diff --git a/README.md b/README.md index e2ff88dfa..9e2d7c15b 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-adm > **使用docker-compose进行部署本项目需注意的问题** +- dockerfile_server使用了多阶段构建,这是docker 17.05后引入的,因此安装的docker版本需要高于17.05 - mysql数据库请使用装在服务器磁盘的本地数据库. - 避免使用docker容器内的mysql,可能会出现写入的问题, io比宿主机低 docker的持久化机制问题 - [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)是给docker-compose进行体验本项目的, 禁止[init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)使用进行项目数据的初始化, 数据库初始化[请使用此方法](https://www.gin-vue-admin.com/docs/help#step1%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%9D%E5%A7%8B%E5%8C%96) @@ -165,7 +166,7 @@ npm run serve ### 2.2 server端 -使用 goland等编辑工具,打开server目录,不可以打开 gin-vue-admin跟目录 +使用 goland等编辑工具,打开server目录,不可以打开 gin-vue-admin 根目录 ```bash # 使用 go.mod @@ -222,12 +223,12 @@ zap: #### 2.3.1 安装 swagger -##### (1)可以翻墙 +##### (1)可以科学上网 ```` go get -u github.com/swaggo/swag/cmd/swag ```` -##### (2)无法翻墙 +##### (2)无法科学上网 由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/) @@ -248,7 +249,7 @@ go get -u github.com/swaggo/swag/cmd/swag cd server swag init ```` -执行上面的命令后,server目录下会出现docs文件夹,登录http://localhost:8888/swagger/index.html,即可查看swagger文档 +执行上面的命令后,server目录下会出现docs文件夹,登录 http://localhost:8888/swagger/index.html ,即可查看swagger文档 ## 3. 技术选型 diff --git a/dockerfile_server b/dockerfile_server index 54d23ddad..17cc2372b 100644 --- a/dockerfile_server +++ b/dockerfile_server @@ -12,7 +12,7 @@ RUN sh ./server-handle.sh RUN rm -f server-handle.sh RUN cat ./config.yaml -RUN go env && go build -o server . +RUN go env && go mod tidy && go build -o server . FROM alpine:latest LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" diff --git a/server/README.md b/server/README.md new file mode 100644 index 000000000..2305e4942 --- /dev/null +++ b/server/README.md @@ -0,0 +1,44 @@ + +整理代码结构 +``` lua +web +├── api/v1 -- 主要API +| ├── sys_initdb.go -- ico +| └── sys_user.go -- +├── config -- 配置文件 设定操作的结构体 +| ├── auto_code.go -- ico captcha.go +| ├── ... -- ico captcha.go +| └── zap.go -- core +├── core -- 主要结构代码 +| ├── server_other.go -- ico captcha.go +| ├── ... -- ico captcha.go +| └── zap.go -- +├── docs -- 文档系统 +| ├── docs.go -- ico captcha.go +| ├── swagger.json -- json +| └── swagger.yaml -- yaml +├── global -- global +├── initialize -- initialize +├── middleware -- 中间键 +├── model -- global +│ ├── request -- 所有请求model结构体 +| | ├── common.go +| | ├── ... +| | └── sys_user.go -- yaml +| ├── response -- 返回数据 +| | ├── common.go +| | ├── ... +| | └── sys_user.go -- yaml +├── packfile -- 文件写入 +├── resource -- 资源文件 +├── router -- 路由 +├── service -- service层 +├── source -- 文件目录操作 +├── utils +├── config.yaml -- +├── Dockerfile -- docker配置 +├── go.mod -- mod 配置 +├── go.sum -- sum +├── latest_log -- vue-cli 配置 +└── main.go -- package.json +``` \ No newline at end of file diff --git a/server/api/v1/exa_breakpoint_continue.go b/server/api/v1/exa_breakpoint_continue.go index e134f86d3..91f5d55f4 100644 --- a/server/api/v1/exa_breakpoint_continue.go +++ b/server/api/v1/exa_breakpoint_continue.go @@ -82,7 +82,7 @@ func FindFile(c *gin.Context) { global.GVA_LOG.Error("查找失败!", zap.Any("err", err)) response.FailWithMessage("查找失败", c) } else { - response.OkWithDetailed(response.FileResponse{File: file},"查找成功", c) + response.OkWithDetailed(response.FileResponse{File: file}, "查找成功", c) } } @@ -122,7 +122,7 @@ func RemoveChunk(c *gin.Context) { err = service.DeleteFileChunk(fileMd5, fileName, filePath) if err != nil { global.GVA_LOG.Error("缓存切片删除失败!", zap.Any("err", err)) - response.FailWithDetailed(response.FilePathResponse{FilePath: filePath},"缓存切片删除失败", c) + response.FailWithDetailed(response.FilePathResponse{FilePath: filePath}, "缓存切片删除失败", c) } else { response.OkWithDetailed(response.FilePathResponse{FilePath: filePath}, "缓存切片删除成功", c) } diff --git a/server/api/v1/exa_simple_uploader.go b/server/api/v1/exa_simple_uploader.go index 984d0b792..cf86477c9 100644 --- a/server/api/v1/exa_simple_uploader.go +++ b/server/api/v1/exa_simple_uploader.go @@ -69,7 +69,7 @@ func CheckFileMd5(c *gin.Context) { response.OkWithDetailed(gin.H{ "chunks": chunks, "isDone": isDone, - },"查询成功", c) + }, "查询成功", c) } } diff --git a/server/api/v1/sys_api.go b/server/api/v1/sys_api.go index aa5d3bd36..325736444 100644 --- a/server/api/v1/sys_api.go +++ b/server/api/v1/sys_api.go @@ -7,6 +7,7 @@ import ( "gin-vue-admin/model/response" "gin-vue-admin/service" "gin-vue-admin/utils" + "github.com/gin-gonic/gin" "go.uber.org/zap" ) @@ -100,7 +101,7 @@ func GetApiById(c *gin.Context) { response.FailWithMessage(err.Error(), c) return } - err, api := service.GetApiById(idInfo.Id) + err, api := service.GetApiById(idInfo.ID) if err != nil { global.GVA_LOG.Error("获取失败!", zap.Any("err", err)) response.FailWithMessage("获取失败", c) @@ -147,3 +148,22 @@ func GetAllApis(c *gin.Context) { response.OkWithDetailed(response.SysAPIListResponse{Apis: apis}, "获取成功", c) } } + +// @Tags SysApi +// @Summary 删除选中Api +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body request.IdsReq true "ID" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" +// @Router /api/deleteApisByIds [delete] +func DeleteApisByIds(c *gin.Context) { + var ids request.IdsReq + _ = c.ShouldBindJSON(&ids) + if err := service.DeleteApisByIds(ids); err != nil { + global.GVA_LOG.Error("删除失败!", zap.Any("err", err)) + response.FailWithMessage("删除失败", c) + } else { + response.OkWithMessage("删除成功", c) + } +} diff --git a/server/api/v1/sys_casbin.go b/server/api/v1/sys_casbin.go index e9bba8f8b..24e0ba5e8 100644 --- a/server/api/v1/sys_casbin.go +++ b/server/api/v1/sys_casbin.go @@ -51,4 +51,3 @@ func GetPolicyPathByAuthorityId(c *gin.Context) { paths := service.GetPolicyPathByAuthorityId(casbin.AuthorityId) response.OkWithDetailed(response.PolicyPathResponse{Paths: paths}, "获取成功", c) } - diff --git a/server/api/v1/sys_menu.go b/server/api/v1/sys_menu.go index 765c61cdb..4f920d7be 100644 --- a/server/api/v1/sys_menu.go +++ b/server/api/v1/sys_menu.go @@ -7,6 +7,7 @@ import ( "gin-vue-admin/model/response" "gin-vue-admin/service" "gin-vue-admin/utils" + "github.com/gin-gonic/gin" "go.uber.org/zap" ) @@ -132,7 +133,7 @@ func DeleteBaseMenu(c *gin.Context) { response.FailWithMessage(err.Error(), c) return } - if err := service.DeleteBaseMenu(menu.Id); err != nil { + if err := service.DeleteBaseMenu(menu.ID); err != nil { global.GVA_LOG.Error("删除失败!", zap.Any("err", err)) response.FailWithMessage("删除失败", c) } else { @@ -182,7 +183,7 @@ func GetBaseMenuById(c *gin.Context) { response.FailWithMessage(err.Error(), c) return } - if err, menu := service.GetBaseMenuById(idInfo.Id); err != nil { + if err, menu := service.GetBaseMenuById(idInfo.ID); err != nil { global.GVA_LOG.Error("获取失败!", zap.Any("err", err)) response.FailWithMessage("获取失败", c) } else { @@ -214,6 +215,6 @@ func GetMenuList(c *gin.Context) { Total: total, Page: pageInfo.Page, PageSize: pageInfo.PageSize, - },"获取成功", c) + }, "获取成功", c) } -} \ No newline at end of file +} diff --git a/server/api/v1/sys_user.go b/server/api/v1/sys_user.go index 5712646c7..7b5dd6a87 100644 --- a/server/api/v1/sys_user.go +++ b/server/api/v1/sys_user.go @@ -8,11 +8,12 @@ import ( "gin-vue-admin/model/response" "gin-vue-admin/service" "gin-vue-admin/utils" + "time" + "github.com/dgrijalva/jwt-go" "github.com/gin-gonic/gin" "github.com/go-redis/redis" "go.uber.org/zap" - "time" ) // @Tags Base @@ -217,11 +218,11 @@ func DeleteUser(c *gin.Context) { return } jwtId := getUserID(c) - if jwtId == uint(reqId.Id) { + if jwtId == uint(reqId.ID) { response.FailWithMessage("删除失败, 自杀失败", c) return } - if err := service.DeleteUser(reqId.Id); err != nil { + if err := service.DeleteUser(reqId.ID); err != nil { global.GVA_LOG.Error("删除失败!", zap.Any("err", err)) response.FailWithMessage("删除失败", c) } else { diff --git a/server/config.yaml b/server/config.yaml index bb2244d7a..7d0057640 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -114,4 +114,17 @@ tencent-cos: # excel configuration excel: - dir: './resource/excel/' \ No newline at end of file + dir: './resource/excel/' + + +# timer task db clear table +Timer: + spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc + detail: [ + # tableName: 需要清理的表名 + # compareField: 需要比较时间的字段 + # interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数 + # 2160h = 24 * 30 * 3 -> 三个月 + { tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" }, + #{ tableName: "log2" , compareField: "created_at", interval: "2160h" } + ] diff --git a/server/config/captcha.go b/server/config/captcha.go index 1238f1e6c..76ed3cc4f 100644 --- a/server/config/captcha.go +++ b/server/config/captcha.go @@ -1,7 +1,7 @@ package config type Captcha struct { - KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"` - ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` - ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` + KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"` // 验证码长度 + ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` // 图片宽度 + ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` // 图片高度 } diff --git a/server/config/casbin.go b/server/config/casbin.go index 67e45b034..ad548dc09 100644 --- a/server/config/casbin.go +++ b/server/config/casbin.go @@ -1,5 +1,5 @@ package config type Casbin struct { - ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` + ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // Model路径 } diff --git a/server/config/config.go b/server/config/config.go index e2e557de0..83d256f49 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -18,4 +18,5 @@ type Server struct { AliyunOSS AliyunOSS `mapstructure:"aliyun-oss" json:"aliyunOSS" yaml:"aliyun-oss"` TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencentCOS" yaml:"tencent-cos"` Excel Excel `mapstructure:"excel" json:"excel" yaml:"excel"` + Timer Timer `mapstructure:"timer" json:"timer" yaml:"timer"` } diff --git a/server/config/email.go b/server/config/email.go index 1da737ef1..6b3d3956f 100644 --- a/server/config/email.go +++ b/server/config/email.go @@ -1,11 +1,11 @@ package config type Email struct { - To string `mapstructure:"to" json:"to" yaml:"to"` - Port int `mapstructure:"port" json:"port" yaml:"port"` - From string `mapstructure:"from" json:"from" yaml:"from"` - Host string `mapstructure:"host" json:"host" yaml:"host"` - IsSSL bool `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"` - Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` - Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"` + To string `mapstructure:"to" json:"to" yaml:"to"` // 收件人 + Port int `mapstructure:"port" json:"port" yaml:"port"` // 端口 + From string `mapstructure:"from" json:"from" yaml:"from"` // 收件人 + Host string `mapstructure:"host" json:"host" yaml:"host"` // 服务器地址 + IsSSL bool `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"` // 是否SSL + Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` // 密钥 + Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"` // 昵称 } diff --git a/server/config/excel.go b/server/config/excel.go index a5a84234f..13caab7f5 100644 --- a/server/config/excel.go +++ b/server/config/excel.go @@ -2,4 +2,4 @@ package config type Excel struct { Dir string `mapstructure:"dir" json:"dir" yaml:"dir"` -} \ No newline at end of file +} diff --git a/server/config/gorm.go b/server/config/gorm.go index 4522461b0..263625fc9 100644 --- a/server/config/gorm.go +++ b/server/config/gorm.go @@ -1,11 +1,11 @@ package config type Mysql struct { - Path string `mapstructure:"path" json:"path" yaml:"path"` + Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口 Config string `mapstructure:"config" json:"config" yaml:"config"` - Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` - Username string `mapstructure:"username" json:"username" yaml:"username"` - Password string `mapstructure:"password" json:"password" yaml:"password"` + Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` // 数据库名 + Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名 + Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码 MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"` MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"` LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"` @@ -14,4 +14,4 @@ type Mysql struct { func (m *Mysql) Dsn() string { return m.Username + ":" + m.Password + "@tcp(" + m.Path + ")/" + m.Dbname + "?" + m.Config -} \ No newline at end of file +} diff --git a/server/config/jwt.go b/server/config/jwt.go index 58b3df16b..0ac7168fb 100644 --- a/server/config/jwt.go +++ b/server/config/jwt.go @@ -1,7 +1,7 @@ package config type JWT struct { - SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"` - ExpiresTime int64 `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"` - BufferTime int64 `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"` + SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"` // jwt签名 + ExpiresTime int64 `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"` // 过期时间 + BufferTime int64 `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"` // 缓冲时间 } diff --git a/server/config/oss.go b/server/config/oss.go index 0a8af1cbe..e7c2de2f1 100644 --- a/server/config/oss.go +++ b/server/config/oss.go @@ -1,17 +1,17 @@ package config type Local struct { - Path string `mapstructure:"path" json:"path" yaml:"path" ` + Path string `mapstructure:"path" json:"path" yaml:"path"` // 本地文件路径 } type Qiniu struct { - Zone string `mapstructure:"zone" json:"zone" yaml:"zone"` - Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` - ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"` - UseHTTPS bool `mapstructure:"use-https" json:"useHttps" yaml:"use-https"` - AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"` - SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` - UseCdnDomains bool `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"` + Zone string `mapstructure:"zone" json:"zone" yaml:"zone"` // 存储区域 + Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` // 空间名称 + ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"` // CDN加速域名 + UseHTTPS bool `mapstructure:"use-https" json:"useHttps" yaml:"use-https"` // 是否使用https + AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"` // accessKey + SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` // secretKey + UseCdnDomains bool `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"` // 上传是否使用CDN上传加速 } type AliyunOSS struct { diff --git a/server/config/redis.go b/server/config/redis.go index 9f725a482..b5bacebd8 100644 --- a/server/config/redis.go +++ b/server/config/redis.go @@ -2,6 +2,6 @@ package config type Redis struct { DB int `mapstructure:"db" json:"db" yaml:"db"` - Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` - Password string `mapstructure:"password" json:"password" yaml:"password"` -} \ No newline at end of file + Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口 + Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码 +} diff --git a/server/config/system.go b/server/config/system.go index d072379ad..768788ab0 100644 --- a/server/config/system.go +++ b/server/config/system.go @@ -1,9 +1,9 @@ package config type System struct { - Env string `mapstructure:"env" json:"env" yaml:"env"` - Addr int `mapstructure:"addr" json:"addr" yaml:"addr"` - DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"` - OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"` - UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"` + Env string `mapstructure:"env" json:"env" yaml:"env"` // 环境值 + Addr int `mapstructure:"addr" json:"addr" yaml:"addr"` // 端口值 + DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"` // 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql + OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"` // Oss类型 + UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"` // 多点登录拦截 } diff --git a/server/config/timer.go b/server/config/timer.go new file mode 100644 index 000000000..f83d6bf08 --- /dev/null +++ b/server/config/timer.go @@ -0,0 +1,13 @@ +package config + +type Timer struct { + Start bool `mapstructure:"start" json:"start" yaml:"start"` + Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` + Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"` +} + +type Detail struct { + TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"` + CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"` + Interval string `mapstructure:"interval" json:"interval" yaml:"interval"` +} diff --git a/server/config/zap.go b/server/config/zap.go index f83b6fb10..f681ca837 100644 --- a/server/config/zap.go +++ b/server/config/zap.go @@ -1,13 +1,13 @@ package config type Zap struct { - Level string `mapstructure:"level" json:"level" yaml:"level"` - Format string `mapstructure:"format" json:"format" yaml:"format"` - Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` - Director string `mapstructure:"director" json:"director" yaml:"director"` - LinkName string `mapstructure:"link-name" json:"linkName" yaml:"link-name"` - ShowLine bool `mapstructure:"show-line" json:"showLine" yaml:"showLine"` - EncodeLevel string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"` - StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"` - LogInConsole bool `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"` + Level string `mapstructure:"level" json:"level" yaml:"level"` // 级别 + Format string `mapstructure:"format" json:"format" yaml:"format"` // 输出 + Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // 日志前缀 + Director string `mapstructure:"director" json:"director" yaml:"director"` // 日志文件夹 + LinkName string `mapstructure:"link-name" json:"linkName" yaml:"link-name"` // 软链接名称 + ShowLine bool `mapstructure:"show-line" json:"showLine" yaml:"showLine"` // 显示行 + EncodeLevel string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"` // 编码级 + StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"` // 栈名 + LogInConsole bool `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"` // 输出控制台 } diff --git a/server/core/server.go b/server/core/server.go index d6a3d8ee4..573d32f16 100644 --- a/server/core/server.go +++ b/server/core/server.go @@ -29,7 +29,7 @@ func RunWindowsServer() { fmt.Printf(` 欢迎使用 Gin-Vue-Admin - 当前版本:V2.4.0 + 当前版本:V2.4.1 加群方式:微信号:shouzi_1994 QQ群:622360840 默认自动化文档地址:http://127.0.0.1%s/swagger/index.html 默认前端文件运行地址:http://127.0.0.1:8080 diff --git a/server/core/server_other.go b/server/core/server_other.go index 67cdac75d..baa722203 100644 --- a/server/core/server_other.go +++ b/server/core/server_other.go @@ -14,4 +14,4 @@ func initServer(address string, router *gin.Engine) server { s.WriteTimeout = 10 * time.Second s.MaxHeaderBytes = 1 << 20 return s -} \ No newline at end of file +} diff --git a/server/core/server_win.go b/server/core/server_win.go index 501128af6..ada3c4bf5 100644 --- a/server/core/server_win.go +++ b/server/core/server_win.go @@ -16,4 +16,4 @@ func initServer(address string, router *gin.Engine) server { WriteTimeout: 10 * time.Second, MaxHeaderBytes: 1 << 20, } -} \ No newline at end of file +} diff --git a/server/docs/docs.go b/server/docs/docs.go index b392f782b..b78c9334a 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -1,5 +1,6 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT -// This file was generated by swaggo/swag +// This file was generated by swaggo/swag at +// 2021-04-30 13:57:23.4731221 +0800 CST m=+1.258292701 package docs @@ -19,7 +20,6 @@ var doc = `{ "description": "{{.Description}}", "title": "{{.Title}}", "contact": {}, - "license": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", @@ -101,6 +101,44 @@ var doc = `{ } } }, + "/api/deleteApisByIds": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "删除选中Api", + "parameters": [ + { + "description": "ID", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.IdsReq" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/api/getAllApis": { "post": { "security": [ @@ -2720,418 +2758,6 @@ var doc = `{ } } } - }, - "/workflowProcess/completeWorkflowMove": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "提交工作流", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/createWorkflowProcess": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "创建WorkflowProcess", - "parameters": [ - { - "description": "创建WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/deleteWorkflowProcess": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "删除WorkflowProcess", - "parameters": [ - { - "description": "删除WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/deleteWorkflowProcessByIds": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "批量删除WorkflowProcess", - "parameters": [ - { - "description": "批量删除WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.IdsReq" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/findWorkflowProcess": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "用id查询WorkflowProcess", - "parameters": [ - { - "description": "用id查询WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/findWorkflowStep": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "用id查询工作流步骤", - "parameters": [ - { - "description": "用id查询WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getMyNeed": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "我的待办", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getMyStated": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "我发起的工作流", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getWorkflowMoveByID": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "根据id获取当前节点详情和历史", - "parameters": [ - { - "description": "根据id获取当前节点详情和过往", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.GetById" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getWorkflowProcessList": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "分页获取WorkflowProcess列表", - "parameters": [ - { - "description": "分页获取WorkflowProcess列表", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WorkflowProcessSearch" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/startWorkflow": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "开启工作流", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/updateWorkflowProcess": { - "put": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "更新WorkflowProcess", - "parameters": [ - { - "description": "更新WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}", - "schema": { - "type": "string" - } - } - } - } } }, "definitions": { @@ -3155,16 +2781,63 @@ var doc = `{ } } }, + "config.Autocode": { + "type": "object", + "properties": { + "root": { + "type": "string" + }, + "server": { + "type": "string" + }, + "serverApi": { + "type": "string" + }, + "serverInitialize": { + "type": "string" + }, + "serverModel": { + "type": "string" + }, + "serverRequest": { + "type": "string" + }, + "serverRouter": { + "type": "string" + }, + "serverService": { + "type": "string" + }, + "web": { + "type": "string" + }, + "webApi": { + "type": "string" + }, + "webFlow": { + "type": "string" + }, + "webForm": { + "type": "string" + }, + "webTable": { + "type": "string" + } + } + }, "config.Captcha": { "type": "object", "properties": { "imgHeight": { + "description": "图片高度", "type": "integer" }, "imgWidth": { + "description": "图片宽度", "type": "integer" }, "keyLong": { + "description": "验证码长度", "type": "integer" } } @@ -3173,6 +2846,21 @@ var doc = `{ "type": "object", "properties": { "modelPath": { + "description": "Model路径", + "type": "string" + } + } + }, + "config.Detail": { + "type": "object", + "properties": { + "compareField": { + "type": "string" + }, + "interval": { + "type": "string" + }, + "tableName": { "type": "string" } } @@ -3181,24 +2869,31 @@ var doc = `{ "type": "object", "properties": { "from": { + "description": "收件人", "type": "string" }, "host": { + "description": "服务器地址", "type": "string" }, "isSSL": { + "description": "是否SSL", "type": "boolean" }, "nickname": { + "description": "昵称", "type": "string" }, "port": { + "description": "端口", "type": "integer" }, "secret": { + "description": "密钥", "type": "string" }, "to": { + "description": "收件人", "type": "string" } } @@ -3215,12 +2910,15 @@ var doc = `{ "type": "object", "properties": { "bufferTime": { + "description": "缓冲时间", "type": "integer" }, "expiresTime": { + "description": "过期时间", "type": "integer" }, "signingKey": { + "description": "jwt签名", "type": "string" } } @@ -3229,6 +2927,7 @@ var doc = `{ "type": "object", "properties": { "path": { + "description": "本地文件路径", "type": "string" } } @@ -3240,6 +2939,7 @@ var doc = `{ "type": "string" }, "dbname": { + "description": "数据库名", "type": "string" }, "logMode": { @@ -3255,12 +2955,15 @@ var doc = `{ "type": "integer" }, "password": { + "description": "数据库密码", "type": "string" }, "path": { + "description": "服务器地址:端口", "type": "string" }, "username": { + "description": "数据库用户名", "type": "string" } } @@ -3269,24 +2972,31 @@ var doc = `{ "type": "object", "properties": { "accessKey": { + "description": "accessKey", "type": "string" }, "bucket": { + "description": "空间名称", "type": "string" }, "imgPath": { + "description": "CDN加速域名", "type": "string" }, "secretKey": { + "description": "secretKey", "type": "string" }, "useCdnDomains": { + "description": "上传是否使用CDN上传加速", "type": "boolean" }, "useHttps": { + "description": "是否使用https", "type": "boolean" }, "zone": { + "description": "存储区域", "type": "string" } } @@ -3295,12 +3005,14 @@ var doc = `{ "type": "object", "properties": { "addr": { + "description": "服务器地址:端口", "type": "string" }, "db": { "type": "integer" }, "password": { + "description": "密码", "type": "string" } } @@ -3309,57 +3021,51 @@ var doc = `{ "type": "object", "properties": { "aliyunOSS": { - "type": "object", "$ref": "#/definitions/config.AliyunOSS" }, + "autoCode": { + "description": "auto", + "$ref": "#/definitions/config.Autocode" + }, "captcha": { - "type": "object", "$ref": "#/definitions/config.Captcha" }, "casbin": { - "type": "object", "$ref": "#/definitions/config.Casbin" }, "email": { - "type": "object", "$ref": "#/definitions/config.Email" }, "excel": { - "type": "object", "$ref": "#/definitions/config.Excel" }, "jwt": { - "type": "object", "$ref": "#/definitions/config.JWT" }, "local": { "description": "oss", - "type": "object", "$ref": "#/definitions/config.Local" }, "mysql": { "description": "gorm", - "type": "object", "$ref": "#/definitions/config.Mysql" }, "qiniu": { - "type": "object", "$ref": "#/definitions/config.Qiniu" }, "redis": { - "type": "object", "$ref": "#/definitions/config.Redis" }, "system": { - "type": "object", "$ref": "#/definitions/config.System" }, "tencentCOS": { - "type": "object", "$ref": "#/definitions/config.TencentCOS" }, + "timer": { + "$ref": "#/definitions/config.Timer" + }, "zap": { - "type": "object", "$ref": "#/definitions/config.Zap" } } @@ -3368,18 +3074,23 @@ var doc = `{ "type": "object", "properties": { "addr": { + "description": "端口值", "type": "integer" }, "dbType": { + "description": "数据库类型:mysql(默认)|sqlite|sqlserver|postgresql", "type": "string" }, "env": { + "description": "环境值", "type": "string" }, "ossType": { + "description": "Oss类型", "type": "string" }, "useMultipoint": { + "description": "多点登录拦截", "type": "boolean" } } @@ -3407,34 +3118,60 @@ var doc = `{ } } }, + "config.Timer": { + "type": "object", + "properties": { + "detail": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Detail" + } + }, + "spec": { + "type": "string" + }, + "start": { + "type": "boolean" + } + } + }, "config.Zap": { "type": "object", "properties": { "director": { + "description": "日志文件夹", "type": "string" }, "encodeLevel": { + "description": "编码级", "type": "string" }, "format": { + "description": "输出", "type": "string" }, "level": { + "description": "级别", "type": "string" }, "linkName": { + "description": "软链接名称", "type": "string" }, "logInConsole": { + "description": "输出控制台", "type": "boolean" }, "prefix": { + "description": "日志前缀", "type": "string" }, "showLine": { + "description": "显示行", "type": "boolean" }, "stacktraceKey": { + "description": "栈名", "type": "string" } } @@ -3443,15 +3180,19 @@ var doc = `{ "type": "object", "properties": { "abbreviation": { + "description": "Struct简称", "type": "string" }, "autoCreateApiToSql": { + "description": "是否自动创建api", "type": "boolean" }, "autoMoveFile": { + "description": "是否自动移动文件", "type": "boolean" }, "description": { + "description": "Struct中文名称", "type": "string" }, "fields": { @@ -3461,12 +3202,15 @@ var doc = `{ } }, "packageName": { + "description": "文件名称", "type": "string" }, "structName": { + "description": "Struct名称", "type": "string" }, "tableName": { + "description": "表名", "type": "string" } } @@ -3475,28 +3219,35 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "customerName": { + "description": "客户名", "type": "string" }, "customerPhoneData": { + "description": "客户手机号", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "sysUser": { - "type": "object", + "description": "管理详情", "$ref": "#/definitions/model.SysUser" }, "sysUserAuthorityID": { + "description": "管理角色ID", "type": "string" }, "sysUserId": { + "description": "管理ID", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3505,24 +3256,31 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "key": { + "description": "编号", "type": "string" }, "name": { + "description": "文件名", "type": "string" }, "tag": { + "description": "文件标签", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "url": { + "description": "文件地址", "type": "string" } } @@ -3531,6 +3289,7 @@ var doc = `{ "type": "object", "properties": { "fileName": { + "description": "文件名", "type": "string" }, "infoList": { @@ -3545,33 +3304,43 @@ var doc = `{ "type": "object", "properties": { "columnName": { + "description": "数据库字段", "type": "string" }, "comment": { + "description": "数据库字段描述", "type": "string" }, "dataType": { + "description": "数据库字段类型", "type": "string" }, "dataTypeLong": { + "description": "数据库字段长度", "type": "string" }, "dictType": { + "description": "字典", "type": "string" }, "fieldDesc": { + "description": "中文名", "type": "string" }, "fieldJson": { + "description": "FieldJson", "type": "string" }, "fieldName": { + "description": "Field名", "type": "string" }, "fieldSearchType": { + "description": "搜索条件", "type": "string" }, "fieldType": { + "description": "Field数据类型", "type": "string" } } @@ -3580,24 +3349,31 @@ var doc = `{ "type": "object", "properties": { "apiGroup": { + "description": "api组", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "description": { + "description": "api中文描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "method": { + "description": "方法:创建POST(默认)|查看GET|更新PUT|删除DELETE", "type": "string" }, "path": { + "description": "api路径", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3606,9 +3382,11 @@ var doc = `{ "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" }, "authorityName": { + "description": "角色名", "type": "string" }, "children": { @@ -3627,6 +3405,7 @@ var doc = `{ } }, "defaultRouter": { + "description": "默认菜单(默认dashboard)", "type": "string" }, "deletedAt": { @@ -3639,6 +3418,7 @@ var doc = `{ } }, "parentId": { + "description": "父角色ID", "type": "string" }, "updatedAt": { @@ -3662,30 +3442,39 @@ var doc = `{ } }, "closeTab": { + "description": "自动关闭tab", "type": "boolean" }, "component": { + "description": "对应前端文件路径", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "defaultMenu": { + "description": "是否是基础路由(开发中)", "type": "boolean" }, "hidden": { + "description": "是否在列表隐藏", "type": "boolean" }, "icon": { + "description": "菜单图标", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "keepAlive": { + "description": "是否缓存", "type": "boolean" }, "name": { + "description": "路由name", "type": "string" }, "parameters": { @@ -3695,18 +3484,23 @@ var doc = `{ } }, "parentId": { + "description": "父菜单ID", "type": "string" }, "path": { + "description": "路由path", "type": "string" }, "sort": { + "description": "排序标记", "type": "integer" }, "title": { + "description": "菜单名", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3715,24 +3509,30 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "key": { + "description": "地址栏携带参数的key", "type": "string" }, "sysBaseMenuID": { "type": "integer" }, "type": { + "description": "地址栏携带参数为params还是query", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "value": { + "description": "地址栏携带参数的值", "type": "string" } } @@ -3741,18 +3541,23 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "desc": { + "description": "描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "name": { + "description": "字典名(中)", "type": "string" }, "status": { + "description": "状态", "type": "boolean" }, "sysDictionaryDetails": { @@ -3762,9 +3567,11 @@ var doc = `{ } }, "type": { + "description": "字典名(英)", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3773,27 +3580,35 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "label": { + "description": "展示值", "type": "string" }, "sort": { + "description": "排序标记", "type": "integer" }, "status": { + "description": "启用状态", "type": "boolean" }, "sysDictionaryID": { + "description": "关联标记", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "value": { + "description": "字典值", "type": "integer" } } @@ -3802,46 +3617,58 @@ var doc = `{ "type": "object", "properties": { "agent": { + "description": "代理", "type": "string" }, "body": { + "description": "请求Body", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "error_message": { + "description": "错误信息", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "ip": { + "description": "请求ip", "type": "string" }, "latency": { + "description": "延迟", "type": "string" }, "method": { + "description": "请求方法", "type": "string" }, "path": { + "description": "请求路径", "type": "string" }, "resp": { + "description": "响应Body", "type": "string" }, "status": { + "description": "请求状态", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "user": { - "type": "object", "$ref": "#/definitions/model.SysUser" }, "user_id": { + "description": "用户id", "type": "integer" } } @@ -3850,31 +3677,38 @@ var doc = `{ "type": "object", "properties": { "authority": { - "type": "object", "$ref": "#/definitions/model.SysAuthority" }, "authorityId": { + "description": "用户角色ID", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "headerImg": { + "description": "用户头像", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "nickName": { + "description": "用户昵称\"", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "userName": { + "description": "用户登录名", "type": "string" }, "uuid": { + "description": "用户UUID", "type": "string" } } @@ -3883,253 +3717,15 @@ var doc = `{ "type": "object", "properties": { "config": { - "type": "object", "$ref": "#/definitions/config.Server" } } }, - "model.WorkflowEdge": { - "type": "object", - "properties": { - "clazz": { - "type": "string" - }, - "conditionExpression": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "endPoint": { - "description": "终点信息", - "type": "object", - "$ref": "#/definitions/model.WorkflowEndPoint" - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "reverse": { - "type": "boolean" - }, - "seq": { - "type": "string" - }, - "shape": { - "type": "string" - }, - "source": { - "type": "string" - }, - "sourceAnchor": { - "type": "integer" - }, - "startPoint": { - "description": "起点信息", - "type": "object", - "$ref": "#/definitions/model.WorkflowStartPoint" - }, - "target": { - "type": "string" - }, - "targetAnchor": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.WorkflowEndPoint": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "index": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - }, - "workflowEdgeID": { - "type": "string" - }, - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "model.WorkflowNode": { - "type": "object", - "properties": { - "assignType": { - "type": "string" - }, - "assignValue": { - "type": "string" - }, - "clazz": { - "type": "string" - }, - "content": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "cycle": { - "type": "string" - }, - "description": { - "type": "string" - }, - "dueDate": { - "type": "string" - }, - "duration": { - "type": "string" - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "shape": { - "type": "string" - }, - "stateValue": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "to": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "view": { - "type": "string" - }, - "waitState": { - "type": "string" - }, - "workflowProcessID": { - "type": "string" - }, - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "model.WorkflowProcess": { - "type": "object", - "properties": { - "category": { - "type": "string" - }, - "clazz": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "edges": { - "description": "流程链接数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowEdge" - } - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nodes": { - "description": "流程节点数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowNode" - } - }, - "updatedAt": { - "type": "string" - }, - "view": { - "type": "string" - } - } - }, - "model.WorkflowStartPoint": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "index": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - }, - "workflowEdgeID": { - "type": "string" - }, - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, "request.AddMenuAuthorityInfo": { "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" }, "menus": { @@ -4144,6 +3740,7 @@ var doc = `{ "type": "object", "properties": { "authorityId": { + "description": "权限id", "type": "string" }, "casbinInfos": { @@ -4158,9 +3755,11 @@ var doc = `{ "type": "object", "properties": { "method": { + "description": "方法", "type": "string" }, "path": { + "description": "路径", "type": "string" } } @@ -4169,12 +3768,15 @@ var doc = `{ "type": "object", "properties": { "newPassword": { + "description": "新密码", "type": "string" }, "password": { + "description": "密码", "type": "string" }, "username": { + "description": "用户名", "type": "string" } } @@ -4186,6 +3788,7 @@ var doc = `{ "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" } } @@ -4194,6 +3797,7 @@ var doc = `{ "type": "object", "properties": { "id": { + "description": "主键ID", "type": "number" } } @@ -4217,18 +3821,23 @@ var doc = `{ ], "properties": { "dbName": { + "description": "数据库名", "type": "string" }, "host": { + "description": "服务器地址", "type": "string" }, "password": { + "description": "数据库密码", "type": "string" }, "port": { + "description": "数据库连接端口", "type": "string" }, "userName": { + "description": "数据库用户名", "type": "string" } } @@ -4237,15 +3846,19 @@ var doc = `{ "type": "object", "properties": { "captcha": { + "description": "验证码", "type": "string" }, "captchaId": { + "description": "验证码ID", "type": "string" }, "password": { + "description": "密码", "type": "string" }, "username": { + "description": "用户名", "type": "string" } } @@ -4254,9 +3867,11 @@ var doc = `{ "type": "object", "properties": { "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" } } @@ -4265,36 +3880,47 @@ var doc = `{ "type": "object", "properties": { "apiGroup": { + "description": "api组", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "desc": { + "description": "排序方式:升序false(默认)|降序true", "type": "boolean" }, "description": { + "description": "api中文描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "method": { + "description": "方法:创建POST(默认)|查看GET|更新PUT|删除DELETE", "type": "string" }, "orderKey": { + "description": "排序", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "path": { + "description": "api路径", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -4303,9 +3929,11 @@ var doc = `{ "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" }, "uuid": { + "description": "用户UUID", "type": "string" } } @@ -4314,33 +3942,43 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "label": { + "description": "展示值", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "sort": { + "description": "排序标记", "type": "integer" }, "status": { + "description": "启用状态", "type": "boolean" }, "sysDictionaryID": { + "description": "关联标记", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "value": { + "description": "字典值", "type": "integer" } } @@ -4349,24 +3987,31 @@ var doc = `{ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "desc": { + "description": "描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "name": { + "description": "字典名(中)", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "status": { + "description": "状态", "type": "boolean" }, "sysDictionaryDetails": { @@ -4376,9 +4021,11 @@ var doc = `{ } }, "type": { + "description": "字典名(英)", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -4387,116 +4034,74 @@ var doc = `{ "type": "object", "properties": { "agent": { + "description": "代理", "type": "string" }, "body": { + "description": "请求Body", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "error_message": { + "description": "错误信息", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "ip": { + "description": "请求ip", "type": "string" }, "latency": { + "description": "延迟", "type": "string" }, "method": { + "description": "请求方法", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "path": { + "description": "请求路径", "type": "string" }, "resp": { + "description": "响应Body", "type": "string" }, "status": { + "description": "请求状态", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "user": { - "type": "object", "$ref": "#/definitions/model.SysUser" }, "user_id": { + "description": "用户id", "type": "integer" } } }, - "request.WorkflowProcessSearch": { - "type": "object", - "properties": { - "category": { - "type": "string" - }, - "clazz": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "edges": { - "description": "流程链接数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowEdge" - } - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nodes": { - "description": "流程节点数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowNode" - } - }, - "page": { - "type": "integer" - }, - "pageSize": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - }, - "view": { - "type": "string" - } - } - }, "response.SysAuthorityCopyResponse": { "type": "object", "properties": { "authority": { - "type": "object", "$ref": "#/definitions/model.SysAuthority" }, "oldAuthorityId": { diff --git a/server/docs/swagger.json b/server/docs/swagger.json index b90baea63..efac867bf 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -4,7 +4,6 @@ "description": "This is a sample Server pets", "title": "Swagger Example API", "contact": {}, - "license": {}, "version": "0.0.1" }, "basePath": "/", @@ -85,6 +84,44 @@ } } }, + "/api/deleteApisByIds": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "删除选中Api", + "parameters": [ + { + "description": "ID", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.IdsReq" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/api/getAllApis": { "post": { "security": [ @@ -2704,418 +2741,6 @@ } } } - }, - "/workflowProcess/completeWorkflowMove": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "提交工作流", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/createWorkflowProcess": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "创建WorkflowProcess", - "parameters": [ - { - "description": "创建WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/deleteWorkflowProcess": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "删除WorkflowProcess", - "parameters": [ - { - "description": "删除WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/deleteWorkflowProcessByIds": { - "delete": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "批量删除WorkflowProcess", - "parameters": [ - { - "description": "批量删除WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.IdsReq" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/findWorkflowProcess": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "用id查询WorkflowProcess", - "parameters": [ - { - "description": "用id查询WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/findWorkflowStep": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "用id查询工作流步骤", - "parameters": [ - { - "description": "用id查询WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getMyNeed": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "我的待办", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getMyStated": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "我发起的工作流", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getWorkflowMoveByID": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "根据id获取当前节点详情和历史", - "parameters": [ - { - "description": "根据id获取当前节点详情和过往", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.GetById" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/getWorkflowProcessList": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "分页获取WorkflowProcess列表", - "parameters": [ - { - "description": "分页获取WorkflowProcess列表", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WorkflowProcessSearch" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/startWorkflow": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "开启工作流", - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/workflowProcess/updateWorkflowProcess": { - "put": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "WorkflowProcess" - ], - "summary": "更新WorkflowProcess", - "parameters": [ - { - "description": "更新WorkflowProcess", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.WorkflowProcess" - } - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}", - "schema": { - "type": "string" - } - } - } - } } }, "definitions": { @@ -3139,16 +2764,63 @@ } } }, + "config.Autocode": { + "type": "object", + "properties": { + "root": { + "type": "string" + }, + "server": { + "type": "string" + }, + "serverApi": { + "type": "string" + }, + "serverInitialize": { + "type": "string" + }, + "serverModel": { + "type": "string" + }, + "serverRequest": { + "type": "string" + }, + "serverRouter": { + "type": "string" + }, + "serverService": { + "type": "string" + }, + "web": { + "type": "string" + }, + "webApi": { + "type": "string" + }, + "webFlow": { + "type": "string" + }, + "webForm": { + "type": "string" + }, + "webTable": { + "type": "string" + } + } + }, "config.Captcha": { "type": "object", "properties": { "imgHeight": { + "description": "图片高度", "type": "integer" }, "imgWidth": { + "description": "图片宽度", "type": "integer" }, "keyLong": { + "description": "验证码长度", "type": "integer" } } @@ -3157,6 +2829,21 @@ "type": "object", "properties": { "modelPath": { + "description": "Model路径", + "type": "string" + } + } + }, + "config.Detail": { + "type": "object", + "properties": { + "compareField": { + "type": "string" + }, + "interval": { + "type": "string" + }, + "tableName": { "type": "string" } } @@ -3165,24 +2852,31 @@ "type": "object", "properties": { "from": { + "description": "收件人", "type": "string" }, "host": { + "description": "服务器地址", "type": "string" }, "isSSL": { + "description": "是否SSL", "type": "boolean" }, "nickname": { + "description": "昵称", "type": "string" }, "port": { + "description": "端口", "type": "integer" }, "secret": { + "description": "密钥", "type": "string" }, "to": { + "description": "收件人", "type": "string" } } @@ -3199,12 +2893,15 @@ "type": "object", "properties": { "bufferTime": { + "description": "缓冲时间", "type": "integer" }, "expiresTime": { + "description": "过期时间", "type": "integer" }, "signingKey": { + "description": "jwt签名", "type": "string" } } @@ -3213,6 +2910,7 @@ "type": "object", "properties": { "path": { + "description": "本地文件路径", "type": "string" } } @@ -3224,6 +2922,7 @@ "type": "string" }, "dbname": { + "description": "数据库名", "type": "string" }, "logMode": { @@ -3239,12 +2938,15 @@ "type": "integer" }, "password": { + "description": "数据库密码", "type": "string" }, "path": { + "description": "服务器地址:端口", "type": "string" }, "username": { + "description": "数据库用户名", "type": "string" } } @@ -3253,24 +2955,31 @@ "type": "object", "properties": { "accessKey": { + "description": "accessKey", "type": "string" }, "bucket": { + "description": "空间名称", "type": "string" }, "imgPath": { + "description": "CDN加速域名", "type": "string" }, "secretKey": { + "description": "secretKey", "type": "string" }, "useCdnDomains": { + "description": "上传是否使用CDN上传加速", "type": "boolean" }, "useHttps": { + "description": "是否使用https", "type": "boolean" }, "zone": { + "description": "存储区域", "type": "string" } } @@ -3279,12 +2988,14 @@ "type": "object", "properties": { "addr": { + "description": "服务器地址:端口", "type": "string" }, "db": { "type": "integer" }, "password": { + "description": "密码", "type": "string" } } @@ -3293,57 +3004,51 @@ "type": "object", "properties": { "aliyunOSS": { - "type": "object", "$ref": "#/definitions/config.AliyunOSS" }, + "autoCode": { + "description": "auto", + "$ref": "#/definitions/config.Autocode" + }, "captcha": { - "type": "object", "$ref": "#/definitions/config.Captcha" }, "casbin": { - "type": "object", "$ref": "#/definitions/config.Casbin" }, "email": { - "type": "object", "$ref": "#/definitions/config.Email" }, "excel": { - "type": "object", "$ref": "#/definitions/config.Excel" }, "jwt": { - "type": "object", "$ref": "#/definitions/config.JWT" }, "local": { "description": "oss", - "type": "object", "$ref": "#/definitions/config.Local" }, "mysql": { "description": "gorm", - "type": "object", "$ref": "#/definitions/config.Mysql" }, "qiniu": { - "type": "object", "$ref": "#/definitions/config.Qiniu" }, "redis": { - "type": "object", "$ref": "#/definitions/config.Redis" }, "system": { - "type": "object", "$ref": "#/definitions/config.System" }, "tencentCOS": { - "type": "object", "$ref": "#/definitions/config.TencentCOS" }, + "timer": { + "$ref": "#/definitions/config.Timer" + }, "zap": { - "type": "object", "$ref": "#/definitions/config.Zap" } } @@ -3352,18 +3057,23 @@ "type": "object", "properties": { "addr": { + "description": "端口值", "type": "integer" }, "dbType": { + "description": "数据库类型:mysql(默认)|sqlite|sqlserver|postgresql", "type": "string" }, "env": { + "description": "环境值", "type": "string" }, "ossType": { + "description": "Oss类型", "type": "string" }, "useMultipoint": { + "description": "多点登录拦截", "type": "boolean" } } @@ -3391,34 +3101,60 @@ } } }, + "config.Timer": { + "type": "object", + "properties": { + "detail": { + "type": "array", + "items": { + "$ref": "#/definitions/config.Detail" + } + }, + "spec": { + "type": "string" + }, + "start": { + "type": "boolean" + } + } + }, "config.Zap": { "type": "object", "properties": { "director": { + "description": "日志文件夹", "type": "string" }, "encodeLevel": { + "description": "编码级", "type": "string" }, "format": { + "description": "输出", "type": "string" }, "level": { + "description": "级别", "type": "string" }, "linkName": { + "description": "软链接名称", "type": "string" }, "logInConsole": { + "description": "输出控制台", "type": "boolean" }, "prefix": { + "description": "日志前缀", "type": "string" }, "showLine": { + "description": "显示行", "type": "boolean" }, "stacktraceKey": { + "description": "栈名", "type": "string" } } @@ -3427,15 +3163,19 @@ "type": "object", "properties": { "abbreviation": { + "description": "Struct简称", "type": "string" }, "autoCreateApiToSql": { + "description": "是否自动创建api", "type": "boolean" }, "autoMoveFile": { + "description": "是否自动移动文件", "type": "boolean" }, "description": { + "description": "Struct中文名称", "type": "string" }, "fields": { @@ -3445,12 +3185,15 @@ } }, "packageName": { + "description": "文件名称", "type": "string" }, "structName": { + "description": "Struct名称", "type": "string" }, "tableName": { + "description": "表名", "type": "string" } } @@ -3459,28 +3202,35 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "customerName": { + "description": "客户名", "type": "string" }, "customerPhoneData": { + "description": "客户手机号", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "sysUser": { - "type": "object", + "description": "管理详情", "$ref": "#/definitions/model.SysUser" }, "sysUserAuthorityID": { + "description": "管理角色ID", "type": "string" }, "sysUserId": { + "description": "管理ID", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3489,24 +3239,31 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "key": { + "description": "编号", "type": "string" }, "name": { + "description": "文件名", "type": "string" }, "tag": { + "description": "文件标签", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "url": { + "description": "文件地址", "type": "string" } } @@ -3515,6 +3272,7 @@ "type": "object", "properties": { "fileName": { + "description": "文件名", "type": "string" }, "infoList": { @@ -3529,33 +3287,43 @@ "type": "object", "properties": { "columnName": { + "description": "数据库字段", "type": "string" }, "comment": { + "description": "数据库字段描述", "type": "string" }, "dataType": { + "description": "数据库字段类型", "type": "string" }, "dataTypeLong": { + "description": "数据库字段长度", "type": "string" }, "dictType": { + "description": "字典", "type": "string" }, "fieldDesc": { + "description": "中文名", "type": "string" }, "fieldJson": { + "description": "FieldJson", "type": "string" }, "fieldName": { + "description": "Field名", "type": "string" }, "fieldSearchType": { + "description": "搜索条件", "type": "string" }, "fieldType": { + "description": "Field数据类型", "type": "string" } } @@ -3564,24 +3332,31 @@ "type": "object", "properties": { "apiGroup": { + "description": "api组", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "description": { + "description": "api中文描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "method": { + "description": "方法:创建POST(默认)|查看GET|更新PUT|删除DELETE", "type": "string" }, "path": { + "description": "api路径", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3590,9 +3365,11 @@ "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" }, "authorityName": { + "description": "角色名", "type": "string" }, "children": { @@ -3611,6 +3388,7 @@ } }, "defaultRouter": { + "description": "默认菜单(默认dashboard)", "type": "string" }, "deletedAt": { @@ -3623,6 +3401,7 @@ } }, "parentId": { + "description": "父角色ID", "type": "string" }, "updatedAt": { @@ -3646,30 +3425,39 @@ } }, "closeTab": { + "description": "自动关闭tab", "type": "boolean" }, "component": { + "description": "对应前端文件路径", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "defaultMenu": { + "description": "是否是基础路由(开发中)", "type": "boolean" }, "hidden": { + "description": "是否在列表隐藏", "type": "boolean" }, "icon": { + "description": "菜单图标", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "keepAlive": { + "description": "是否缓存", "type": "boolean" }, "name": { + "description": "路由name", "type": "string" }, "parameters": { @@ -3679,18 +3467,23 @@ } }, "parentId": { + "description": "父菜单ID", "type": "string" }, "path": { + "description": "路由path", "type": "string" }, "sort": { + "description": "排序标记", "type": "integer" }, "title": { + "description": "菜单名", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3699,24 +3492,30 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "key": { + "description": "地址栏携带参数的key", "type": "string" }, "sysBaseMenuID": { "type": "integer" }, "type": { + "description": "地址栏携带参数为params还是query", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "value": { + "description": "地址栏携带参数的值", "type": "string" } } @@ -3725,18 +3524,23 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "desc": { + "description": "描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "name": { + "description": "字典名(中)", "type": "string" }, "status": { + "description": "状态", "type": "boolean" }, "sysDictionaryDetails": { @@ -3746,9 +3550,11 @@ } }, "type": { + "description": "字典名(英)", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -3757,27 +3563,35 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "label": { + "description": "展示值", "type": "string" }, "sort": { + "description": "排序标记", "type": "integer" }, "status": { + "description": "启用状态", "type": "boolean" }, "sysDictionaryID": { + "description": "关联标记", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "value": { + "description": "字典值", "type": "integer" } } @@ -3786,46 +3600,58 @@ "type": "object", "properties": { "agent": { + "description": "代理", "type": "string" }, "body": { + "description": "请求Body", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "error_message": { + "description": "错误信息", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "ip": { + "description": "请求ip", "type": "string" }, "latency": { + "description": "延迟", "type": "string" }, "method": { + "description": "请求方法", "type": "string" }, "path": { + "description": "请求路径", "type": "string" }, "resp": { + "description": "响应Body", "type": "string" }, "status": { + "description": "请求状态", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "user": { - "type": "object", "$ref": "#/definitions/model.SysUser" }, "user_id": { + "description": "用户id", "type": "integer" } } @@ -3834,31 +3660,38 @@ "type": "object", "properties": { "authority": { - "type": "object", "$ref": "#/definitions/model.SysAuthority" }, "authorityId": { + "description": "用户角色ID", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "headerImg": { + "description": "用户头像", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "nickName": { + "description": "用户昵称\"", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "userName": { + "description": "用户登录名", "type": "string" }, "uuid": { + "description": "用户UUID", "type": "string" } } @@ -3867,253 +3700,15 @@ "type": "object", "properties": { "config": { - "type": "object", "$ref": "#/definitions/config.Server" } } }, - "model.WorkflowEdge": { - "type": "object", - "properties": { - "clazz": { - "type": "string" - }, - "conditionExpression": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "endPoint": { - "description": "终点信息", - "type": "object", - "$ref": "#/definitions/model.WorkflowEndPoint" - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "reverse": { - "type": "boolean" - }, - "seq": { - "type": "string" - }, - "shape": { - "type": "string" - }, - "source": { - "type": "string" - }, - "sourceAnchor": { - "type": "integer" - }, - "startPoint": { - "description": "起点信息", - "type": "object", - "$ref": "#/definitions/model.WorkflowStartPoint" - }, - "target": { - "type": "string" - }, - "targetAnchor": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.WorkflowEndPoint": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "index": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - }, - "workflowEdgeID": { - "type": "string" - }, - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "model.WorkflowNode": { - "type": "object", - "properties": { - "assignType": { - "type": "string" - }, - "assignValue": { - "type": "string" - }, - "clazz": { - "type": "string" - }, - "content": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "cycle": { - "type": "string" - }, - "description": { - "type": "string" - }, - "dueDate": { - "type": "string" - }, - "duration": { - "type": "string" - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "shape": { - "type": "string" - }, - "stateValue": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "to": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "view": { - "type": "string" - }, - "waitState": { - "type": "string" - }, - "workflowProcessID": { - "type": "string" - }, - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "model.WorkflowProcess": { - "type": "object", - "properties": { - "category": { - "type": "string" - }, - "clazz": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "edges": { - "description": "流程链接数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowEdge" - } - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nodes": { - "description": "流程节点数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowNode" - } - }, - "updatedAt": { - "type": "string" - }, - "view": { - "type": "string" - } - } - }, - "model.WorkflowStartPoint": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "index": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - }, - "workflowEdgeID": { - "type": "string" - }, - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, "request.AddMenuAuthorityInfo": { "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" }, "menus": { @@ -4128,6 +3723,7 @@ "type": "object", "properties": { "authorityId": { + "description": "权限id", "type": "string" }, "casbinInfos": { @@ -4142,9 +3738,11 @@ "type": "object", "properties": { "method": { + "description": "方法", "type": "string" }, "path": { + "description": "路径", "type": "string" } } @@ -4153,12 +3751,15 @@ "type": "object", "properties": { "newPassword": { + "description": "新密码", "type": "string" }, "password": { + "description": "密码", "type": "string" }, "username": { + "description": "用户名", "type": "string" } } @@ -4170,6 +3771,7 @@ "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" } } @@ -4178,6 +3780,7 @@ "type": "object", "properties": { "id": { + "description": "主键ID", "type": "number" } } @@ -4201,18 +3804,23 @@ ], "properties": { "dbName": { + "description": "数据库名", "type": "string" }, "host": { + "description": "服务器地址", "type": "string" }, "password": { + "description": "数据库密码", "type": "string" }, "port": { + "description": "数据库连接端口", "type": "string" }, "userName": { + "description": "数据库用户名", "type": "string" } } @@ -4221,15 +3829,19 @@ "type": "object", "properties": { "captcha": { + "description": "验证码", "type": "string" }, "captchaId": { + "description": "验证码ID", "type": "string" }, "password": { + "description": "密码", "type": "string" }, "username": { + "description": "用户名", "type": "string" } } @@ -4238,9 +3850,11 @@ "type": "object", "properties": { "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" } } @@ -4249,36 +3863,47 @@ "type": "object", "properties": { "apiGroup": { + "description": "api组", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "desc": { + "description": "排序方式:升序false(默认)|降序true", "type": "boolean" }, "description": { + "description": "api中文描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "method": { + "description": "方法:创建POST(默认)|查看GET|更新PUT|删除DELETE", "type": "string" }, "orderKey": { + "description": "排序", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "path": { + "description": "api路径", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -4287,9 +3912,11 @@ "type": "object", "properties": { "authorityId": { + "description": "角色ID", "type": "string" }, "uuid": { + "description": "用户UUID", "type": "string" } } @@ -4298,33 +3925,43 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "label": { + "description": "展示值", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "sort": { + "description": "排序标记", "type": "integer" }, "status": { + "description": "启用状态", "type": "boolean" }, "sysDictionaryID": { + "description": "关联标记", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "value": { + "description": "字典值", "type": "integer" } } @@ -4333,24 +3970,31 @@ "type": "object", "properties": { "createdAt": { + "description": "创建时间", "type": "string" }, "desc": { + "description": "描述", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "name": { + "description": "字典名(中)", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "status": { + "description": "状态", "type": "boolean" }, "sysDictionaryDetails": { @@ -4360,9 +4004,11 @@ } }, "type": { + "description": "字典名(英)", "type": "string" }, "updatedAt": { + "description": "更新时间", "type": "string" } } @@ -4371,116 +4017,74 @@ "type": "object", "properties": { "agent": { + "description": "代理", "type": "string" }, "body": { + "description": "请求Body", "type": "string" }, "createdAt": { + "description": "创建时间", "type": "string" }, "error_message": { + "description": "错误信息", "type": "string" }, "id": { + "description": "主键ID", "type": "integer" }, "ip": { + "description": "请求ip", "type": "string" }, "latency": { + "description": "延迟", "type": "string" }, "method": { + "description": "请求方法", "type": "string" }, "page": { + "description": "页码", "type": "integer" }, "pageSize": { + "description": "每页大小", "type": "integer" }, "path": { + "description": "请求路径", "type": "string" }, "resp": { + "description": "响应Body", "type": "string" }, "status": { + "description": "请求状态", "type": "integer" }, "updatedAt": { + "description": "更新时间", "type": "string" }, "user": { - "type": "object", "$ref": "#/definitions/model.SysUser" }, "user_id": { + "description": "用户id", "type": "integer" } } }, - "request.WorkflowProcessSearch": { - "type": "object", - "properties": { - "category": { - "type": "string" - }, - "clazz": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "edges": { - "description": "流程链接数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowEdge" - } - }, - "hideIcon": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nodes": { - "description": "流程节点数据", - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkflowNode" - } - }, - "page": { - "type": "integer" - }, - "pageSize": { - "type": "integer" - }, - "updatedAt": { - "type": "string" - }, - "view": { - "type": "string" - } - } - }, "response.SysAuthorityCopyResponse": { "type": "object", "properties": { "authority": { - "type": "object", "$ref": "#/definitions/model.SysAuthority" }, "oldAuthorityId": { diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index 03318a514..325899ca0 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -13,35 +13,84 @@ definitions: endpoint: type: string type: object + config.Autocode: + properties: + root: + type: string + server: + type: string + serverApi: + type: string + serverInitialize: + type: string + serverModel: + type: string + serverRequest: + type: string + serverRouter: + type: string + serverService: + type: string + web: + type: string + webApi: + type: string + webFlow: + type: string + webForm: + type: string + webTable: + type: string + type: object config.Captcha: properties: imgHeight: + description: 图片高度 type: integer imgWidth: + description: 图片宽度 type: integer keyLong: + description: 验证码长度 type: integer type: object config.Casbin: properties: modelPath: + description: Model路径 + type: string + type: object + config.Detail: + properties: + compareField: + type: string + interval: + type: string + tableName: type: string type: object config.Email: properties: from: + description: 收件人 type: string host: + description: 服务器地址 type: string isSSL: + description: 是否SSL type: boolean nickname: + description: 昵称 type: string port: + description: 端口 type: integer secret: + description: 密钥 type: string to: + description: 收件人 type: string type: object config.Excel: @@ -52,15 +101,19 @@ definitions: config.JWT: properties: bufferTime: + description: 缓冲时间 type: integer expiresTime: + description: 过期时间 type: integer signingKey: + description: jwt签名 type: string type: object config.Local: properties: path: + description: 本地文件路径 type: string type: object config.Mysql: @@ -68,6 +121,7 @@ definitions: config: type: string dbname: + description: 数据库名 type: string logMode: type: boolean @@ -78,93 +132,102 @@ definitions: maxOpenConns: type: integer password: + description: 数据库密码 type: string path: + description: 服务器地址:端口 type: string username: + description: 数据库用户名 type: string type: object config.Qiniu: properties: accessKey: + description: accessKey type: string bucket: + description: 空间名称 type: string imgPath: + description: CDN加速域名 type: string secretKey: + description: secretKey type: string useCdnDomains: + description: 上传是否使用CDN上传加速 type: boolean useHttps: + description: 是否使用https type: boolean zone: + description: 存储区域 type: string type: object config.Redis: properties: addr: + description: 服务器地址:端口 type: string db: type: integer password: + description: 密码 type: string type: object config.Server: properties: aliyunOSS: $ref: '#/definitions/config.AliyunOSS' - type: object + autoCode: + $ref: '#/definitions/config.Autocode' + description: auto captcha: $ref: '#/definitions/config.Captcha' - type: object casbin: $ref: '#/definitions/config.Casbin' - type: object email: $ref: '#/definitions/config.Email' - type: object excel: $ref: '#/definitions/config.Excel' - type: object jwt: $ref: '#/definitions/config.JWT' - type: object local: $ref: '#/definitions/config.Local' description: oss - type: object mysql: $ref: '#/definitions/config.Mysql' description: gorm - type: object qiniu: $ref: '#/definitions/config.Qiniu' - type: object redis: $ref: '#/definitions/config.Redis' - type: object system: $ref: '#/definitions/config.System' - type: object tencentCOS: $ref: '#/definitions/config.TencentCOS' - type: object + timer: + $ref: '#/definitions/config.Timer' zap: $ref: '#/definitions/config.Zap' - type: object type: object config.System: properties: addr: + description: 端口值 type: integer dbType: + description: 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql type: string env: + description: 环境值 type: string ossType: + description: Oss类型 type: string useMultipoint: + description: 多点登录拦截 type: boolean type: object config.TencentCOS: @@ -182,88 +245,130 @@ definitions: secretKey: type: string type: object + config.Timer: + properties: + detail: + items: + $ref: '#/definitions/config.Detail' + type: array + spec: + type: string + start: + type: boolean + type: object config.Zap: properties: director: + description: 日志文件夹 type: string encodeLevel: + description: 编码级 type: string format: + description: 输出 type: string level: + description: 级别 type: string linkName: + description: 软链接名称 type: string logInConsole: + description: 输出控制台 type: boolean prefix: + description: 日志前缀 type: string showLine: + description: 显示行 type: boolean stacktraceKey: + description: 栈名 type: string type: object model.AutoCodeStruct: properties: abbreviation: + description: Struct简称 type: string autoCreateApiToSql: + description: 是否自动创建api type: boolean autoMoveFile: + description: 是否自动移动文件 type: boolean description: + description: Struct中文名称 type: string fields: items: $ref: '#/definitions/model.Field' type: array packageName: + description: 文件名称 type: string structName: + description: Struct名称 type: string tableName: + description: 表名 type: string type: object model.ExaCustomer: properties: createdAt: + description: 创建时间 type: string customerName: + description: 客户名 type: string customerPhoneData: + description: 客户手机号 type: string id: + description: 主键ID type: integer sysUser: $ref: '#/definitions/model.SysUser' - type: object + description: 管理详情 sysUserAuthorityID: + description: 管理角色ID type: string sysUserId: + description: 管理ID type: integer updatedAt: + description: 更新时间 type: string type: object model.ExaFileUploadAndDownload: properties: createdAt: + description: 创建时间 type: string id: + description: 主键ID type: integer key: + description: 编号 type: string name: + description: 文件名 type: string tag: + description: 文件标签 type: string updatedAt: + description: 更新时间 type: string url: + description: 文件地址 type: string type: object model.ExcelInfo: properties: fileName: + description: 文件名 type: string infoList: items: @@ -273,48 +378,67 @@ definitions: model.Field: properties: columnName: + description: 数据库字段 type: string comment: + description: 数据库字段描述 type: string dataType: + description: 数据库字段类型 type: string dataTypeLong: + description: 数据库字段长度 type: string dictType: + description: 字典 type: string fieldDesc: + description: 中文名 type: string fieldJson: + description: FieldJson type: string fieldName: + description: Field名 type: string fieldSearchType: + description: 搜索条件 type: string fieldType: + description: Field数据类型 type: string type: object model.SysApi: properties: apiGroup: + description: api组 type: string createdAt: + description: 创建时间 type: string description: + description: api中文描述 type: string id: + description: 主键ID type: integer method: + description: 方法:创建POST(默认)|查看GET|更新PUT|删除DELETE type: string path: + description: api路径 type: string updatedAt: + description: 更新时间 type: string type: object model.SysAuthority: properties: authorityId: + description: 角色ID type: string authorityName: + description: 角色名 type: string children: items: @@ -327,6 +451,7 @@ definitions: $ref: '#/definitions/model.SysAuthority' type: array defaultRouter: + description: 默认菜单(默认dashboard) type: string deletedAt: type: string @@ -335,6 +460,7 @@ definitions: $ref: '#/definitions/model.SysBaseMenu' type: array parentId: + description: 父角色ID type: string updatedAt: type: string @@ -350,317 +476,212 @@ definitions: $ref: '#/definitions/model.SysBaseMenu' type: array closeTab: + description: 自动关闭tab type: boolean component: + description: 对应前端文件路径 type: string createdAt: + description: 创建时间 type: string defaultMenu: + description: 是否是基础路由(开发中) type: boolean hidden: + description: 是否在列表隐藏 type: boolean icon: + description: 菜单图标 type: string id: + description: 主键ID type: integer keepAlive: + description: 是否缓存 type: boolean name: + description: 路由name type: string parameters: items: $ref: '#/definitions/model.SysBaseMenuParameter' type: array parentId: + description: 父菜单ID type: string path: + description: 路由path type: string sort: + description: 排序标记 type: integer title: + description: 菜单名 type: string updatedAt: + description: 更新时间 type: string type: object model.SysBaseMenuParameter: properties: createdAt: + description: 创建时间 type: string id: + description: 主键ID type: integer key: + description: 地址栏携带参数的key type: string sysBaseMenuID: type: integer type: + description: 地址栏携带参数为params还是query type: string updatedAt: + description: 更新时间 type: string value: + description: 地址栏携带参数的值 type: string type: object model.SysDictionary: properties: createdAt: + description: 创建时间 type: string desc: + description: 描述 type: string id: + description: 主键ID type: integer name: + description: 字典名(中) type: string status: + description: 状态 type: boolean sysDictionaryDetails: items: $ref: '#/definitions/model.SysDictionaryDetail' type: array type: + description: 字典名(英) type: string updatedAt: + description: 更新时间 type: string type: object model.SysDictionaryDetail: properties: createdAt: + description: 创建时间 type: string id: + description: 主键ID type: integer label: + description: 展示值 type: string sort: + description: 排序标记 type: integer status: + description: 启用状态 type: boolean sysDictionaryID: + description: 关联标记 type: integer updatedAt: + description: 更新时间 type: string value: + description: 字典值 type: integer type: object model.SysOperationRecord: properties: agent: + description: 代理 type: string body: + description: 请求Body type: string createdAt: + description: 创建时间 type: string error_message: + description: 错误信息 type: string id: + description: 主键ID type: integer ip: + description: 请求ip type: string latency: + description: 延迟 type: string method: + description: 请求方法 type: string path: + description: 请求路径 type: string resp: + description: 响应Body type: string status: + description: 请求状态 type: integer updatedAt: + description: 更新时间 type: string user: $ref: '#/definitions/model.SysUser' - type: object user_id: + description: 用户id type: integer type: object model.SysUser: properties: authority: $ref: '#/definitions/model.SysAuthority' - type: object authorityId: + description: 用户角色ID type: string createdAt: + description: 创建时间 type: string headerImg: + description: 用户头像 type: string id: + description: 主键ID type: integer nickName: + description: 用户昵称" type: string updatedAt: + description: 更新时间 type: string userName: + description: 用户登录名 type: string uuid: + description: 用户UUID type: string type: object model.System: properties: config: $ref: '#/definitions/config.Server' - type: object - type: object - model.WorkflowEdge: - properties: - clazz: - type: string - conditionExpression: - type: string - createdAt: - type: string - description: - type: string - endPoint: - $ref: '#/definitions/model.WorkflowEndPoint' - description: 终点信息 - type: object - hideIcon: - type: boolean - id: - type: string - label: - type: string - reverse: - type: boolean - seq: - type: string - shape: - type: string - source: - type: string - sourceAnchor: - type: integer - startPoint: - $ref: '#/definitions/model.WorkflowStartPoint' - description: 起点信息 - type: object - target: - type: string - targetAnchor: - type: integer - updatedAt: - type: string - type: object - model.WorkflowEndPoint: - properties: - createdAt: - type: string - id: - type: integer - index: - type: integer - updatedAt: - type: string - workflowEdgeID: - type: string - x: - type: number - "y": - type: number - type: object - model.WorkflowNode: - properties: - assignType: - type: string - assignValue: - type: string - clazz: - type: string - content: - type: string - createdAt: - type: string - cycle: - type: string - description: - type: string - dueDate: - type: string - duration: - type: string - hideIcon: - type: boolean - id: - type: string - label: - type: string - shape: - type: string - stateValue: - type: string - subject: - type: string - success: - type: boolean - to: - type: string - type: - type: string - updatedAt: - type: string - view: - type: string - waitState: - type: string - workflowProcessID: - type: string - x: - type: number - "y": - type: number - type: object - model.WorkflowProcess: - properties: - category: - type: string - clazz: - type: string - createdAt: - type: string - description: - type: string - edges: - description: 流程链接数据 - items: - $ref: '#/definitions/model.WorkflowEdge' - type: array - hideIcon: - type: boolean - id: - type: string - label: - type: string - name: - type: string - nodes: - description: 流程节点数据 - items: - $ref: '#/definitions/model.WorkflowNode' - type: array - updatedAt: - type: string - view: - type: string - type: object - model.WorkflowStartPoint: - properties: - createdAt: - type: string - id: - type: integer - index: - type: integer - updatedAt: - type: string - workflowEdgeID: - type: string - x: - type: number - "y": - type: number type: object request.AddMenuAuthorityInfo: properties: authorityId: + description: 角色ID type: string menus: items: @@ -670,6 +691,7 @@ definitions: request.CasbinInReceive: properties: authorityId: + description: 权限id type: string casbinInfos: items: @@ -679,17 +701,22 @@ definitions: request.CasbinInfo: properties: method: + description: 方法 type: string path: + description: 路径 type: string type: object request.ChangePasswordStruct: properties: newPassword: + description: 新密码 type: string password: + description: 密码 type: string username: + description: 用户名 type: string type: object request.Empty: @@ -697,11 +724,13 @@ definitions: request.GetAuthorityId: properties: authorityId: + description: 角色ID type: string type: object request.GetById: properties: id: + description: 主键ID type: number type: object request.IdsReq: @@ -714,14 +743,19 @@ definitions: request.InitDB: properties: dbName: + description: 数据库名 type: string host: + description: 服务器地址 type: string password: + description: 数据库密码 type: string port: + description: 数据库连接端口 type: string userName: + description: 数据库用户名 type: string required: - dbName @@ -730,186 +764,199 @@ definitions: request.Login: properties: captcha: + description: 验证码 type: string captchaId: + description: 验证码ID type: string password: + description: 密码 type: string username: + description: 用户名 type: string type: object request.PageInfo: properties: page: + description: 页码 type: integer pageSize: + description: 每页大小 type: integer type: object request.SearchApiParams: properties: apiGroup: + description: api组 type: string createdAt: + description: 创建时间 type: string desc: + description: 排序方式:升序false(默认)|降序true type: boolean description: + description: api中文描述 type: string id: + description: 主键ID type: integer method: + description: 方法:创建POST(默认)|查看GET|更新PUT|删除DELETE type: string orderKey: + description: 排序 type: string page: + description: 页码 type: integer pageSize: + description: 每页大小 type: integer path: + description: api路径 type: string updatedAt: + description: 更新时间 type: string type: object request.SetUserAuth: properties: authorityId: + description: 角色ID type: string uuid: + description: 用户UUID type: string type: object request.SysDictionaryDetailSearch: properties: createdAt: + description: 创建时间 type: string id: + description: 主键ID type: integer label: + description: 展示值 type: string page: + description: 页码 type: integer pageSize: + description: 每页大小 type: integer sort: + description: 排序标记 type: integer status: + description: 启用状态 type: boolean sysDictionaryID: + description: 关联标记 type: integer updatedAt: + description: 更新时间 type: string value: + description: 字典值 type: integer type: object request.SysDictionarySearch: properties: createdAt: + description: 创建时间 type: string desc: + description: 描述 type: string id: + description: 主键ID type: integer name: + description: 字典名(中) type: string page: + description: 页码 type: integer pageSize: + description: 每页大小 type: integer status: + description: 状态 type: boolean sysDictionaryDetails: items: $ref: '#/definitions/model.SysDictionaryDetail' type: array type: + description: 字典名(英) type: string updatedAt: + description: 更新时间 type: string type: object request.SysOperationRecordSearch: properties: agent: + description: 代理 type: string body: + description: 请求Body type: string createdAt: + description: 创建时间 type: string error_message: + description: 错误信息 type: string id: + description: 主键ID type: integer ip: + description: 请求ip type: string latency: + description: 延迟 type: string method: + description: 请求方法 type: string page: + description: 页码 type: integer pageSize: + description: 每页大小 type: integer path: + description: 请求路径 type: string resp: + description: 响应Body type: string status: + description: 请求状态 type: integer updatedAt: + description: 更新时间 type: string user: $ref: '#/definitions/model.SysUser' - type: object user_id: + description: 用户id type: integer type: object - request.WorkflowProcessSearch: - properties: - category: - type: string - clazz: - type: string - createdAt: - type: string - description: - type: string - edges: - description: 流程链接数据 - items: - $ref: '#/definitions/model.WorkflowEdge' - type: array - hideIcon: - type: boolean - id: - type: string - label: - type: string - name: - type: string - nodes: - description: 流程节点数据 - items: - $ref: '#/definitions/model.WorkflowNode' - type: array - page: - type: integer - pageSize: - type: integer - updatedAt: - type: string - view: - type: string - type: object response.SysAuthorityCopyResponse: properties: authority: $ref: '#/definitions/model.SysAuthority' - type: object oldAuthorityId: type: string type: object info: contact: {} description: This is a sample Server pets - license: {} title: Swagger Example API version: 0.0.1 paths: @@ -959,6 +1006,29 @@ paths: summary: 删除api tags: - SysApi + /api/deleteApisByIds: + delete: + consumes: + - application/json + parameters: + - description: ID + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.IdsReq' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"删除成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 删除选中Api + tags: + - SysApi /api/getAllApis: post: consumes: @@ -2544,254 +2614,6 @@ paths: summary: 设置用户信息 tags: - SysUser - /workflowProcess/completeWorkflowMove: - post: - consumes: - - application/json - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 提交工作流 - tags: - - WorkflowProcess - /workflowProcess/createWorkflowProcess: - post: - consumes: - - application/json - parameters: - - description: 创建WorkflowProcess - in: body - name: data - required: true - schema: - $ref: '#/definitions/model.WorkflowProcess' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 创建WorkflowProcess - tags: - - WorkflowProcess - /workflowProcess/deleteWorkflowProcess: - delete: - consumes: - - application/json - parameters: - - description: 删除WorkflowProcess - in: body - name: data - required: true - schema: - $ref: '#/definitions/model.WorkflowProcess' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"删除成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 删除WorkflowProcess - tags: - - WorkflowProcess - /workflowProcess/deleteWorkflowProcessByIds: - delete: - consumes: - - application/json - parameters: - - description: 批量删除WorkflowProcess - in: body - name: data - required: true - schema: - $ref: '#/definitions/request.IdsReq' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"删除成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 批量删除WorkflowProcess - tags: - - WorkflowProcess - /workflowProcess/findWorkflowProcess: - get: - consumes: - - application/json - parameters: - - description: 用id查询WorkflowProcess - in: body - name: data - required: true - schema: - $ref: '#/definitions/model.WorkflowProcess' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"查询成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 用id查询WorkflowProcess - tags: - - WorkflowProcess - /workflowProcess/findWorkflowStep: - get: - consumes: - - application/json - parameters: - - description: 用id查询WorkflowProcess - in: body - name: data - required: true - schema: - $ref: '#/definitions/model.WorkflowProcess' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"查询成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 用id查询工作流步骤 - tags: - - WorkflowProcess - /workflowProcess/getMyNeed: - get: - consumes: - - application/json - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 我的待办 - tags: - - WorkflowProcess - /workflowProcess/getMyStated: - get: - consumes: - - application/json - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 我发起的工作流 - tags: - - WorkflowProcess - /workflowProcess/getWorkflowMoveByID: - get: - consumes: - - application/json - parameters: - - description: 根据id获取当前节点详情和过往 - in: body - name: data - required: true - schema: - $ref: '#/definitions/request.GetById' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 根据id获取当前节点详情和历史 - tags: - - WorkflowProcess - /workflowProcess/getWorkflowProcessList: - get: - consumes: - - application/json - parameters: - - description: 分页获取WorkflowProcess列表 - in: body - name: data - required: true - schema: - $ref: '#/definitions/request.WorkflowProcessSearch' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 分页获取WorkflowProcess列表 - tags: - - WorkflowProcess - /workflowProcess/startWorkflow: - post: - consumes: - - application/json - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"获取成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 开启工作流 - tags: - - WorkflowProcess - /workflowProcess/updateWorkflowProcess: - put: - consumes: - - application/json - parameters: - - description: 更新WorkflowProcess - in: body - name: data - required: true - schema: - $ref: '#/definitions/model.WorkflowProcess' - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"更新成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 更新WorkflowProcess - tags: - - WorkflowProcess securityDefinitions: ApiKeyAuth: in: header diff --git a/server/global/global.go b/server/global/global.go index 3d01031a5..43577a4c1 100644 --- a/server/global/global.go +++ b/server/global/global.go @@ -1,9 +1,12 @@ package global import ( + "gin-vue-admin/utils/timer" + "go.uber.org/zap" "gin-vue-admin/config" + "github.com/go-redis/redis" "github.com/spf13/viper" "gorm.io/gorm" @@ -15,5 +18,6 @@ var ( GVA_CONFIG config.Server GVA_VP *viper.Viper //GVA_LOG *oplogging.Logger - GVA_LOG *zap.Logger + GVA_LOG *zap.Logger + GVA_Timer timer.Timer = timer.NewTimerTask() ) diff --git a/server/global/model.go b/server/global/model.go index 06541f2fb..2e2bb706b 100644 --- a/server/global/model.go +++ b/server/global/model.go @@ -6,8 +6,8 @@ import ( ) type GVA_MODEL struct { - ID uint `gorm:"primarykey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` + ID uint `gorm:"primarykey"` // 主键ID + CreatedAt time.Time // 创建时间 + UpdatedAt time.Time // 更新时间 + DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 删除时间 } diff --git a/server/go.mod b/server/go.mod index 0521af28d..231eed658 100644 --- a/server/go.mod +++ b/server/go.mod @@ -8,7 +8,6 @@ require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect - github.com/casbin/casbin v1.9.1 github.com/casbin/casbin/v2 v2.11.0 github.com/casbin/gorm-adapter/v3 v3.0.2 github.com/dgrijalva/jwt-go v3.2.0+incompatible @@ -30,7 +29,6 @@ require ( github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible github.com/lestrrat-go/strftime v1.0.3 // indirect github.com/mailru/easyjson v0.7.1 // indirect - github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/mapstructure v1.2.2 // indirect github.com/mojocn/base64Captcha v1.3.1 github.com/onsi/ginkgo v1.7.0 // indirect @@ -38,12 +36,13 @@ require ( github.com/pelletier/go-toml v1.6.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/qiniu/api.v7/v7 v7.4.1 + github.com/robfig/cron/v3 v3.0.1 github.com/satori/go.uuid v1.2.0 github.com/shirou/gopsutil v3.21.1+incompatible github.com/spf13/afero v1.2.2 // indirect github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.1.1 github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.0 github.com/swaggo/gin-swagger v1.2.0 github.com/swaggo/swag v1.6.7 @@ -51,13 +50,11 @@ require ( github.com/tencentyun/cos-go-sdk-v5 v0.7.19 github.com/unrolled/secure v1.0.7 go.uber.org/zap v1.10.0 - golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect + golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect golang.org/x/tools v0.0.0-20200324003944-a576cf524670 // indirect google.golang.org/protobuf v1.24.0 // indirect gopkg.in/ini.v1 v1.55.0 // indirect gopkg.in/yaml.v2 v2.3.0 // indirect - gorm.io/driver/mysql v0.3.0 - gorm.io/gorm v1.20.9 + gorm.io/driver/mysql v1.0.1 + gorm.io/gorm v1.20.7 ) - -replace github.com/casbin/gorm-adapter/v3 => github.com/casbin/gorm-adapter/v3 v3.0.2 diff --git a/server/initialize/redis.go b/server/initialize/redis.go index f5fbaaf32..f9571ddfa 100644 --- a/server/initialize/redis.go +++ b/server/initialize/redis.go @@ -17,7 +17,7 @@ func Redis() { if err != nil { global.GVA_LOG.Error("redis connect ping failed, err:", zap.Any("err", err)) } else { - global.GVA_LOG.Info("redis connect ping response:", zap.String("pong",pong)) + global.GVA_LOG.Info("redis connect ping response:", zap.String("pong", pong)) global.GVA_REDIS = client } } diff --git a/server/initialize/timer.go b/server/initialize/timer.go new file mode 100644 index 000000000..6fa279137 --- /dev/null +++ b/server/initialize/timer.go @@ -0,0 +1,24 @@ +package initialize + +import ( + "fmt" + "gin-vue-admin/config" + "gin-vue-admin/global" + "gin-vue-admin/utils" +) + +func Timer() { + if global.GVA_CONFIG.Timer.Start { + for _, detail := range global.GVA_CONFIG.Timer.Detail { + fmt.Println(detail) + go func(detail config.Detail) { + global.GVA_Timer.AddTaskByFunc("ClearDB", global.GVA_CONFIG.Timer.Spec, func() { + err := utils.ClearTable(global.GVA_DB, detail.TableName, detail.CompareField, detail.Interval) + if err != nil { + fmt.Println("timer error:", err) + } + }) + }(detail) + } + } +} diff --git a/server/main.go b/server/main.go index c772d3276..ee9080f1b 100644 --- a/server/main.go +++ b/server/main.go @@ -17,6 +17,7 @@ func main() { global.GVA_VP = core.Viper() // 初始化Viper global.GVA_LOG = core.Zap() // 初始化zap日志库 global.GVA_DB = initialize.Gorm() // gorm连接数据库 + initialize.Timer() if global.GVA_DB != nil { initialize.MysqlTables(global.GVA_DB) // 初始化表 // 程序结束前关闭数据库链接 diff --git a/server/model/exa_customer.go b/server/model/exa_customer.go index e4ea0ddf9..066032c51 100644 --- a/server/model/exa_customer.go +++ b/server/model/exa_customer.go @@ -6,9 +6,9 @@ import ( type ExaCustomer struct { global.GVA_MODEL - CustomerName string `json:"customerName" form:"customerName" gorm:"comment:客户名"` - CustomerPhoneData string `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"` - SysUserID uint `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"` - SysUserAuthorityID string `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"` - SysUser SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"` + CustomerName string `json:"customerName" form:"customerName" gorm:"comment:客户名"` // 客户名 + CustomerPhoneData string `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"` // 客户手机号 + SysUserID uint `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"` // 管理ID + SysUserAuthorityID string `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"` // 管理角色ID + SysUser SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"` // 管理详情 } diff --git a/server/model/exa_excel.go b/server/model/exa_excel.go index c1d7f7696..facaceb80 100644 --- a/server/model/exa_excel.go +++ b/server/model/exa_excel.go @@ -1,6 +1,6 @@ package model type ExcelInfo struct { - FileName string `json:"fileName"` + FileName string `json:"fileName"` // 文件名 InfoList []SysBaseMenu `json:"infoList"` } diff --git a/server/model/exa_file_upload_download.go b/server/model/exa_file_upload_download.go index 0dc200224..5504375fd 100644 --- a/server/model/exa_file_upload_download.go +++ b/server/model/exa_file_upload_download.go @@ -6,8 +6,8 @@ import ( type ExaFileUploadAndDownload struct { global.GVA_MODEL - Name string `json:"name" gorm:"comment:文件名"` - Url string `json:"url" gorm:"comment:文件地址"` - Tag string `json:"tag" gorm:"comment:文件标签"` - Key string `json:"key" gorm:"comment:编号"` + Name string `json:"name" gorm:"comment:文件名"` // 文件名 + Url string `json:"url" gorm:"comment:文件地址"` // 文件地址 + Tag string `json:"tag" gorm:"comment:文件标签"` // 文件标签 + Key string `json:"key" gorm:"comment:编号"` // 编号 } diff --git a/server/model/request/common.go b/server/model/request/common.go index b65941aec..4d7db04f8 100644 --- a/server/model/request/common.go +++ b/server/model/request/common.go @@ -2,13 +2,13 @@ package request // Paging common input parameter structure type PageInfo struct { - Page int `json:"page" form:"page"` - PageSize int `json:"pageSize" form:"pageSize"` + Page int `json:"page" form:"page"` // 页码 + PageSize int `json:"pageSize" form:"pageSize"` // 每页大小 } // Find by id structure type GetById struct { - Id float64 `json:"id" form:"id"` + ID float64 `json:"id" form:"id"` } type IdsReq struct { @@ -17,7 +17,7 @@ type IdsReq struct { // Get role by id structure type GetAuthorityId struct { - AuthorityId string + AuthorityId string // 角色ID } type Empty struct{} diff --git a/server/model/request/sys_api.go b/server/model/request/sys_api.go index e2b1fce5d..f9d5ec037 100644 --- a/server/model/request/sys_api.go +++ b/server/model/request/sys_api.go @@ -6,6 +6,6 @@ import "gin-vue-admin/model" type SearchApiParams struct { model.SysApi PageInfo - OrderKey string `json:"orderKey"` - Desc bool `json:"desc"` + OrderKey string `json:"orderKey"` // 排序 + Desc bool `json:"desc"` // 排序方式:升序false(默认)|降序true } diff --git a/server/model/request/sys_casbin.go b/server/model/request/sys_casbin.go index d95490514..ccb461b86 100644 --- a/server/model/request/sys_casbin.go +++ b/server/model/request/sys_casbin.go @@ -2,12 +2,12 @@ package request // Casbin info structure type CasbinInfo struct { - Path string `json:"path"` - Method string `json:"method"` + Path string `json:"path"` // 路径 + Method string `json:"method"` // 方法 } // Casbin structure for input parameters type CasbinInReceive struct { - AuthorityId string `json:"authorityId"` + AuthorityId string `json:"authorityId"` // 权限id CasbinInfos []CasbinInfo `json:"casbinInfos"` } diff --git a/server/model/request/sys_dictionary.go b/server/model/request/sys_dictionary.go index c71b3666a..abd8ff041 100644 --- a/server/model/request/sys_dictionary.go +++ b/server/model/request/sys_dictionary.go @@ -2,7 +2,7 @@ package request import "gin-vue-admin/model" -type SysDictionarySearch struct{ - model.SysDictionary - PageInfo -} \ No newline at end of file +type SysDictionarySearch struct { + model.SysDictionary + PageInfo +} diff --git a/server/model/request/sys_dictionary_detail.go b/server/model/request/sys_dictionary_detail.go index 95b30a629..8b5e10652 100644 --- a/server/model/request/sys_dictionary_detail.go +++ b/server/model/request/sys_dictionary_detail.go @@ -2,7 +2,7 @@ package request import "gin-vue-admin/model" -type SysDictionaryDetailSearch struct{ - model.SysDictionaryDetail - PageInfo -} \ No newline at end of file +type SysDictionaryDetailSearch struct { + model.SysDictionaryDetail + PageInfo +} diff --git a/server/model/request/sys_init.go b/server/model/request/sys_init.go index 63f20112d..3f994cf3f 100644 --- a/server/model/request/sys_init.go +++ b/server/model/request/sys_init.go @@ -1,9 +1,9 @@ package request type InitDB struct { - Host string `json:"host"` - Port string `json:"port"` - UserName string `json:"userName" binding:"required"` - Password string `json:"password"` - DBName string `json:"dbName" binding:"required"` + Host string `json:"host"` // 服务器地址 + Port string `json:"port"` // 数据库连接端口 + UserName string `json:"userName" binding:"required"` // 数据库用户名 + Password string `json:"password"` // 数据库密码 + DBName string `json:"dbName" binding:"required"` // 数据库名 } diff --git a/server/model/request/sys_menu.go b/server/model/request/sys_menu.go index e17ffafdd..0c4b95da7 100644 --- a/server/model/request/sys_menu.go +++ b/server/model/request/sys_menu.go @@ -5,5 +5,5 @@ import "gin-vue-admin/model" // Add menu authority info structure type AddMenuAuthorityInfo struct { Menus []model.SysBaseMenu - AuthorityId string + AuthorityId string // 角色ID } diff --git a/server/model/request/sys_user.go b/server/model/request/sys_user.go index 858e241f6..f2b147ed8 100644 --- a/server/model/request/sys_user.go +++ b/server/model/request/sys_user.go @@ -13,21 +13,21 @@ type Register struct { // User login structure type Login struct { - Username string `json:"username"` - Password string `json:"password"` - Captcha string `json:"captcha"` - CaptchaId string `json:"captchaId"` + Username string `json:"username"` // 用户名 + Password string `json:"password"` // 密码 + Captcha string `json:"captcha"` // 验证码 + CaptchaId string `json:"captchaId"` // 验证码ID } // Modify password structure type ChangePasswordStruct struct { - Username string `json:"username"` - Password string `json:"password"` - NewPassword string `json:"newPassword"` + Username string `json:"username"` // 用户名 + Password string `json:"password"` // 密码 + NewPassword string `json:"newPassword"` // 新密码 } // Modify user's auth structure type SetUserAuth struct { - UUID uuid.UUID `json:"uuid"` - AuthorityId string `json:"authorityId"` + UUID uuid.UUID `json:"uuid"` // 用户UUID + AuthorityId string `json:"authorityId"` // 角色ID } diff --git a/server/model/sys_api.go b/server/model/sys_api.go index 058bbd214..20d9b657a 100644 --- a/server/model/sys_api.go +++ b/server/model/sys_api.go @@ -6,8 +6,8 @@ import ( type SysApi struct { global.GVA_MODEL - Path string `json:"path" gorm:"comment:api路径"` - Description string `json:"description" gorm:"comment:api中文描述"` - ApiGroup string `json:"apiGroup" gorm:"comment:api组"` - Method string `json:"method" gorm:"default:POST" gorm:"comment:方法"` + Path string `json:"path" gorm:"comment:api路径"` // api路径 + Description string `json:"description" gorm:"comment:api中文描述"` // api中文描述 + ApiGroup string `json:"apiGroup" gorm:"comment:api组"` // api组 + Method string `json:"method" gorm:"default:POST" gorm:"comment:方法"` // 方法:创建POST(默认)|查看GET|更新PUT|删除DELETE } diff --git a/server/model/sys_authority.go b/server/model/sys_authority.go index ac80ea6e4..9332af390 100644 --- a/server/model/sys_authority.go +++ b/server/model/sys_authority.go @@ -8,11 +8,11 @@ type SysAuthority struct { CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` - AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` - AuthorityName string `json:"authorityName" gorm:"comment:角色名"` - ParentId string `json:"parentId" gorm:"comment:父角色ID"` + AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` // 角色ID + AuthorityName string `json:"authorityName" gorm:"comment:角色名"` // 角色名 + ParentId string `json:"parentId" gorm:"comment:父角色ID"` // 父角色ID DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"` Children []SysAuthority `json:"children" gorm:"-"` SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"` - DefaultRouter string `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"` + DefaultRouter string `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"` // 默认菜单(默认dashboard) } diff --git a/server/model/sys_auto_code.go b/server/model/sys_auto_code.go index 78b77778d..6e9e0bdec 100644 --- a/server/model/sys_auto_code.go +++ b/server/model/sys_auto_code.go @@ -4,27 +4,27 @@ import "errors" // 初始版本自动化代码工具 type AutoCodeStruct struct { - StructName string `json:"structName"` - TableName string `json:"tableName"` - PackageName string `json:"packageName"` - Abbreviation string `json:"abbreviation"` - Description string `json:"description"` - AutoCreateApiToSql bool `json:"autoCreateApiToSql"` - AutoMoveFile bool `json:"autoMoveFile"` - Fields []Field `json:"fields"` + StructName string `json:"structName"` // Struct名称 + TableName string `json:"tableName"` // 表名 + PackageName string `json:"packageName"` // 文件名称 + Abbreviation string `json:"abbreviation"` // Struct简称 + Description string `json:"description"` // Struct中文名称 + AutoCreateApiToSql bool `json:"autoCreateApiToSql"` // 是否自动创建api + AutoMoveFile bool `json:"autoMoveFile"` // 是否自动移动文件 + Fields []*Field `json:"fields"` } type Field struct { - FieldName string `json:"fieldName"` - FieldDesc string `json:"fieldDesc"` - FieldType string `json:"fieldType"` - FieldJson string `json:"fieldJson"` - DataType string `json:"dataType"` - DataTypeLong string `json:"dataTypeLong"` - Comment string `json:"comment"` - ColumnName string `json:"columnName"` - FieldSearchType string `json:"fieldSearchType"` - DictType string `json:"dictType"` + FieldName string `json:"fieldName"` // Field名 + FieldDesc string `json:"fieldDesc"` // 中文名 + FieldType string `json:"fieldType"` // Field数据类型 + FieldJson string `json:"fieldJson"` // FieldJson + DataType string `json:"dataType"` // 数据库字段类型 + DataTypeLong string `json:"dataTypeLong"` // 数据库字段长度 + Comment string `json:"comment"` // 数据库字段描述 + ColumnName string `json:"columnName"` // 数据库字段 + FieldSearchType string `json:"fieldSearchType"` // 搜索条件 + DictType string `json:"dictType"` // 字典 } var AutoMoveErr error = errors.New("创建代码成功并移动文件成功") diff --git a/server/model/sys_base_menu.go b/server/model/sys_base_menu.go index c9dbe5103..83a287b74 100644 --- a/server/model/sys_base_menu.go +++ b/server/model/sys_base_menu.go @@ -6,31 +6,31 @@ import ( type SysBaseMenu struct { global.GVA_MODEL - MenuLevel uint `json:"-"` - ParentId string `json:"parentId" gorm:"comment:父菜单ID"` - Path string `json:"path" gorm:"comment:路由path"` - Name string `json:"name" gorm:"comment:路由name"` - Hidden bool `json:"hidden" gorm:"comment:是否在列表隐藏"` - Component string `json:"component" gorm:"comment:对应前端文件路径"` - Sort int `json:"sort" gorm:"comment:排序标记"` - Meta `json:"meta" gorm:"comment:附加属性"` + MenuLevel uint `json:"-"` + ParentId string `json:"parentId" gorm:"comment:父菜单ID"` // 父菜单ID + Path string `json:"path" gorm:"comment:路由path"` // 路由path + Name string `json:"name" gorm:"comment:路由name"` // 路由name + Hidden bool `json:"hidden" gorm:"comment:是否在列表隐藏"` // 是否在列表隐藏 + Component string `json:"component" gorm:"comment:对应前端文件路径"` // 对应前端文件路径 + Sort int `json:"sort" gorm:"comment:排序标记"` // 排序标记 + Meta `json:"meta" gorm:"comment:附加属性"` // 附加属性 SysAuthoritys []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_menus;"` Children []SysBaseMenu `json:"children" gorm:"-"` Parameters []SysBaseMenuParameter `json:"parameters"` } type Meta struct { - KeepAlive bool `json:"keepAlive" gorm:"comment:是否缓存"` - DefaultMenu bool `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"` - Title string `json:"title" gorm:"comment:菜单名"` - Icon string `json:"icon" gorm:"comment:菜单图标"` - CloseTab bool `json:"closeTab" gorm:"comment:自动关闭tab"` + KeepAlive bool `json:"keepAlive" gorm:"comment:是否缓存"` // 是否缓存 + DefaultMenu bool `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"` // 是否是基础路由(开发中) + Title string `json:"title" gorm:"comment:菜单名"` // 菜单名 + Icon string `json:"icon" gorm:"comment:菜单图标"` // 菜单图标 + CloseTab bool `json:"closeTab" gorm:"comment:自动关闭tab"` // 自动关闭tab } type SysBaseMenuParameter struct { global.GVA_MODEL SysBaseMenuID uint - Type string `json:"type" gorm:"comment:地址栏携带参数为params还是query"` - Key string `json:"key" gorm:"comment:地址栏携带参数的key"` - Value string `json:"value" gorm:"comment:地址栏携带参数的值"` + Type string `json:"type" gorm:"comment:地址栏携带参数为params还是query"` // 地址栏携带参数为params还是query + Key string `json:"key" gorm:"comment:地址栏携带参数的key"` // 地址栏携带参数的key + Value string `json:"value" gorm:"comment:地址栏携带参数的值"` // 地址栏携带参数的值 } diff --git a/server/model/sys_casbin.go b/server/model/sys_casbin.go index 83f55f4d0..9bb198868 100644 --- a/server/model/sys_casbin.go +++ b/server/model/sys_casbin.go @@ -1,7 +1,7 @@ package model type CasbinModel struct { - Ptype string `json:"ptype" gorm:"column:p_type"` + Ptype string `json:"ptype" gorm:"column:ptype"` AuthorityId string `json:"rolename" gorm:"column:v0"` Path string `json:"path" gorm:"column:v1"` Method string `json:"method" gorm:"column:v2"` diff --git a/server/model/sys_dictionary.go b/server/model/sys_dictionary.go index 208f1396f..153a0f4f3 100644 --- a/server/model/sys_dictionary.go +++ b/server/model/sys_dictionary.go @@ -8,9 +8,9 @@ import ( // 如果含有time.Time 请自行import time包 type SysDictionary struct { global.GVA_MODEL - Name string `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"` - Type string `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"` - Status *bool `json:"status" form:"status" gorm:"column:status;comment:状态"` - Desc string `json:"desc" form:"desc" gorm:"column:desc;comment:描述"` + Name string `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"` // 字典名(中) + Type string `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"` // 字典名(英) + Status *bool `json:"status" form:"status" gorm:"column:status;comment:状态"` // 状态 + Desc string `json:"desc" form:"desc" gorm:"column:desc;comment:描述"` // 描述 SysDictionaryDetails []SysDictionaryDetail `json:"sysDictionaryDetails" form:"sysDictionaryDetails"` } diff --git a/server/model/sys_dictionary_detail.go b/server/model/sys_dictionary_detail.go index e0dded0e5..b75d1336a 100644 --- a/server/model/sys_dictionary_detail.go +++ b/server/model/sys_dictionary_detail.go @@ -8,9 +8,9 @@ import ( // 如果含有time.Time 请自行import time包 type SysDictionaryDetail struct { global.GVA_MODEL - Label string `json:"label" form:"label" gorm:"column:label;comment:展示值"` - Value int `json:"value" form:"value" gorm:"column:value;comment:字典值"` - Status *bool `json:"status" form:"status" gorm:"column:status;comment:启用状态"` - Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"` - SysDictionaryID int `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"` + Label string `json:"label" form:"label" gorm:"column:label;comment:展示值"` // 展示值 + Value int `json:"value" form:"value" gorm:"column:value;comment:字典值"` // 字典值 + Status *bool `json:"status" form:"status" gorm:"column:status;comment:启用状态"` // 启用状态 + Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"` // 排序标记 + SysDictionaryID int `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"` // 关联标记 } diff --git a/server/model/sys_operation_record.go b/server/model/sys_operation_record.go index 9bf9e2f4e..46d02f83e 100644 --- a/server/model/sys_operation_record.go +++ b/server/model/sys_operation_record.go @@ -9,15 +9,15 @@ import ( // 如果含有time.Time 请自行import time包 type SysOperationRecord struct { global.GVA_MODEL - Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"` - Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"` - Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"` - Status int `json:"status" form:"status" gorm:"column:status;comment:请求状态"` - Latency time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"` - Agent string `json:"agent" form:"agent" gorm:"column:agent;comment:代理"` - ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"` - Body string `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"` - Resp string `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"` - UserID int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"` + Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"` // 请求ip + Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"` // 请求方法 + Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"` // 请求路径 + Status int `json:"status" form:"status" gorm:"column:status;comment:请求状态"` // 请求状态 + Latency time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟" swaggertype:"string"` // 延迟 + Agent string `json:"agent" form:"agent" gorm:"column:agent;comment:代理"` // 代理 + ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"` // 错误信息 + Body string `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"` // 请求Body + Resp string `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"` // 响应Body + UserID int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"` // 用户id User SysUser `json:"user"` } diff --git a/server/model/sys_user.go b/server/model/sys_user.go index bfd17e389..8ed5c2afe 100644 --- a/server/model/sys_user.go +++ b/server/model/sys_user.go @@ -7,11 +7,11 @@ import ( type SysUser struct { global.GVA_MODEL - UUID uuid.UUID `json:"uuid" gorm:"comment:用户UUID"` - Username string `json:"userName" gorm:"comment:用户登录名"` - Password string `json:"-" gorm:"comment:用户登录密码"` - NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称" ` - HeaderImg string `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"` + UUID uuid.UUID `json:"uuid" gorm:"comment:用户UUID"` // 用户UUID + Username string `json:"userName" gorm:"comment:用户登录名"` // 用户登录名 + Password string `json:"-" gorm:"comment:用户登录密码"` // 用户登录密码 + NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称" + HeaderImg string `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"` // 用户头像 Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"` - AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"` + AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID } diff --git a/server/resource/page/css/index.d8b172cd.css b/server/resource/page/css/index.d8b172cd.css deleted file mode 100644 index 8f0a3b88f..000000000 --- a/server/resource/page/css/index.d8b172cd.css +++ /dev/null @@ -1 +0,0 @@ -.add-item[data-v-1ba11f83]{margin-top:8px}.url-item[data-v-1ba11f83]{margin-bottom:12px}.tab-editor[data-v-68aaf5c0]{position:absolute;top:33px;bottom:0;left:0;right:0;font-size:14px}.left-editor[data-v-68aaf5c0]{position:relative;height:100%;background:#1e1e1e;overflow:hidden}.setting[data-v-68aaf5c0]{position:absolute;right:15px;top:3px;color:#a9f122;font-size:18px;cursor:pointer;z-index:1}.right-preview[data-v-68aaf5c0]{height:100%}.right-preview .result-wrapper[data-v-68aaf5c0]{height:calc(100vh - 33px);width:100%;overflow:auto;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.action-bar[data-v-68aaf5c0]{height:33px;background:#f2fafb;padding:0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}.action-bar .bar-btn[data-v-68aaf5c0]{display:inline-block;padding:0 6px;line-height:32px;color:#8285f5;cursor:pointer;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.action-bar .bar-btn i[data-v-68aaf5c0]{font-size:20px}.action-bar .bar-btn[data-v-68aaf5c0]:hover{color:#4348d4}.action-bar .bar-btn+.bar-btn[data-v-68aaf5c0]{margin-left:8px}.action-bar .delete-btn[data-v-68aaf5c0]{color:#f56c6c}.action-bar .delete-btn[data-v-68aaf5c0]:hover{color:#ea0b30}[data-v-68aaf5c0] .el-drawer__header,[data-v-d06a2be0] .el-drawer__header{display:none}.action-bar[data-v-d06a2be0]{height:33px;background:#f2fafb;padding:0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}.action-bar .bar-btn[data-v-d06a2be0]{display:inline-block;padding:0 6px;line-height:32px;color:#8285f5;cursor:pointer;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.action-bar .bar-btn i[data-v-d06a2be0]{font-size:20px}.action-bar .bar-btn[data-v-d06a2be0]:hover{color:#4348d4}.action-bar .bar-btn+.bar-btn[data-v-d06a2be0]{margin-left:8px}.action-bar .delete-btn[data-v-d06a2be0]{color:#f56c6c}.action-bar .delete-btn[data-v-d06a2be0]:hover{color:#ea0b30}.json-editor[data-v-d06a2be0]{height:calc(100vh - 33px)}.icon-ul[data-v-3ba3d51c]{margin:0;padding:0;font-size:0}.icon-ul li[data-v-3ba3d51c]{list-style-type:none;text-align:center;font-size:14px;display:inline-block;width:16.66%;-webkit-box-sizing:border-box;box-sizing:border-box;height:108px;padding:15px 6px 6px 6px;cursor:pointer;overflow:hidden}.icon-ul li[data-v-3ba3d51c]:hover{background:#f2f2f2}.icon-ul li.active-item[data-v-3ba3d51c]{background:#e1f3fb;color:#7a6df0}.icon-ul li>i[data-v-3ba3d51c]{font-size:30px;line-height:50px}.icon-dialog[data-v-3ba3d51c] .el-dialog{border-radius:8px;margin-bottom:0;margin-top:4vh!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-height:92vh;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.icon-dialog[data-v-3ba3d51c] .el-dialog .el-dialog__header{padding-top:14px}.icon-dialog[data-v-3ba3d51c] .el-dialog .el-dialog__body{margin:0 20px 20px 20px;padding:0;overflow:auto}.right-board[data-v-5786ab0e]{width:350px;position:absolute;right:0;top:0;padding-top:3px}.right-board .field-box[data-v-5786ab0e]{position:relative;height:calc(100vh - 42px);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.right-board .el-scrollbar[data-v-5786ab0e]{height:100%}.select-item[data-v-5786ab0e]{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px dashed #fff;-webkit-box-sizing:border-box;box-sizing:border-box}.select-item .close-btn[data-v-5786ab0e]{cursor:pointer;color:#f56c6c}.select-item .el-input+.el-input[data-v-5786ab0e]{margin-left:4px}.select-item+.select-item[data-v-5786ab0e]{margin-top:4px}.select-item.sortable-chosen[data-v-5786ab0e]{border:1px dashed #409eff}.select-line-icon[data-v-5786ab0e]{line-height:32px;font-size:22px;padding:0 4px;color:#777}.option-drag[data-v-5786ab0e]{cursor:move}.time-range .el-date-editor[data-v-5786ab0e]{width:227px}.time-range[data-v-5786ab0e] .el-icon-time{display:none}.document-link[data-v-5786ab0e]{position:absolute;display:block;width:26px;height:26px;top:0;left:0;cursor:pointer;background:#409eff;z-index:1;border-radius:0 0 6px 0;text-align:center;line-height:26px;color:#fff;font-size:18px}.node-label[data-v-5786ab0e]{font-size:14px}.node-icon[data-v-5786ab0e]{color:#bebfc3}.container{position:relative;width:100%;height:100%}.components-list{padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%}.components-list .components-item{display:inline-block;width:48%;margin:1%;-webkit-transition:-webkit-transform 0ms!important;transition:-webkit-transform 0ms!important;transition:transform 0ms!important;transition:transform 0ms,-webkit-transform 0ms!important}.components-draggable{padding-bottom:20px}.components-title{font-size:14px;color:#222;margin:6px 2px}.components-title .svg-icon{color:#666;font-size:18px}.components-body{padding:8px 10px;background:#f6f7ff;font-size:12px;cursor:move;border:1px dashed #f6f7ff;border-radius:3px}.components-body .svg-icon{color:#777;font-size:15px}.components-body:hover{border:1px dashed #787be8;color:#787be8}.components-body:hover .svg-icon{color:#787be8}.left-board{width:260px;position:absolute;left:0;top:0;height:100vh}.center-scrollbar,.left-scrollbar{height:calc(100vh - 42px);overflow:hidden}.center-scrollbar{border-left:1px solid #f1e8e8;border-right:1px solid #f1e8e8}.center-board,.center-scrollbar{-webkit-box-sizing:border-box;box-sizing:border-box}.center-board{height:100vh;width:auto;margin:0 350px 0 260px}.empty-info{position:absolute;top:46%;left:0;right:0;text-align:center;font-size:18px;color:#ccb1ea;letter-spacing:4px}.action-bar{position:relative;height:42px;text-align:right;padding:0 15px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #f1e8e8;border-top:none;border-left:none}.action-bar .delete-btn{color:#f56c6c}.logo-wrapper{position:relative;height:42px;background:#fff;border-bottom:1px solid #f1e8e8;-webkit-box-sizing:border-box;box-sizing:border-box}.logo{position:absolute;left:12px;top:6px;line-height:30px;color:#00afff;font-weight:600;font-size:17px;white-space:nowrap}.logo>img{width:30px;height:30px;vertical-align:top}.logo .github{display:inline-block;vertical-align:sub;margin-left:15px}.logo .github>img{height:22px}.center-board-row{padding:12px 12px 15px 12px;-webkit-box-sizing:border-box;box-sizing:border-box}.center-board-row>.el-form{height:calc(100vh - 69px)}.drawing-board{margin-top:20px;height:100%;position:relative}.drawing-board .components-body{padding:0;margin:0;font-size:0}.drawing-board .sortable-ghost{position:relative;display:block;overflow:hidden}.drawing-board .sortable-ghost:before{content:" ";position:absolute;left:0;right:0;top:0;height:3px;background:#5959df;z-index:2}.drawing-board .components-item.sortable-ghost{width:100%;height:60px;background-color:#f6f7ff}.drawing-board .active-from-item>.el-form-item{background:#f6f7ff;border-radius:6px}.drawing-board .active-from-item>.drawing-item-copy,.drawing-board .active-from-item>.drawing-item-delete{display:initial}.drawing-board .active-from-item>.component-name{color:#409eff}.drawing-board .el-form-item{margin-bottom:15px}.drawing-item{position:relative;cursor:move}.drawing-item.unfocus-bordered:not(.active-from-item)>div:first-child{border:1px dashed #ccc}.drawing-item .el-form-item{padding:12px 10px}.drawing-row-item{position:relative;cursor:move;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px dashed #ccc;border-radius:3px;padding:0 2px;margin-bottom:15px}.drawing-row-item .drawing-row-item{margin-bottom:2px}.drawing-row-item .el-col{margin-top:22px}.drawing-row-item .el-form-item{margin-bottom:0}.drawing-row-item .drag-wrapper{min-height:80px}.drawing-row-item.active-from-item{border:1px dashed #409eff}.drawing-row-item .component-name{position:absolute;top:0;left:0;font-size:12px;color:#bbb;display:inline-block;padding:0 6px}.drawing-item:hover>.el-form-item,.drawing-row-item:hover>.el-form-item{background:#f6f7ff;border-radius:6px}.drawing-item:hover>.drawing-item-copy,.drawing-item:hover>.drawing-item-delete,.drawing-row-item:hover>.drawing-item-copy,.drawing-row-item:hover>.drawing-item-delete{display:initial}.drawing-item>.drawing-item-copy,.drawing-item>.drawing-item-delete,.drawing-row-item>.drawing-item-copy,.drawing-row-item>.drawing-item-delete{display:none;position:absolute;top:-10px;width:22px;height:22px;line-height:22px;text-align:center;border-radius:50%;font-size:12px;border:1px solid;cursor:pointer;z-index:1}.drawing-item>.drawing-item-copy,.drawing-row-item>.drawing-item-copy{right:56px;border-color:#409eff;color:#409eff;background:#fff}.drawing-item>.drawing-item-copy:hover,.drawing-row-item>.drawing-item-copy:hover{background:#409eff;color:#fff}.drawing-item>.drawing-item-delete,.drawing-row-item>.drawing-item-delete{right:24px;border-color:#f56c6c;color:#f56c6c;background:#fff}.drawing-item>.drawing-item-delete:hover,.drawing-row-item>.drawing-item-delete:hover{background:#f56c6c;color:#fff}.test-from[data-v-412f198a]{margin:15px auto;width:800px;padding:15px}body,html{margin:0;padding:0;background:#fff;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}body,html,input,textarea{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}.editor-tabs{background:#121315}.editor-tabs .el-tabs__header{margin:0;border-bottom-color:#121315}.editor-tabs .el-tabs__header .el-tabs__nav{border-color:#121315}.editor-tabs .el-tabs__item{height:32px;line-height:32px;color:#888a8e;border-left:1px solid #121315!important;background:#363636;margin-right:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editor-tabs .el-tabs__item.is-active{background:#1e1e1e;border-bottom-color:#1e1e1e!important;color:#fff}.editor-tabs .el-icon-edit{color:#f1fa8c}.editor-tabs .el-icon-document{color:#a95812}.right-scrollbar .el-scrollbar__view{padding:12px 18px 15px 15px}.el-scrollbar__wrap{-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden!important}.center-tabs .el-tabs__header,.el-scrollbar__wrap{margin-bottom:0!important}.center-tabs .el-tabs__item{width:50%;text-align:center}.center-tabs .el-tabs__nav{width:100%}.reg-item{padding:12px 6px;background:#f8f8f8;position:relative;border-radius:4px}.reg-item .close-btn{position:absolute;right:-6px;top:-6px;display:block;width:16px;height:16px;line-height:16px;background:rgba(0,0,0,.2);border-radius:50%;color:#fff;text-align:center;z-index:1;cursor:pointer;font-size:12px}.reg-item .close-btn:hover{background:rgba(210,23,23,.5)}.reg-item+.reg-item{margin-top:18px}.action-bar .el-button+.el-button{margin-left:15px}.action-bar i{font-size:20px;vertical-align:middle;position:relative;top:-1px}.custom-tree-node{width:100%;font-size:14px}.custom-tree-node .node-operation{float:right}.custom-tree-node i[class*=el-icon]+i[class*=el-icon]{margin-left:6px}.custom-tree-node .el-icon-plus{color:#409eff}.custom-tree-node .el-icon-delete{color:#157a0c}.el-scrollbar__view{overflow-x:hidden}.el-rate{display:inline-block;vertical-align:text-top}.el-upload__tip{line-height:1.2}.svg-icon[data-v-21958c4e]{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.svg-external-icon[data-v-21958c4e]{background-color:currentColor;-webkit-mask-size:cover!important;mask-size:cover!important;display:inline-block} \ No newline at end of file diff --git a/server/resource/page/css/index.f05c41c6.css b/server/resource/page/css/index.f05c41c6.css new file mode 100644 index 000000000..ab9bbcf7c --- /dev/null +++ b/server/resource/page/css/index.f05c41c6.css @@ -0,0 +1 @@ +.add-item[data-v-60dcec16]{margin-top:8px}.url-item[data-v-60dcec16]{margin-bottom:12px}.tab-editor[data-v-3157a144]{position:absolute;top:33px;bottom:0;left:0;right:0;font-size:14px}.left-editor[data-v-3157a144]{position:relative;height:100%;background:#1e1e1e;overflow:hidden}.setting[data-v-3157a144]{position:absolute;right:15px;top:3px;color:#a9f122;font-size:18px;cursor:pointer;z-index:1}.right-preview[data-v-3157a144]{height:100%}.right-preview .result-wrapper[data-v-3157a144]{height:calc(100vh - 33px);width:100%;overflow:auto;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.action-bar[data-v-3157a144]{height:33px;background:#f2fafb;padding:0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}.action-bar .bar-btn[data-v-3157a144]{display:inline-block;padding:0 6px;line-height:32px;color:#8285f5;cursor:pointer;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.action-bar .bar-btn i[data-v-3157a144]{font-size:20px}.action-bar .bar-btn[data-v-3157a144]:hover{color:#4348d4}.action-bar .bar-btn+.bar-btn[data-v-3157a144]{margin-left:8px}.action-bar .delete-btn[data-v-3157a144]{color:#f56c6c}.action-bar .delete-btn[data-v-3157a144]:hover{color:#ea0b30}[data-v-3157a144] .el-drawer__header,[data-v-44793736] .el-drawer__header{display:none}.action-bar[data-v-44793736]{height:33px;background:#f2fafb;padding:0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}.action-bar .bar-btn[data-v-44793736]{display:inline-block;padding:0 6px;line-height:32px;color:#8285f5;cursor:pointer;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.action-bar .bar-btn i[data-v-44793736]{font-size:20px}.action-bar .bar-btn[data-v-44793736]:hover{color:#4348d4}.action-bar .bar-btn+.bar-btn[data-v-44793736]{margin-left:8px}.action-bar .delete-btn[data-v-44793736]{color:#f56c6c}.action-bar .delete-btn[data-v-44793736]:hover{color:#ea0b30}.json-editor[data-v-44793736]{height:calc(100vh - 33px)}.icon-ul[data-v-3ba3d51c]{margin:0;padding:0;font-size:0}.icon-ul li[data-v-3ba3d51c]{list-style-type:none;text-align:center;font-size:14px;display:inline-block;width:16.66%;-webkit-box-sizing:border-box;box-sizing:border-box;height:108px;padding:15px 6px 6px 6px;cursor:pointer;overflow:hidden}.icon-ul li[data-v-3ba3d51c]:hover{background:#f2f2f2}.icon-ul li.active-item[data-v-3ba3d51c]{background:#e1f3fb;color:#7a6df0}.icon-ul li>i[data-v-3ba3d51c]{font-size:30px;line-height:50px}.icon-dialog[data-v-3ba3d51c] .el-dialog{border-radius:8px;margin-bottom:0;margin-top:4vh!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-height:92vh;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.icon-dialog[data-v-3ba3d51c] .el-dialog .el-dialog__header{padding-top:14px}.icon-dialog[data-v-3ba3d51c] .el-dialog .el-dialog__body{margin:0 20px 20px 20px;padding:0;overflow:auto}.right-board[data-v-48152a99]{width:350px;position:absolute;right:0;top:0;padding-top:3px}.right-board .field-box[data-v-48152a99]{position:relative;height:calc(100vh - 42px);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.right-board .el-scrollbar[data-v-48152a99]{height:100%}.select-item[data-v-48152a99]{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px dashed #fff;-webkit-box-sizing:border-box;box-sizing:border-box}.select-item .close-btn[data-v-48152a99]{cursor:pointer;color:#f56c6c}.select-item .el-input+.el-input[data-v-48152a99]{margin-left:4px}.select-item+.select-item[data-v-48152a99]{margin-top:4px}.select-item.sortable-chosen[data-v-48152a99]{border:1px dashed #409eff}.select-line-icon[data-v-48152a99]{line-height:32px;font-size:22px;padding:0 4px;color:#777}.option-drag[data-v-48152a99]{cursor:move}.time-range .el-date-editor[data-v-48152a99]{width:227px}.time-range[data-v-48152a99] .el-icon-time{display:none}.document-link[data-v-48152a99]{position:absolute;display:block;width:26px;height:26px;top:0;left:0;cursor:pointer;background:#409eff;z-index:1;border-radius:0 0 6px 0;text-align:center;line-height:26px;color:#fff;font-size:18px}.node-label[data-v-48152a99]{font-size:14px}.node-icon[data-v-48152a99]{color:#bebfc3}.container{position:relative;width:100%;height:100%}.components-list{padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%}.components-list .components-item{display:inline-block;width:48%;margin:1%;-webkit-transition:-webkit-transform 0ms!important;transition:-webkit-transform 0ms!important;transition:transform 0ms!important;transition:transform 0ms,-webkit-transform 0ms!important}.components-draggable{padding-bottom:20px}.components-title{font-size:14px;color:#222;margin:6px 2px}.components-title .svg-icon{color:#666;font-size:18px}.components-body{padding:8px 10px;background:#f6f7ff;font-size:12px;cursor:move;border:1px dashed #f6f7ff;border-radius:3px}.components-body .svg-icon{color:#777;font-size:15px}.components-body:hover{border:1px dashed #787be8;color:#787be8}.components-body:hover .svg-icon{color:#787be8}.left-board{width:260px;position:absolute;left:0;top:0;height:100vh}.center-scrollbar,.left-scrollbar{height:calc(100vh - 42px);overflow:hidden}.center-scrollbar{border-left:1px solid #f1e8e8;border-right:1px solid #f1e8e8}.center-board,.center-scrollbar{-webkit-box-sizing:border-box;box-sizing:border-box}.center-board{height:100vh;width:auto;margin:0 350px 0 260px}.empty-info{position:absolute;top:46%;left:0;right:0;text-align:center;font-size:18px;color:#ccb1ea;letter-spacing:4px}.action-bar{position:relative;height:42px;text-align:right;padding:0 15px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #f1e8e8;border-top:none;border-left:none}.action-bar .delete-btn{color:#f56c6c}.logo-wrapper{position:relative;height:42px;background:#fff;border-bottom:1px solid #f1e8e8;-webkit-box-sizing:border-box;box-sizing:border-box}.logo{position:absolute;left:12px;top:6px;line-height:30px;color:#00afff;font-weight:600;font-size:17px;white-space:nowrap}.logo>img{width:30px;height:30px;vertical-align:top}.logo .github{display:inline-block;vertical-align:sub;margin-left:15px}.logo .github>img{height:22px}.center-board-row{padding:12px 12px 15px 12px;-webkit-box-sizing:border-box;box-sizing:border-box}.center-board-row>.el-form{height:calc(100vh - 69px)}.drawing-board{height:100%;position:relative}.drawing-board .components-body{padding:0;margin:0;font-size:0}.drawing-board .sortable-ghost{position:relative;display:block;overflow:hidden}.drawing-board .sortable-ghost:before{content:" ";position:absolute;left:0;right:0;top:0;height:3px;background:#5959df;z-index:2}.drawing-board .components-item.sortable-ghost{width:100%;height:60px;background-color:#f6f7ff}.drawing-board .active-from-item>.el-form-item{background:#f6f7ff;border-radius:6px}.drawing-board .active-from-item>.drawing-item-copy,.drawing-board .active-from-item>.drawing-item-delete{display:initial}.drawing-board .active-from-item>.component-name{color:#409eff}.drawing-board .el-form-item{margin-bottom:15px}.drawing-item{position:relative;cursor:move}.drawing-item.unfocus-bordered:not(.active-from-item)>div:first-child{border:1px dashed #ccc}.drawing-item .el-form-item{padding:12px 10px}.drawing-row-item{position:relative;cursor:move;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px dashed #ccc;border-radius:3px;padding:0 2px;margin-bottom:15px}.drawing-row-item .drawing-row-item{margin-bottom:2px}.drawing-row-item .el-col{margin-top:22px}.drawing-row-item .el-form-item{margin-bottom:0}.drawing-row-item .drag-wrapper{min-height:80px}.drawing-row-item.active-from-item{border:1px dashed #409eff}.drawing-row-item .component-name{position:absolute;top:0;left:0;font-size:12px;color:#bbb;display:inline-block;padding:0 6px}.drawing-item:hover>.el-form-item,.drawing-row-item:hover>.el-form-item{background:#f6f7ff;border-radius:6px}.drawing-item:hover>.drawing-item-copy,.drawing-item:hover>.drawing-item-delete,.drawing-row-item:hover>.drawing-item-copy,.drawing-row-item:hover>.drawing-item-delete{display:initial}.drawing-item>.drawing-item-copy,.drawing-item>.drawing-item-delete,.drawing-row-item>.drawing-item-copy,.drawing-row-item>.drawing-item-delete{display:none;position:absolute;top:-10px;width:22px;height:22px;line-height:22px;text-align:center;border-radius:50%;font-size:12px;border:1px solid;cursor:pointer;z-index:1}.drawing-item>.drawing-item-copy,.drawing-row-item>.drawing-item-copy{right:56px;border-color:#409eff;color:#409eff;background:#fff}.drawing-item>.drawing-item-copy:hover,.drawing-row-item>.drawing-item-copy:hover{background:#409eff;color:#fff}.drawing-item>.drawing-item-delete,.drawing-row-item>.drawing-item-delete{right:24px;border-color:#f56c6c;color:#f56c6c;background:#fff}.drawing-item>.drawing-item-delete:hover,.drawing-row-item>.drawing-item-delete:hover{background:#f56c6c;color:#fff}body,html{margin:0;padding:0;background:#fff;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}body,html,input,textarea{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}.editor-tabs{background:#121315}.editor-tabs .el-tabs__header{margin:0;border-bottom-color:#121315}.editor-tabs .el-tabs__header .el-tabs__nav{border-color:#121315}.editor-tabs .el-tabs__item{height:32px;line-height:32px;color:#888a8e;border-left:1px solid #121315!important;background:#363636;margin-right:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editor-tabs .el-tabs__item.is-active{background:#1e1e1e;border-bottom-color:#1e1e1e!important;color:#fff}.editor-tabs .el-icon-edit{color:#f1fa8c}.editor-tabs .el-icon-document{color:#a95812}.editor-tabs :focus.is-active.is-focus:not(:active){-webkit-box-shadow:none;box-shadow:none;border-radius:0}.right-scrollbar .el-scrollbar__view{padding:12px 18px 15px 15px}.el-scrollbar__wrap{-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden!important}.center-tabs .el-tabs__header,.el-scrollbar__wrap{margin-bottom:0!important}.center-tabs .el-tabs__item{width:50%;text-align:center}.center-tabs .el-tabs__nav{width:100%}.reg-item{padding:12px 6px;background:#f8f8f8;position:relative;border-radius:4px}.reg-item .close-btn{position:absolute;right:-6px;top:-6px;display:block;width:16px;height:16px;line-height:16px;background:rgba(0,0,0,.2);border-radius:50%;color:#fff;text-align:center;z-index:1;cursor:pointer;font-size:12px}.reg-item .close-btn:hover{background:rgba(210,23,23,.5)}.reg-item+.reg-item{margin-top:18px}.action-bar .el-button+.el-button{margin-left:15px}.action-bar i{font-size:20px;vertical-align:middle;position:relative;top:-1px}.custom-tree-node{width:100%;font-size:14px}.custom-tree-node .node-operation{float:right}.custom-tree-node i[class*=el-icon]+i[class*=el-icon]{margin-left:6px}.custom-tree-node .el-icon-plus{color:#409eff}.custom-tree-node .el-icon-delete{color:#157a0c}.el-scrollbar__view{overflow-x:hidden}.el-rate{display:inline-block;vertical-align:text-top}.el-upload__tip{line-height:1.2}.svg-icon[data-v-19957a58]{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.svg-external-icon[data-v-19957a58]{background-color:currentColor;-webkit-mask-size:cover!important;mask-size:cover!important;display:inline-block} \ No newline at end of file diff --git a/server/resource/page/css/parser-example.69e16e51.css b/server/resource/page/css/parser-example.69e16e51.css new file mode 100644 index 000000000..09cac886c --- /dev/null +++ b/server/resource/page/css/parser-example.69e16e51.css @@ -0,0 +1 @@ +.test-form[data-v-77b1aafa]{margin:15px auto;width:800px;padding:15px} \ No newline at end of file diff --git a/server/resource/page/img/logo.e1bc3747.png b/server/resource/page/img/logo.e1bc3747.png deleted file mode 100644 index f23b7580b..000000000 Binary files a/server/resource/page/img/logo.e1bc3747.png and /dev/null differ diff --git a/server/resource/page/index.html b/server/resource/page/index.html index 8cd5fd59a..5a133e192 100644 --- a/server/resource/page/index.html +++ b/server/resource/page/index.html @@ -1 +1 @@ -
1){var m=L(Ie),y=F(Ie,":not(."+this.options.selectedClass+")");if(!_e&&h.animation&&(Ie.thisAnimationDuration=null),c.captureAnimationState(),!_e&&(h.animation&&(Ie.fromRect=m,Me.forEach((function(t){if(t.thisAnimationDuration=null,t!==Ie){var e=Re?L(t):m;t.fromRect=e,c.addAnimationState({target:t,rect:e})}}))),qe(),Me.forEach((function(t){l[y]?r.insertBefore(t,l[y]):r.appendChild(t),y++})),a===F(Ie))){var g=!1;Me.forEach((function(t){t.sortableIndex===F(t)||(g=!0)})),g&&n("update")}Me.forEach((function(t){G(t)})),c.animateAll()}Ne=c}(s===r||o&&"clone"!==o.lastPutMode)&&Le.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=je=!1,Le.length=0},destroyGlobal:function(){this._deselectMultiDrag(),T(document,"pointerup",this._deselectMultiDrag),T(document,"mouseup",this._deselectMultiDrag),T(document,"touchend",this._deselectMultiDrag),T(document,"keydown",this._checkKeyDown),T(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(("undefined"===typeof je||!je)&&Ne===this.sortable&&(!t||!S(t.target,this.options.draggable,this.sortable.el,!1))&&(!t||0===t.button))while(Me.length){var e=Me[0];N(e,this.options.selectedClass,!1),Me.shift(),rt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},n(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~Me.indexOf(t)&&(Ne&&Ne!==e&&(Ne.multiDrag._deselectMultiDrag(),Ne=e),N(t,e.options.selectedClass,!0),Me.push(t))},deselect:function(t){var e=t.parentNode[Y],s=Me.indexOf(t);e&&e.options.multiDrag&&~s&&(N(t,e.options.selectedClass,!1),Me.splice(s,1))}},eventProperties:function(){var t=this,e=[],s=[];return Me.forEach((function(r){var i;e.push({multiDragElement:r,index:r.sortableIndex}),i=Re&&r!==Ie?-1:Re?F(r,":not(."+t.options.selectedClass+")"):F(r),s.push({multiDragElement:r,index:i})})),{items:h(Me),clones:[].concat(Le),oldIndicies:e,newIndicies:s}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),"ctrl"===t?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Be(t,e){Me.forEach((function(s,r){var i=e.children[s.sortableIndex+(t?Number(r):0)];i?e.insertBefore(s,i):e.appendChild(s)}))}function Ue(t,e){Le.forEach((function(s,r){var i=e.children[s.sortableIndex+(t?Number(r):0)];i?e.insertBefore(s,i):e.appendChild(s)}))}function qe(){Me.forEach((function(t){t!==Ie&&t.parentNode&&t.parentNode.removeChild(t)}))}Qt.mount(new xe),Qt.mount(Ae,Ee),e["default"]=Qt},"252a":function(t,e,s){var r=s("d5dc"),i=s("41f6"),n=s("d9a3"),a=s("2ba5"),o=s("57c4"),c=o("iterator"),h=o("toStringTag"),l=n.values;for(var p in i){var u=r[p],d=u&&u.prototype;if(d){if(d[c]!==l)try{a(d,c,l)}catch(m){d[c]=l}if(d[h]||a(d,h,p),i[p])for(var f in n)if(d[f]!==n[f])try{a(d,f,n[f])}catch(m){d[f]=n[f]}}}},"2a2f":function(t,e,s){var r=s("d5dc");t.exports=r},"2ba5":function(t,e,s){var r=s("7a23"),i=s("c223"),n=s("aec8");t.exports=r?function(t,e,s){return i.f(t,e,n(1,s))}:function(t,e,s){return t[e]=s,t}},"2bba":function(t,e,s){var r=s("ac83");t.exports=function(t,e,s,i){try{return i?e(r(s)[0],s[1]):e(s)}catch(a){var n=t["return"];throw void 0!==n&&r(n.call(t)),a}}},"30c9":function(t,e,s){var r=s("57c4"),i=r("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(s){try{return e[i]=!1,"/./"[t](e)}catch(r){}}return!1}},3109:function(t,e,s){var r=s("d5dc"),i=s("527d"),n=r.WeakMap;t.exports="function"===typeof n&&/native code/.test(i(n))},3132:function(t,e,s){var r=s("d68d"),i=s("a8c9"),n=s("57c4"),a=n("species");t.exports=function(t,e){var s;return i(t)&&(s=t.constructor,"function"!=typeof s||s!==Array&&!i(s.prototype)?r(s)&&(s=s[a],null===s&&(s=void 0)):s=void 0),new(void 0===s?Array:s)(0===e?0:e)}},3193:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},3303:function(t,e,s){var r=s("f240"),i=s("3193"),n=function(t){return function(e,s){var n,a,o=String(i(e)),c=r(s),h=o.length;return c<0||c>=h?t?"":void 0:(n=o.charCodeAt(c),n<55296||n>56319||c+1===h||(a=o.charCodeAt(c+1))<56320||a>57343?t?o.charAt(c):n:t?o.slice(c,c+2):a-56320+(n-55296<<10)+65536)}};t.exports={codeAt:n(!1),charAt:n(!0)}},"33c4":function(t,e,s){"use strict";var r=s("91fe"),i=s("407d").findIndex,n=s("5751"),a=s("6885"),o="findIndex",c=!0,h=a(o);o in[]&&Array(1)[o]((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!h},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(o)},"354c":function(t,e,s){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,n=i&&!r.call({1:2},1);e.f=n?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},"3a20":function(t,e,s){var r=s("efd1"),i=s("3d8a"),n=s("3f8e");r||i(Object.prototype,"toString",n,{unsafe:!0})},"3d8a":function(t,e,s){var r=s("d5dc"),i=s("2ba5"),n=s("f28d"),a=s("200e"),o=s("527d"),c=s("d0e2"),h=c.get,l=c.enforce,p=String(String).split("String");(t.exports=function(t,e,s,o){var c=!!o&&!!o.unsafe,h=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet;"function"==typeof s&&("string"!=typeof e||n(s,"name")||i(s,"name",e),l(s).source=p.join("string"==typeof e?e:"")),t!==r?(c?!u&&t[e]&&(h=!0):delete t[e],h?t[e]=s:i(t,e,s)):h?t[e]=s:a(e,s)})(Function.prototype,"toString",(function(){return"function"==typeof this&&h(this).source||o(this)}))},"3e5e":function(t,e,s){"use strict";var r=s("deaa"),i=s("e1dd"),n=s("ac83"),a=s("3193"),o=s("fb8e"),c=s("536c"),h=s("684e"),l=s("81a0"),p=s("21d4"),u=s("f30e"),d=[].push,f=Math.min,m=4294967295,y=!u((function(){return!RegExp(m,"y")}));r("split",2,(function(t,e,s){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,s){var r=String(a(this)),n=void 0===s?m:s>>>0;if(0===n)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,n);var o,c,h,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,y=new RegExp(t.source,u+"g");while(o=p.call(y,r)){if(c=y.lastIndex,c>f&&(l.push(r.slice(f,o.index)),o.length>1&&o.index 1){var m=L(Ie),y=F(Ie,":not(."+this.options.selectedClass+")");if(!_e&&h.animation&&(Ie.thisAnimationDuration=null),c.captureAnimationState(),!_e&&(h.animation&&(Ie.fromRect=m,Me.forEach((function(t){if(t.thisAnimationDuration=null,t!==Ie){var e=Re?L(t):m;t.fromRect=e,c.addAnimationState({target:t,rect:e})}}))),qe(),Me.forEach((function(t){l[y]?s.insertBefore(t,l[y]):s.appendChild(t),y++})),a===F(Ie))){var g=!1;Me.forEach((function(t){t.sortableIndex===F(t)||(g=!0)})),g&&n("update")}Me.forEach((function(t){G(t)})),c.animateAll()}ke=c}(r===s||o&&"clone"!==o.lastPutMode)&&Le.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=je=!1,Le.length=0},destroyGlobal:function(){this._deselectMultiDrag(),T(document,"pointerup",this._deselectMultiDrag),T(document,"mouseup",this._deselectMultiDrag),T(document,"touchend",this._deselectMultiDrag),T(document,"keydown",this._checkKeyDown),T(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(("undefined"===typeof je||!je)&&ke===this.sortable&&(!t||!S(t.target,this.options.draggable,this.sortable.el,!1))&&(!t||0===t.button))while(Me.length){var e=Me[0];k(e,this.options.selectedClass,!1),Me.shift(),st({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},n(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~Me.indexOf(t)&&(ke&&ke!==e&&(ke.multiDrag._deselectMultiDrag(),ke=e),k(t,e.options.selectedClass,!0),Me.push(t))},deselect:function(t){var e=t.parentNode[Y],r=Me.indexOf(t);e&&e.options.multiDrag&&~r&&(k(t,e.options.selectedClass,!1),Me.splice(r,1))}},eventProperties:function(){var t=this,e=[],r=[];return Me.forEach((function(s){var i;e.push({multiDragElement:s,index:s.sortableIndex}),i=Re&&s!==Ie?-1:Re?F(s,":not(."+t.options.selectedClass+")"):F(s),r.push({multiDragElement:s,index:i})})),{items:h(Me),clones:[].concat(Le),oldIndicies:e,newIndicies:r}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),"ctrl"===t?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Be(t,e){Me.forEach((function(r,s){var i=e.children[r.sortableIndex+(t?Number(s):0)];i?e.insertBefore(r,i):e.appendChild(r)}))}function Ue(t,e){Le.forEach((function(r,s){var i=e.children[r.sortableIndex+(t?Number(s):0)];i?e.insertBefore(r,i):e.appendChild(r)}))}function qe(){Me.forEach((function(t){t!==Ie&&t.parentNode&&t.parentNode.removeChild(t)}))}Qt.mount(new xe),Qt.mount(Ae,Ee),e["default"]=Qt},"273d":function(t,e,r){var s=r("3534"),i=r("77de");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(r,[]),e=r instanceof Array}catch(n){}return function(r,n){return s(r),i(n),e?t.call(r,n):r.__proto__=n,r}}():void 0)},"28b8":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"2b4b":function(t,e,r){var s=r("79fa");t.exports=function(t,e){var r=s.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},"2cbd":function(t,e,r){var s=r("f382"),i=r("0a8b"),n=r("f36e"),a=n("toStringTag"),o="Arguments"==i(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(r){}};t.exports=s?i:function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=c(e=Object(t),a))?r:o?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},"2cd3":function(t,e,r){"use strict";var s=r("482b").IteratorPrototype,i=r("6a02"),n=r("d9cb"),a=r("46cd"),o=r("4a22"),c=function(){return this};t.exports=function(t,e,r){var h=e+" Iterator";return t.prototype=i(s,{next:n(1,r)}),a(t,h,!1,!0),o[h]=c,t}},"2cde":function(t,e,r){var s=r("79fa"),i=r("9b6f");t.exports=function(t,e){try{i(s,t,e)}catch(r){s[t]=e}return e}},"2ed0":function(t,e,r){"use strict";(function(e){var s=r("d844"),i=r("9d72"),n={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!s.isUndefined(t)&&s.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function o(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof e&&"[object process]"===Object.prototype.toString.call(e))&&(t=r("a169")),t}var c={adapter:o(),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),s.isFormData(t)||s.isArrayBuffer(t)||s.isBuffer(t)||s.isStream(t)||s.isFile(t)||s.isBlob(t)?t:s.isArrayBufferView(t)?t.buffer:s.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):s.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};s.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),s.forEach(["post","put","patch"],(function(t){c.headers[t]=s.merge(n)})),t.exports=c}).call(this,r("eef6"))},"30a0":function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},"31bf":function(t,e,r){(function(r){var s,i,n;(function(r,a){i=[],s=a,n="function"===typeof s?s.apply(e,i):s,void 0===n||(t.exports=n)})(0,(function(){"use strict";function e(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function s(t,e,r){var s=new XMLHttpRequest;s.open("GET",t),s.responseType="blob",s.onload=function(){c(s.response,e,r)},s.onerror=function(){console.error("could not download file")},s.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function n(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(s){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r&&r.global===r?r:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(t,e,r){var o=a.URL||a.webkitURL,c=document.createElement("a");e=e||t.name||"download",c.download=e,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?n(c):i(c.href)?s(t,e,r):n(c,c.target="_blank")):(c.href=o.createObjectURL(t),setTimeout((function(){o.revokeObjectURL(c.href)}),4e4),setTimeout((function(){n(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,r,a){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,a),r);else if(i(t))s(t,r,a);else{var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout((function(){n(o)}))}}:function(t,e,r,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return s(t,e,r);var n="application/octet-stream"===t.type,c=/constructor/i.test(a.HTMLElement)||a.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||n&&c||o)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=h?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},l.readAsDataURL(t)}else{var p=a.URL||a.webkitURL,u=p.createObjectURL(t);i?i.location=u:location.href=u,i=null,setTimeout((function(){p.revokeObjectURL(u)}),4e4)}});a.saveAs=c.saveAs=c,t.exports=c}))}).call(this,r("2409"))},3335:function(t,e,r){(function(e,s){t.exports=s(r("2480"))})("undefined"!==typeof self&&self,(function(t){return function(t){var e={};function r(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,s){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(s,i,function(e){return t[e]}.bind(null,i));return s},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({"01f9":function(t,e,r){"use strict";var s=r("2d00"),i=r("5ca1"),n=r("2aba"),a=r("32e9"),o=r("84f2"),c=r("41a0"),h=r("7f20"),l=r("38fd"),p=r("2b4c")("iterator"),u=!([].keys&&"next"in[].keys()),d="@@iterator",f="keys",m="values",y=function(){return this};t.exports=function(t,e,r,g,x,b,v){c(r,e,g);var w,P,T,E=function(t){if(!u&&t in N)return N[t];switch(t){case f:return function(){return new r(this,t)};case m:return function(){return new r(this,t)}}return function(){return new r(this,t)}},A=e+" Iterator",S=x==m,C=!1,N=t.prototype,k=N[p]||N[d]||x&&N[x],I=k||E(x),O=x?S?E("entries"):I:void 0,D="Array"==e&&N.entries||k;if(D&&(T=l(D.call(new t)),T!==Object.prototype&&T.next&&(h(T,A,!0),s||"function"==typeof T[p]||a(T,p,y))),S&&k&&k.name!==m&&(C=!0,I=function(){return k.call(this)}),s&&!v||!u&&!C&&N[p]||a(N,p,I),o[e]=I,o[A]=y,x)if(w={values:S?I:E(m),keys:b?I:E(f),entries:O},v)for(P in w)P in N||n(N,P,w[P]);else i(i.P+i.F*(u||C),e,w);return w}},"02f4":function(t,e,r){var s=r("4588"),i=r("be13");t.exports=function(t){return function(e,r){var n,a,o=String(i(e)),c=s(r),h=o.length;return c<0||c>=h?t?"":void 0:(n=o.charCodeAt(c),n<55296||n>56319||c+1===h||(a=o.charCodeAt(c+1))<56320||a>57343?t?o.charAt(c):n:t?o.slice(c,c+2):a-56320+(n-55296<<10)+65536)}}},"0390":function(t,e,r){"use strict";var s=r("02f4")(!0);t.exports=function(t,e,r){return e+(r?s(t,e).length:1)}},"0bfb":function(t,e,r){"use strict";var s=r("cb7c");t.exports=function(){var t=s(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,r){var s=r("ce10"),i=r("e11e");t.exports=Object.keys||function(t){return s(t,i)}},1495:function(t,e,r){var s=r("86cc"),i=r("cb7c"),n=r("0d58");t.exports=r("9e1e")?Object.defineProperties:function(t,e){i(t);var r,a=n(e),o=a.length,c=0;while(o>c)s.f(t,r=a[c++],e[r]);return t}},"214f":function(t,e,r){"use strict";r("b0c5");var s=r("2aba"),i=r("32e9"),n=r("79e5"),a=r("be13"),o=r("2b4c"),c=r("520a"),h=o("species"),l=!n((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),p=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(t,e,r){var u=o(t),d=!n((function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})),f=d?!n((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[h]=function(){return r}),r[u](""),!e})):void 0;if(!d||!f||"replace"===t&&!l||"split"===t&&!p){var m=/./[u],y=r(a,u,""[t],(function(t,e,r,s,i){return e.exec===c?d&&!i?{done:!0,value:m.call(e,r,s)}:{done:!0,value:t.call(r,e,s)}:{done:!1}})),g=y[0],x=y[1];s(String.prototype,t,g),i(RegExp.prototype,u,2==e?function(t,e){return x.call(t,this,e)}:function(t){return x.call(t,this)})}}},"230e":function(t,e,r){var s=r("d3f4"),i=r("7726").document,n=s(i)&&s(i.createElement);t.exports=function(t){return n?i.createElement(t):{}}},"23c6":function(t,e,r){var s=r("2d95"),i=r("2b4c")("toStringTag"),n="Arguments"==s(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(r){}};t.exports=function(t){var e,r,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=a(e=Object(t),i))?r:n?s(e):"Object"==(o=s(e))&&"function"==typeof e.callee?"Arguments":o}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,r){var s=r("7726"),i=r("32e9"),n=r("69a8"),a=r("ca5a")("src"),o=r("fa5b"),c="toString",h=(""+o).split(c);r("8378").inspectSource=function(t){return o.call(t)},(t.exports=function(t,e,r,o){var c="function"==typeof r;c&&(n(r,"name")||i(r,"name",e)),t[e]!==r&&(c&&(n(r,a)||i(r,a,t[e]?""+t[e]:h.join(String(e)))),t===s?t[e]=r:o?t[e]?t[e]=r:i(t,e,r):(delete t[e],i(t,e,r)))})(Function.prototype,c,(function(){return"function"==typeof this&&this[a]||o.call(this)}))},"2aeb":function(t,e,r){var s=r("cb7c"),i=r("1495"),n=r("e11e"),a=r("613b")("IE_PROTO"),o=function(){},c="prototype",h=function(){var t,e=r("230e")("iframe"),s=n.length,i="<",a=">";e.style.display="none",r("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),h=t.F;while(s--)delete h[c][n[s]];return h()};t.exports=Object.create||function(t,e){var r;return null!==t?(o[c]=s(t),r=new o,o[c]=null,r[a]=t):r=h(),void 0===e?r:i(r,e)}},"2b4c":function(t,e,r){var s=r("5537")("wks"),i=r("ca5a"),n=r("7726").Symbol,a="function"==typeof n,o=t.exports=function(t){return s[t]||(s[t]=a&&n[t]||(a?n:i)("Symbol."+t))};o.store=s},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},"2fdb":function(t,e,r){"use strict";var s=r("5ca1"),i=r("d2c8"),n="includes";s(s.P+s.F*r("5147")(n),"String",{includes:function(t){return!!~i(this,t,n).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(t,e,r){var s=r("86cc"),i=r("4630");t.exports=r("9e1e")?function(t,e,r){return s.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},"38fd":function(t,e,r){var s=r("69a8"),i=r("4bf8"),n=r("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),s(t,n)?t[n]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"41a0":function(t,e,r){"use strict";var s=r("2aeb"),i=r("4630"),n=r("7f20"),a={};r("32e9")(a,r("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,r){t.prototype=s(a,{next:i(1,r)}),n(t,e+" Iterator")}},"456d":function(t,e,r){var s=r("4bf8"),i=r("0d58");r("5eda")("keys",(function(){return function(t){return i(s(t))}}))},4588:function(t,e){var r=Math.ceil,s=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?s:r)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,r){var s=r("be13");t.exports=function(t){return Object(s(t))}},5147:function(t,e,r){var s=r("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[s]=!1,!"/./"[t](e)}catch(i){}}return!0}},"520a":function(t,e,r){"use strict";var s=r("0bfb"),i=RegExp.prototype.exec,n=String.prototype.replace,a=i,o="lastIndex",c=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[o]||0!==e[o]}(),h=void 0!==/()??/.exec("")[1],l=c||h;l&&(a=function(t){var e,r,a,l,p=this;return h&&(r=new RegExp("^"+p.source+"$(?!\\s)",s.call(p))),c&&(e=p[o]),a=i.call(p,t),c&&a&&(p[o]=p.global?a.index+a[0].length:e),h&&a&&a.length>1&&n.call(a[0],r,(function(){for(l=1;l=s.left.start&&(e.shorthandAssign=-1),this.checkLVal(o,void 0,void 0,"assignment expression"),this.next(),s.right=this.parseMaybeAssign(t),this.finishNode(s,"AssignmentExpression")}return a&&this.checkExpressionErrors(e,!0),o}parseMaybeConditional(t,e,s){const r=this.state.start,i=this.state.startLoc,n=this.state.potentialArrowAt,a=this.parseExprOps(t,e);return"ArrowFunctionExpression"===a.type&&a.start===n||this.checkExpressionErrors(e,!1)?a:this.parseConditional(a,t,r,i,s)}parseConditional(t,e,s,r,i){if(this.eat(d.question)){const i=this.startNodeAt(s,r);return i.test=t,i.consequent=this.parseMaybeAssign(),this.expect(d.colon),i.alternate=this.parseMaybeAssign(e),this.finishNode(i,"ConditionalExpression")}return t}parseExprOps(t,e){const s=this.state.start,r=this.state.startLoc,i=this.state.potentialArrowAt,n=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===n.type&&n.start===i||this.checkExpressionErrors(e,!1)?n:this.parseExprOp(n,s,r,-1,t)}parseExprOp(t,e,s,r,i){let n=this.state.type.binop;if(null!=n&&(!i||!this.match(d._in))&&n>r){const a=this.state.value;if("|>"===a&&this.state.inFSharpPipelineDirectBody)return t;const o=this.startNodeAt(e,s);o.left=t,o.operator=a,"**"!==a||"UnaryExpression"!==t.type||!this.options.createParenthesizedExpressions&&t.extra&&t.extra.parenthesized||this.raise(t.argument.start,ut.UnexpectedTokenUnaryExponentiation);const c=this.state.type,h=c===d.logicalOR||c===d.logicalAND,l=c===d.nullishCoalescing;if(c===d.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)):l&&(n=d.logicalAND.binop),this.next(),c===d.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(d.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,ut.UnexpectedAwaitAfterPipelineBody);o.right=this.parseExprOpRightExpr(c,n,i),this.finishNode(o,h||l?"LogicalExpression":"BinaryExpression");const p=this.state.type;if(l&&(p===d.logicalOR||p===d.logicalAND)||h&&p===d.nullishCoalescing)throw this.raise(this.state.start,ut.MixingCoalesceWithLogical);return this.parseExprOp(o,e,s,r,i)}return t}parseExprOpRightExpr(t,e,s){const r=this.state.start,i=this.state.startLoc;switch(t){case d.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext(()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(t,e,s),r,i));case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e,s))}default:return this.parseExprOpBaseRightExpr(t,e,s)}}parseExprOpBaseRightExpr(t,e,s){const r=this.state.start,i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,i,t.rightAssociative?e-1:e,s)}parseMaybeUnary(t){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();if(this.state.type.prefix){const e=this.startNode(),s=this.match(d.incDec);if(e.operator=this.state.value,e.prefix=!0,"throw"===e.operator&&this.expectPlugin("throwExpressions"),this.next(),e.argument=this.parseMaybeUnary(),this.checkExpressionErrors(t,!0),s)this.checkLVal(e.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===e.operator){const t=e.argument;"Identifier"===t.type?this.raise(e.start,ut.StrictDelete):"MemberExpression"===t.type&&"PrivateName"===t.property.type&&this.raise(e.start,ut.DeletePrivateField)}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}const e=this.state.start,s=this.state.startLoc;let r=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return r;while(this.state.type.postfix&&!this.canInsertSemicolon()){const t=this.startNodeAt(e,s);t.operator=this.state.value,t.prefix=!1,t.argument=r,this.checkLVal(r,void 0,void 0,"postfix operation"),this.next(),r=this.finishNode(t,"UpdateExpression")}return r}parseExprSubscripts(t){const e=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(t);return"ArrowFunctionExpression"===i.type&&i.start===r?i:this.parseSubscripts(i,e,s)}parseSubscripts(t,e,s,r){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{const n=this.state.maybeInAsyncArrowHead;i.maybeAsyncArrow&&(this.state.maybeInAsyncArrowHead=!0),t=this.parseSubscript(t,e,s,r,i),i.maybeAsyncArrow=!1,this.state.maybeInAsyncArrowHead=n}while(!i.stop);return t}parseSubscript(t,e,s,r,i){if(!r&&this.eat(d.doubleColon)){const n=this.startNodeAt(e,s);return n.object=t,n.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,s,r)}let n=!1;if(this.match(d.questionDot)){if(i.optionalChainMember=n=!0,r&&40===this.lookaheadCharCode())return i.stop=!0,t;this.next()}const a=this.eat(d.bracketL);if(n&&!this.match(d.parenL)&&!this.match(d.backQuote)||a||this.eat(d.dot)){const r=this.startNodeAt(e,s);return r.object=t,r.property=a?this.parseExpression():n?this.parseIdentifier(!0):this.parseMaybePrivateName(!0),r.computed=a,"PrivateName"===r.property.type&&("Super"===r.object.type&&this.raise(e,ut.SuperPrivateField),this.classScope.usePrivateName(r.property.id.name,r.property.start)),a&&this.expect(d.bracketR),i.optionalChainMember?(r.optional=n,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(!r&&this.match(d.parenL)){const r=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();let c=this.startNodeAt(e,s);return c.callee=t,n?(c.optional=!0,c.arguments=this.parseCallExpressionArguments(d.parenR,!1)):c.arguments=this.parseCallExpressionArguments(d.parenR,i.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,c),this.finishCallExpression(c,i.optionalChainMember),i.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!n?(i.stop=!0,c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),c),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=a,this.state.awaitPos=o):(this.toReferencedListDeep(c.arguments),-1!==a&&(this.state.yieldPos=a),(this.isAwaitAllowed()||r)&&-1===o||(this.state.awaitPos=o)),this.state.maybeInArrowParameters=r,c}return this.match(d.backQuote)?this.parseTaggedTemplateExpression(e,s,t,i):(i.stop=!0,t)}parseTaggedTemplateExpression(t,e,s,r,i){const n=this.startNodeAt(t,e);return n.tag=s,n.quasi=this.parseTemplate(!0),i&&(n.typeParameters=i),r.optionalChainMember&&this.raise(t,ut.OptionalChainingNoTemplate),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(1!==t.arguments.length)this.raise(t.start,ut.ImportCallArity);else{const e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,ut.ImportCallSpreadArgument)}return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,i){const n=[];let a,o=!0;const c=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;while(!this.eat(t)){if(o)o=!1;else if(this.expect(d.comma),this.match(t)){s&&this.raise(this.state.lastTokStart,ut.ImportCallArgumentTrailingComma),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}this.match(d.parenL)&&!a&&(a=this.state.start),n.push(this.parseExprListItem(!1,e?new Le:void 0,e?{start:0}:void 0,r))}return e&&a&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=c,n}shouldParseAsyncArrow(){return this.match(d.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.expect(d.arrow),this.parseArrowExpression(t,e.arguments,!0,null==(s=e.extra)?void 0:s.trailingComma),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){this.state.type===d.slash&&this.readRegexp();const e=this.state.potentialArrowAt===this.state.start;let s;switch(this.state.type){case d._super:return s=this.startNode(),this.next(),!this.match(d.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(s.start,ut.UnexpectedSuper):this.raise(s.start,ut.SuperNotAllowed),this.match(d.parenL)||this.match(d.bracketL)||this.match(d.dot)||this.raise(s.start,ut.UnsupportedSuper),this.finishNode(s,"Super");case d._import:return s=this.startNode(),this.next(),this.match(d.dot)?this.parseImportMetaProperty(s):(this.match(d.parenL)||this.raise(this.state.lastTokStart,ut.UnsupportedImport),this.finishNode(s,"Import"));case d._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case d.name:{s=this.startNode();const t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&this.match(d._function)&&!this.canInsertSemicolon()){const t=this.state.context.length-1;if(this.state.context[t]!==gt.functionStatement)throw new Error("Internal error");return this.state.context[t]=gt.functionExpression,this.next(),this.parseFunction(s,void 0,!0)}if(e&&!t&&"async"===r.name&&this.match(d.name)&&!this.canInsertSemicolon()){const t=this.state.maybeInArrowParameters,e=this.state.maybeInAsyncArrowHead,r=this.state.yieldPos,i=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.maybeInAsyncArrowHead=!0,this.state.yieldPos=-1,this.state.awaitPos=-1;const n=[this.parseIdentifier()];return this.expect(d.arrow),this.checkYieldAwaitInDefaultParams(),this.state.maybeInArrowParameters=t,this.state.maybeInAsyncArrowHead=e,this.state.yieldPos=r,this.state.awaitPos=i,this.parseArrowExpression(s,n,!0),s}return e&&this.match(d.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(s,[r],!1),s):r}case d._do:{this.expectPlugin("doExpressions");const t=this.startNode();this.next();const e=this.state.labels;return this.state.labels=[],t.body=this.parseBlock(),this.state.labels=e,this.finishNode(t,"DoExpression")}case d.regexp:{const t=this.state.value;return s=this.parseLiteral(t.value,"RegExpLiteral"),s.pattern=t.pattern,s.flags=t.flags,s}case d.num:return this.parseLiteral(this.state.value,"NumericLiteral");case d.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case d.string:return this.parseLiteral(this.state.value,"StringLiteral");case d._null:return s=this.startNode(),this.next(),this.finishNode(s,"NullLiteral");case d._true:case d._false:return this.parseBooleanLiteral();case d.parenL:return this.parseParenAndDistinguishExpression(e);case d.bracketBarL:case d.bracketHashL:{this.expectPlugin("recordAndTuple");const e=this.state.inFSharpPipelineDirectBody,r=this.state.type===d.bracketBarL?d.bracketBarR:d.bracketR;return this.state.inFSharpPipelineDirectBody=!1,s=this.startNode(),this.next(),s.elements=this.parseExprList(r,!0,t,s),this.state.inFSharpPipelineDirectBody=e,this.finishNode(s,"TupleExpression")}case d.bracketL:{const e=this.state.inFSharpPipelineDirectBody;return this.state.inFSharpPipelineDirectBody=!1,s=this.startNode(),this.next(),s.elements=this.parseExprList(d.bracketR,!0,t,s),this.state.maybeInArrowParameters||this.toReferencedList(s.elements),this.state.inFSharpPipelineDirectBody=e,this.finishNode(s,"ArrayExpression")}case d.braceBarL:case d.braceHashL:{this.expectPlugin("recordAndTuple");const e=this.state.inFSharpPipelineDirectBody,s=this.state.type===d.braceBarL?d.braceBarR:d.braceR;this.state.inFSharpPipelineDirectBody=!1;const r=this.parseObj(s,!1,!0,t);return this.state.inFSharpPipelineDirectBody=e,r}case d.braceL:{const e=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const s=this.parseObj(d.braceR,!1,!1,t);return this.state.inFSharpPipelineDirectBody=e,s}case d._function:return this.parseFunctionExpression();case d.at:this.parseDecorators();case d._class:return s=this.startNode(),this.takeDecorators(s),this.parseClass(s,!1);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate(!1);case d.doubleColon:{s=this.startNode(),this.next(),s.object=null;const t=s.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(s,"BindExpression");throw this.raise(t.start,ut.UnsupportedBind)}case d.hash:if(this.state.inPipeline)return s=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(s.start,ut.PrimaryTopicRequiresSmartPipeline),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(s.start,ut.PrimaryTopicNotAllowed),this.registerTopicReference(),this.finishNode(s,"PipelinePrimaryTopicReference");default:throw this.unexpected()}}parseBooleanLiteral(){const t=this.startNode();return t.value=this.match(d._true),this.next(),this.finishNode(t,"BooleanLiteral")}parseMaybePrivateName(t){const e=this.match(d.hash);if(e){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]),t||this.raise(this.state.pos,ut.UnexpectedPrivateField);const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionExpression(){const t=this.startNode();let e=this.startNode();return this.next(),e=this.createIdentifier(e,"function"),this.prodParam.hasYield&&this.eat(d.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(t.property.start,ut.UnsupportedMetaProperty,e.name,s),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.expect(d.dot),this.isContextual("meta")?(this.expectPlugin("importMeta"),this.inModule||this.raiseWithData(e.start,{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"},ut.ImportMetaOutsideModule),this.sawUnambiguousESM=!0):this.hasPlugin("importMeta")||this.raise(e.start,ut.ImportCallArityLtOne),this.parseMetaProperty(t,e,"meta")}parseLiteral(t,e,s,r){s=s||this.state.start,r=r||this.state.startLoc;const i=this.startNodeAt(s,r);return this.addExtra(i,"rawValue",t),this.addExtra(i,"raw",this.input.slice(s,this.state.end)),i.value=t,this.next(),this.finishNode(i,e)}parseParenAndDistinguishExpression(t){const e=this.state.start,s=this.state.startLoc;let r;this.expect(d.parenL);const i=this.state.maybeInArrowParameters,n=this.state.yieldPos,a=this.state.awaitPos,o=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;const c=this.state.start,h=this.state.startLoc,l=[],p=new Le,u={start:0};let f,m,y=!0;while(!this.match(d.parenR)){if(y)y=!1;else if(this.expect(d.comma,u.start||null),this.match(d.parenR)){m=this.state.start;break}if(this.match(d.ellipsis)){const t=this.state.start,e=this.state.startLoc;f=this.state.start,l.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}l.push(this.parseMaybeAssign(!1,p,this.parseParenItem,u))}const g=this.state.start,x=this.state.startLoc;this.expect(d.parenR),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=o;let b=this.startNodeAt(e,s);if(t&&this.shouldParseArrow()&&(b=this.parseArrow(b))){this.isAwaitAllowed()||this.state.maybeInAsyncArrowHead||(this.state.awaitPos=a),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=n,this.state.awaitPos=a;for(let t=0;t=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t,e){const s=this.state.start,r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const n=this.parseExprOp(this.parseMaybeUnary(),s,r,t,e);return this.state.inFSharpPipelineDirectBody=i,n}}const Ue={kind:"loop"},qe={kind:"switch"},Ve=0,ze=1,He=2,We=4;class Ke extends Be{parseTopLevel(t,e){if(e.sourceType=this.options.sourceType,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,d.eof),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let s=0,r=Array.from(this.scope.undefinedExports);s=0:p>u;u+=d)u in l&&(c=s(c,l[u],u,h));return c}};t.exports={left:o(!1),right:o(!0)}},c223:function(t,e,s){var r=s("7a23"),i=s("88b4"),n=s("ac83"),a=s("7dc7"),o=Object.defineProperty;e.f=r?o:function(t,e,s){if(n(t),e=a(e,!0),n(s),i)try{return o(t,e,s)}catch(r){}if("get"in s||"set"in s)throw TypeError("Accessors not supported");return"value"in s&&(t[e]=s.value),t}},c354:function(t,e,s){var r=s("7a23"),i=s("c223").f,n=Function.prototype,a=n.toString,o=/^\s*function ([^ (]*)/,c="name";r&&!(c in n)&&i(n,c,{configurable:!0,get:function(){try{return a.call(this).match(o)[1]}catch(t){return""}}})},c451:function(t,e,s){"use strict";s.d(e,"a",(function(){return n}));s("4178"),s("86dd"),s("af82"),s("3f36"),s("f4dd"),s("79dd"),s("9a14");function r(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function i(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,r)}return s}function n(t){for(var e=1;eb-s+r;p--)delete x[p-1]}else if(r>s)for(p=b-s;p>v;p--)y=p+s-1,g=p+r-1,y in x?x[g]=x[y]:delete x[g];for(p=0;pm)throw TypeError(y);for(r=0;r=m)throw TypeError(y);h(p,u++,n)}return p.length=u,p}})},"642e":function(t,e,r){"use strict";var s=r("28b8");t.exports=function(t,e){var r=[][t];return!!r&&s((function(){r.call(null,e||function(){throw 1},1)}))}},6513:function(t,e,r){var s=r("7746"),i=r("7d98"),n=r("3534"),a=r("e90e"),o=Object.defineProperty;e.f=s?o:function(t,e,r){if(n(t),e=a(e,!0),n(r),i)try{return o(t,e,r)}catch(s){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},"66e1":function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},"6a02":function(t,e,r){var s,i=r("3534"),n=r("3f9f"),a=r("9b90"),o=r("a509"),c=r("a8c2"),h=r("6f6e"),l=r("f0f9"),p=">",u="<",d="prototype",f="script",m=l("IE_PROTO"),y=function(){},g=function(t){return u+f+p+t+u+"/"+f+p},x=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){var t,e=h("iframe"),r="java"+f+":";return e.style.display="none",c.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},v=function(){try{s=document.domain&&new ActiveXObject("htmlfile")}catch(e){}v=s?x(s):b();var t=a.length;while(t--)delete v[d][a[t]];return v()};o[m]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(y[d]=i(t),r=new y,y[d]=null,r[m]=t):r=v(),void 0===e?r:n(r,e)}},"6abc":function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));r("12b5"),r("e31e"),r("b0da"),r("ec1e"),r("9719"),r("4a224");var s=r("7dd6");function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,s)}return r}function n(t){for(var e=1;e"ParenthesizedExpression"===t.type?rr(t.expression):t;class sr extends er{toAssignable(t,e=!1){var r,s;let i=void 0;switch(("ParenthesizedExpression"===t.type||null!=(r=t.extra)&&r.parenthesized)&&(i=rr(t),e?"Identifier"===i.type?this.expressionScope.recordParenthesizedIdentifierError(t.start,A.InvalidParenthesizedAssignment):"MemberExpression"!==i.type&&this.raise(t.start,A.InvalidParenthesizedAssignment):this.raise(t.start,A.InvalidParenthesizedAssignment)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(let r=0,s=t.properties.length,i=s-1;rthis.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){const e=this.state.start,r=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(d.comma)){const i=this.startNodeAt(e,r);i.expressions=[s];while(this.eat(d.comma))i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e,r){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e,r))}parseMaybeAssignAllowIn(t,e,r){return this.allowInAnd(()=>this.parseMaybeAssign(t,e,r))}parseMaybeAssign(t,e,r){const s=this.state.start,i=this.state.startLoc;if(this.isContextual("yield")&&this.prodParam.hasYield){this.state.exprAllowed=!0;let t=this.parseYield();return e&&(t=e.call(this,t,s,i)),t}let n;t?n=!1:(t=new Ze,n=!0),(this.match(d.parenL)||this.match(d.name))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t,r);if(e&&(a=e.call(this,a,s,i)),this.state.type.isAssign){const e=this.startNodeAt(s,i),r=this.state.value;return e.operator=r,this.match(d.eq)?(e.left=this.toAssignable(a,!0),t.doubleProto=-1):e.left=a,t.shorthandAssign>=e.left.start&&(t.shorthandAssign=-1),this.checkLVal(a,"assignment expression"),this.next(),e.right=this.parseMaybeAssign(),this.finishNode(e,"AssignmentExpression")}return n&&this.checkExpressionErrors(t,!0),a}parseMaybeConditional(t,e){const r=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,n=this.parseExprOps(t);return this.shouldExitDescending(n,i)?n:this.parseConditional(n,r,s,e)}parseConditional(t,e,r,s){if(this.eat(d.question)){const s=this.startNodeAt(e,r);return s.test=t,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(d.colon),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return t}parseExprOps(t){const e=this.state.start,r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnary(t);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,e,r,-1)}parseExprOp(t,e,r,s){let i=this.state.type.binop;if(null!=i&&(this.prodParam.hasIn||!this.match(d._in))&&i>s){const n=this.state.type;if(n===d.pipeline){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)}const a=this.startNodeAt(e,r);a.left=t,a.operator=this.state.value;const o=n===d.logicalOR||n===d.logicalAND,c=n===d.nullishCoalescing;if(c&&(i=d.logicalAND.binop),this.next(),n===d.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(d.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,A.UnexpectedAwaitAfterPipelineBody);a.right=this.parseExprOpRightExpr(n,i),this.finishNode(a,o||c?"LogicalExpression":"BinaryExpression");const h=this.state.type;if(c&&(h===d.logicalOR||h===d.logicalAND)||o&&h===d.nullishCoalescing)throw this.raise(this.state.start,A.MixingCoalesceWithLogical);return this.parseExprOp(a,e,r,s)}return t}parseExprOpRightExpr(t,e){const r=this.state.start,s=this.state.startLoc;switch(t){case d.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext(()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(t,e),r,s));case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const r=this.state.start,s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,s,t.rightAssociative?e-1:e)}checkExponentialAfterUnary(t){this.match(d.exponent)&&this.raise(t.argument.start,A.UnexpectedTokenUnaryExponentiation)}parseMaybeUnary(t,e){const r=this.state.start,s=this.state.startLoc,i=this.isContextual("await");if(i&&this.isAwaitAllowed()){this.next();const t=this.parseAwait(r,s);return e||this.checkExponentialAfterUnary(t),t}if(this.isContextual("module")&&123===this.lookaheadCharCode()&&!this.hasFollowingLineBreak())return this.parseModuleExpression();const n=this.match(d.incDec),a=this.startNode();if(this.state.type.prefix){a.operator=this.state.value,a.prefix=!0,this.match(d._throw)&&this.expectPlugin("throwExpressions");const r=this.match(d._delete);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&r){const t=a.argument;"Identifier"===t.type?this.raise(a.start,A.StrictDelete):this.hasPropertyAsPrivateName(t)&&this.raise(a.start,A.DeletePrivateField)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}const o=this.parseUpdate(a,n,t);if(i){const t=this.hasPlugin("v8intrinsic")?this.state.type.startsExpr:this.state.type.startsExpr&&!this.match(d.modulo);if(t&&!this.isAmbiguousAwait())return this.raiseOverwrite(r,this.hasPlugin("topLevelAwait")?A.AwaitNotInAsyncContext:A.AwaitNotInAsyncFunction),this.parseAwait(r,s)}return o}parseUpdate(t,e,r){if(e)return this.checkLVal(t.argument,"prefix operation"),this.finishNode(t,"UpdateExpression");const s=this.state.start,i=this.state.startLoc;let n=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return n;while(this.state.type.postfix&&!this.canInsertSemicolon()){const t=this.startNodeAt(s,i);t.operator=this.state.value,t.prefix=!1,t.argument=n,this.checkLVal(n,"postfix operation"),this.next(),n=this.finishNode(t,"UpdateExpression")}return n}parseExprSubscripts(t){const e=this.state.start,r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,e,r)}parseSubscripts(t,e,r,s){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{t=this.parseSubscript(t,e,r,s,i),i.maybeAsyncArrow=!1}while(!i.stop);return t}parseSubscript(t,e,r,s,i){if(!s&&this.eat(d.doubleColon))return this.parseBind(t,e,r,s,i);if(this.match(d.backQuote))return this.parseTaggedTemplateExpression(t,e,r,i);let n=!1;if(this.match(d.questionDot)){if(s&&40===this.lookaheadCharCode())return i.stop=!0,t;i.optionalChainMember=n=!0,this.next()}return!s&&this.match(d.parenL)?this.parseCoverCallAndAsyncArrowHead(t,e,r,i,n):n||this.match(d.bracketL)||this.eat(d.dot)?this.parseMember(t,e,r,i,n):(i.stop=!0,t)}parseMember(t,e,r,s,i){const n=this.startNodeAt(e,r),a=this.eat(d.bracketL);n.object=t,n.computed=a;const o=a?this.parseExpression():this.parseMaybePrivateName(!0);return this.isPrivateName(o)&&("Super"===n.object.type&&this.raise(e,A.SuperPrivateField),this.classScope.usePrivateName(this.getPrivateNameSV(o),o.start)),n.property=o,a&&this.expect(d.bracketR),s.optionalChainMember?(n.optional=i,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,r,s,i){const n=this.startNodeAt(e,r);return n.object=t,n.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,r,s)}parseCoverCallAndAsyncArrowHead(t,e,r,s,i){const n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(e,r);return a.callee=t,s.maybeAsyncArrow&&this.expressionScope.enter(Ye()),s.optionalChainMember&&(a.optional=i),a.arguments=i?this.parseCallExpressionArguments(d.parenR,!1):this.parseCallExpressionArguments(d.parenR,s.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,a),this.finishCallExpression(a,s.optionalChainMember),s.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),a=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,r),a)):(s.maybeAsyncArrow&&this.expressionScope.exit(),this.toReferencedArguments(a)),this.state.maybeInArrowParameters=n,a}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,r,s){const i=this.startNodeAt(e,r);return i.tag=t,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(e,A.OptionalChainingNoTemplate),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(2===t.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===t.arguments.length||t.arguments.length>2)this.raise(t.start,A.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument");else for(const r of t.arguments)"SpreadElement"===r.type&&this.raise(r.start,A.ImportCallSpreadArgument);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,r,s,i){const n=[];let a=!0;const o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;while(!this.eat(t)){if(a)a=!1;else if(this.expect(d.comma),this.match(t)){!r||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(this.state.lastTokStart,A.ImportCallArgumentTrailingComma),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}n.push(this.parseExprListItem(!1,e?new Ze:void 0,e?{start:0}:void 0,s))}return this.state.inFSharpPipelineDirectBody=o,n}shouldParseAsyncArrow(){return this.match(d.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var r;return this.expect(d.arrow),this.parseArrowExpression(t,e.arguments,!0,null==(r=e.extra)?void 0:r.trailingComma),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){this.state.type===d.slash&&this.readRegexp();const e=this.state.potentialArrowAt===this.state.start;let r;switch(this.state.type){case d._super:return this.parseSuper();case d._import:return r=this.startNode(),this.next(),this.match(d.dot)?this.parseImportMetaProperty(r):(this.match(d.parenL)||this.raise(this.state.lastTokStart,A.UnsupportedImport),this.finishNode(r,"Import"));case d._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case d.name:{const t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){if(this.match(d._function)){const t=this.state.context.length-1;if(this.state.context[t]!==k.functionStatement)throw new Error("Internal error");return this.state.context[t]=k.functionExpression,this.next(),this.parseFunction(this.startNodeAtNode(r),void 0,!0)}if(this.match(d.name))return this.parseAsyncArrowUnaryFunction(r)}return e&&this.match(d.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}case d._do:return this.parseDo();case d.regexp:{const t=this.state.value;return r=this.parseLiteral(t.value,"RegExpLiteral"),r.pattern=t.pattern,r.flags=t.flags,r}case d.num:return this.parseLiteral(this.state.value,"NumericLiteral");case d.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case d.decimal:return this.parseLiteral(this.state.value,"DecimalLiteral");case d.string:return this.parseLiteral(this.state.value,"StringLiteral");case d._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case d._true:case d._false:return this.parseBooleanLiteral();case d.parenL:return this.parseParenAndDistinguishExpression(e);case d.bracketBarL:case d.bracketHashL:return this.parseArrayLike(this.state.type===d.bracketBarL?d.bracketBarR:d.bracketR,!1,!0,t);case d.bracketL:return this.parseArrayLike(d.bracketR,!0,!1,t);case d.braceBarL:case d.braceHashL:return this.parseObjectLike(this.state.type===d.braceBarL?d.braceBarR:d.braceR,!1,!0,t);case d.braceL:return this.parseObjectLike(d.braceR,!1,!1,t);case d._function:return this.parseFunctionOrFunctionSent();case d.at:this.parseDecorators();case d._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case d._new:return this.parseNewOrNewTarget();case d.backQuote:return this.parseTemplate(!1);case d.doubleColon:{r=this.startNode(),this.next(),r.object=null;const t=r.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(r,"BindExpression");throw this.raise(t.start,A.UnsupportedBind)}case d.hash:{if(this.state.inPipeline)return r=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(r.start,A.PrimaryTopicRequiresSmartPipeline),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(r.start,A.PrimaryTopicNotAllowed),this.registerTopicReference(),this.finishNode(r,"PipelinePrimaryTopicReference");const t=this.input.codePointAt(this.state.end);if(j(t)||92===t){const t=this.state.start;if(r=this.parseMaybePrivateName(!0),this.match(d._in))this.expectPlugin("privateIn"),this.classScope.usePrivateName(this.getPrivateNameSV(r),r.start);else{if(!this.hasPlugin("privateIn"))throw this.unexpected(t);this.raise(this.state.start,A.PrivateInExpectedIn,this.getPrivateNameSV(r))}return r}}case d.relational:if("<"===this.state.value){const t=this.input.codePointAt(this.nextTokenStart());(j(t)||62===t)&&this.expectOnePlugin(["jsx","flow","typescript"])}default:throw this.unexpected()}}parseAsyncArrowUnaryFunction(t){const e=this.startNodeAtNode(t);this.prodParam.enter(fe(!0,this.prodParam.hasYield));const r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(this.state.pos,A.LineTerminatorBeforeArrow),this.expect(d.arrow),this.parseArrowExpression(e,r,!0),e}parseDo(){this.expectPlugin("doExpressions");const t=this.startNode();this.next();const e=this.state.labels;return this.state.labels=[],t.body=this.parseBlock(),this.state.labels=e,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),!this.match(d.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(t.start,A.UnexpectedSuper):this.raise(t.start,A.SuperNotAllowed),this.match(d.parenL)||this.match(d.bracketL)||this.match(d.dot)||this.raise(t.start,A.UnsupportedSuper),this.finishNode(t,"Super")}parseBooleanLiteral(){const t=this.startNode();return t.value=this.match(d._true),this.next(),this.finishNode(t,"BooleanLiteral")}parseMaybePrivateName(t){const e=this.match(d.hash);if(e){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]),t||this.raise(this.state.pos,A.UnexpectedPrivateField);const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(d.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,r){t.meta=e,"function"===e.name&&"sent"===r&&(this.isContextual(r)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const s=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==r||s)&&this.raise(t.property.start,A.UnsupportedMetaProperty,e.name,r),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.next(),this.isContextual("meta")&&(this.inModule||this.raiseWithData(e.start,{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"},A.ImportMetaOutsideModule),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,e,"meta")}parseLiteral(t,e,r,s){r=r||this.state.start,s=s||this.state.startLoc;const i=this.startNodeAt(r,s);return this.addExtra(i,"rawValue",t),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=t,this.next(),this.finishNode(i,e)}parseParenAndDistinguishExpression(t){const e=this.state.start,r=this.state.startLoc;let s;this.next(),this.expressionScope.enter(Ge());const i=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const a=this.state.start,o=this.state.startLoc,c=[],h=new Ze,l={start:0};let p,u,f=!0;while(!this.match(d.parenR)){if(f)f=!1;else if(this.expect(d.comma,l.start||null),this.match(d.parenR)){u=this.state.start;break}if(this.match(d.ellipsis)){const t=this.state.start,e=this.state.startLoc;p=this.state.start,c.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}c.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem,l))}const m=this.state.lastTokEnd,y=this.state.lastTokEndLoc;this.expect(d.parenR),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=n;let g=this.startNodeAt(e,r);if(t&&this.shouldParseArrow()&&(g=this.parseArrow(g)))return this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(g,c,!1),g;if(this.expressionScope.exit(),c.length||this.unexpected(this.state.lastTokStart),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(h,!0),l.start&&this.unexpected(l.start),this.toReferencedListDeep(c,!0),c.length>1?(s=this.startNodeAt(a,o),s.expressions=c,this.finishNodeAt(s,"SequenceExpression",m,y)):s=c[0],!this.options.createParenthesizedExpressions)return this.addExtra(s,"parenthesized",!0),this.addExtra(s,"parenStart",e),s;const x=this.startNodeAt(e,r);return x.expression=s,this.finishNode(x,"ParenthesizedExpression"),x}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(d.arrow))return t}parseParenItem(t,e,r){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(d.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const r=this.parseMetaProperty(t,e,"target");if(!this.scope.inNonArrowFunction&&!this.scope.inClass){let t=A.UnexpectedNewTarget;this.hasPlugin("classProperties")&&(t+=" or class properties"),this.raise(r.start,t)}return r}return this.parseNew(t)}parseNew(t){return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,A.ImportCallNotNewExpression):this.isOptionalChain(t.callee)?this.raise(this.state.lastTokEnd,A.OptionalChainingNoNew):this.eat(d.questionDot)&&this.raise(this.state.start,A.OptionalChainingNoNew),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}parseNewArguments(t){if(this.eat(d.parenL)){const e=this.parseExprList(d.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}parseTemplateElement(t){const e=this.startNode();return null===this.state.value&&(t||this.raise(this.state.start+1,A.InvalidEscapeSequenceTemplate)),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(d.backQuote),this.finishNode(e,"TemplateElement")}parseTemplate(t){const e=this.startNode();this.next(),e.expressions=[];let r=this.parseTemplateElement(t);e.quasis=[r];while(!r.tail)this.expect(d.dollarBraceL),e.expressions.push(this.parseTemplateSubstitution()),this.expect(d.braceR),e.quasis.push(r=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,r,s){r&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=Object.create(null);let a=!0;const o=this.startNode();o.properties=[],this.next();while(!this.match(t)){if(a)a=!1;else if(this.expect(d.comma),this.match(t)){this.addExtra(o,"trailingComma",this.state.lastTokStart);break}const i=this.parsePropertyDefinition(e,s);e||this.checkProto(i,r,n,s),r&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(i.start,A.InvalidRecordProperty),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.state.exprAllowed=!1,this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return e?c="ObjectPattern":r&&(c="RecordExpression"),this.finishNode(o,c)}maybeAsyncOrAccessorProp(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(d.bracketL)||this.match(d.star))}parsePropertyDefinition(t,e){let r=[];if(this.match(d.at)){this.hasPlugin("decorators")&&this.raise(this.state.start,A.UnsupportedPropertyDecorator);while(this.match(d.at))r.push(this.parseDecorator())}const s=this.startNode();let i,n,a=!1,o=!1,c=!1;if(this.match(d.ellipsis))return r.length&&this.unexpected(),t?(this.next(),s.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(s,"RestElement")):this.parseSpread();r.length&&(s.decorators=r,r=[]),s.method=!1,(t||e)&&(i=this.state.start,n=this.state.startLoc),t||(a=this.eat(d.star));const h=this.state.containsEsc,l=this.parsePropertyName(s,!1);if(!t&&!a&&!h&&this.maybeAsyncOrAccessorProp(s)){const t=l.name;"async"!==t||this.hasPrecedingLineBreak()||(o=!0,a=this.eat(d.star),this.parsePropertyName(s,!1)),"get"!==t&&"set"!==t||(c=!0,s.kind=t,this.match(d.star)&&(a=!0,this.raise(this.state.pos,A.AccessorIsGenerator,t),this.next()),this.parsePropertyName(s,!1))}return this.parseObjPropValue(s,i,n,a,o,t,c,e),s}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const r=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t),i=t.start;s.length!==r&&("get"===t.kind?this.raise(i,A.BadGetterArity):this.raise(i,A.BadSetterArity)),"set"===t.kind&&"RestElement"===(null==(e=s[s.length-1])?void 0:e.type)&&this.raise(i,A.BadSetterRestParameter)}parseObjectMethod(t,e,r,s,i){return i?(this.parseMethod(t,e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):r||e||this.match(d.parenL)?(s&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,r,!1,!1,"ObjectMethod")):void 0}parseObjectProperty(t,e,r,s,i){return t.shorthand=!1,this.eat(d.colon)?(t.value=s?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!1),s?t.value=this.parseMaybeDefault(e,r,t.key.__clone()):this.match(d.eq)&&i?(-1===i.shorthandAssign&&(i.shorthandAssign=this.state.start),t.value=this.parseMaybeDefault(e,r,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}parseObjPropValue(t,e,r,s,i,n,a,o){const c=this.parseObjectMethod(t,s,i,n,a)||this.parseObjectProperty(t,e,r,n,o);return c||this.unexpected(),c}parsePropertyName(t,e){if(this.eat(d.bracketL))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(d.bracketR);else{const r=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(d.num)||this.match(d.string)||this.match(d.bigint)||this.match(d.decimal)?this.parseExprAtom():this.parseMaybePrivateName(e),this.isPrivateName(t.key)||(t.computed=!1),this.state.inPropertyName=r}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=!!e}parseMethod(t,e,r,s,i,n,a=!1){this.initFunction(t,r),t.generator=!!e;const o=s;return this.scope.enter(Q|et|(a?st:0)|(i?rt:0)),this.prodParam.enter(fe(r,t.generator)),this.parseFunctionParams(t,o),this.parseFunctionBodyAndFinish(t,n,!0),this.prodParam.exit(),this.scope.exit(),t}parseArrayLike(t,e,r,s){r&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!r,s,n),this.state.inFSharpPipelineDirectBody=i,this.finishNode(n,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,r,s){this.scope.enter(Q|Z);let i=fe(r,!1);!this.match(d.bracketL)&&this.prodParam.hasIn&&(i|=ue),this.prodParam.enter(i),this.initFunction(t,r);const n=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,r){t.params=this.toAssignableList(e,r,!1)}parseFunctionBodyAndFinish(t,e,r=!1){this.parseFunctionBody(t,!1,r),this.finishNode(t,e)}parseFunctionBody(t,e,r=!1){const s=e&&!this.match(d.braceL);if(this.expressionScope.enter(Je()),s)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const s=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|pe),t.body=this.parseBlock(!0,!1,i=>{const n=!this.isSimpleParamList(t.params);if(i&&n){const e="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(e,A.IllegalLanguageModeDirective)}const a=!s&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!r&&!n,e,a),this.state.strict&&t.id&&this.checkLVal(t.id,"function name",Ct,void 0,void 0,a)}),this.prodParam.exit(),this.expressionScope.exit(),this.state.labels=i}}isSimpleParamList(t){for(let e=0,r=t.length;e1||"".split(/.?/).length?function(t,r){var s=String(a(this)),n=void 0===r?m:r>>>0;if(0===n)return[];if(void 0===t)return[s];if(!i(t))return e.call(s,t,n);var o,c,h,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,y=new RegExp(t.source,u+"g");while(o=p.call(y,s)){if(c=y.lastIndex,c>f&&(l.push(s.slice(f,o.index)),o.length>1&&o.index