From e091c2539f7ca9bb7c7f13a8984834c591e97e93 Mon Sep 17 00:00:00 2001 From: liulujian Date: Wed, 29 Apr 2026 18:13:12 +0800 Subject: [PATCH] chore: local-nodemodules --- local-nodemodules/@gt4/common-front/README.md | 21 + .../@gt4/common-front/package.json | 154 + .../@gtff/tdesign-gt-vue/.browserslistrc | 4 + .../@gtff/tdesign-gt-vue/.eslintrc.js | 65 + .../@gtff/tdesign-gt-vue/README.md | 11 + .../@gtff/tdesign-gt-vue/babel.config.js | 10 + .../es/components/filter-wrapper/index.js | 1 + .../es/components/filter/index.js | 1 + .../es/components/header/index.js | 1 + .../tdesign-gt-vue/es/components/index.js | 1 + .../tdesign-gt-vue/es/core/theme/zh-CH.js | 1 + .../@gtff/tdesign-gt-vue/es/index.js | 3 + .../@gtff/tdesign-gt-vue/es/mixins/menu.js | 1 + .../@gtff/tdesign-gt-vue/es/store/actions.js | 1 + .../@gtff/tdesign-gt-vue/es/store/getters.js | 1 + .../@gtff/tdesign-gt-vue/es/store/index.js | 1 + .../es/store/mutaition-types.js | 1 + .../tdesign-gt-vue/es/store/mutations.js | 1 + .../@gtff/tdesign-gt-vue/es/store/state.js | 1 + .../@gtff/tdesign-gt-vue/es/utils/common.js | 1 + .../@gtff/tdesign-gt-vue/es/utils/index.js | 3 + .../@gtff/tdesign-gt-vue/es/utils/pinyin.js | 1 + .../tdesign-gt-vue/es/utils/request/index.js | 1 + .../es/utils/request/request-interceptors.js | 1 + .../tdesign-gt-vue/es/utils/tool/download.js | 1 + .../es/utils/tool/getBroswer.js | 1 + .../tdesign-gt-vue/es/utils/tool/index.js | 2 + .../tdesign-gt-vue/es/utils/tool/storage.js | 2 + .../@gtff/tdesign-gt-vue/es/utils/tools.js | 1 + .../@gtff/tdesign-gt-vue/es/utils/typeOf.js | 1 + .../es/utils/validator/index.js | 1 + .../es/utils/validator/isCJK.js | 1 + .../es/utils/validator/isCarNum.js | 1 + .../es/utils/validator/isCnName.js | 1 + .../es/utils/validator/isEmail.js | 1 + .../es/utils/validator/isEnName.js | 1 + .../es/utils/validator/isIDCard.js | 1 + .../es/utils/validator/isMobile.js | 1 + .../es/utils/validator/isPassport.js | 1 + .../es/utils/validator/isPermit.js | 1 + .../es/utils/validator/isURL.js | 1 + .../es/utils/validator/isVCode.js | 1 + .../@gtff/tdesign-gt-vue/icon/icon-map.js | 1 + .../@gtff/tdesign-gt-vue/icon/loader.js | 6 + .../@gtff/tdesign-gt-vue/icon/plugin.js | 176 + .../@gtff/tdesign-gt-vue/icon/svg.js | 11 + .../@gtff/tdesign-gt-vue/icon/svg.json | 1 + .../@gtff/tdesign-gt-vue/lib/index.common.js | 21487 ++++++++++++++++ .../@gtff/tdesign-gt-vue/lib/index.css | 1 + .../@gtff/tdesign-gt-vue/package.json | 141 + .../tdesign-gt-vue/plugins/auto-router.js | 143 + .../@gtff/tdesign-gt-vue/prettier.config.js | 39 + .../@gtff/tdesign-gt-vue/stylelint.config.js | 192 + .../vue-route-generator/README.md | 145 + .../vue-route-generator/lib/index.d.ts | 9 + .../vue-route-generator/lib/index.js | 19 + .../vue-route-generator/lib/nested-map.d.ts | 5 + .../vue-route-generator/lib/nested-map.js | 18 + .../vue-route-generator/lib/parse-sfc.d.ts | 8 + .../vue-route-generator/lib/parse-sfc.js | 24 + .../vue-route-generator/lib/resolve.d.ts | 12 + .../vue-route-generator/lib/resolve.js | 177 + .../lib/template/routes.d.ts | 2 + .../lib/template/routes.js | 56 + .../vue-route-generator/package.json | 68 + 65 files changed, 23048 insertions(+) create mode 100644 local-nodemodules/@gt4/common-front/README.md create mode 100644 local-nodemodules/@gt4/common-front/package.json create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/.browserslistrc create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/.eslintrc.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/README.md create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/babel.config.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter-wrapper/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/components/header/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/components/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/core/theme/zh-CH.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/mixins/menu.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/store/actions.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/store/getters.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/store/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutaition-types.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutations.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/store/state.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/common.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/pinyin.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/request-interceptors.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/download.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/getBroswer.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/storage.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tools.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/typeOf.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCJK.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCarNum.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCnName.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEmail.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEnName.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isIDCard.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isMobile.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPassport.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPermit.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isURL.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isVCode.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/icon/icon-map.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/icon/loader.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/icon/plugin.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.json create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/lib/index.common.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/lib/index.css create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/package.json create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/plugins/auto-router.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/prettier.config.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/stylelint.config.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/README.md create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.d.ts create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.d.ts create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.d.ts create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.d.ts create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.d.ts create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.js create mode 100644 local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/package.json diff --git a/local-nodemodules/@gt4/common-front/README.md b/local-nodemodules/@gt4/common-front/README.md new file mode 100644 index 0000000..ae1438c --- /dev/null +++ b/local-nodemodules/@gt4/common-front/README.md @@ -0,0 +1,21 @@ +# @gt4/common + +## 安装 + +pnpm i + +## 启动 + +pnpm dev + +## 编译 + +pnpm build + +## 文档打包 + +pnpm build:site + +## 部署 + +pnpm release diff --git a/local-nodemodules/@gt4/common-front/package.json b/local-nodemodules/@gt4/common-front/package.json new file mode 100644 index 0000000..950abb1 --- /dev/null +++ b/local-nodemodules/@gt4/common-front/package.json @@ -0,0 +1,154 @@ +{ + "name": "@gt4/common-front", + "version": "2.0.113", + "main": "dist/index.js", + "author": "three musketeers", + "description": "gt4 common sdk", + "license": "MIT", + "keywords": [ + "vue" + ], + "files": [ + "dist" + ], + "devDependencies": { + "@babel/core": "7.19.0", + "@babel/eslint-parser": "7.18.9", + "@babel/plugin-proposal-class-properties": "7.18.6", + "@babel/plugin-syntax-jsx": "7.18.6", + "@babel/plugin-transform-runtime": "7.18.10", + "@babel/preset-env": "7.19.0", + "@babel/preset-react": "7.18.6", + "@babel/preset-typescript": "7.18.6", + "@babel/runtime": "7.19.0", + "@changesets/cli": "2.24.4", + "@commitlint/cli": "12.1.4", + "@commitlint/config-conventional": "12.1.4", + "@fortawesome/fontawesome-svg-core": "6.2.0", + "@fortawesome/free-solid-svg-icons": "6.2.0", + "@fortawesome/react-fontawesome": "0.2.0", + "@gtff/tdesign-gt-vue": "1.4.5", + "@ianvs/prettier-plugin-sort-imports": "3.4.2", + "@rollup/plugin-babel": "5.1.0", + "@rollup/plugin-commonjs": "18.0.0", + "@rollup/plugin-json": "4.1.0", + "@rollup/plugin-node-resolve": "11.2.1", + "@rollup/plugin-replace": "2.4.2", + "@rollup/plugin-strip": "2.1.0", + "@rollup/plugin-url": "5.0.1", + "@seanix/cz-emoji-lerna-changelog": "1.0.3", + "@sy/vitest-ui": "0.0.1", + "@types/node": "18.7.13", + "@vitejs/plugin-vue-jsx": "3.0.1", + "@vitest/coverage-c8": "0.30.1", + "@vue/babel-helper-vue-jsx-merge-props": "1.4.0", + "@vue/babel-preset-jsx": "1.4.0", + "@vue/test-utils": "1.3.0", + "@wecity/tdesign-vue-ie": "1.4.5", + "axios": "0.27.2", + "babel-loader": "8.2.5", + "classnames": "2.3.1", + "commitizen": "4.2.5", + "cross-env": "7.0.3", + "css-loader": "5.2.7", + "css-properties-sorting": "1.0.10", + "esbuild": "0.15.5", + "eslint": "8.23.0", + "eslint-config-airbnb-base": "15.0.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-import": "2.26.0", + "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-vue": "9.4.0", + "husky": "8.0.1", + "inquirer": "8.2.4", + "jsdom": "^22.0.0", + "less": "4.1.3", + "less-loader": "11.0.0", + "lint-staged": "10.5.4", + "lodash-es": "4.17.21", + "mini-html-webpack-plugin": "3.1.3", + "nodemon": "2.0.20", + "postcss": "8.4.16", + "postcss-less": "^6.0.0", + "prettier": "2.7.1", + "prop-types": "15.8.1", + "qs": "6.11.0", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-github-btn": "1.4.0", + "react-is": "18.2.0", + "react-rainbow-components": "1.31.0", + "rimraf": "3.0.2", + "rollup": "2.63.0", + "rollup-plugin-analyzer": "3.3.0", + "rollup-plugin-esbuild": "4.8.2", + "rollup-plugin-ignore-import": "1.3.2", + "rollup-plugin-less": "1.1.3", + "rollup-plugin-multi-input": "1.1.1", + "rollup-plugin-postcss": "4.0.1", + "rollup-plugin-static-import": "0.1.1", + "rollup-plugin-styles": "4.0.0", + "rollup-plugin-terser": "~7.0.2", + "rollup-plugin-vue": "5.1.9", + "rollup-pluginutils": "2.8.2", + "style-loader": "2.0.0", + "stylelint": "14.11.0", + "stylelint-config-prettier": "9.0.3", + "stylelint-config-recommended-vue": "1.4.0", + "stylelint-config-tencent": "1.0.0", + "stylelint-order": "5.0.0", + "tdesign-icons-vue": "0.0.8", + "tdesign-vue": "1.4.5", + "unplugin-auto-import": "0.11.2", + "unplugin-vue-components": "0.22.4", + "vite": "4.3.5", + "vite-plugin-vue2": "2.0.2", + "vitest": "0.31.0", + "vue": "2.6.14", + "vue-loader": "15.10.0", + "vue-styleguidist": "4.54.1", + "vue-template-compiler": "2.6.14", + "vuex": "3.4.0", + "webpack": "5.74.0" + }, + "peerDependencies": { + "@gtff/tdesign-gt-vue": "1.4.5", + "@wecity/tdesign-vue-ie": "1.4.5", + "tdesign-icons-vue": "0.0.8", + "tdesign-vue": "1.4.5", + "vuex": "3.4.0" + }, + "lint-staged": { + "src/**/*.{js,ts,tsx,jsx,vue}": "pnpm lint", + "src/**/*.{vue,less,css,html}": "pnpm lint:style" + }, + "dependencies": { + "@wecity/http-json-key-format": "0.0.4-alpha", + "chalk": "2.4.2", + "cross-spawn": "^7.0.3", + "dayjs": "1.11.5", + "qrcodejs2": "0.0.3", + "rollup-plugin-filesize": "^9.1.2", + "uuid": "^9.0.0", + "vue-frag": "1.4.1", + "xwcj-sdk-h5": "1.0.28", + "yargs-parser": "^21.1.1" + }, + "engines": { + "pnpm": ">6" + }, + "scripts": { + "dev": "vue-styleguidist server --open", + "dev:nodemon": "cross-env NODE_ENV=development nodemon -x vue-styleguidist server", + "prebuild": "rimraf es && rimraf esm && rimraf lib && rimraf dist", + "build:less": "lessc src/style/global.less dist/global.css && lessc src/style/ie.less dist/ie.css", + "build": "cross-env NODE_ENV=production rollup -c ./rollup.config.js && pnpm build:less", + "build:site": "cross-env NODE_ENV=production vue-styleguidist build", + "release": "node ./publish.js", + "lint": "eslint --fix", + "lint:style": "stylelint --fix", + "test": "vitest", + "coverage": "vitest run --coverage", + "vitest-ui": "vitest --ui" + } +} \ No newline at end of file diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/.browserslistrc b/local-nodemodules/@gtff/tdesign-gt-vue/.browserslistrc new file mode 100644 index 0000000..408f951 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/.browserslistrc @@ -0,0 +1,4 @@ +> 1% +last 2 versions +ie > 8 +chrome > 69 diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/.eslintrc.js b/local-nodemodules/@gtff/tdesign-gt-vue/.eslintrc.js new file mode 100644 index 0000000..fae34e2 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/.eslintrc.js @@ -0,0 +1,65 @@ +module.exports = { + root: true, + env: { + node: true, + browser: true, + }, + extends: ['plugin:vue/essential', 'airbnb-base', 'plugin:prettier/recommended'], + parserOptions: { + parser: 'babel-eslint', + ecmaFeatures: { + jsx: true, + }, + }, + plugins: ['import'], + settings: { + // 别名 + 'import/resolver': { + alias: { + map: [['@', './src/']], + extensions: ['.js', '.vue'], + }, + }, + }, + rules: { + 'func-names': 0, + 'import/extensions': 0, + 'no-unused-expressions': 0, + /** + * 导入语句前不允许有任何非导入语句 + */ + 'import/first': 'error', + /** + * 禁止重复导入模块 + */ + 'import/no-duplicates': 'error', + /** + * 禁止使用 let 导出 + */ + 'import/no-mutable-exports': 'warn', + /** + * 禁用导入的模块时使用 webpack 特有的语法(感叹号) + */ + 'import/no-webpack-loader-syntax': 'warn', + /** + * 当只有一个导出时,必须使用 export default 来导出 + */ + 'import/prefer-default-export': 'off', + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: true, + }, + ], + 'no-plusplus': [ + 'error', + { + allowForLoopAfterthoughts: true, + }, + ], + 'import/no-dynamic-require': 0, + 'global-require': 0, + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + }, +}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/README.md b/local-nodemodules/@gtff/tdesign-gt-vue/README.md new file mode 100644 index 0000000..e2f78ae --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/README.md @@ -0,0 +1,11 @@ +存放 vue2 版本的税务行业 UI 组件,只实现页面交互,无数据接口对接 + +## 构建样式 + +```sh +# 实时监听编译less +yarn dev:css + +# 构建样式 +yarn build:less +``` diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/babel.config.js b/local-nodemodules/@gtff/tdesign-gt-vue/babel.config.js new file mode 100644 index 0000000..0348cdc --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/babel.config.js @@ -0,0 +1,10 @@ +module.exports = { + presets: [ + [ + '@vue/cli-plugin-babel/preset', + { + useBuiltIns: 'entry', + }, + ], + ], +}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter-wrapper/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter-wrapper/index.js new file mode 100644 index 0000000..02c16fb --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter-wrapper/index.js @@ -0,0 +1 @@ +function r(){return r=Object.assign||function(r){for(var e,t=1;tr.length)&&(e=r.length);for(var t=0,n=new Array(e);t1){var y=Array(this.colNum*p-f).fill("");o.splice.apply(o,[o.length-1,0].concat(u(y)))}var h={props:s({},this.rowProps)};return e("t-row",a([{},h]),[o.map((function(t,n){var o=i.includes(n)?0:12/r.colNum;return e("t-col",a([{},{props:{span:o,key:n},domProps:{"data-index":n}}]),[t])}))])}},render:function(){var r=arguments[0];return r("div",{class:"g-filter-wrapper"},[this.renderContent()])}};export{f as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter/index.js new file mode 100644 index 0000000..23da3d4 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/components/filter/index.js @@ -0,0 +1 @@ +function r(){return r=Object.assign||function(r){for(var t,e=1;er.length)&&(t=r.length);for(var e=0,n=new Array(t);e1){var v=Array(this.colNum*h-d).fill("");o.splice.apply(o,[o.length-1,0].concat(u(v)))}var y={props:s({},this.rowProps)};return t("t-row",a([{},y]),[o.map((function(e,n){var o=(e.data||{}).attrs,i=void 0===o?{}:o,c=+i["g-col-num"]||+i.gColNum||1,u=f.includes(n)?0:12/r.colNum*c;return t("t-col",a([{},{props:{span:u,key:n},domProps:{"data-index":n}}]),[e])}))])}},render:function(){var r=arguments[0];return r("div",{class:"g-filter-wrapper"},[this.renderContent()])}};export{f as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/components/header/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/components/header/index.js new file mode 100644 index 0000000..0b77c0d --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/components/header/index.js @@ -0,0 +1 @@ +import{mapState as e}from"vuex";function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n,r,o,i,a,s,c,l){"boolean"!=typeof a&&(c=s,s=a,a=!1);var u,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),r&&(d._scopeId=r),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):t&&(u=a?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,t){return u.call(t),p(e,t)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return n}var o={name:"HeaderUser",data:function(){return{options:[{content:"退出登录",value:"handleLogout"}]}},computed:function(e){for(var r=1;r> changeHandler",e),"normal"===this.topbarExpandType)&&(this.$router&&(this.$route&&this.$route.path)!==e&&this.$router.push(e))},setTopbarActiveMenuItem:function(){var e=this.getActiveMenuItem(this.topbarConfig,this.active);this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_TOPBAR_ACTIVE_MENU_ITEM),e||{})},getActiveMenuItem:function(e,t){for(var n,r=e.length,o=0;o> changeHandler",e),"normal"===this.topbarExpandType)&&(this.$router&&(this.$route&&this.$route.path)!==e&&this.$router.push(e))},setTopbarActiveMenuItem:function(){var e=this.getActiveMenuItem(this.topbarConfig,this.active);this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_TOPBAR_ACTIVE_MENU_ITEM),e||{})},getActiveMenuItem:function(e,t){for(var n,i=e.length,r=0;r-1&&O.indexOf("MSIE")>-1,k=O.indexOf("Trident")>-1&&O.indexOf("rv:11.0")>-1,x||k?["ripple"]:[])},pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条"},calendar:{fillWithZero:!1,yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:["周一","周二","周三","周四","周五","周六","周日"].join(),cellMonth:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"].join()},transfer:{title:"{checked} / {total}",empty:"暂无数据",placeholder:"请输入"},dialog:{confirm:"确定",cancel:"取消",confirmBtnTheme:{default:"primary",info:"primary",warning:"warning",danger:"danger",success:"success"}},drawer:{confirm:"确定",cancel:"取消"},popconfirm:{confirm:"确定",cancel:"取消",confirmBtnTheme:{default:"primary",warning:"warning",danger:"danger"}},table:{empty:"暂无数据",expandIcon:function(e){return e&&e(o)},sortIcon:function(e){return e&&e(s)}},tree:{empty:"暂无数据",folderIcon:function(e){return e&&e(l)}},select:{empty:"暂无数据",loadingText:"加载中...",clearIcon:function(e){return e&&e(c)}},treeSelect:{empty:"暂无数据",loadingText:"加载中..."},steps:{errorIcon:function(e){return e&&e(u)}}};function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n path:",e,"; activeKey:",n),this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_SIDEBAR_ACTIVE_KEY),n||""),this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_SIDEBAR_ACTIVE_MENU_ITEM),i||{})},sidebarActiveKey:function(e){this.setDefaultSelectedKey(e)},sideBarConfig:function(){var e=this.getRouteKey(this.sideBarConfig,this.$route.path).activeKey;this.setDefaultSelectedKey(e)},sidebarExpanded:function(e){console.log("sidebarExpanded => expanded",e),this.expanded=e,this.concatCurrentParentMenu()}},methods:{getRouteKey:function(e,t){for(var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.length,a="",o="",s=0;st)},onExpand:function(e){this.expanded=e}}},I=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("t-menu",{staticClass:"g-sidebar",attrs:{theme:"light",value:e.active,mode:"accordion",width:"100%",collapsed:e.isSideBarCollapse,defaultExpanded:e.expanded},on:{expand:e.onExpand}},[e._t("top"),e._v(" "),e._l(e.sideBarConfig,(function(t,i){return[t.children&&e.limitLevel(t,1)?n("t-submenu",{key:i,attrs:{value:t.key||t.name}},[t.imgUrl?n("img",{staticClass:"t-icon g-menu-icon",attrs:{slot:"icon",src:t.imgUrl},slot:"icon"}):n("t-icon",{attrs:{slot:"icon",name:t.iconClassName||"setting",url:t.iconFontUrl},slot:"icon"}),e._v(" "),n("span",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(t.name))]),e._v(" "),e._l(t.children,(function(t,i){return[t.children&&e.limitLevel(t,2)?n("t-submenu",{key:i,attrs:{value:t.key||t.name}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(t.name))]),e._v(" "),e._l(t.children,(function(t,i){return[n("t-menu-item",{key:i,attrs:{value:t.key||t.href||t.path||t.name},nativeOn:{click:function(n){return e.onItemClick(t)}}},[n("tooltip-label",{attrs:{label:t.name}})],1)]}))],2):n("t-menu-item",{key:i,attrs:{value:t.key||t.href||t.path||t.name},nativeOn:{click:function(n){return e.onItemClick(t)}}},[n("tooltip-label",{attrs:{label:t.name}})],1)]}))],2):n("t-menu-item",{key:i,attrs:{value:t.key||t.href||t.path||t.name},nativeOn:{click:function(n){return e.onItemClick(t)}}},[t.imgUrl?n("img",{staticClass:"t-icon g-menu-icon",attrs:{slot:"icon",src:t.imgUrl},slot:"icon"}):n("t-icon",{attrs:{slot:"icon",name:t.iconClassName||"setting",url:t.iconFontUrl},slot:"icon"}),e._v(" "),n("tooltip-label",{attrs:{label:t.name}})],1)]})),e._v(" "),n("div",{attrs:{slot:"options"},slot:"options"},[n("t-icon",{attrs:{name:e.iconName},nativeOn:{click:function(t){return e.toggleSideBar.apply(null,arguments)}}})],1)],2)};I._withStripped=!0;var z=g({render:I,staticRenderFns:[]},undefined,V,undefined,false,undefined,!1,void 0,void 0,void 0);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function G(e){for(var t=1;tt&&"#"!==t?1:-1}));this.orderedElementArr=t.map((function(t){return{key:t,list:e.orderedElementObj[t]}}))},onCheck:function(e,t){var i=this.getObjectValueByKey(e);t?this.checkedKeys.push(i):this.$set(this,"checkedKeys",E(new Set(n(this.checkedKeys,[i])))),this.$emit("changecheck",{checkedKeys:this.checkedKeys})},onCheckAllChange:function(e){this.checkedKeys=this.getFilterDisabledKey(e),this.$emit("changecheck",{checkedKeys:this.checkedKeys})},dealElement:function(e){var t=i(e),n=this.getFirstLetterKey(e);this.orderedElementObj[n]||(this.orderedElementObj[n]=[]),this.orderedElementObj[n].push(t)},getPersonList:function(){var e=this;this.classify?(this.elementLists.forEach((function(t){e.dealElement(t)})),this.sortElementKey()):this.orderedElementArr=[{key:"all",list:i(this.elementLists)}]},getFirstLetterKey:function(e){var t,n=e[this.optionKey.label],i=n.slice(0,1),r="#";if(t=i,new RegExp("[\\u4E00-\\u9FFF]+","g").test(t)){var a=function(e){for(var t=e.length,n="",i=new RegExp("[a-zA-Z0-9- ]"),r=0;r0;)n=n.replace("--","-");return n}(n);r=a[0].toUpperCase()}else(function(e){return new RegExp("^[a-zA-Z]+$","g").test(e)})(i)&&(r=i.toUpperCase());return r},getObjectValueByKey:function(e){var t=this.optionKey.value;return this.objectKey?e[t][this.objectKey]:e[t]},getCurrentElementsAllKey:function(){var e=this;return this.elementLists.map((function(t){return e.getObjectValueByKey(t)}))},getFilterDisabledKey:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.getCurrentElementsAllKey()||[];return n.filter((function(n){return e.disabledValues.includes(n)?e.checkedKeys.includes(n):t}))}}},J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"list__content-header"},[n("t-checkbox",{attrs:{indeterminate:e.indeterminate},on:{change:e.onCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("\n 全选(共"+e._s(e.checkedKeys.length)+"/"+e._s(e.total)+")\n ")])],1),e._v(" "),n("t-checkbox-group",{attrs:{value:e.checkedKeys}},e._l(e.orderedElementArr,(function(t){return n("div",{key:t.key},[e.classify?n("div",{staticClass:"list__content-title"},[e._v(e._s(t.key))]):e._e(),e._v(" "),n("div",{staticClass:"list__content-list"},e._l(t.list,(function(t,i){return n("div",{key:i,class:{"list__content-item":!0,"g-is-selected":e.checkedKeys.includes(e.getObjectValueByKey(t))},attrs:{title:t[e.optionKey.label]+(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")}},[n("t-checkbox",{attrs:{disabled:e.disabledValues.includes(e.getObjectValueByKey(t)),value:e.getObjectValueByKey(t),item:t},on:{change:function(n){for(var i=arguments.length,r=Array(i);i--;)r[i]=arguments[i];return e.onCheck.apply(void 0,[t].concat(r))}}},[e._v("\n "+e._s(t[e.optionKey.label])+"\n "),n("span",{staticClass:"list__content-description"},[e._v(e._s(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":""))])])],1)})),0)])})),0)],1)};J._withStripped=!0;var X={model:{prop:"selectedItems",event:"change"},components:{Splitpanes:d,Pane:h,List:g({render:J,staticRenderFns:[]},undefined,H,undefined,false,undefined,!1,void 0,void 0,void 0)},data:function(){return{isDefault:!0,searchOptionKey:{},selectedContent:[],selectedValues:[]}},props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},top:{type:[String,Number],default:"10%"},width:{type:[String,Number],default:720},leftWidthPercent:{type:[String,Number],default:20},targetText:{type:String,default:""},classify:{type:Boolean,default:!0},search:{type:Boolean,default:!1},optionKey:{type:Object,default:function(){return{label:"label",value:"value",description:"description"}}},objectKey:{type:String,default:void 0},elementLists:{type:Array,default:function(){return[]}},disabledValues:{type:Array,default:function(){return[]}},selectedItems:{type:Array,default:function(){return[]}},defaultSelectedItems:{type:Array,default:function(){return[]}}},computed:{isVisibleSelectDialog:function(){return this.visible}},watch:{visible:function(){this.visible&&this.initSelected()},selectedItems:function(){console.log("GSelectDialog component ==> selectedItems change:",this.selectedItems),this.changeLocalSelected(this.selectedItems),this.isDefault=!1},selectedValues:function(e,t){JSON.stringify(e)!==JSON.stringify(t)&&(this.selectedContent=this.getSelectedContent(this.selectedValues))}},mounted:function(){this.initConfig(),this.visible&&this.initSelected()},methods:{initConfig:function(){this.visible&&this.initSelected()},initSelected:function(){var e=this.selectedItems;this.isDefault&&!this.selectedItems.length&&(e=this.defaultSelectedItems),this.changeLocalSelected(e)},changeLocalSelected:function(e){this.selectedContent=i(e),this.selectedValues=this.getSelectedValues(e)},add:function(e){this.selectedContent=this.getUniqList(this.selectedContent,e),this.selectedValues=this.getSelectedValues(this.selectedContent),console.log("GSelectDialog component ==> selectedContent:",this.selectedContent)},remove:function(e){this.deleteSelected(e)},getObjectValueByKey:function(e){var t=this.optionKey.value;return this.objectKey?e[t][this.objectKey]:e[t]},getSelectedValues:function(e){var t=this;return e.map((function(e){return t.getObjectValueByKey(e)}))},getSelectedContent:function(e){var t=this;return this.getUniqList(this.selectedContent,this.elementLists).filter((function(n){var i=t.getObjectValueByKey(n);return e.includes(i)}))},getUniqList:function(e,t){var n=this;return r([].concat(e,t),(function(e,t){return a(n.getObjectValueByKey(e),n.getObjectValueByKey(t))}))},getCurrentElementsAllKey:function(){var e=this;return this.elementLists.map((function(t){return e.getObjectValueByKey(t)}))},changeSelected:function(e){var t=this.getCurrentElementsAllKey(),n=this.selectedValues.filter((function(e){return!t.includes(e)})),i=e.checkedKeys;this.selectedValues=n.concat(i)},deleteSelected:function(e){var t=this,n=this.selectedContent.map((function(e){return t.getObjectValueByKey(e)}));this.selectedValues=n.filter((function(n){return n!==t.getObjectValueByKey(e)}))},closeDialog:function(){this.$emit("update:visible",!1)},cancelDialog:function(e){this.$emit("cancel",e)},confirmDialog:function(){this.isDefault=!1,this.$emit("change",this.selectedContent),console.log("GSelectDialog component ==> confirmDialog selectedItems:",this.selectedContent),this.$emit("ok",this.selectedContent),this.$emit("update:visible",!1)},resize:function(e){this.$emit("resize",e)}}},Y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("t-dialog",{staticClass:"g-select-dialog",attrs:{width:e.width,top:e.top,visible:e.isVisibleSelectDialog},on:{close:e.closeDialog,cancel:e.cancelDialog,confirm:e.confirmDialog}},[n("div",{staticClass:"g-select-dialog__header",attrs:{slot:"header"},slot:"header"},[n("span",{staticClass:"g-select-dialog__title",domProps:{textContent:e._s(e.title||"请选择"+e.targetText)}}),e._v(" "),e.$slots.search?n("div",{staticClass:"g-select-dialog__header-right"},[e._t("search")],2):e._e()]),e._v(" "),n("div",{attrs:{slot:"body"},slot:"body"},[n("div",{staticClass:"g-select-dialog__content"},[n("splitpanes",{staticClass:"default-theme",on:{resize:e.resize}},[e.$slots.leftContent?n("pane",{staticClass:"g-select-dialog__content-left",attrs:{"min-size":"15",size:e.leftWidthPercent}},[e._t("leftContent")],2):e._e(),e._v(" "),n("pane",{attrs:{"min-size":"15"}},[n("list",{staticClass:"g-select-dialog__content-right",attrs:{"checked-values":e.selectedValues,"disabled-values":e.disabledValues,"element-lists":e.elementLists,"option-key":e.optionKey,"object-key":e.objectKey,classify:e.classify},on:{changecheck:e.changeSelected}})],1)],1)],1),e._v(" "),n("div",{staticClass:"g-selected-result"},[n("span",{staticClass:"g-selected-result_title"},[e._v(e._s(e.targetText)+"(已选"+e._s(e.selectedContent.length)+")")]),e._v(" "),n("div",{staticClass:"g-selected-result_content"},e._l(e.selectedContent,(function(t,i){return n("t-popup",{key:e.getObjectValueByKey(t),attrs:{content:t[e.optionKey.label]+(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")}},[n("t-tag",{staticClass:"g-selected-result_item",attrs:{"max-width":"210",closable:"",disabled:e.disabledValues.includes(e.getObjectValueByKey(t))},on:{close:function(n){return e.deleteSelected(t,i)}}},[e._v(e._s(t[e.optionKey.label]+(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")))])],1)})),1)])])])],1)};Y._withStripped=!0;var Z=g({render:Y,staticRenderFns:[]},undefined,X,undefined,false,undefined,!1,void 0,void 0,void 0),Q={data:function(){return{searchValue:this.defaultValue}},props:{width:{type:[String,Number],default:280},placeholder:{type:String,default:"请输入搜索内容"},defaultValue:{type:String,default:""},optionKey:{type:Object,default:function(){return{label:"label",value:"value",description:"description",info:"info"}}},elementLists:{type:Array,default:function(){return[]}},disabledValues:{type:Array,default:function(){return[]}}},methods:{getObjectValueByKey:function(e){var t=this.optionKey.value;return this.objectKey?e[t][this.objectKey]:e[t]},handleClear:function(e){console.log("search component ==> clear",e),this.$emit("clear",e)},handleChange:function(e,t){console.log("search component ==> change",e,t),this.$emit("change",e,t)},handleEnter:function(e,t){console.log("search component ==> enter",e,t),this.$emit("enter",e,t)},handleClick:function(e,t){console.log("search component ==> click",e,t),this.$emit("click",e,t),this.searchValue=""}}},ee=Q,te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"g-search"},[n("t-popup",{attrs:{trigger:"focus",placement:"bottom-right","overlay-class-name":"g-search-popup"}},[n("t-input",{attrs:{placeholder:e.placeholder,clearable:""},on:{enter:e.handleEnter,change:e.handleChange,clear:e.handleClear},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[n("t-icon",{attrs:{slot:"suffix-icon",name:"search"},slot:"suffix-icon"})],1),e._v(" "),e.elementLists&&e.elementLists.length?n("template",{slot:"content"},e._l(e.elementLists,(function(t,i){return n("div",{key:i,staticClass:"g-search-item",style:"width: "+e.width+("number"==typeof e.width?"px;":";")},[n("div",{staticClass:"g-search-item__wrapper"},[n("div",{staticClass:"g-search-item__content"},[n("span",{staticClass:"g-search-item__label"},[e._v(e._s(t[e.optionKey.label]))]),e._v("\n "+e._s(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")+"\n ")]),e._v(" "),t[e.optionKey.info]?n("div",{staticClass:"g-search-item__info"},[e._v(e._s(t[e.optionKey.info]))]):e._e()]),e._v(" "),n("t-button",{staticClass:"g-search-item__add-btn",attrs:{variant:"text",theme:"primary",disabled:e.disabledValues.includes(e.getObjectValueByKey(t))},on:{click:function(n){return e.handleClick(t,i)}}},[e._v("加入已选")])],1)})),0):e._e()],2)],1)};te._withStripped=!0;var ne=g({render:te,staticRenderFns:[]},undefined,ee,undefined,false,undefined,!1,void 0,void 0,void 0);function ie(){return ie=Object.assign||function(e){for(var t,n=1;n1){var u=Array(this.colNum*c-l).fill("");r.splice.apply(r,[r.length-1,0].concat(E(u)))}var d={props:ue({},this.rowProps)};return t("t-row",le([{},d]),[r.map((function(n,i){var r=a.includes(i)?0:12/e.colNum;return t("t-col",le([{},{props:{span:r,key:i},domProps:{"data-index":i}}]),[n])}))])}},render:function(){var e=arguments[0];return e("div",{class:"g-filter-wrapper"},[this.renderContent()])}};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function pe(e){for(var t=1;t1){var h=Array(this.colNum*d-u).fill("");r.splice.apply(r,[r.length-1,0].concat(E(h)))}var p={props:pe({},this.rowProps)};return t("t-row",le([{},p]),[r.map((function(n,i){var r=(n.data||{}).attrs,a=void 0===r?{}:r,o=+a["g-col-num"]||+a.gColNum||1,s=l.includes(i)?0:12/e.colNum*o;return t("t-col",le([{},{props:{span:s,key:i},domProps:{"data-index":i}}]),[n])}))])}},render:function(){var e=arguments[0];return e("div",{class:"g-filter-wrapper"},[this.renderContent()])}};function ge(e,t,n,i,r,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,r)}var me={exports:{}},ve={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ve),function(e){var t=ve.exports,n=function(e){var n,i=Object.prototype,r=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var r=t&&t.prototype instanceof v?t:v,a=Object.create(r.prototype),o=new K(i||[]);return a._invoke=function(e,t,n){var i=h;return function(r,a){if(i===f)throw new Error("Generator is already running");if(i===g){if("throw"===r)throw a;return P()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=S(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var l=d(e,t,n);if("normal"===l.type){if(i=n.done?g:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=g,n.method="throw",n.arg=l.arg)}}}(e,n,o),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var h="suspendedStart",p="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var _={};c(_,o,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(A([])));w&&w!==i&&r.call(w,o)&&(_=w);var O=b.prototype=v.prototype=Object.create(_);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,n){function i(a,o,s,l){var c=d(e[a],e,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"===t(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(e){i("next",e,s,l)}),(function(e){i("throw",e,s,l)})):n.resolve(h).then((function(e){u.value=e,s(u)}),(function(e){return i("throw",e,s,l)}))}l(c.arg)}var a;this._invoke=function(e,t){function r(){return new n((function(n,r){i(e,t,n,r)}))}return a=a?a.then(r,r):r()}}function S(e,t){var i=e.iterator[t.method];if(i===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,S(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=d(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function K(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:A(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=n),m}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=n}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}(me);var ye=me.exports,be=null,_e=0,Ce={name:"GTabRoute",props:{isOpen:{type:Boolean,default:!0},isCacheMode:{type:Boolean,default:!0},maxTabCount:{type:Number,default:20},extraClass:{type:String,default:""},extraContentClass:{type:String,default:""}},data:function(){return{panelData:[],value:null}},watch:{isOpen:function(e){e&&this.dealRouteChange(this.$route)},$route:function(e){this.isOpen&&this.dealRouteChange(e)}},created:function(){var e=this;this.$router.beforeEach((function(t,n,i){var r,a;if(e.isOpen&&e.panelData.length>=e.maxTabCount)return e.panelData.find((function(e){return e.name===t.name}))?void i():void(be=e.$dialog.alert({header:"提示",body:"最多可同时开启 ".concat(e.maxTabCount," 个页签,请关闭其他页签后重试!"),theme:"warning",onConfirm:(r=ye.mark((function e(){return ye.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:be&&be.hide();case 1:case"end":return e.stop()}}),e)})),a=function(){var e=this,t=arguments;return new Promise((function(n,i){var a=r.apply(e,t);function o(e){ge(a,n,i,o,s,"next",e)}function s(e){ge(a,n,i,o,s,"throw",e)}o(void 0)}))},function(){return a.apply(this,arguments)})}));i()}))},methods:{dealRouteChange:function(e){var t=this.panelData.find((function(t){return t.name===e.name}));t?this.value=t.value:this.dealAddTab(e)},dealAddTab:function(e){var t=e.meta.title;_e+=1,this.panelData.push({label:t||e.path,value:_e,removable:!0,path:e.path,name:e.name,params:e.params,query:e.query}),this.$set(this.panelData[0],"removable",1!==this.panelData.length),this.value=_e},removeTab:function(e){var t=e.value,n=this.panelData.findIndex((function(e){return e.value===t}));return n<0||(this.panelData.splice(n,1),1===this.panelData.length&&this.$set(this.panelData[0],"removable",!1),this.value===t&&this.changeTab(this.panelData[Math.max(n-1,0)].value)),!1},changeTab:function(e){this.value=e;var t=this.panelData.find((function(t){return t.value===e}));this.$router.push({path:t.path,params:t.params,query:t.query})}}},we=Ce,Oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"g-tabRoute__container",class:e.extraClass},[e.isOpen?[n("t-tabs",{attrs:{value:e.value,theme:"card"},on:{remove:e.removeTab,change:e.changeTab}},e._l(e.panelData,(function(t){return n("t-tab-panel",{key:t.value,attrs:{value:t.value,removable:t.removable}},[n("div",{staticClass:"g-label__container",attrs:{slot:"label"},slot:"label"},[n("t-tooltip",{attrs:{content:t.label,placement:"top","show-arrow":""}},[n("div",{staticClass:"g-label__content"},[n("div",{staticClass:"g-tab-item-text"},[e._v(e._s(t.label))]),e._v(" "),n("div",{staticClass:"g-tab-item-cover"}),e._v(" "),n("div",{staticClass:"g-tab-item-line"})])])],1)])})),1),e._v(" "),e.isCacheMode?n("keep-alive",[e._t("default",(function(){return[n("router-view",{class:e.extraContentClass})]}))],2):e._t("default",(function(){return[n("router-view",{class:e.extraContentClass})]}))]:e._t("default",(function(){return[n("router-view",{class:e.extraContentClass})]}))],2)};Oe._withStripped=!0;var xe=g({render:Oe,staticRenderFns:[]},undefined,we,undefined,false,undefined,!1,void 0,void 0,void 0);export{fe as GFilter,de as GFilterWrapper,w as GHeader,U as GLayout,ne as GSearch,Z as GSelectDialog,z as GSidebar,xe as GTabRoute}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/core/theme/zh-CH.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/core/theme/zh-CH.js new file mode 100644 index 0000000..6d59301 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/core/theme/zh-CH.js @@ -0,0 +1 @@ +import{ChevronDownIcon as e,CaretDownSmallIcon as n,CaretRightSmallIcon as r,CloseCircleFilledIcon as t,ErrorIcon as o}from"tdesign-icons-vue";var i,a,c,l={animation:{exclude:(i=navigator.userAgent,a=i.indexOf("compatible")>-1&&i.indexOf("MSIE")>-1,c=i.indexOf("Trident")>-1&&i.indexOf("rv:11.0")>-1,a||c?["ripple"]:[])},pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条"},calendar:{fillWithZero:!1,yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:["周一","周二","周三","周四","周五","周六","周日"].join(),cellMonth:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"].join()},transfer:{title:"{checked} / {total}",empty:"暂无数据",placeholder:"请输入"},dialog:{confirm:"确定",cancel:"取消",confirmBtnTheme:{default:"primary",info:"primary",warning:"warning",danger:"danger",success:"success"}},drawer:{confirm:"确定",cancel:"取消"},popconfirm:{confirm:"确定",cancel:"取消",confirmBtnTheme:{default:"primary",warning:"warning",danger:"danger"}},table:{empty:"暂无数据",expandIcon:function(n){return n&&n(e)},sortIcon:function(e){return e&&e(n)}},tree:{empty:"暂无数据",folderIcon:function(e){return e&&e(r)}},select:{empty:"暂无数据",loadingText:"加载中...",clearIcon:function(e){return e&&e(t)}},treeSelect:{empty:"暂无数据",loadingText:"加载中..."},steps:{errorIcon:function(e){return e&&e(o)}}};export{l as zhCH}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/index.js new file mode 100644 index 0000000..86c6c58 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/index.js @@ -0,0 +1,3 @@ +import{mapState as e}from"vuex";import{merge as t,difference as n,cloneDeep as r,uniqWith as i,isEqual as o}from"lodash-es";import{ChevronDownIcon as a,CaretDownSmallIcon as s,CaretRightSmallIcon as c,CloseCircleFilledIcon as l,ErrorIcon as u}from"tdesign-icons-vue";import{Splitpanes as d,Pane as h}from"splitpanes";import f from"axios";import p from"qs";function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e,t,n,r,i,o,a,s,c,l){"boolean"!=typeof a&&(c=s,s=a,a=!1);var u,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),r&&(d._scopeId=r),o?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=u):t&&(u=a?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),u)if(d.functional){var h=d.render;d.render=function(e,t){return u.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,u):[u]}return n}var y={name:"HeaderUser",data:function(){return{options:[{content:"退出登录",value:"handleLogout"}]}},computed:function(e){for(var t=1;t> changeHandler",e),"normal"===this.topbarExpandType)&&(this.$router&&(this.$route&&this.$route.path)!==e&&this.$router.push(e))},setTopbarActiveMenuItem:function(){var e=this.getActiveMenuItem(this.topbarConfig,this.active);this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_TOPBAR_ACTIVE_MENU_ITEM),e||{})},getActiveMenuItem:function(e,t){for(var n,r=e.length,i=0;i-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;return!(!t&&!n)}var A={animation:{exclude:w()?["ripple"]:[]},pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条"},calendar:{fillWithZero:!1,yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:["周一","周二","周三","周四","周五","周六","周日"].join(),cellMonth:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"].join()},transfer:{title:"{checked} / {total}",empty:"暂无数据",placeholder:"请输入"},dialog:{confirm:"确定",cancel:"取消",confirmBtnTheme:{default:"primary",info:"primary",warning:"warning",danger:"danger",success:"success"}},drawer:{confirm:"确定",cancel:"取消"},popconfirm:{confirm:"确定",cancel:"取消",confirmBtnTheme:{default:"primary",warning:"warning",danger:"danger"}},table:{empty:"暂无数据",expandIcon:function(e){return e&&e(a)},sortIcon:function(e){return e&&e(s)}},tree:{empty:"暂无数据",folderIcon:function(e){return e&&e(c)}},select:{empty:"暂无数据",loadingText:"加载中...",clearIcon:function(e){return e&&e(l)}},treeSelect:{empty:"暂无数据",loadingText:"加载中..."},steps:{errorIcon:function(e){return e&&e(u)}}};function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n path:",e,"; activeKey:",n),this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_SIDEBAR_ACTIVE_KEY),n||""),this.$store.commit("global/".concat(this.$storeGlobalTypes.SET_SIDEBAR_ACTIVE_MENU_ITEM),r||{})},sidebarActiveKey:function(e){this.setDefaultSelectedKey(e)},sideBarConfig:function(){var e=this.getRouteKey(this.sideBarConfig,this.$route.path).activeKey;this.setDefaultSelectedKey(e)},sidebarExpanded:function(e){console.log("sidebarExpanded => expanded",e),this.expanded=e,this.concatCurrentParentMenu()}},methods:{getRouteKey:function(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=e.length,o="",a="",s=0;st)},onExpand:function(e){this.expanded=e}}},N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("t-menu",{staticClass:"g-sidebar",attrs:{theme:"light",value:e.active,mode:"accordion",width:"100%",collapsed:e.isSideBarCollapse,defaultExpanded:e.expanded},on:{expand:e.onExpand}},[e._t("top"),e._v(" "),e._l(e.sideBarConfig,(function(t,r){return[t.children&&e.limitLevel(t,1)?n("t-submenu",{key:r,attrs:{value:t.key||t.name}},[t.imgUrl?n("img",{staticClass:"t-icon g-menu-icon",attrs:{slot:"icon",src:t.imgUrl},slot:"icon"}):n("t-icon",{attrs:{slot:"icon",name:t.iconClassName||"setting",url:t.iconFontUrl},slot:"icon"}),e._v(" "),n("span",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(t.name))]),e._v(" "),e._l(t.children,(function(t,r){return[t.children&&e.limitLevel(t,2)?n("t-submenu",{key:r,attrs:{value:t.key||t.name}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(t.name))]),e._v(" "),e._l(t.children,(function(t,r){return[n("t-menu-item",{key:r,attrs:{value:t.key||t.href||t.path||t.name},nativeOn:{click:function(n){return e.onItemClick(t)}}},[n("tooltip-label",{attrs:{label:t.name}})],1)]}))],2):n("t-menu-item",{key:r,attrs:{value:t.key||t.href||t.path||t.name},nativeOn:{click:function(n){return e.onItemClick(t)}}},[n("tooltip-label",{attrs:{label:t.name}})],1)]}))],2):n("t-menu-item",{key:r,attrs:{value:t.key||t.href||t.path||t.name},nativeOn:{click:function(n){return e.onItemClick(t)}}},[t.imgUrl?n("img",{staticClass:"t-icon g-menu-icon",attrs:{slot:"icon",src:t.imgUrl},slot:"icon"}):n("t-icon",{attrs:{slot:"icon",name:t.iconClassName||"setting",url:t.iconFontUrl},slot:"icon"}),e._v(" "),n("tooltip-label",{attrs:{label:t.name}})],1)]})),e._v(" "),n("div",{attrs:{slot:"options"},slot:"options"},[n("t-icon",{attrs:{name:e.iconName},nativeOn:{click:function(t){return e.toggleSideBar.apply(null,arguments)}}})],1)],2)};N._withStripped=!0;var V=v({render:N,staticRenderFns:[]},undefined,$,undefined,false,undefined,!1,void 0,void 0,void 0);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;tt&&"#"!==t?1:-1}));this.orderedElementArr=t.map((function(t){return{key:t,list:e.orderedElementObj[t]}}))},onCheck:function(e,t){var r=this.getObjectValueByKey(e);t?this.checkedKeys.push(r):this.$set(this,"checkedKeys",T(new Set(n(this.checkedKeys,[r])))),this.$emit("changecheck",{checkedKeys:this.checkedKeys})},onCheckAllChange:function(e){this.checkedKeys=this.getFilterDisabledKey(e),this.$emit("changecheck",{checkedKeys:this.checkedKeys})},dealElement:function(e){var t=r(e),n=this.getFirstLetterKey(e);this.orderedElementObj[n]||(this.orderedElementObj[n]=[]),this.orderedElementObj[n].push(t)},getPersonList:function(){var e=this;this.classify?(this.elementLists.forEach((function(t){e.dealElement(t)})),this.sortElementKey()):this.orderedElementArr=[{key:"all",list:r(this.elementLists)}]},getFirstLetterKey:function(e){var t,n=e[this.optionKey.label],r=n.slice(0,1),i="#";if(t=r,new RegExp("[\\u4E00-\\u9FFF]+","g").test(t)){var o=function(e){for(var t=e.length,n="",r=new RegExp("[a-zA-Z0-9- ]"),i=0;i0;)n=n.replace("--","-");return n}(n);i=o[0].toUpperCase()}else(function(e){return new RegExp("^[a-zA-Z]+$","g").test(e)})(r)&&(i=r.toUpperCase());return i},getObjectValueByKey:function(e){var t=this.optionKey.value;return this.objectKey?e[t][this.objectKey]:e[t]},getCurrentElementsAllKey:function(){var e=this;return this.elementLists.map((function(t){return e.getObjectValueByKey(t)}))},getFilterDisabledKey:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.getCurrentElementsAllKey()||[];return n.filter((function(n){return e.disabledValues.includes(n)?e.checkedKeys.includes(n):t}))}}},Z=q,Y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"list__content-header"},[n("t-checkbox",{attrs:{indeterminate:e.indeterminate},on:{change:e.onCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("\n 全选(共"+e._s(e.checkedKeys.length)+"/"+e._s(e.total)+")\n ")])],1),e._v(" "),n("t-checkbox-group",{attrs:{value:e.checkedKeys}},e._l(e.orderedElementArr,(function(t){return n("div",{key:t.key},[e.classify?n("div",{staticClass:"list__content-title"},[e._v(e._s(t.key))]):e._e(),e._v(" "),n("div",{staticClass:"list__content-list"},e._l(t.list,(function(t,r){return n("div",{key:r,class:{"list__content-item":!0,"g-is-selected":e.checkedKeys.includes(e.getObjectValueByKey(t))},attrs:{title:t[e.optionKey.label]+(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")}},[n("t-checkbox",{attrs:{disabled:e.disabledValues.includes(e.getObjectValueByKey(t)),value:e.getObjectValueByKey(t),item:t},on:{change:function(n){for(var r=arguments.length,i=Array(r);r--;)i[r]=arguments[r];return e.onCheck.apply(void 0,[t].concat(i))}}},[e._v("\n "+e._s(t[e.optionKey.label])+"\n "),n("span",{staticClass:"list__content-description"},[e._v(e._s(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":""))])])],1)})),0)])})),0)],1)};Y._withStripped=!0;var X={model:{prop:"selectedItems",event:"change"},components:{Splitpanes:d,Pane:h,List:v({render:Y,staticRenderFns:[]},undefined,Z,undefined,false,undefined,!1,void 0,void 0,void 0)},data:function(){return{isDefault:!0,searchOptionKey:{},selectedContent:[],selectedValues:[]}},props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},top:{type:[String,Number],default:"10%"},width:{type:[String,Number],default:720},leftWidthPercent:{type:[String,Number],default:20},targetText:{type:String,default:""},classify:{type:Boolean,default:!0},search:{type:Boolean,default:!1},optionKey:{type:Object,default:function(){return{label:"label",value:"value",description:"description"}}},objectKey:{type:String,default:void 0},elementLists:{type:Array,default:function(){return[]}},disabledValues:{type:Array,default:function(){return[]}},selectedItems:{type:Array,default:function(){return[]}},defaultSelectedItems:{type:Array,default:function(){return[]}}},computed:{isVisibleSelectDialog:function(){return this.visible}},watch:{visible:function(){this.visible&&this.initSelected()},selectedItems:function(){console.log("GSelectDialog component ==> selectedItems change:",this.selectedItems),this.changeLocalSelected(this.selectedItems),this.isDefault=!1},selectedValues:function(e,t){JSON.stringify(e)!==JSON.stringify(t)&&(this.selectedContent=this.getSelectedContent(this.selectedValues))}},mounted:function(){this.initConfig(),this.visible&&this.initSelected()},methods:{initConfig:function(){this.visible&&this.initSelected()},initSelected:function(){var e=this.selectedItems;this.isDefault&&!this.selectedItems.length&&(e=this.defaultSelectedItems),this.changeLocalSelected(e)},changeLocalSelected:function(e){this.selectedContent=r(e),this.selectedValues=this.getSelectedValues(e)},add:function(e){this.selectedContent=this.getUniqList(this.selectedContent,e),this.selectedValues=this.getSelectedValues(this.selectedContent),console.log("GSelectDialog component ==> selectedContent:",this.selectedContent)},remove:function(e){this.deleteSelected(e)},getObjectValueByKey:function(e){var t=this.optionKey.value;return this.objectKey?e[t][this.objectKey]:e[t]},getSelectedValues:function(e){var t=this;return e.map((function(e){return t.getObjectValueByKey(e)}))},getSelectedContent:function(e){var t=this;return this.getUniqList(this.selectedContent,this.elementLists).filter((function(n){var r=t.getObjectValueByKey(n);return e.includes(r)}))},getUniqList:function(e,t){var n=this;return i([].concat(e,t),(function(e,t){return o(n.getObjectValueByKey(e),n.getObjectValueByKey(t))}))},getCurrentElementsAllKey:function(){var e=this;return this.elementLists.map((function(t){return e.getObjectValueByKey(t)}))},changeSelected:function(e){var t=this.getCurrentElementsAllKey(),n=this.selectedValues.filter((function(e){return!t.includes(e)})),r=e.checkedKeys;this.selectedValues=n.concat(r)},deleteSelected:function(e){var t=this,n=this.selectedContent.map((function(e){return t.getObjectValueByKey(e)}));this.selectedValues=n.filter((function(n){return n!==t.getObjectValueByKey(e)}))},closeDialog:function(){this.$emit("update:visible",!1)},cancelDialog:function(e){this.$emit("cancel",e)},confirmDialog:function(){this.isDefault=!1,this.$emit("change",this.selectedContent),console.log("GSelectDialog component ==> confirmDialog selectedItems:",this.selectedContent),this.$emit("ok",this.selectedContent),this.$emit("update:visible",!1)},resize:function(e){this.$emit("resize",e)}}},J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("t-dialog",{staticClass:"g-select-dialog",attrs:{width:e.width,top:e.top,visible:e.isVisibleSelectDialog},on:{close:e.closeDialog,cancel:e.cancelDialog,confirm:e.confirmDialog}},[n("div",{staticClass:"g-select-dialog__header",attrs:{slot:"header"},slot:"header"},[n("span",{staticClass:"g-select-dialog__title",domProps:{textContent:e._s(e.title||"请选择"+e.targetText)}}),e._v(" "),e.$slots.search?n("div",{staticClass:"g-select-dialog__header-right"},[e._t("search")],2):e._e()]),e._v(" "),n("div",{attrs:{slot:"body"},slot:"body"},[n("div",{staticClass:"g-select-dialog__content"},[n("splitpanes",{staticClass:"default-theme",on:{resize:e.resize}},[e.$slots.leftContent?n("pane",{staticClass:"g-select-dialog__content-left",attrs:{"min-size":"15",size:e.leftWidthPercent}},[e._t("leftContent")],2):e._e(),e._v(" "),n("pane",{attrs:{"min-size":"15"}},[n("list",{staticClass:"g-select-dialog__content-right",attrs:{"checked-values":e.selectedValues,"disabled-values":e.disabledValues,"element-lists":e.elementLists,"option-key":e.optionKey,"object-key":e.objectKey,classify:e.classify},on:{changecheck:e.changeSelected}})],1)],1)],1),e._v(" "),n("div",{staticClass:"g-selected-result"},[n("span",{staticClass:"g-selected-result_title"},[e._v(e._s(e.targetText)+"(已选"+e._s(e.selectedContent.length)+")")]),e._v(" "),n("div",{staticClass:"g-selected-result_content"},e._l(e.selectedContent,(function(t,r){return n("t-popup",{key:e.getObjectValueByKey(t),attrs:{content:t[e.optionKey.label]+(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")}},[n("t-tag",{staticClass:"g-selected-result_item",attrs:{"max-width":"210",closable:"",disabled:e.disabledValues.includes(e.getObjectValueByKey(t))},on:{close:function(n){return e.deleteSelected(t,r)}}},[e._v(e._s(t[e.optionKey.label]+(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")))])],1)})),1)])])])],1)};J._withStripped=!0;var Q=v({render:J,staticRenderFns:[]},undefined,X,undefined,false,undefined,!1,void 0,void 0,void 0),ee={data:function(){return{searchValue:this.defaultValue}},props:{width:{type:[String,Number],default:280},placeholder:{type:String,default:"请输入搜索内容"},defaultValue:{type:String,default:""},optionKey:{type:Object,default:function(){return{label:"label",value:"value",description:"description",info:"info"}}},elementLists:{type:Array,default:function(){return[]}},disabledValues:{type:Array,default:function(){return[]}}},methods:{getObjectValueByKey:function(e){var t=this.optionKey.value;return this.objectKey?e[t][this.objectKey]:e[t]},handleClear:function(e){console.log("search component ==> clear",e),this.$emit("clear",e)},handleChange:function(e,t){console.log("search component ==> change",e,t),this.$emit("change",e,t)},handleEnter:function(e,t){console.log("search component ==> enter",e,t),this.$emit("enter",e,t)},handleClick:function(e,t){console.log("search component ==> click",e,t),this.$emit("click",e,t),this.searchValue=""}}},te=ee,ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"g-search"},[n("t-popup",{attrs:{trigger:"focus",placement:"bottom-right","overlay-class-name":"g-search-popup"}},[n("t-input",{attrs:{placeholder:e.placeholder,clearable:""},on:{enter:e.handleEnter,change:e.handleChange,clear:e.handleClear},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[n("t-icon",{attrs:{slot:"suffix-icon",name:"search"},slot:"suffix-icon"})],1),e._v(" "),e.elementLists&&e.elementLists.length?n("template",{slot:"content"},e._l(e.elementLists,(function(t,r){return n("div",{key:r,staticClass:"g-search-item",style:"width: "+e.width+("number"==typeof e.width?"px;":";")},[n("div",{staticClass:"g-search-item__wrapper"},[n("div",{staticClass:"g-search-item__content"},[n("span",{staticClass:"g-search-item__label"},[e._v(e._s(t[e.optionKey.label]))]),e._v("\n "+e._s(t[e.optionKey.description]?"("+t[e.optionKey.description]+")":"")+"\n ")]),e._v(" "),t[e.optionKey.info]?n("div",{staticClass:"g-search-item__info"},[e._v(e._s(t[e.optionKey.info]))]):e._e()]),e._v(" "),n("t-button",{staticClass:"g-search-item__add-btn",attrs:{variant:"text",theme:"primary",disabled:e.disabledValues.includes(e.getObjectValueByKey(t))},on:{click:function(n){return e.handleClick(t,r)}}},[e._v("加入已选")])],1)})),0):e._e()],2)],1)};ne._withStripped=!0;var re=v({render:ne,staticRenderFns:[]},undefined,te,undefined,false,undefined,!1,void 0,void 0,void 0);function ie(){return ie=Object.assign||function(e){for(var t,n=1;n1){var u=Array(this.colNum*l-c).fill("");i.splice.apply(i,[i.length-1,0].concat(T(u)))}var d={props:de({},this.rowProps)};return t("t-row",le([{},d]),[i.map((function(n,r){var i=o.includes(r)?0:12/e.colNum;return t("t-col",le([{},{props:{span:i,key:r},domProps:{"data-index":r}}]),[n])}))])}},render:function(){var e=arguments[0];return e("div",{class:"g-filter-wrapper"},[this.renderContent()])}};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t1){var h=Array(this.colNum*d-u).fill("");i.splice.apply(i,[i.length-1,0].concat(T(h)))}var f={props:pe({},this.rowProps)};return t("t-row",le([{},f]),[i.map((function(n,r){var i=(n.data||{}).attrs,o=void 0===i?{}:i,a=+o["g-col-num"]||+o.gColNum||1,s=c.includes(r)?0:12/e.colNum*a;return t("t-col",le([{},{props:{span:s,key:r},domProps:{"data-index":r}}]),[n])}))])}},render:function(){var e=arguments[0];return e("div",{class:"g-filter-wrapper"},[this.renderContent()])}};function me(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}var ve={exports:{}},ye={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ye),function(e){var t=ye.exports,n=function(e){var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(e,t,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw o;return I()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=d(e,t,n);if("normal"===c.type){if(r=n.done?g:f,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=g,n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",g="completed",m={};function v(){}function y(){}function b(){}var E={};l(E,a,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(k([])));O&&O!==r&&i.call(O,a)&&(E=O);var S=b.prototype=v.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,n){function r(o,a,s,c){var l=d(e[o],e,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===t(h)&&i.call(h,"__await")?n.resolve(h.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):n.resolve(h).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,c)}))}c(l.arg)}var o;this._invoke=function(e,t){function i(){return new n((function(n,i){r(e,t,n,i)}))}return o=o?o.then(i,i):i()}}function A(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,A(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=d(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,m;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),m}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=n}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}(ve);var be=ve.exports,Ee=null,_e=0,Oe={name:"GTabRoute",props:{isOpen:{type:Boolean,default:!0},isCacheMode:{type:Boolean,default:!0},maxTabCount:{type:Number,default:20},extraClass:{type:String,default:""},extraContentClass:{type:String,default:""}},data:function(){return{panelData:[],value:null}},watch:{isOpen:function(e){e&&this.dealRouteChange(this.$route)},$route:function(e){this.isOpen&&this.dealRouteChange(e)}},created:function(){var e=this;this.$router.beforeEach((function(t,n,r){var i,o;if(e.isOpen&&e.panelData.length>=e.maxTabCount)return e.panelData.find((function(e){return e.name===t.name}))?void r():void(Ee=e.$dialog.alert({header:"提示",body:"最多可同时开启 ".concat(e.maxTabCount," 个页签,请关闭其他页签后重试!"),theme:"warning",onConfirm:(i=be.mark((function e(){return be.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ee&&Ee.hide();case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){me(o,n,r,a,s,"next",e)}function s(e){me(o,n,r,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})}));r()}))},methods:{dealRouteChange:function(e){var t=this.panelData.find((function(t){return t.name===e.name}));t?this.value=t.value:this.dealAddTab(e)},dealAddTab:function(e){var t=e.meta.title;_e+=1,this.panelData.push({label:t||e.path,value:_e,removable:!0,path:e.path,name:e.name,params:e.params,query:e.query}),this.$set(this.panelData[0],"removable",1!==this.panelData.length),this.value=_e},removeTab:function(e){var t=e.value,n=this.panelData.findIndex((function(e){return e.value===t}));return n<0||(this.panelData.splice(n,1),1===this.panelData.length&&this.$set(this.panelData[0],"removable",!1),this.value===t&&this.changeTab(this.panelData[Math.max(n-1,0)].value)),!1},changeTab:function(e){this.value=e;var t=this.panelData.find((function(t){return t.value===e}));this.$router.push({path:t.path,params:t.params,query:t.query})}}},Se=Oe,Ce=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"g-tabRoute__container",class:e.extraClass},[e.isOpen?[n("t-tabs",{attrs:{value:e.value,theme:"card"},on:{remove:e.removeTab,change:e.changeTab}},e._l(e.panelData,(function(t){return n("t-tab-panel",{key:t.value,attrs:{value:t.value,removable:t.removable}},[n("div",{staticClass:"g-label__container",attrs:{slot:"label"},slot:"label"},[n("t-tooltip",{attrs:{content:t.label,placement:"top","show-arrow":""}},[n("div",{staticClass:"g-label__content"},[n("div",{staticClass:"g-tab-item-text"},[e._v(e._s(t.label))]),e._v(" "),n("div",{staticClass:"g-tab-item-cover"}),e._v(" "),n("div",{staticClass:"g-tab-item-line"})])])],1)])})),1),e._v(" "),e.isCacheMode?n("keep-alive",[e._t("default",(function(){return[n("router-view",{class:e.extraContentClass})]}))],2):e._t("default",(function(){return[n("router-view",{class:e.extraContentClass})]}))]:e._t("default",(function(){return[n("router-view",{class:e.extraContentClass})]}))],2)};Ce._withStripped=!0;var we,Ae=v({render:Ce,staticRenderFns:[]},undefined,Se,undefined,false,undefined,!1,void 0,void 0,void 0),je={SET_SIDEBAR_CONFIG:"SET_SIDEBAR_CONFIG",SET_SIDEBAR_EXPAND_LEVEL:"SET_SIDEBAR_EXPAND_LEVEL",TOGGLE_SIDEBAR:"TOGGLE_SIDEBAR",SET_TOPBAR_CONFIG:"SET_TOPBAR_CONFIG",SET_TOPBAR_ACTIVE_KEY:"SET_TOPBAR_ACTIVE_KEY",SET_TOPBAR_EXPAND_TYPE:"SET_TOPBAR_EXPAND_TYPE",SET_HEADER_USER_STATUS:"SET_HEADER_USER_STATUS",SET_TOPBAR_ACTIVE_MENU_ITEM:"SET_TOPBAR_ACTIVE_MENU_ITEM",DEAL_LOADING:"DEAL_LOADING",SET_USER_INFO:"SET_USER_INFO",REGISTER_EVENT:"REGISTER_EVENT",SET_SIDEBAR_STATUS:"SET_SIDEBAR_STATUS",SET_SIDEBAR_ACTIVE_KEY:"SET_SIDEBAR_ACTIVE_KEY",SET_SIDEBAR_ACTIVE_MENU_ITEM:"SET_SIDEBAR_ACTIVE_MENU_ITEM",SET_SIDEBAR_EXPANDED:"SET_SIDEBAR_EXPANDED"};function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:[];return e.use(t),Object.assign(e.prototype,{$storeGlobalTypes:je}),new t.Store({plugins:n,modules:{global:Ie}})}},De=w()?3:0,Ke=function(){return document.body.clientHeight&&document.documentElement.clientHeight?document.body.clientHeightdocument.documentElement.clientHeight?document.body.clientHeight:document.documentElement.clientHeight},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!("hasPageHeader"in e)||e.hasPageHeader,n=Ke(),r=e.header||64,i=t?e.pageHeader||60:0,o=e.margin||48,a=e.extraHeight||0,s=n-i-o-a-r-De;return s>300?s:300},Be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.padding||24,n=e.pagination||66,r=e.condition||48,i=e.tableMinHeight||200,o=e.tableHeader||48,a=e.tableExtra||0,s=Re(e)-t-o-a-De;return!1!==e.hasPagination&&(s-=n),!1!==e.hasCondition&&(s-=r),s>i?s:i};function Le(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Event]":"event","[object Object]":"object","[object MouseEvent]":"mouseEvent"}[Object.prototype.toString.call(e)]}var $e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ne=function(e){return"string"==typeof e&&$e.test(e.trim())},Ve=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),Me=function(e){return"string"==typeof e&&Ve.test(e.trim())},Fe=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,Ge=[1,0,10,9,8,7,6,5,4,3,2],Ue=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1],ze=function(e){if("string"!=typeof e)return!1;var t=e.trim();return 18===t.length&&Fe.test(t)&&function(e){var t=e.split(""),n=0;"x"===t[17].toLowerCase()&&(t[17]=10);for(var r=0;r<17;r++)n+=Ue[r]*t[r];var i=n%11;return+t[17]===Ge[i]}(t)&&function(e){var t=e.substring(6,10),n=e.substring(10,12),r=e.substring(12,14),i=new Date(t,parseFloat(n)-1,parseFloat(r)),o=(new Date).getFullYear()-parseFloat(t);return i.getFullYear()===parseFloat(t)&&i.getMonth()===parseFloat(n)-1&&i.getDate()===parseFloat(r)&&o>=0&&o<=150}(t)},He=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,We=function(e){return"string"==typeof e&&He.test(e.trim())},qe=/^1[3456789]\d{9}$/,Ze=function(e){return"string"==typeof e&&qe.test(e.trim())},Ye=/^[\u2E80-\uFE4F]+$/,Xe=function(e){return"string"==typeof e&&Ye.test(e.trim())},Je=/^[\u2E80-\uFE4F]{2,6}(?:·[\u2E80-\uFE4F]{2,6})*$/,Qe=function(e){return"string"==typeof e&&Je.test(e.trim())},et=/^[\da-zA-Z\s]{2,}$/,tt=function(e){return"string"==typeof e&&et.test(e.trim())},nt=/^1[45][0-9]{7}|([DSPGE](?![IO])[A-Z\d]{8})|((DE|SE|PE)(?![IO])[A-Z\d]{7})|([HM]\d{8, 10})$/,rt=function(e){return"string"==typeof e&&nt.test(e.toUpperCase().trim())},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.len,r=void 0===n?6:n;return"string"==typeof e&&e.length===r&&/^\d+$/.test(e.trim())},ot={POLICE:/^[0-9a-zA-Z]{8,9}$/,OFFICER:/^[0-9a-zA-Z]{4,15}$/,SOLDIER:/^[0-9a-zA-Z]{4,15}$/,DISCHARGE:/^[0-9a-zA-Z]{4,20}$/,HMCOME:/^[HMhm]{1}\d{10}$/,TWCOME:/^(\d{8}|[a-zA-Z]\d{7})$/,HMPASS:/^[WCwc]\d{8}$/,TWPASS:/^[TLtl]\d{8}$/,HKID:/^[a-zA-Z0-9]{1}\d{6,7}[a-zA-Z0-9]{1}$/,MCID:/^[157]\d{6}\([0-9Aa]\)$/,TWID:/^[a-zA-Z]{1}\d{9}$/,HMTID:/^8[123]0000\d{12}$/,FOREIGNID:/^[a-zA-Z]{3}\d{12}$/,OTHERS:/^[0-9a-zA-Z]{4,20}$/},at={IDCARD:"IDCARD",PASSPORT:"PASSPORT",POLICE:"POLICE",OFFICER:"OFFICER",SOLDIER:"SOLDIER",DISCHARGE:"DISCHARGE",HMCOME:"HMCOME",TWCOME:"TWCOME",HMPASS:"HMPASS",TWPASS:"TWPASS",HKID:"HKID",MCID:"MCID",TWID:"TWID",HMTID:"HMTID",FOREIGNID:"FOREIGNID",OTHERS:"OTHERS"},st=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=void 0===n?at.OTHERS:n,i="";return-1===Object.keys(ot).indexOf(r)&&(console.warn("证件类型不存在"),i=at.OTHERS),r===at.IDCARD?ze(e):r===at.PASSPORT?rt(e):"string"==typeof e&&ot[i||r].test(e.trim())};function ct(e){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ct(e)}var lt=function e(t,n,r,i){if("object"===ct(n)){if(Array.isArray(n))return n.map((function(t){return e(null,t,r,i)}));for(var o in n){var a=n[o],s="function"==typeof r?r(o,a):o;n[s]=e(o,a,r,i),s!==o&&delete n[o]}return n}return"function"==typeof i?i(t,n):n},ut=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toLowerCase()):e},dt=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toUpperCase()):e};function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t statusCode no 2xx,Reject: ",e.response);var a={reqConfig:ft({},pt(r))};return"object"===Le(o)?"old"!==r.headers["x-api-version"]?Promise.reject(Object.assign(lt(null,o.Response,ut),a)):Promise.reject(gt(o,a)):Promise.reject(gt({data:e.response.data,status:e.response.status,statusText:e.response.statusText,headers:e.response.headers},a))}return Promise.reject(e||new Error("Unknown Network Error"))},bt=function(e){if("old"!==e.headers["x-api-version"]){if(e.data){var t=r(e.data);Object.assign(e,{data:lt(null,t,dt)})}if(e.params){var n=r(e.params);Object.assign(e,{params:lt(null,n,dt)})}}return e.hideLoading,e},Et=function(e){return Promise.reject(e)},_t=function(){var e=f.create({maxRedirects:0});return e.defaults.timeout=window.STATIC_ENV_CONFIG&&window.STATIC_ENV_CONFIG.VUE_APP_API_TIMEOUT||15e3,e.defaults.headers["Content-Type"]="application/json",e.interceptors.request.use(bt,Et),e.interceptors.response.use(vt,yt),e},Ot=function(){var e=f.create({method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return Object.keys(e).forEach((function(t){"object"===ct(e[t])&&Object.assign(e,g({},t,JSON.stringify(e[t])))})),p.stringify(e)}]});return e.interceptors.request.use(bt,Et),e.interceptors.response.use(vt,yt),e},St=_t(),Ct=Ot(),wt=function(){var e=navigator.userAgent.toLowerCase(),t=[{reg:/edge\/([\d.]+)/,broswer:"Edge"},{reg:/rv:([\d.]+)\) like gecko/,broswer:"IE"},{reg:/msie ([\d.]+)/,broswer:"IE"},{reg:/firefox\/([\d.]+)/,broswer:"Firefox"},{reg:/chrome\/([\d.]+)/,broswer:"Chrome"},{reg:/opera.([\d.]+)/,broswer:"Opera"},{reg:/version\/([\d.]+).*safari/,broswer:"Safari"}].find((function(t){var n=t.reg;return e.match(n)}));if(t){var n=e.match(t.reg);return{broswer:t.broswer,version:n[1]}}return{broswer:"",version:"0"}}; +/*! js-cookie v3.0.1 | MIT */ +function At(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:[];return e.use(E),Object.assign(e.prototype,{$storeGlobalTypes:t}),new E.Store({plugins:n,modules:{global:T}})}};export{r as default,r as store}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutaition-types.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutaition-types.js new file mode 100644 index 0000000..7f74324 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutaition-types.js @@ -0,0 +1 @@ +var E={SET_SIDEBAR_CONFIG:"SET_SIDEBAR_CONFIG",SET_SIDEBAR_EXPAND_LEVEL:"SET_SIDEBAR_EXPAND_LEVEL",TOGGLE_SIDEBAR:"TOGGLE_SIDEBAR",SET_TOPBAR_CONFIG:"SET_TOPBAR_CONFIG",SET_TOPBAR_ACTIVE_KEY:"SET_TOPBAR_ACTIVE_KEY",SET_TOPBAR_EXPAND_TYPE:"SET_TOPBAR_EXPAND_TYPE",SET_HEADER_USER_STATUS:"SET_HEADER_USER_STATUS",SET_TOPBAR_ACTIVE_MENU_ITEM:"SET_TOPBAR_ACTIVE_MENU_ITEM",DEAL_LOADING:"DEAL_LOADING",SET_USER_INFO:"SET_USER_INFO",REGISTER_EVENT:"REGISTER_EVENT",SET_SIDEBAR_STATUS:"SET_SIDEBAR_STATUS",SET_SIDEBAR_ACTIVE_KEY:"SET_SIDEBAR_ACTIVE_KEY",SET_SIDEBAR_ACTIVE_MENU_ITEM:"SET_SIDEBAR_ACTIVE_MENU_ITEM",SET_SIDEBAR_EXPANDED:"SET_SIDEBAR_EXPANDED"};export{E as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutations.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutations.js new file mode 100644 index 0000000..80f898d --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/store/mutations.js @@ -0,0 +1 @@ +function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t,n="SET_SIDEBAR_CONFIG",i="SET_SIDEBAR_EXPAND_LEVEL",r="SET_TOPBAR_CONFIG",c="SET_TOPBAR_ACTIVE_KEY",s="SET_TOPBAR_EXPAND_TYPE",a="SET_HEADER_USER_STATUS",o="SET_TOPBAR_ACTIVE_MENU_ITEM",E="DEAL_LOADING",O="SET_USER_INFO",b="REGISTER_EVENT",u="SET_SIDEBAR_STATUS",_="SET_SIDEBAR_ACTIVE_KEY",f="SET_SIDEBAR_ACTIVE_MENU_ITEM",S="SET_SIDEBAR_EXPANDED";function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function A(t){for(var n=1;n-1&&e.indexOf("MSIE")>-1,t=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;return!(!n&&!t)}export{e as isChinese,n as isLetter,t as isMSIE}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/index.js new file mode 100644 index 0000000..07073b6 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/index.js @@ -0,0 +1,3 @@ +import e from"axios";import t from"qs";import{cloneDeep as r}from"lodash-es";function n(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Event]":"event","[object Object]":"object","[object MouseEvent]":"mouseEvent"}[Object.prototype.toString.call(e)]}var o=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,i=function(e){return"string"==typeof e&&o.test(e.trim())},a=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),s=function(e){return"string"==typeof e&&a.test(e.trim())},c=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,u=[1,0,10,9,8,7,6,5,4,3,2],f=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1],d=function(e){if("string"!=typeof e)return!1;var t=e.trim();return 18===t.length&&c.test(t)&&function(e){var t=e.split(""),r=0;"x"===t[17].toLowerCase()&&(t[17]=10);for(var n=0;n<17;n++)r+=f[n]*t[n];var o=r%11;return+t[17]===u[o]}(t)&&function(e){var t=e.substring(6,10),r=e.substring(10,12),n=e.substring(12,14),o=new Date(t,parseFloat(r)-1,parseFloat(n)),i=(new Date).getFullYear()-parseFloat(t);return o.getFullYear()===parseFloat(t)&&o.getMonth()===parseFloat(r)-1&&o.getDate()===parseFloat(n)&&i>=0&&i<=150}(t)},l=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,p=function(e){return"string"==typeof e&&l.test(e.trim())},g=/^1[3456789]\d{9}$/,m=function(e){return"string"==typeof e&&g.test(e.trim())},b=/^[\u2E80-\uFE4F]+$/,v=function(e){return"string"==typeof e&&b.test(e.trim())},O=/^[\u2E80-\uFE4F]{2,6}(?:·[\u2E80-\uFE4F]{2,6})*$/,y=function(e){return"string"==typeof e&&O.test(e.trim())},w=/^[\da-zA-Z\s]{2,}$/,E=function(e){return"string"==typeof e&&w.test(e.trim())},S=/^1[45][0-9]{7}|([DSPGE](?![IO])[A-Z\d]{8})|((DE|SE|PE)(?![IO])[A-Z\d]{7})|([HM]\d{8, 10})$/,I=function(e){return"string"==typeof e&&S.test(e.toUpperCase().trim())},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.len,n=void 0===r?6:r;return"string"==typeof e&&e.length===n&&/^\d+$/.test(e.trim())},h={POLICE:/^[0-9a-zA-Z]{8,9}$/,OFFICER:/^[0-9a-zA-Z]{4,15}$/,SOLDIER:/^[0-9a-zA-Z]{4,15}$/,DISCHARGE:/^[0-9a-zA-Z]{4,20}$/,HMCOME:/^[HMhm]{1}\d{10}$/,TWCOME:/^(\d{8}|[a-zA-Z]\d{7})$/,HMPASS:/^[WCwc]\d{8}$/,TWPASS:/^[TLtl]\d{8}$/,HKID:/^[a-zA-Z0-9]{1}\d{6,7}[a-zA-Z0-9]{1}$/,MCID:/^[157]\d{6}\([0-9Aa]\)$/,TWID:/^[a-zA-Z]{1}\d{9}$/,HMTID:/^8[123]0000\d{12}$/,FOREIGNID:/^[a-zA-Z]{3}\d{12}$/,OTHERS:/^[0-9a-zA-Z]{4,20}$/},C={IDCARD:"IDCARD",PASSPORT:"PASSPORT",POLICE:"POLICE",OFFICER:"OFFICER",SOLDIER:"SOLDIER",DISCHARGE:"DISCHARGE",HMCOME:"HMCOME",TWCOME:"TWCOME",HMPASS:"HMPASS",TWPASS:"TWPASS",HKID:"HKID",MCID:"MCID",TWID:"TWID",HMTID:"HMTID",FOREIGNID:"FOREIGNID",OTHERS:"OTHERS"},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.type,n=void 0===r?C.OTHERS:r,o="";return-1===Object.keys(h).indexOf(n)&&(console.warn("证件类型不存在"),o=C.OTHERS),n===C.IDCARD?d(e):n===C.PASSPORT?I(e):"string"==typeof e&&h[o||n].test(e.trim())};function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var P=function e(t,r,n,o){if("object"===R(r)){if(Array.isArray(r))return r.map((function(t){return e(null,t,n,o)}));for(var i in r){var a=r[i],s="function"==typeof n?n(i,a):i;r[s]=e(i,a,n,o),s!==i&&delete r[i]}return r}return"function"==typeof o?o(t,r):r},T=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toLowerCase()):e},F=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toUpperCase()):e};function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var t=1;t statusCode no 2xx,Reject: ",e.response);var s={reqConfig:$({},M(o))};return"object"===n(a)?"old"!==o.headers["x-api-version"]?Promise.reject(Object.assign(P(null,a.Response,T),s)):Promise.reject(H(a,s)):Promise.reject(H({data:e.response.data,status:e.response.status,statusText:e.response.statusText,headers:e.response.headers},s))}return Promise.reject(e||new Error("Unknown Network Error"))},N=function(e){if("old"!==e.headers["x-api-version"]){if(e.data){var t=r(e.data);Object.assign(e,{data:P(null,t,F)})}if(e.params){var n=r(e.params);Object.assign(e,{params:P(null,n,F)})}}return e.hideLoading,e},L=function(e){return Promise.reject(e)},U=function(){var t=e.create({maxRedirects:0});return t.defaults.timeout=window.STATIC_ENV_CONFIG&&window.STATIC_ENV_CONFIG.VUE_APP_API_TIMEOUT||15e3,t.defaults.headers["Content-Type"]="application/json",t.interceptors.request.use(N,L),t.interceptors.response.use(k,Z),t},_=function(){var r=e.create({method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return Object.keys(e).forEach((function(t){"object"===R(e[t])&&Object.assign(e,D({},t,JSON.stringify(e[t])))})),t.stringify(e)}]});return r.interceptors.request.use(N,L),r.interceptors.response.use(k,Z),r},W=U(),G=_(),q=function(){var e=navigator.userAgent.toLowerCase(),t=[{reg:/edge\/([\d.]+)/,broswer:"Edge"},{reg:/rv:([\d.]+)\) like gecko/,broswer:"IE"},{reg:/msie ([\d.]+)/,broswer:"IE"},{reg:/firefox\/([\d.]+)/,broswer:"Firefox"},{reg:/chrome\/([\d.]+)/,broswer:"Chrome"},{reg:/opera.([\d.]+)/,broswer:"Opera"},{reg:/version\/([\d.]+).*safari/,broswer:"Safari"}].find((function(t){var r=t.reg;return e.match(r)}));if(t){var r=e.match(t.reg);return{broswer:t.broswer,version:r[1]}}return{broswer:"",version:"0"}}; +/*! js-cookie v3.0.1 | MIT */ +function B(e){for(var t=1;t0;)i=i.replace("--","-");return i}export{a as arraySearch,u as convertPinyin}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/index.js new file mode 100644 index 0000000..9a63bfb --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/index.js @@ -0,0 +1 @@ +import e from"axios";import r from"qs";import{cloneDeep as t}from"lodash-es";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var s=function e(r,t,n,s){if("object"===o(t)){if(Array.isArray(t))return t.map((function(r){return e(null,r,n,s)}));for(var i in t){var a=t[i],c="function"==typeof n?n(i,a):i;t[c]=e(i,a,n,s),c!==i&&delete t[i]}return t}return"function"==typeof s?s(r,t):t},i=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toLowerCase()):e},a=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toUpperCase()):e};function c(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Event]":"event","[object Object]":"object","[object MouseEvent]":"mouseEvent"}[Object.prototype.toString.call(e)]}function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var r=1;r statusCode no 2xx,Reject: ",e.response);var u={reqConfig:f({},p(n))};return"object"===c(a)?"old"!==n.headers["x-api-version"]?Promise.reject(Object.assign(s(null,a.Response,i),u)):Promise.reject(l(a,u)):Promise.reject(l({data:e.response.data,status:e.response.status,statusText:e.response.statusText,headers:e.response.headers},u))}return Promise.reject(e||new Error("Unknown Network Error"))},y=function(e){if("old"!==e.headers["x-api-version"]){if(e.data){var r=t(e.data);Object.assign(e,{data:s(null,r,a)})}if(e.params){var n=t(e.params);Object.assign(e,{params:s(null,n,a)})}}return e.hideLoading,e},m=function(e){return Promise.reject(e)},O=function(){var r=e.create({maxRedirects:0});return r.defaults.timeout=window.STATIC_ENV_CONFIG&&window.STATIC_ENV_CONFIG.VUE_APP_API_TIMEOUT||15e3,r.defaults.headers["Content-Type"]="application/json",r.interceptors.request.use(y,m),r.interceptors.response.use(b,j),r},g=function(){var t=e.create({method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return Object.keys(e).forEach((function(r){"object"===o(e[r])&&Object.assign(e,n({},r,JSON.stringify(e[r])))})),r.stringify(e)}]});return t.interceptors.request.use(y,m),t.interceptors.response.use(b,j),t},v=O(),w=g();export{O as createRequest,g as createRequestFd,v as request,w as requestFd}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/request-interceptors.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/request-interceptors.js new file mode 100644 index 0000000..4b386ed --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/request/request-interceptors.js @@ -0,0 +1 @@ +import{cloneDeep as e}from"lodash-es";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var n=function e(r,n,o,s){if("object"===t(n)){if(Array.isArray(n))return n.map((function(r){return e(null,r,o,s)}));for(var i in n){var a=n[i],c="function"==typeof o?o(i,a):i;n[c]=e(i,a,o,s),c!==i&&delete n[i]}return n}return"function"==typeof s?s(r,n):n},o=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toLowerCase()):e},s=function(e){return"string"==typeof e&&e?e.replace(e[0],e[0].toUpperCase()):e};function i(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Event]":"event","[object Object]":"object","[object MouseEvent]":"mouseEvent"}[Object.prototype.toString.call(e)]}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var t=1;t statusCode no 2xx,Reject: ",e.response);var l={reqConfig:c({},u(s))};return"object"===i(p)?"old"!==s.headers["x-api-version"]?Promise.reject(Object.assign(n(null,p.Response,o),l)):Promise.reject(f(p,l)):Promise.reject(f({data:e.response.data,status:e.response.status,statusText:e.response.statusText,headers:e.response.headers},l))}return Promise.reject(e||new Error("Unknown Network Error"))},d=function(r){if("old"!==r.headers["x-api-version"]){if(r.data){var t=e(r.data);Object.assign(r,{data:n(null,t,s)})}if(r.params){var o=e(r.params);Object.assign(r,{params:n(null,o,s)})}}return r.hideLoading,r},j=function(e){return Promise.reject(e)};export{d as requestBefore,j as requestError,b as responseReject,l as responseResolve}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/download.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/download.js new file mode 100644 index 0000000..98cff2a --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/download.js @@ -0,0 +1 @@ +import e from"qs";function o(o){var t=o.url,d=void 0===t?"":t,n=o.params,i=void 0===n?null:n,a=o.iframeId,l=void 0===a?"download":a,r=o.type,c=void 0===r?"alink":r,m=d;if(i&&"[object Object]"===Object.prototype.toString.call(i)&&(m+="?".concat(e.stringify(i))),"alink"===c){var f=document.createElement("a");f.style.display="none",f.download="download",f.href=m,f.target="_blank",document.body.appendChild(f),f.click(),document.body.removeChild(f)}else if("iframe"===c){var p=document.createElement("iframe");p.id=l,p.style.display="none",p.src="",document.body.appendChild(p),setTimeout((function(){p.contentWindow.location.href=m,document.body.removeChild(p)}),50)}}export{o as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/getBroswer.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/getBroswer.js new file mode 100644 index 0000000..23af685 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/getBroswer.js @@ -0,0 +1 @@ +var r=function(){var r=navigator.userAgent.toLowerCase(),e=[{reg:/edge\/([\d.]+)/,broswer:"Edge"},{reg:/rv:([\d.]+)\) like gecko/,broswer:"IE"},{reg:/msie ([\d.]+)/,broswer:"IE"},{reg:/firefox\/([\d.]+)/,broswer:"Firefox"},{reg:/chrome\/([\d.]+)/,broswer:"Chrome"},{reg:/opera.([\d.]+)/,broswer:"Opera"},{reg:/version\/([\d.]+).*safari/,broswer:"Safari"}].find((function(e){var o=e.reg;return r.match(o)}));if(e){var o=r.match(e.reg);return{broswer:e.broswer,version:o[1]}}return{broswer:"",version:"0"}};export{r as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/index.js new file mode 100644 index 0000000..9679ace --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/tool/index.js @@ -0,0 +1,2 @@ +import e from"qs";var r=function(){var e=navigator.userAgent.toLowerCase(),r=[{reg:/edge\/([\d.]+)/,broswer:"Edge"},{reg:/rv:([\d.]+)\) like gecko/,broswer:"IE"},{reg:/msie ([\d.]+)/,broswer:"IE"},{reg:/firefox\/([\d.]+)/,broswer:"Firefox"},{reg:/chrome\/([\d.]+)/,broswer:"Chrome"},{reg:/opera.([\d.]+)/,broswer:"Opera"},{reg:/version\/([\d.]+).*safari/,broswer:"Safari"}].find((function(r){var t=r.reg;return e.match(t)}));if(r){var t=e.match(r.reg);return{broswer:r.broswer,version:t[1]}}return{broswer:"",version:"0"}}; +/*! js-cookie v3.0.1 | MIT */function t(e){for(var r=1;r-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,t||n?3:0),d=function(){return document.body.clientHeight&&document.documentElement.clientHeight?document.body.clientHeightdocument.documentElement.clientHeight?document.body.clientHeight:document.documentElement.clientHeight},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!("hasPageHeader"in e)||e.hasPageHeader,n=d(),o=e.header||64,c=t?e.pageHeader||60:0,a=e.margin||48,g=e.extraHeight||0,m=n-c-a-g-o-i;return m>300?m:300},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.padding||24,n=e.pagination||66,d=e.condition||48,c=e.tableMinHeight||200,a=e.tableHeader||48,g=e.tableExtra||0,m=o(e)-t-a-g-i;return!1!==e.hasPagination&&(m-=n),!1!==e.hasCondition&&(m-=d),m>c?m:c};export{d as getClientHeight,c as getFirstLevelTableHeight,o as getPageContentHeight}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/typeOf.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/typeOf.js new file mode 100644 index 0000000..37112e9 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/typeOf.js @@ -0,0 +1 @@ +function e(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Event]":"event","[object Object]":"object","[object MouseEvent]":"mouseEvent"}[Object.prototype.toString.call(e)]}export{e as typeOf}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/index.js new file mode 100644 index 0000000..ef3c01f --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/index.js @@ -0,0 +1 @@ +var t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,r=function(r){return"string"==typeof r&&t.test(r.trim())},e=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),n=function(t){return"string"==typeof t&&e.test(t.trim())},a=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,f=[1,0,10,9,8,7,6,5,4,3,2],u=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1],i=function(t){if("string"!=typeof t)return!1;var r=t.trim();return 18===r.length&&a.test(r)&&function(t){var r=t.split(""),e=0;"x"===r[17].toLowerCase()&&(r[17]=10);for(var n=0;n<17;n++)e+=u[n]*r[n];var a=e%11;return+r[17]===f[a]}(r)&&function(t){var r=t.substring(6,10),e=t.substring(10,12),n=t.substring(12,14),a=new Date(r,parseFloat(e)-1,parseFloat(n)),f=(new Date).getFullYear()-parseFloat(r);return a.getFullYear()===parseFloat(r)&&a.getMonth()===parseFloat(e)-1&&a.getDate()===parseFloat(n)&&f>=0&&f<=150}(r)},o=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,s=function(t){return"string"==typeof t&&o.test(t.trim())},d=/^1[3456789]\d{9}$/,E=function(t){return"string"==typeof t&&d.test(t.trim())},A=/^[\u2E80-\uFE4F]+$/,I=function(t){return"string"==typeof t&&A.test(t.trim())},S=/^[\u2E80-\uFE4F]{2,6}(?:·[\u2E80-\uFE4F]{2,6})*$/,D=function(t){return"string"==typeof t&&S.test(t.trim())},O=/^[\da-zA-Z\s]{2,}$/,p=function(t){return"string"==typeof t&&O.test(t.trim())},$=/^1[45][0-9]{7}|([DSPGE](?![IO])[A-Z\d]{8})|((DE|SE|PE)(?![IO])[A-Z\d]{7})|([HM]\d{8, 10})$/,C=function(t){return"string"==typeof t&&$.test(t.toUpperCase().trim())},R=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.len,n=void 0===e?6:e;return"string"==typeof t&&t.length===n&&/^\d+$/.test(t.trim())},g={POLICE:/^[0-9a-zA-Z]{8,9}$/,OFFICER:/^[0-9a-zA-Z]{4,15}$/,SOLDIER:/^[0-9a-zA-Z]{4,15}$/,DISCHARGE:/^[0-9a-zA-Z]{4,20}$/,HMCOME:/^[HMhm]{1}\d{10}$/,TWCOME:/^(\d{8}|[a-zA-Z]\d{7})$/,HMPASS:/^[WCwc]\d{8}$/,TWPASS:/^[TLtl]\d{8}$/,HKID:/^[a-zA-Z0-9]{1}\d{6,7}[a-zA-Z0-9]{1}$/,MCID:/^[157]\d{6}\([0-9Aa]\)$/,TWID:/^[a-zA-Z]{1}\d{9}$/,HMTID:/^8[123]0000\d{12}$/,FOREIGNID:/^[a-zA-Z]{3}\d{12}$/,OTHERS:/^[0-9a-zA-Z]{4,20}$/},F={IDCARD:"IDCARD",PASSPORT:"PASSPORT",POLICE:"POLICE",OFFICER:"OFFICER",SOLDIER:"SOLDIER",DISCHARGE:"DISCHARGE",HMCOME:"HMCOME",TWCOME:"TWCOME",HMPASS:"HMPASS",TWPASS:"TWPASS",HKID:"HKID",MCID:"MCID",TWID:"TWID",HMTID:"HMTID",FOREIGNID:"FOREIGNID",OTHERS:"OTHERS"},H=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.type,n=void 0===e?F.OTHERS:e,a="";return-1===Object.keys(g).indexOf(n)&&(console.warn("证件类型不存在"),a=F.OTHERS),n===F.IDCARD?i(t):n===F.PASSPORT?C(t):"string"==typeof t&&g[a||n].test(t.trim())};export{I as isCJK,s as isCarNum,D as isCnName,r as isEmail,p as isEnName,i as isIDCard,E as isMobile,C as isPassport,H as isPermit,n as isURL,R as isVCode,F as permitType}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCJK.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCJK.js new file mode 100644 index 0000000..5dba168 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCJK.js @@ -0,0 +1 @@ +var t=/^[\u2E80-\uFE4F]+$/,r=function(r){return"string"==typeof r&&t.test(r.trim())};export{r as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCarNum.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCarNum.js new file mode 100644 index 0000000..e3079be --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCarNum.js @@ -0,0 +1 @@ +var t=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,r=function(r){return"string"==typeof r&&t.test(r.trim())};export{r as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCnName.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCnName.js new file mode 100644 index 0000000..b1417ed --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isCnName.js @@ -0,0 +1 @@ +var t=/^[\u2E80-\uFE4F]{2,6}(?:·[\u2E80-\uFE4F]{2,6})*$/,u=function(u){return"string"==typeof u&&t.test(u.trim())};export{u as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEmail.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEmail.js new file mode 100644 index 0000000..6ef3e27 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEmail.js @@ -0,0 +1 @@ +var t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,r=function(r){return"string"==typeof r&&t.test(r.trim())};export{r as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEnName.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEnName.js new file mode 100644 index 0000000..2ee2135 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isEnName.js @@ -0,0 +1 @@ +var t=/^[\da-zA-Z\s]{2,}$/,r=function(r){return"string"==typeof r&&t.test(r.trim())};export{r as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isIDCard.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isIDCard.js new file mode 100644 index 0000000..c928b80 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isIDCard.js @@ -0,0 +1 @@ +var t=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,r=[1,0,10,9,8,7,6,5,4,3,2],e=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1],a=function(a){if("string"!=typeof a)return!1;var n=a.trim();return 18===n.length&&t.test(n)&&function(t){var a=t.split(""),n=0;"x"===a[17].toLowerCase()&&(a[17]=10);for(var s=0;s<17;s++)n+=e[s]*a[s];var o=n%11;return+a[17]===r[o]}(n)&&function(t){var r=t.substring(6,10),e=t.substring(10,12),a=t.substring(12,14),n=new Date(r,parseFloat(e)-1,parseFloat(a)),s=(new Date).getFullYear()-parseFloat(r);return n.getFullYear()===parseFloat(r)&&n.getMonth()===parseFloat(e)-1&&n.getDate()===parseFloat(a)&&s>=0&&s<=150}(n)};export{a as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isMobile.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isMobile.js new file mode 100644 index 0000000..5fd9bed --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isMobile.js @@ -0,0 +1 @@ +var t=/^1[3456789]\d{9}$/,r=function(r){return"string"==typeof r&&t.test(r.trim())};export{r as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPassport.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPassport.js new file mode 100644 index 0000000..35890a3 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPassport.js @@ -0,0 +1 @@ +var t=/^1[45][0-9]{7}|([DSPGE](?![IO])[A-Z\d]{8})|((DE|SE|PE)(?![IO])[A-Z\d]{7})|([HM]\d{8, 10})$/,e=function(e){return"string"==typeof e&&t.test(e.toUpperCase().trim())};export{e as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPermit.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPermit.js new file mode 100644 index 0000000..e596d1c --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isPermit.js @@ -0,0 +1 @@ +var t=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,e=[1,0,10,9,8,7,6,5,4,3,2],r=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1],a=function(a){if("string"!=typeof a)return!1;var I=a.trim();return 18===I.length&&t.test(I)&&function(t){var a=t.split(""),I=0;"x"===a[17].toLowerCase()&&(a[17]=10);for(var D=0;D<17;D++)I+=r[D]*a[D];var S=I%11;return+a[17]===e[S]}(I)&&function(t){var e=t.substring(6,10),r=t.substring(10,12),a=t.substring(12,14),I=new Date(e,parseFloat(r)-1,parseFloat(a)),D=(new Date).getFullYear()-parseFloat(e);return I.getFullYear()===parseFloat(e)&&I.getMonth()===parseFloat(r)-1&&I.getDate()===parseFloat(a)&&D>=0&&D<=150}(I)},I=/^1[45][0-9]{7}|([DSPGE](?![IO])[A-Z\d]{8})|((DE|SE|PE)(?![IO])[A-Z\d]{7})|([HM]\d{8, 10})$/,D=function(t){return"string"==typeof t&&I.test(t.toUpperCase().trim())},S={POLICE:/^[0-9a-zA-Z]{8,9}$/,OFFICER:/^[0-9a-zA-Z]{4,15}$/,SOLDIER:/^[0-9a-zA-Z]{4,15}$/,DISCHARGE:/^[0-9a-zA-Z]{4,20}$/,HMCOME:/^[HMhm]{1}\d{10}$/,TWCOME:/^(\d{8}|[a-zA-Z]\d{7})$/,HMPASS:/^[WCwc]\d{8}$/,TWPASS:/^[TLtl]\d{8}$/,HKID:/^[a-zA-Z0-9]{1}\d{6,7}[a-zA-Z0-9]{1}$/,MCID:/^[157]\d{6}\([0-9Aa]\)$/,TWID:/^[a-zA-Z]{1}\d{9}$/,HMTID:/^8[123]0000\d{12}$/,FOREIGNID:/^[a-zA-Z]{3}\d{12}$/,OTHERS:/^[0-9a-zA-Z]{4,20}$/},n={IDCARD:"IDCARD",PASSPORT:"PASSPORT",POLICE:"POLICE",OFFICER:"OFFICER",SOLDIER:"SOLDIER",DISCHARGE:"DISCHARGE",HMCOME:"HMCOME",TWCOME:"TWCOME",HMPASS:"HMPASS",TWPASS:"TWPASS",HKID:"HKID",MCID:"MCID",TWID:"TWID",HMTID:"HMTID",FOREIGNID:"FOREIGNID",OTHERS:"OTHERS"},E=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.type,I=void 0===r?n.OTHERS:r,E="";return-1===Object.keys(S).indexOf(I)&&(console.warn("证件类型不存在"),E=n.OTHERS),I===n.IDCARD?a(t):I===n.PASSPORT?D(t):"string"==typeof t&&S[E||I].test(t.trim())};export{E as default,n as permitType}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isURL.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isURL.js new file mode 100644 index 0000000..01a91af --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isURL.js @@ -0,0 +1 @@ +var f=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),t=function(t){return"string"==typeof t&&f.test(t.trim())};export{t as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isVCode.js b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isVCode.js new file mode 100644 index 0000000..cba3f36 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/es/utils/validator/isVCode.js @@ -0,0 +1 @@ +var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.len,r=void 0===n?6:n;return"string"==typeof t&&t.length===r&&/^\d+$/.test(t.trim())};export{t as default}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/icon/icon-map.js b/local-nodemodules/@gtff/tdesign-gt-vue/icon/icon-map.js new file mode 100644 index 0000000..2f5a6cc --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/icon/icon-map.js @@ -0,0 +1 @@ +module.exports = {"add":"add","add-circle":"add-circle","add-rectangle":"add-rectangle","app":"app","arrow-down":"arrow-down","arrow-down-rectangle":"arrow-down-rectangle","arrow-left":"arrow-left","arrow-right":"arrow-right","arrow-up":"arrow-up","attach":"attach","backtop":"backtop","backtop-rectangle":"backtop-rectangle","backward":"backward","barcode":"barcode","books":"books","browse":"browse","browse-off":"browse-off","bulletpoint":"bulletpoint","calendar":"calendar","call":"call","caret-down":"caret-down","caret-down-small":"caret-down-small","caret-left":"caret-left","caret-left-small":"caret-left-small","caret-right":"caret-right","caret-right-small":"caret-right-small","caret-up":"caret-up","caret-up-small":"caret-up-small","cart":"cart","chart":"chart","chart-bar":"chart-bar","chart-bubble":"chart-bubble","chart-pie":"chart-pie","chat":"chat","check":"check","check-circle":"check-circle","check-circle-filled":"check-circle-filled","check-rectangle":"check-rectangle","check-rectangle-filled":"check-rectangle-filled","chevron-down":"chevron-down","chevron-down-circle":"chevron-down-circle","chevron-down-rectangle":"chevron-down-rectangle","chevron-left":"chevron-left","chevron-left-circle":"chevron-left-circle","chevron-left-double":"chevron-left-double","chevron-left-rectangle":"chevron-left-rectangle","chevron-right":"chevron-right","chevron-right-circle":"chevron-right-circle","chevron-right-double":"chevron-right-double","chevron-right-rectangle":"chevron-right-rectangle","chevron-up":"chevron-up","chevron-up-circle":"chevron-up-circle","chevron-up-rectangle":"chevron-up-rectangle","circle":"circle","clear":"clear","close":"close","close-circle":"close-circle","close-circle-filled":"close-circle-filled","close-rectangle":"close-rectangle","cloud":"cloud","cloud-download":"cloud-download","cloud-upload":"cloud-upload","code":"code","control-platform":"control-platform","creditcard":"creditcard","dashboard":"dashboard","delete":"delete","desktop":"desktop","discount":"discount","discount-filled":"discount-filled","download":"download","edit":"edit","edit-1":"edit-1","ellipsis":"ellipsis","enter":"enter","error":"error","error-circle":"error-circle","error-circle-filled":"error-circle-filled","file":"file","file-add":"file-add","file-copy":"file-copy","file-excel":"file-excel","file-image":"file-image","file-paste":"file-paste","file-pdf":"file-pdf","file-powerpoint":"file-powerpoint","file-unknown":"file-unknown","file-word":"file-word","filter":"filter","filter-clear":"filter-clear","flag":"flag","folder":"folder","folder-add":"folder-add","folder-open":"folder-open","fork":"fork","format-horizontal-align-bottom":"format-horizontal-align-bottom","format-horizontal-align-center":"format-horizontal-align-center","format-horizontal-align-top":"format-horizontal-align-top","format-vertical-align-center":"format-vertical-align-center","format-vertical-align-left":"format-vertical-align-left","format-vertical-align-right":"format-vertical-align-right","forward":"forward","fullscreen":"fullscreen","fullscreen-exit":"fullscreen-exit","gender-female":"gender-female","gender-male":"gender-male","gift":"gift","heart":"heart","heart-filled":"heart-filled","help":"help","help-circle":"help-circle","help-circle-filled":"help-circle-filled","history":"history","home":"home","hourglass":"hourglass","image":"image","info-circle":"info-circle","info-circle-filled":"info-circle-filled","internet":"internet","jump":"jump","laptop":"laptop","layers":"layers","link":"link","link-unlink":"link-unlink","loading":"loading","location":"location","lock-off":"lock-off","lock-on":"lock-on","login":"login","logo-android":"logo-android","logo-apple":"logo-apple","logo-apple-filled":"logo-apple-filled","logo-chrome":"logo-chrome","logo-chrome-filled":"logo-chrome-filled","logo-codepen":"logo-codepen","logo-github":"logo-github","logo-github-filled":"logo-github-filled","logo-ie":"logo-ie","logo-ie-filled":"logo-ie-filled","logo-windows":"logo-windows","logo-windows-filled":"logo-windows-filled","logout":"logout","mail":"mail","menu-fold":"menu-fold","menu-unfold":"menu-unfold","minus-circle":"minus-circle","minus-rectangle":"minus-rectangle","mobile":"mobile","mobile-vibrate":"mobile-vibrate","money-circle":"money-circle","more":"more","move":"move","next":"next","notification":"notification","notification-filled":"notification-filled","order-adjustment-column":"order-adjustment-column","order-ascending":"order-ascending","order-descending":"order-descending","page-first":"page-first","page-last":"page-last","pause-circle-filled":"pause-circle-filled","photo":"photo","pin":"pin","play":"play","play-circle":"play-circle","play-circle-filled":"play-circle-filled","play-circle-stroke":"play-circle-stroke","poweroff":"poweroff","precise-monitor":"precise-monitor","previous":"previous","print":"print","qrcode":"qrcode","queue":"queue","rectangle":"rectangle","refresh":"refresh","remove":"remove","rollback":"rollback","root-list":"root-list","round":"round","save":"save","scan":"scan","search":"search","secured":"secured","server":"server","service":"service","setting":"setting","share":"share","shop":"shop","slash":"slash","sound":"sound","star":"star","star-filled":"star-filled","stop":"stop","stop-circle":"stop-circle","stop-circle-1":"stop-circle-1","stop-circle-filled":"stop-circle-filled","swap":"swap","swap-left":"swap-left","swap-right":"swap-right","thumb-down":"thumb-down","thumb-up":"thumb-up","time":"time","time-filled":"time-filled","tips":"tips","tools":"tools","unfold-less":"unfold-less","unfold-more":"unfold-more","upload":"upload","usb":"usb","user":"user","user-add":"user-add","user-avatar":"user-avatar","user-circle":"user-circle","user-clear":"user-clear","user-talk":"user-talk","usergroup":"usergroup","usergroup-add":"usergroup-add","usergroup-clear":"usergroup-clear","video":"video","view-column":"view-column","view-list":"view-list","view-module":"view-module","wallet":"wallet","wifi":"wifi","zoom-in":"zoom-in","zoom-out":"zoom-out"}; \ No newline at end of file diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/icon/loader.js b/local-nodemodules/@gtff/tdesign-gt-vue/icon/loader.js new file mode 100644 index 0000000..1ff4f7b --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/icon/loader.js @@ -0,0 +1,6 @@ +module.exports = function modifyModuleSourceLoader(source) { + const options = this && this.query && typeof this.query === 'object' ? this.query : {}; + const modify = options.modify || null; + + return modify ? modify(source, options.path) : source; +}; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/icon/plugin.js b/local-nodemodules/@gtff/tdesign-gt-vue/icon/plugin.js new file mode 100644 index 0000000..6b647d6 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/icon/plugin.js @@ -0,0 +1,176 @@ +const fs = require('fs'); +const path = require('path'); +const { icons } = require('./svg.json'); +// 待替换图标名称,和目标替换图标名称,映射关系 +const ICON_MAP = require('./icon-map'); + +const PLUGIN_NAME = 't-icon-replace-webpack-plugin'; +class TIconReplaceWebpackPlugin { + constructor(options) { + this.options = { + name: PLUGIN_NAME, + staticPath: 'static', + debug: false, + rules: [ + /** + * 替换按需加载的icon组件 + */ + { + test: /tdesign-icons-vue\/(esm|lib)\/components\/.*\.js$/, + modify: (src, pathString) => { + let newData = src || ''; + // 获取需要替换的icon组件 + const fileNameObj = pathString.split('/'); + const fileNameExt = fileNameObj[fileNameObj.length - 1]; + const fileName = fileNameExt.split('.')[0]; + const module = ICON_MAP[fileName]; + // console.log('newData', newData); + if (module) { + newData = this.replace(src); + } + + return newData; + }, + }, + /** + * 替换全量t-icon组件 + */ + { + test: /tdesign-icons-vue\/(esm|dist)\/svg-sprite\/svg-sprite\.js$/, + modify: (src) => { + const str = + process.env.RUN_TYPE === 'demo' + ? '//tencent-tdgv-1255000078.cos.zjywxc.csp.xc01.cloud.sat.tax/icon/svg.js' + : /** + * 本地开发模式会编译成绝对路径,如/dev/static/svg.js + * 做成物料包会编译成./static/svg.js + */ + `${process.env.NODE_ENV === 'production' ? '.' : process.env.VUE_APP_CDN_PATH}/${ + this.options.staticPath + }/svg.js`; + // console.log('str', str); + return src.replace(/(CDN_ICONFONT_URL = ['|"]).*(['|"])/, `$1${str}$2`); + }, + }, + ], + ...options, + }; + + // 如果不是用于demo站点,则把svg.js拷贝到工程目录去 + if ( + process.env.RUN_TYPE !== 'demo' && + // 确保跑在vue-cli下 + process.env.VUE_APP_ENV !== undefined && + // 非lint模式 + /vue-cli-service lint/.test(process.env.npm_lifecycle_script) !== true + ) { + this.copyJs(); + } + + // return this.replacePlugin(); + } + + apply(compiler) { + compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => { + const modifiedModules = []; + const { rules, debug } = this.options; + const tapCallback = (params, normalModule) => { + const userRequest = normalModule.userRequest || ''; + + const startIndex = userRequest.lastIndexOf('!') === -1 ? 0 : userRequest.lastIndexOf('!') + 1; + + const moduleRequest = userRequest.substr(startIndex).replace(/\\/g, '/'); + + if (modifiedModules.includes(moduleRequest)) { + return; + } + + rules.forEach((options, ruleIndex) => { + const { test, modify } = options; + const isMatched = (() => { + if (typeof test === 'function' && test(normalModule)) { + return true; + } + + return test instanceof RegExp && test.test(moduleRequest); + })(); + + if (debug && isMatched) { + // eslint-disable-next-line no-console + console.log(`[${PLUGIN_NAME}] Add loader for module ${moduleRequest} at index ${ruleIndex}.`); + } + + if (isMatched) { + normalModule.loaders.push({ + loader: require.resolve('./loader.js'), + options: { + path: moduleRequest, + ruleIndex, + modify, + }, + }); + + modifiedModules.push(moduleRequest); + } + }); + }; + compilation.hooks.normalModuleLoader.tap(PLUGIN_NAME, tapCallback); + }); + } + + /** + * 替换单个icon js文件的核心处理函数 + * @param source + * @returns {*} + */ + replace(source = '') { + let newSource = source; + // let iconName = source.match(/-icon-([\w|-]+)/g)[0]; + const iconNameMatch = /id:[ ]?'([\w|-]+)'/g.exec(source); + if (iconNameMatch && iconNameMatch.length > 1) { + const iconName = iconNameMatch[1]; + const newIconName = ICON_MAP[iconName]; + const newIconSvg = icons.find((t) => t.name === newIconName); + // 存在图标替换 + if (newIconName && newIconSvg) { + // 匹配 svg / path 属性 进行替换 + let attrs = newIconSvg.svgCode.match(/([\w-]+?=".*?")/g); + if (!attrs) { + console.warn('icon svgCode is not correct, it should like ``'); + return; + } + attrs = attrs.map((t) => { + const r = t.split('='); + return { key: r[0], value: r[1] }; + }); + // 不包含 value 的 svg 属性 + const pureAttrs = attrs.map((t) => t.key); + const regExp = new RegExp(`"*(${pureAttrs.join('|')})"*: ".*?"`, 'g'); + newSource = source.replace(regExp, (str) => { + for (let i = 0, len = attrs.length; i < len; i++) { + const { key, value } = attrs[i]; + if (str.indexOf(key) !== -1) { + return `"${key}": ${value}`; + } + } + return str; + }); + } + } + + return newSource; + } + + /** + * 拷贝全量svg到项目静态目录 + */ + copyJs() { + fs.copyFileSync( + path.resolve(__dirname, 'svg.js'), + path.resolve(process.cwd(), `public/${this.options.staticPath}/svg.js`), + ); + console.log('====>> 拷贝全量svg到项目静态目录成功'); + } +} + +module.exports = TIconReplaceWebpackPlugin; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.js b/local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.js new file mode 100644 index 0000000..e47a9d8 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.js @@ -0,0 +1,11 @@ +!(function () { + var svgCode = '' + if (document.body) { + document.body.insertAdjacentHTML('afterbegin', svgCode) + } else { + document.addEventListener('DOMContentLoaded', function() { + document.body.insertAdjacentHTML('afterbegin', svgCode) + }) + } + })() + \ No newline at end of file diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.json b/local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.json new file mode 100644 index 0000000..d96771c --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/icon/svg.json @@ -0,0 +1 @@ +{"iconName":"tdg","icons":[{"name":"check-circle-filled","svgCode":"","codepoint":"\\e103"},{"name":"close-circle-filled","svgCode":"","codepoint":"\\e105"},{"name":"error-circle-filled","svgCode":"","codepoint":"\\e104"},{"name":"info-circle-filled","svgCode":"","codepoint":"\\e106"},{"name":"default-filled","svgCode":"","codepoint":"\\e107"},{"name":"menu-fold","svgCode":"","codepoint":"\\e10a"},{"name":"menu-unfold","svgCode":"","codepoint":"\\e10d"},{"name":"backtop","svgCode":"","codepoint":"\\e10c"},{"name":"rollback","svgCode":"","codepoint":"\\e10b"},{"name":"share","svgCode":"","codepoint":"\\e10e"},{"name":"swap","svgCode":"","codepoint":"\\e10f"},{"name":"chevron-up","svgCode":"","codepoint":"\\e110"},{"name":"fullscreen","svgCode":"","codepoint":"\\e111"},{"name":"upload","svgCode":"","codepoint":"\\e112"},{"name":"chevron-right-double","svgCode":"","codepoint":"\\e117"},{"name":"chevron-left-double","svgCode":"","codepoint":"\\e116"},{"name":"fullscreen-exit","svgCode":"","codepoint":"\\e118"},{"name":"cloud-upload","svgCode":"","codepoint":"\\e11a"},{"name":"chevron-down","svgCode":"","codepoint":"\\e11b"},{"name":"download","svgCode":"","codepoint":"\\e11c"},{"name":"arrow-up","svgCode":"","codepoint":"\\e11d"},{"name":"arrow-down","svgCode":"","codepoint":"\\e11e"},{"name":"arrow-right","svgCode":"","codepoint":"\\e11f"},{"name":"arrow-left","svgCode":"","codepoint":"\\e120"},{"name":"chevron-right","svgCode":"","codepoint":"\\e121"},{"name":"refresh","svgCode":"","codepoint":"\\e122"},{"name":"chevron-left","svgCode":"","codepoint":"\\e124"},{"name":"order-adjustment-column","svgCode":"","codepoint":"\\e125"},{"name":"edit","svgCode":"","codepoint":"\\e126"},{"name":"close","svgCode":"","codepoint":"\\e127"},{"name":"zoom-in","svgCode":"","codepoint":"\\e128"},{"name":"search","svgCode":"","codepoint":"\\e129"},{"name":"file-copy","svgCode":"","codepoint":"\\e12a"},{"name":"bulletpoint","svgCode":"","codepoint":"\\e12b"},{"name":"ellipsis","svgCode":"","codepoint":"\\e12c"},{"name":"more","svgCode":"","codepoint":"\\e12e"},{"name":"add","svgCode":"","codepoint":"\\e12f"},{"name":"remove","svgCode":"","codepoint":"\\e130"},{"name":"minus-rectangle","svgCode":"","codepoint":"\\e131"},{"name":"format-vertical-align-center","svgCode":"","codepoint":"\\e132"},{"name":"play-circle","svgCode":"","codepoint":"\\e133"},{"name":"close-circle","svgCode":"","codepoint":"\\e135"},{"name":"filter","svgCode":"","codepoint":"\\e134"},{"name":"delete","svgCode":"","codepoint":"\\e136"},{"name":"setting","svgCode":"","codepoint":"\\e137"},{"name":"zoom-out","svgCode":"","codepoint":"\\e13a"},{"name":"browse-off","svgCode":"","codepoint":"\\e13e"},{"name":"format-vertical-align-right","svgCode":"","codepoint":"\\e13f"},{"name":"browse","svgCode":"","codepoint":"\\e143"},{"name":"stop-circle","svgCode":"","codepoint":"\\e141"},{"name":"add-rectangle","svgCode":"","codepoint":"\\e142"},{"name":"edit-1","svgCode":"","codepoint":"\\e145"},{"name":"format-vertical-align-left","svgCode":"","codepoint":"\\e147"},{"name":"error-circle","svgCode":"","codepoint":"\\e151"},{"name":"info-circle","svgCode":"","codepoint":"\\e150"},{"name":"save","svgCode":"","codepoint":"\\e154"},{"name":"discount","svgCode":"","codepoint":"\\e152"},{"name":"chart-pie","svgCode":"","codepoint":"\\e158"},{"name":"lock-off","svgCode":"","codepoint":"\\e15e"},{"name":"code","svgCode":"","codepoint":"\\e164"},{"name":"thumb-up","svgCode":"","codepoint":"\\e165"},{"name":"desktop","svgCode":"","codepoint":"\\e16a"},{"name":"location","svgCode":"","codepoint":"\\e16c"},{"name":"check-rectangle","svgCode":"","codepoint":"\\e16b"},{"name":"qrcode","svgCode":"","codepoint":"\\e16e"},{"name":"order-descending","svgCode":"","codepoint":"\\e170"},{"name":"attach","svgCode":"","codepoint":"\\e173"},{"name":"server","svgCode":"","codepoint":"\\e174"},{"name":"app","svgCode":"","codepoint":"\\e177"},{"name":"gift","svgCode":"","codepoint":"\\e185"},{"name":"link","svgCode":"","codepoint":"\\e182"},{"name":"control-platform","svgCode":"","codepoint":"\\e183"},{"name":"precise-monitor","svgCode":"","codepoint":"\\e18b"},{"name":"usergroup","svgCode":"","codepoint":"\\e198"},{"name":"calendar","svgCode":"","codepoint":"\\e19b"},{"name":"sound","svgCode":"","codepoint":"\\e19a"},{"name":"chart-bubble","svgCode":"","codepoint":"\\e19c"},{"name":"time","svgCode":"","codepoint":"\\e19d"},{"name":"money-circle","svgCode":"","codepoint":"\\e1a2"},{"name":"home","svgCode":"","codepoint":"\\e1a1"},{"name":"lock-on","svgCode":"","codepoint":"\\e1a8"},{"name":"chat","svgCode":"","codepoint":"\\e1ac"},{"name":"layers","svgCode":"","codepoint":"\\e1ad"},{"name":"image","svgCode":"","codepoint":"\\e1b4"},{"name":"poweroff","svgCode":"","codepoint":"\\e1b3"},{"name":"folder","svgCode":"","codepoint":"\\e1b2"},{"name":"folder-open","svgCode":"","codepoint":"\\e1b8"},{"name":"photo","svgCode":"","codepoint":"\\e1bd"},{"name":"notification","svgCode":"","codepoint":"\\e1b9"},{"name":"resources-list","svgCode":"","codepoint":"\\e1bc"},{"name":"mobile","svgCode":"","codepoint":"\\e1bf"},{"name":"order-ascending","svgCode":"","codepoint":"\\e1c0"},{"name":"star-filled","svgCode":"","codepoint":"\\e1c1"},{"name":"user","svgCode":"","codepoint":"\\e1c2"},{"name":"mail","svgCode":"","codepoint":"\\e1c7"},{"name":"chart","svgCode":"","codepoint":"\\e1cd"},{"name":"books","svgCode":"","codepoint":"\\e1cc"},{"name":"caret-down-small","svgCode":"","codepoint":"\\e1d3"},{"name":"caret-right-small","svgCode":"","codepoint":"\\e1d4"},{"name":"heart-filled","svgCode":"","codepoint":"\\e1d5"},{"name":"discount-filled","svgCode":"","codepoint":"\\e1d9"},{"name":"time-filled","svgCode":"","codepoint":"\\e1d8"},{"name":"notification-filled","svgCode":"","codepoint":"\\e1d7"},{"name":"logo-chrome-filled","svgCode":"","codepoint":"\\e1db"},{"name":"jump","svgCode":"","codepoint":"\\e1dd"},{"name":"login","svgCode":"","codepoint":"\\e1de"},{"name":"close-rectangle","svgCode":"","codepoint":"\\e1df"},{"name":"queue","svgCode":"","codepoint":"\\e1e1"},{"name":"add-circle","svgCode":"","codepoint":"\\e1e0"},{"name":"folder-add","svgCode":"","codepoint":"\\e1e3"},{"name":"file-add","svgCode":"","codepoint":"\\e1e4"},{"name":"star","svgCode":"","codepoint":"\\e1e5"},{"name":"zhantie","svgCode":"","codepoint":"\\e1e7"},{"name":"arrow-down-rectangle","svgCode":"","codepoint":"\\e1e6"},{"name":"enter","svgCode":"","codepoint":"\\e1e8"},{"name":"caret-up","svgCode":"","codepoint":"\\e1e9"},{"name":"backward","svgCode":"","codepoint":"\\e1ea"},{"name":"forward","svgCode":"","codepoint":"\\e1eb"},{"name":"caret-down","svgCode":"","codepoint":"\\e1ec"},{"name":"caret-right","svgCode":"","codepoint":"\\e1ed"},{"name":"caret-left","svgCode":"","codepoint":"\\e1ee"},{"name":"backtop-rectangle","svgCode":"","codepoint":"\\e1ef"},{"name":"previous","svgCode":"","codepoint":"\\e1f0"},{"name":"page-first","svgCode":"","codepoint":"\\e1f2"},{"name":"unfold-less","svgCode":"","codepoint":"\\e1f1"},{"name":"next","svgCode":"","codepoint":"\\e1f3"},{"name":"chevron-up-rectangle","svgCode":"","codepoint":"\\e1f4"},{"name":"chevron-up-circle","svgCode":"","codepoint":"\\e1f5"},{"name":"chevron-down-rectangle","svgCode":"","codepoint":"\\e1f6"},{"name":"chevron-down-circle","svgCode":"","codepoint":"\\e1f8"},{"name":"chevron-right-rectangle","svgCode":"","codepoint":"\\e1f7"},{"name":"chevron-right-circle","svgCode":"","codepoint":"\\e1f9"},{"name":"chevron-left-rectangle","svgCode":"","codepoint":"\\e1fa"},{"name":"chevron-left-circle","svgCode":"","codepoint":"\\e1fc"},{"name":"cloud-download","svgCode":"","codepoint":"\\e1fb"},{"name":"unfold-more","svgCode":"","codepoint":"\\e1fd"},{"name":"page-last","svgCode":"","codepoint":"\\e1fe"},{"name":"swap-left","svgCode":"","codepoint":"\\e1ff"},{"name":"heart","svgCode":"","codepoint":"\\e201"},{"name":"secured","svgCode":"","codepoint":"\\e202"},{"name":"logo-android","svgCode":"","codepoint":"\\e203"},{"name":"pin","svgCode":"","codepoint":"\\e204"},{"name":"thumb-down","svgCode":"","codepoint":"\\e205"},{"name":"print","svgCode":"","codepoint":"\\e209"},{"name":"tips","svgCode":"","codepoint":"\\e207"},{"name":"call","svgCode":"","codepoint":"\\e20a"},{"name":"fork","svgCode":"","codepoint":"\\e208"},{"name":"error","svgCode":"","codepoint":"\\e20d"},{"name":"root-list","svgCode":"","codepoint":"\\e20c"},{"name":"tools","svgCode":"","codepoint":"\\e210"},{"name":"cart","svgCode":"","codepoint":"\\e20e"},{"name":"internet","svgCode":"","codepoint":"\\e20f"},{"name":"loading","svgCode":"","codepoint":"\\e211"},{"name":"history","svgCode":"","codepoint":"\\e212"},{"name":"gender-male","svgCode":"","codepoint":"\\e214"},{"name":"gender-female","svgCode":"","codepoint":"\\e213"},{"name":"logo-apple","svgCode":"","codepoint":"\\e216"},{"name":"flag","svgCode":"","codepoint":"\\e215"},{"name":"wallet","svgCode":"","codepoint":"\\e218"},{"name":"user-clear","svgCode":"","codepoint":"\\e217"},{"name":"usergroup-clear","svgCode":"","codepoint":"\\e219"},{"name":"link-unlink","svgCode":"","codepoint":"\\e21a"},{"name":"scan","svgCode":"","codepoint":"\\e21b"},{"name":"hourglass","svgCode":"","codepoint":"\\e21c"},{"name":"shop","svgCode":"","codepoint":"\\e21d"},{"name":"video","svgCode":"","codepoint":"\\e21e"},{"name":"view-column","svgCode":"","codepoint":"\\e21f"},{"name":"view-list","svgCode":"","codepoint":"\\e220"},{"name":"view-module","svgCode":"","codepoint":"\\e221"},{"name":"format-horizontal-align-bottom","svgCode":"","codepoint":"\\e223"},{"name":"format-horizontal-align-top","svgCode":"","codepoint":"\\e224"},{"name":"format-horizontal-align-center","svgCode":"","codepoint":"\\e222"},{"name":"user-add","svgCode":"","codepoint":"\\e225"},{"name":"usergroup-add","svgCode":"","codepoint":"\\e226"},{"name":"barcode","svgCode":"","codepoint":"\\e227"},{"name":"file-image","svgCode":"","codepoint":"\\e228"},{"name":"file-unknown","svgCode":"","codepoint":"\\e229"},{"name":"file-paste","svgCode":"","codepoint":"\\e22a"},{"name":"slash","svgCode":"","codepoint":"\\e22c"},{"name":"dashboard","svgCode":"","codepoint":"\\e22b"},{"name":"mobile-vibrate","svgCode":"","codepoint":"\\e22d"},{"name":"help","svgCode":"","codepoint":"\\e231"},{"name":"user-circle","svgCode":"","codepoint":"\\e22f"},{"name":"user-avatar","svgCode":"","codepoint":"\\e22e"},{"name":"round","svgCode":"","codepoint":"\\e230"},{"name":"cloud","svgCode":"","codepoint":"\\e233"},{"name":"chart-bar","svgCode":"","codepoint":"\\e232"},{"name":"file-excel","svgCode":"","codepoint":"\\e234"},{"name":"file-pdf","svgCode":"","codepoint":"\\e235"},{"name":"file-powerpoint","svgCode":"","codepoint":"\\e237"},{"name":"usb","svgCode":"","codepoint":"\\e236"},{"name":"wifi","svgCode":"","codepoint":"\\e238"},{"name":"file-word","svgCode":"","codepoint":"\\e239"},{"name":"creditcard","svgCode":"","codepoint":"\\e23a"},{"name":"service","svgCode":"","codepoint":"\\e23b"},{"name":"swap-right","svgCode":"","codepoint":"\\e23c"},{"name":"check-circle","svgCode":"","codepoint":"\\e23d"},{"name":"file","svgCode":"","codepoint":"\\e23f"},{"name":"stop","svgCode":"","codepoint":"\\e240"},{"name":"laptop","svgCode":"","codepoint":"\\e241"},{"name":"help-circle-filled","svgCode":"","codepoint":"\\e243"},{"name":"help-circle","svgCode":"","codepoint":"\\e244"},{"name":"check","svgCode":"","codepoint":"\\e248"},{"name":"logo-apple-filled","svgCode":"","codepoint":"\\e24e"},{"name":"logo-github-filled","svgCode":"","codepoint":"\\e24a"},{"name":"check-rectangle-filled","svgCode":"","codepoint":"\\e24f"},{"name":"caret-left-small","svgCode":"","codepoint":"\\e249"},{"name":"logo-ie-filled","svgCode":"","codepoint":"\\e24c"},{"name":"play-circle-stroke","svgCode":"","codepoint":"\\e251"},{"name":"circle","svgCode":"","codepoint":"\\e250"},{"name":"clear","svgCode":"","codepoint":"\\e252"},{"name":"user-talk","svgCode":"","codepoint":"\\e253"},{"name":"logout","svgCode":"","codepoint":"\\e256"},{"name":"filter-clear","svgCode":"","codepoint":"\\e258"},{"name":"logo-chrome","svgCode":"","codepoint":"\\e257"},{"name":"logo-codepen","svgCode":"","codepoint":"\\e254"},{"name":"logo-ie","svgCode":"","codepoint":"\\e255"},{"name":"logo-windows","svgCode":"","codepoint":"\\e259"},{"name":"logo-windows-filled","svgCode":"","codepoint":"\\e25a"},{"name":"play","svgCode":"","codepoint":"\\e25c"},{"name":"minus-circle","svgCode":"","codepoint":"\\e25b"},{"name":"rectangle","svgCode":"","codepoint":"\\e264"},{"name":"stop-circle-1","svgCode":"","codepoint":"\\e265"},{"name":"play-circle-filled","svgCode":"","codepoint":"\\e266"},{"name":"pause-circle-filled","svgCode":"","codepoint":"\\e267"},{"name":"stop-circle-filled","svgCode":"","codepoint":"\\e268"},{"name":"caret-up-small","svgCode":"","codepoint":"\\e269"},{"name":"logo-github","svgCode":"","codepoint":"\\e26a"},{"name":"move","svgCode":"","codepoint":"\\e26b"}]} \ No newline at end of file diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/lib/index.common.js b/local-nodemodules/@gtff/tdesign-gt-vue/lib/index.common.js new file mode 100644 index 0000000..7588476 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/lib/index.common.js @@ -0,0 +1,21487 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "dd63"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 0: +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "01ff": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("92ae"); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("7326")(module))) + +/***/ }), + +/***/ "032e": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__("3f48"); +var settle = __webpack_require__("4a86"); +var cookies = __webpack_require__("ca6e"); +var buildURL = __webpack_require__("4367"); +var buildFullPath = __webpack_require__("aafc"); +var parseHeaders = __webpack_require__("7868"); +var isURLSameOrigin = __webpack_require__("d335"); +var createError = __webpack_require__("a505"); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + var responseType = config.responseType; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + var fullPath = buildFullPath(config.baseURL, config.url); + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(createError('Request aborted', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(createError( + timeoutErrorMessage, + config, + config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (!requestData) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; + + +/***/ }), + +/***/ "04ff": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); +}; + + +/***/ }), + +/***/ "06d4": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__("3f48"); +var transformData = __webpack_require__("e067"); +var isCancel = __webpack_require__("5816"); +var defaults = __webpack_require__("7723"); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData.call( + config, + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData.call( + config, + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; + + +/***/ }), + +/***/ "07d9": +/***/ (function(module, exports, __webpack_require__) { + +exports.nextTick = function nextTick(fn) { + var args = Array.prototype.slice.call(arguments); + args.shift(); + setTimeout(function () { + fn.apply(null, args); + }, 0); +}; + +exports.platform = exports.arch = +exports.execPath = exports.title = 'browser'; +exports.pid = 1; +exports.browser = true; +exports.env = {}; +exports.argv = []; + +exports.binding = function (name) { + throw new Error('No such module. (Possibly not yet loaded)') +}; + +(function () { + var cwd = '/'; + var path; + exports.cwd = function () { return cwd }; + exports.chdir = function (dir) { + if (!path) path = __webpack_require__("a0d5"); + cwd = path.resolve(dir, cwd); + }; +})(); + +exports.exit = exports.kill = +exports.umask = exports.dlopen = +exports.uptime = exports.memoryUsage = +exports.uvCounters = function() {}; +exports.features = {}; + + +/***/ }), + +/***/ "13b8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + + +/***/ }), + +/***/ "1536": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c { + if (global.__IS_REQUEST_PROXYED__) { + console.warn("请不要重复调用"); + return; + } + var wxProxy = new Proxy(wx, { + get(target, prop) { + if (prop === "request") { + return function (args) { + const tempRequest = target[prop]; + const shouldFormat = + typeof filter === "function" + ? filter({ + method: args.method ? args.method.toLowerCase() : "get", + url: args.url, + }) + : true; + if (shouldFormat) { + tempRequest.call(target, { + ...args, + data: Object(_utils_loopAndFormat__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( + null, + args.data, + reqKeyFormatter, + null + ), + success(res) { + args.success && + args.success({ + ...res, + data: Object(_utils_loopAndFormat__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( + null, + res.data, + resKeyFormatter, + valueFormatter + ), + }); + }, + }); + } else { + tempRequest.call(target, args); + } + }; + } + return target[prop]; + }, + }); + wx = wxProxy; + global.__IS_REQUEST_PROXYED__ = true; +}); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("7d15"))) + +/***/ }), + +/***/ "1ba2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var pkg = __webpack_require__("9ab4"); + +var validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +var deprecatedWarnings = {}; +var currentVerArr = pkg.version.split('.'); + +/** + * Compare package versions + * @param {string} version + * @param {string?} thanVersion + * @returns {boolean} + */ +function isOlderVersion(version, thanVersion) { + var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr; + var destVer = version.split('.'); + for (var i = 0; i < 3; i++) { + if (pkgVersionArr[i] > destVer[i]) { + return true; + } else if (pkgVersionArr[i] < destVer[i]) { + return false; + } + } + return false; +} + +/** + * Transitional option validator + * @param {function|boolean?} validator + * @param {string?} version + * @param {string} message + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + var isDeprecated = version && isOlderVersion(version); + + function formatMessage(opt, desc) { + return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return function(value, opt, opts) { + if (validator === false) { + throw new Error(formatMessage(opt, ' has been removed in ' + version)); + } + + if (isDeprecated && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new TypeError('options must be an object'); + } + var keys = Object.keys(options); + var i = keys.length; + while (i-- > 0) { + var opt = keys[i]; + var validator = schema[opt]; + if (validator) { + var value = options[opt]; + var result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new TypeError('option ' + opt + ' must be ' + result); + } + continue; + } + if (allowUnknown !== true) { + throw Error('Unknown option ' + opt); + } + } +} + +module.exports = { + isOlderVersion: isOlderVersion, + assertOptions: assertOptions, + validators: validators +}; + + +/***/ }), + +/***/ "20e0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +}; + + +/***/ }), + +/***/ "275a": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Cancel = __webpack_require__("1586"); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ +function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); +} + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } +}; + +/** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ +CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; +}; + +module.exports = CancelToken; + + +/***/ }), + +/***/ "2a1b": +/***/ (function(module, exports, __webpack_require__) { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var inspectCustom = __webpack_require__(0).custom; +var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function') { + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if ('cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { + return obj[inspectSymbol](); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + + +/***/ }), + +/***/ "338e": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + + error.request = request; + error.response = response; + error.isAxiosError = true; + + error.toJSON = function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: this.config, + code: this.code + }; + }; + return error; +}; + + +/***/ }), + +/***/ "37fe": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__("3f48"); + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * @returns {Object} New object resulting from merging config2 to config1 + */ +module.exports = function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + var config = {}; + + var valueFromConfig2Keys = ['url', 'method', 'data']; + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; + var defaultToConfig2Keys = [ + 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', + 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', + 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', + 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' + ]; + var directMergeKeys = ['validateStatus']; + + function getMergedValue(target, source) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge(target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; + } + + function mergeDeepProperties(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(config1[prop], config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + config[prop] = getMergedValue(undefined, config1[prop]); + } + } + + utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(undefined, config2[prop]); + } + }); + + utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); + + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(undefined, config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + config[prop] = getMergedValue(undefined, config1[prop]); + } + }); + + utils.forEach(directMergeKeys, function merge(prop) { + if (prop in config2) { + config[prop] = getMergedValue(config1[prop], config2[prop]); + } else if (prop in config1) { + config[prop] = getMergedValue(undefined, config1[prop]); + } + }); + + var axiosKeys = valueFromConfig2Keys + .concat(mergeDeepPropertiesKeys) + .concat(defaultToConfig2Keys) + .concat(directMergeKeys); + + var otherKeys = Object + .keys(config1) + .concat(Object.keys(config2)) + .filter(function filterAxiosKeys(key) { + return axiosKeys.indexOf(key) === -1; + }); + + utils.forEach(otherKeys, mergeDeepProperties); + + return config; +}; + + +/***/ }), + +/***/ "3a83": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__("57e0")(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__("e4be"); +var hasOwn = __webpack_require__("c124"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "3b6b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tooltip_label_vue_vue_type_style_index_0_id_9c019630_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8c4f"); +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tooltip_label_vue_vue_type_style_index_0_id_9c019630_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tooltip_label_vue_vue_type_style_index_0_id_9c019630_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + + +/***/ }), + +/***/ "3b70": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__("3f48"); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; + + +/***/ }), + +/***/ "3bde": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames() { + var classes = []; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + if (arg.length) { + var inner = classNames.apply(null, arg); + if (inner) { + classes.push(inner); + } + } + } else if (argType === 'object') { + if (arg.toString === Object.prototype.toString) { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } else { + classes.push(arg.toString()); + } + } + } + + return classes.join(' '); + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + +/***/ }), + +/***/ "3f48": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__("bdf1"); + +// utils is a library of generic helper functions non-specific to axios + +var toString = Object.prototype.toString; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return toString.call(val) === '[object Array]'; +} + +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is a Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return (typeof FormData !== 'undefined') && (val instanceof FormData); +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} + +/** + * Determine if a value is a plain Object + * + * @param {Object} val The value to test + * @return {boolean} True if value is a plain Object, otherwise false + */ +function isPlainObject(val) { + if (toString.call(val) !== '[object Object]') { + return false; + } + + var prototype = Object.getPrototypeOf(val); + return prototype === null || prototype === Object.prototype; +} + +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} + +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} + +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} + +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} + +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || + navigator.product === 'NativeScript' || + navigator.product === 'NS')) { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); +} + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } +} + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (isPlainObject(result[key]) && isPlainObject(val)) { + result[key] = merge(result[key], val); + } else if (isPlainObject(val)) { + result[key] = merge({}, val); + } else if (isArray(val)) { + result[key] = val.slice(); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * @return {string} content value without BOM + */ +function stripBOM(content) { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isPlainObject: isPlainObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim, + stripBOM: stripBOM +}; + + +/***/ }), + +/***/ "405b": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller +// MIT license +// source: https://github.com/amiller-gh/currentScript-polyfill + +// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505 + +(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(typeof self !== 'undefined' ? self : this, function () { + function getCurrentScript () { + var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript') + // for chrome + if (!descriptor && 'currentScript' in document && document.currentScript) { + return document.currentScript + } + + // for other browsers with native support for currentScript + if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) { + return document.currentScript + } + + // IE 8-10 support script readyState + // IE 11+ & Firefox support stack trace + try { + throw new Error(); + } + catch (err) { + // Find the second match for the "at" string to get file src url from stack. + var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig, + ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig, + stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack), + scriptLocation = (stackDetails && stackDetails[1]) || false, + line = (stackDetails && stackDetails[2]) || false, + currentLocation = document.location.href.replace(document.location.hash, ''), + pageSource, + inlineScriptSourceRegExp, + inlineScriptSource, + scripts = document.getElementsByTagName('script'); // Live NodeList collection + + if (scriptLocation === currentLocation) { + pageSource = document.documentElement.outerHTML; + inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*

Hello

+ +``` + +The generated route config is like following: + +```js +module.exports = [ + { + name: 'index', + path: '/', + component: () => import('@/pages/index.vue'), + meta: { + requiresAuth: true + } + } +] +``` + +## References + +### `generateRoutes(config: GenerateConfig): string` + +`GenerateConfig` has the following properties: + +- `pages`: Path to the directory that contains your page components. +- `importPrefix`: A string that will be added to importing component path (default `@/pages/`). +- `dynamicImport`: Use dynamic import expression (`import()`) to import component (default `true`). +- `nested`: If `true`, generated route path will be always treated as nested. (e.g. will generate `path: 'foo'` rather than `path: '/foo'`) + +## Related Projects + +- [vue-cli-plugin-auto-routing](https://github.com/ktsn/vue-cli-plugin-auto-routing): Vue CLI plugin including auto pages and layouts resolution. +- [vue-router-layout](https://github.com/ktsn/vue-router-layout): Lightweight layout resolver for Vue Router. +- [vue-auto-routing](https://github.com/ktsn/vue-auto-routing): Generate Vue Router routing automatically. + +## License + +MIT diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.d.ts b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.d.ts new file mode 100644 index 0000000..3b73d35 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.d.ts @@ -0,0 +1,9 @@ +export interface GenerateConfig { + pages: string; + importPrefix?: string; + dynamicImport?: boolean; + chunkNamePrefix?: string; + nested?: boolean; + patterns?: Array; +} +export declare function generateRoutes({ pages, importPrefix, dynamicImport, chunkNamePrefix, nested, patterns }: GenerateConfig): string; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.js b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.js new file mode 100644 index 0000000..1ec0e8e --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/index.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateRoutes = void 0; +const fs = require("fs"); +const path = require("path"); +const fg = require("fast-glob"); +const routes_1 = require("./template/routes"); +const resolve_1 = require("./resolve"); +function generateRoutes({ pages, importPrefix = '@/pages/', dynamicImport = true, chunkNamePrefix = '', nested = false, patterns = ['**/*.vue', '!**/__*__.vue', '!**/__*__/**', '!**/components/**'] }) { + const pagePaths = fg.sync(patterns, { + cwd: pages, + onlyFiles: true, + }); + const metaList = (0, resolve_1.resolveRoutePaths)(pagePaths, importPrefix, nested, (file) => { + return fs.readFileSync(path.join(pages, file), 'utf8'); + }); + return (0, routes_1.createRoutes)(metaList, dynamicImport, chunkNamePrefix); +} +exports.generateRoutes = generateRoutes; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.d.ts b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.d.ts new file mode 100644 index 0000000..0fbab48 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.d.ts @@ -0,0 +1,5 @@ +export interface NestedMap { + value?: T; + children?: Map>; +} +export declare function setToMap(map: NestedMap, path: string[], value: T): void; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.js b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.js new file mode 100644 index 0000000..6aa2802 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/nested-map.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setToMap = void 0; +function setToMap(map, path, value) { + const target = path.reduce((item, key) => { + if (!item.children) { + item.children = new Map(); + } + let child = item.children.get(key); + if (!child) { + child = {}; + item.children.set(key, child); + } + return child; + }, map); + target.value = value; +} +exports.setToMap = setToMap; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.d.ts b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.d.ts new file mode 100644 index 0000000..05f8d09 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.d.ts @@ -0,0 +1,8 @@ +export interface ParseResult { + customBlocks: CustomBlock[]; +} +export interface CustomBlock { + type: string; + content: string; +} +export declare function parseSFC(code: string): ParseResult; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.js b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.js new file mode 100644 index 0000000..d934f20 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/parse-sfc.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseSFC = void 0; +function parseSFC(code) { + try { + const parserV2 = require('vue-template-compiler') + .parseComponent; + return parserV2(code, { + pad: 'space', + }); + } + catch (_a) { + try { + const parserV3 = require('@vue/compiler-sfc').parse; + return parserV3(code, { + pad: 'space', + }).descriptor; + } + catch (_b) { + throw new Error('[vue-route-generator] Either "vue-template-compiler" or "@vue/compiler-sfc" is required.'); + } + } +} +exports.parseSFC = parseSFC; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.d.ts b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.d.ts new file mode 100644 index 0000000..b8d3f57 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.d.ts @@ -0,0 +1,12 @@ +export interface PageMeta { + name: string; + chunkName: string; + specifier: string; + path: string; + pathSegments: string[]; + component: string; + children?: PageMeta[]; + routeMeta?: any; + route?: any; +} +export declare function resolveRoutePaths(paths: string[], importPrefix: string, nested: boolean, readFile: (path: string) => string): PageMeta[]; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.js b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.js new file mode 100644 index 0000000..ca3964e --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/resolve.js @@ -0,0 +1,177 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveRoutePaths = void 0; +const nested_map_1 = require("./nested-map"); +const parse_sfc_1 = require("./parse-sfc"); +const routeMetaName = 'route-meta'; +const routeBlockName = 'route'; +function resolveRoutePaths(paths, importPrefix, nested, readFile) { + const map = {}; + const splitted = paths.map((p) => p.split('/')); + splitted.forEach((path) => { + (0, nested_map_1.setToMap)(map, pathToMapPath(path), path); + }); + const schema = pathMapToMeta(map, importPrefix, nested, readFile); + return mergeComponent(schema); +} +exports.resolveRoutePaths = resolveRoutePaths; +function mergeComponent(schema) { + return schema.map(item => { + var _a, _b; + const component = ((_a = item.route) === null || _a === void 0 ? void 0 : _a.component) || ((_b = item.routeMeta) === null || _b === void 0 ? void 0 : _b.component); + if (component) { + return Object.assign(Object.assign({}, item), { component: component || '' }); + } + else { + return item; + } + }); +} +function pathMapToMeta(map, importPrefix, nested, readFile, parentDepth = 0) { + if (map.value) { + const path = map.value; + const meta = { + name: pathToName(path), + chunkName: pathToChunkName(path), + specifier: pathToSpecifier(path), + path: pathToRoute(path, parentDepth, nested), + pathSegments: toActualPath(path), + component: importPrefix + path.join('/'), + }; + const content = readFile(path.join('/')); + const parsed = (0, parse_sfc_1.parseSFC)(content); + const routeMetaBlock = parsed.customBlocks.find((b) => b.type === routeMetaName); + const routeBlock = parsed.customBlocks.find((b) => b.type === routeBlockName); + // Deprecated. Will be removed in a later version + if (routeMetaBlock) { + // console.warn( + // ' custom block is deprecated. Use block instead. Found in ' + + // path.join('/') + // ) + meta.routeMeta = tryParseCustomBlock(routeMetaBlock.content, path, 'route-meta'); + } + if (routeBlock) { + meta.route = tryParseCustomBlock(routeBlock.content, path, 'route'); + } + if (map.children) { + meta.children = pathMapChildrenToMeta(map.children, importPrefix, nested, readFile, meta.pathSegments.length); + } + return [meta]; + } + return map.children + ? pathMapChildrenToMeta(map.children, importPrefix, nested, readFile, parentDepth) + : []; +} +function routePathComparator(a, b) { + const a0 = a[0]; + const b0 = b[0]; + if (!a0 || !b0) { + return a.length - b.length; + } + const aOrder = isDynamicRoute(a0) ? 1 : 0; + const bOrder = isDynamicRoute(b0) ? 1 : 0; + const order = aOrder - bOrder; + return order !== 0 ? order : routePathComparator(a.slice(1), b.slice(1)); +} +function pathMapChildrenToMeta(children, importPrefix, nested, readFile, parentDepth) { + return Array.from(children.values()) + .reduce((acc, value) => { + return acc.concat(pathMapToMeta(value, importPrefix, nested, readFile, parentDepth)); + }, []) + .sort((a, b) => { + // Prioritize static routes than dynamic routes + return routePathComparator(a.pathSegments, b.pathSegments); + }); +} +function tryParseCustomBlock(content, filePath, blockName) { + try { + return JSON.parse(content); + } + catch (err) { + const joinedPath = filePath.join('/'); + const wrapped = new Error(`Invalid json format of <${blockName}> content in ${joinedPath}\n` + + err); + // Store file path to provide useful information to downstream tools + // like friendly-errors-webpack-plugin + wrapped.file = joinedPath; + throw wrapped; + } +} +function isDynamicRoute(segment) { + return segment[0] === ':'; +} +function isOmittable(segment) { + return segment === 'index'; +} +/** + * - Remove `.vue` from the last path + * - Omit if the last segument is `index` + * - Convert dynamic route to `:param` format + */ +function toActualPath(segments) { + const lastIndex = segments.length - 1; + const last = basename(segments[lastIndex]); + segments = segments.slice(0, -1).concat(last); + return segments + .map((s, i) => { + if (s[0] === '_') { + const suffix = lastIndex === i ? '?' : ''; + return ':' + s.slice(1) + suffix; + } + else { + return s; + } + }) + .filter((s) => !isOmittable(s)); +} +function pathToMapPath(segments) { + const last = segments[segments.length - 1]; + return segments.slice(0, -1).concat(basename(last)); +} +function pathToName(segments) { + const last = segments[segments.length - 1]; + segments = segments + .slice(0, -1) + .concat(basename(last)) + .filter((s) => !isOmittable(s)); + if (segments.length === 0) { + return 'index'; + } + return segments + .map((s) => { + return s[0] === '_' ? s.slice(1) : s; + }) + .join('-'); +} +function pathToChunkName(segments) { + const last = segments[segments.length - 1]; + segments = segments.slice(0, -1).concat(basename(last)); + return segments + .map((s) => { + return s[0] === '_' ? s.slice(1) : s; + }) + .join('-'); +} +function toHump(name) { + return name.replace(/\-(\w)/g, function (all, letter) { + all.valueOf(); + return letter.toUpperCase(); + }); +} +function pathToSpecifier(segments) { + const last = segments[segments.length - 1]; + segments = segments.slice(0, -1).concat(basename(last)); + return toHump(segments + .map((s) => { + return s[0] === '_' ? s.slice(1) : s; + }) + .join('-')); +} +function pathToRoute(segments, parentDepth, nested) { + const prefix = nested || parentDepth > 0 ? '' : '/'; + // return prefix + toActualPath(segments).slice(parentDepth).join('/') + return prefix + toActualPath(segments).join('/'); +} +function basename(filename) { + return filename.replace(/\.[^.]+$/g, ''); +} diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.d.ts b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.d.ts new file mode 100644 index 0000000..0967070 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.d.ts @@ -0,0 +1,2 @@ +import { PageMeta } from '../resolve'; +export declare function createRoutes(meta: PageMeta[], dynamic: boolean, chunkNamePrefix: string): string; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.js b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.js new file mode 100644 index 0000000..d0971f7 --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/lib/template/routes.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createRoutes = void 0; +const prettier = require("prettier"); +function isAllowedRouteOption(key) { + return !['name', 'meta', 'path', 'component'].includes(key); +} +function createChildrenRoute(children) { + return `,children: [${children.map(createRoute).join(',')}]`; +} +function createRoute(meta) { + var _a, _b, _c; + const children = !meta.children ? '' : createChildrenRoute(meta.children); + const route = (_a = meta.route) !== null && _a !== void 0 ? _a : {}; + // If default child is exists, the route should not have a name. + const routeName = meta.children && meta.children.some((m) => m.path === '') + ? '' + : `name: '${(_b = route.name) !== null && _b !== void 0 ? _b : meta.name}',`; + const routeMeta = meta.routeMeta + ? ',meta: ' + JSON.stringify(meta.routeMeta, null, 2) + : ((_c = meta.route) === null || _c === void 0 ? void 0 : _c.meta) + ? ',meta: ' + JSON.stringify(route.meta, null, 2) + : ''; + const otherOptions = Object.keys(route) + .filter(isAllowedRouteOption) + .map((key) => `,${key}: ${JSON.stringify(route[key])}`) + .join(','); + return ` + { + ${routeName} + path: '${meta.path}', + component: ${meta.specifier}${routeMeta}${otherOptions}${children} + }`; +} +function createImport(meta, dynamic, chunkNamePrefix) { + const code = dynamic + ? `function ${meta.specifier}() { return import(/* webpackChunkName: "${chunkNamePrefix}${meta.chunkName}" */ '${meta.component}') };` + : `import ${meta.specifier} from '${meta.component}';`; + return meta.children + ? [code] + .concat(meta.children.map((child) => createImport(child, dynamic, chunkNamePrefix))) + .join('\n') + : code; +} +function createRoutes(meta, dynamic, chunkNamePrefix) { + const imports = meta + .map((m) => createImport(m, dynamic, chunkNamePrefix)) + .join('\n'); + const code = meta.map(createRoute).join(','); + return prettier.format(`${imports}\n\nexport default [${code}];`, { + parser: 'babel', + semi: false, + singleQuote: true, + }); +} +exports.createRoutes = createRoutes; diff --git a/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/package.json b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/package.json new file mode 100644 index 0000000..fbd442e --- /dev/null +++ b/local-nodemodules/@gtff/tdesign-gt-vue/vue-route-generator/package.json @@ -0,0 +1,68 @@ +{ + "name": "vue-route-generator", + "version": "0.3.3", + "author": "katashin", + "description": "Vue Router route config generator", + "keywords": [ + "Vue", + "Vue Router", + "routing", + "generator" + ], + "license": "MIT", + "main": "lib/index.js", + "typings": "lib/index.d.ts", + "files": [ + "lib" + ], + "homepage": "https://github.com/ktsn/vue-route-generator", + "bugs": "https://github.com/ktsn/vue-route-generator/issues", + "repository": { + "type": "git", + "url": "https://github.com/ktsn/vue-route-generator.git" + }, + "scripts": { + "prepublishOnly": "npm run clean && npm run test && npm run build", + "clean": "rm -rf lib", + "build": "tsc -p src", + "dev": "jest --watch", + "lint": "tslint -p . && prettier --list-different \"{src,scripts,test}/**/*.{js,ts}\"", + "format": "prettier --write \"{src,scripts,test}/**/*.{js,ts}\"", + "test": "npm run lint && npm run test:unit", + "test:unit": "jest" + }, + "jest": { + "transform": { + "^.+\\.ts$": "ts-jest" + }, + "testRegex": "/test/.+\\.spec\\.(js|ts)$", + "moduleFileExtensions": [ + "ts", + "js", + "json" + ], + "globals": { + "ts-jest": { + "tsConfigFile": "test/tsconfig.json" + } + } + }, + "devDependencies": { + "@types/jest": "^26.0.19", + "@types/node": "^15.12.1", + "@types/prettier": "^2.1.6", + "@vue/compiler-sfc": "^3.0.5", + "jest": "^26.6.3", + "ts-jest": "^26.4.4", + "tslint": "^6.1.3", + "tslint-config-ktsn": "^2.1.0", + "tslint-config-prettier": "^1.18.0", + "typescript": "^4.1.3", + "vue": "^3.0.5", + "vue-template-compiler": "^2.6.12" + }, + "dependencies": { + "fast-glob": "^3.2.4", + "prettier": "2.2.1" + } +}