diff --git a/internal/run/handler.go b/internal/run/handler.go index f214665..6516510 100644 --- a/internal/run/handler.go +++ b/internal/run/handler.go @@ -15,6 +15,7 @@ import ( "github.com/gin-gonic/gin" "gorm.io/datatypes" "gorm.io/gorm" + "gorm.io/gorm/clause" ) type Handler struct { @@ -108,6 +109,7 @@ func (h *Handler) Answer(c *gin.Context) { return } var input struct { + NodeKey string `json:"node_key"` Answers map[string]interface{} `json:"answers"` } if err := c.ShouldBindJSON(&input); err != nil { @@ -116,12 +118,26 @@ func (h *Handler) Answer(c *gin.Context) { } var updated model.SOPRun err := h.db.Transaction(func(tx *gorm.DB) error { - if err := tx.Clauses().Where("id = ? AND tenant_id = ?", id, p.TenantID).First(&updated).Error; err != nil { + if err := tx.Clauses(clause.Locking{Strength: "UPDATE"}).Where("id = ? AND tenant_id = ?", id, p.TenantID).First(&updated).Error; err != nil { return err } if updated.Status != "running" { return errors.New("run is not active") } + if input.NodeKey != "" && input.NodeKey != updated.CurrentNodeKey { + return errors.New("当前步骤已经变化,请刷新后重试") + } + var currentNode model.SOPNode + if err := tx.Where("sop_version_id = ? AND node_key = ? AND tenant_id = ?", updated.SOPVersionID, updated.CurrentNodeKey, p.TenantID).First(¤tNode).Error; err != nil { + return err + } + var fields []model.ScenarioField + if err := tx.Table("scenario_fields sf").Joins("JOIN sops s ON s.scenario_id = sf.scenario_id").Where("s.id = ? AND sf.tenant_id = ?", updated.SOPID, p.TenantID).Order("sf.sort_order, sf.id").Find(&fields).Error; err != nil { + return err + } + if err := validateNodeAnswers(currentNode, fields, input.Answers); err != nil { + return err + } answers := map[string]interface{}{} if len(updated.Answers) > 0 { _ = json.Unmarshal(updated.Answers, &answers) diff --git a/internal/run/validation.go b/internal/run/validation.go new file mode 100644 index 0000000..ef8b0bd --- /dev/null +++ b/internal/run/validation.go @@ -0,0 +1,174 @@ +package run + +import ( + "encoding/json" + "fmt" + "strings" + "time" + + "git.iwork-ai.com/xdc/iqudo-top1/internal/model" +) + +type answerNodeConfig struct { + FieldKey string `json:"field_key"` + FieldKeys []string `json:"field_keys"` + Required bool `json:"required"` +} + +func validateNodeAnswers(node model.SOPNode, fields []model.ScenarioField, answers map[string]interface{}) error { + var config answerNodeConfig + if len(node.Config) > 0 { + if err := json.Unmarshal(node.Config, &config); err != nil { + return fmt.Errorf("当前节点配置不正确") + } + } + fieldMap := make(map[string]model.ScenarioField, len(fields)) + for _, field := range fields { + fieldMap[field.FieldKey] = field + } + expected := map[string]bool{} + switch node.Type { + case "question", "choice": + if config.FieldKey == "" { + return fmt.Errorf("当前节点没有配置采集字段") + } + expected[config.FieldKey] = config.Required + case "form": + if len(config.FieldKeys) == 0 { + return fmt.Errorf("当前表单没有配置采集字段") + } + for _, key := range config.FieldKeys { + expected[key] = false + } + default: + if len(answers) > 0 { + return fmt.Errorf("当前节点不接受字段回答") + } + return nil + } + + for key := range answers { + if _, ok := expected[key]; !ok { + return fmt.Errorf("字段 %s 不属于当前节点", key) + } + } + for key, nodeRequired := range expected { + field, exists := fieldMap[key] + if !exists { + return fmt.Errorf("字段 %s 不存在", key) + } + value, provided := answers[key] + required := field.Required || nodeRequired + if !provided || isEmptyValue(value) { + if required { + return fmt.Errorf("请填写%s", field.FieldName) + } + continue + } + if err := validateFieldValue(field, value); err != nil { + return err + } + } + return nil +} + +func validateFieldValue(field model.ScenarioField, value interface{}) error { + switch field.FieldType { + case "text", "textarea": + text, ok := value.(string) + if !ok { + return fmt.Errorf("%s必须是文本", field.FieldName) + } + var rules struct { + MinLength int `json:"min_length"` + MaxLength int `json:"max_length"` + } + _ = json.Unmarshal(field.Validation, &rules) + length := len([]rune(text)) + if rules.MinLength > 0 && length < rules.MinLength { + return fmt.Errorf("%s不能少于%d个字符", field.FieldName, rules.MinLength) + } + if rules.MaxLength > 0 && length > rules.MaxLength { + return fmt.Errorf("%s不能超过%d个字符", field.FieldName, rules.MaxLength) + } + case "number": + number, ok := toFloat(value) + if !ok { + return fmt.Errorf("%s必须是数字", field.FieldName) + } + var rules struct { + Min *float64 `json:"min"` + Max *float64 `json:"max"` + } + _ = json.Unmarshal(field.Validation, &rules) + if rules.Min != nil && number < *rules.Min { + return fmt.Errorf("%s不能小于%v", field.FieldName, *rules.Min) + } + if rules.Max != nil && number > *rules.Max { + return fmt.Errorf("%s不能大于%v", field.FieldName, *rules.Max) + } + case "boolean": + if _, ok := value.(bool); !ok { + return fmt.Errorf("%s必须选择是或否", field.FieldName) + } + case "select": + selected, ok := value.(string) + if !ok || !optionAllowed(field.Options, selected) { + return fmt.Errorf("%s的选项不正确", field.FieldName) + } + case "multiselect": + values, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("%s必须是多选值", field.FieldName) + } + for _, item := range values { + selected, ok := item.(string) + if !ok || !optionAllowed(field.Options, selected) { + return fmt.Errorf("%s包含不正确的选项", field.FieldName) + } + } + case "date": + text, ok := value.(string) + if !ok || !validDate(text) { + return fmt.Errorf("%s的日期格式不正确", field.FieldName) + } + default: + return fmt.Errorf("%s的字段类型不支持", field.FieldName) + } + return nil +} + +func optionAllowed(raw []byte, selected string) bool { + var options []string + if err := json.Unmarshal(raw, &options); err != nil { + return false + } + for _, option := range options { + if option == selected { + return true + } + } + return false +} + +func validDate(value string) bool { + for _, layout := range []string{time.RFC3339, "2006-01-02"} { + if _, err := time.Parse(layout, value); err == nil { + return true + } + } + return false +} + +func isEmptyValue(value interface{}) bool { + if value == nil { + return true + } + if text, ok := value.(string); ok { + return strings.TrimSpace(text) == "" + } + if values, ok := value.([]interface{}); ok { + return len(values) == 0 + } + return false +} diff --git a/internal/run/validation_test.go b/internal/run/validation_test.go new file mode 100644 index 0000000..72f76ba --- /dev/null +++ b/internal/run/validation_test.go @@ -0,0 +1,48 @@ +package run + +import ( + "strings" + "testing" + + "git.iwork-ai.com/xdc/iqudo-top1/internal/model" + "gorm.io/datatypes" +) + +func TestValidateNodeAnswers(t *testing.T) { + fields := []model.ScenarioField{ + {FieldKey: "pet_name", FieldName: "宠物名称", FieldType: "text", Required: true, Validation: datatypes.JSON([]byte(`{"max_length":20}`))}, + {FieldKey: "pet_weight", FieldName: "体重", FieldType: "number", Validation: datatypes.JSON([]byte(`{"min":0.01,"max":200}`))}, + {FieldKey: "pet_type", FieldName: "宠物种类", FieldType: "select", Options: datatypes.JSON([]byte(`["犬","猫"]`))}, + } + node := model.SOPNode{Type: "form", Config: datatypes.JSON([]byte(`{"field_keys":["pet_name","pet_weight","pet_type"]}`))} + + tests := []struct { + name string + answers map[string]interface{} + want string + }{ + {name: "valid", answers: map[string]interface{}{"pet_name": "豆包", "pet_weight": 5.2, "pet_type": "犬"}}, + {name: "missing required", answers: map[string]interface{}{"pet_weight": 5.2}, want: "请填写宠物名称"}, + {name: "unknown field", answers: map[string]interface{}{"pet_name": "豆包", "owner_phone": "123"}, want: "不属于当前节点"}, + {name: "invalid number", answers: map[string]interface{}{"pet_name": "豆包", "pet_weight": 0.0}, want: "不能小于"}, + {name: "invalid option", answers: map[string]interface{}{"pet_name": "豆包", "pet_type": "兔"}, want: "选项不正确"}, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + err := validateNodeAnswers(node, fields, test.answers) + if test.want == "" && err != nil { + t.Fatalf("validateNodeAnswers() error = %v", err) + } + if test.want != "" && (err == nil || !strings.Contains(err.Error(), test.want)) { + t.Fatalf("validateNodeAnswers() error = %v, want containing %q", err, test.want) + } + }) + } +} + +func TestValidateNodeAnswersRejectsAnswersForMessage(t *testing.T) { + err := validateNodeAnswers(model.SOPNode{Type: "message", Config: datatypes.JSON([]byte(`{}`))}, nil, map[string]interface{}{"pet_name": "豆包"}) + if err == nil || !strings.Contains(err.Error(), "不接受字段回答") { + t.Fatalf("validateNodeAnswers() error = %v", err) + } +} diff --git a/internal/sop/handler.go b/internal/sop/handler.go index 9440f97..b2f7fe7 100644 --- a/internal/sop/handler.go +++ b/internal/sop/handler.go @@ -190,12 +190,16 @@ func (h *Handler) Validate(c *gin.Context) { if !ok { return } - _, version, nodes, edges, err := h.loadLatest(id, p.TenantID) + item, version, nodes, edges, err := h.loadLatest(id, p.TenantID) if err != nil { response.Error(c, http.StatusNotFound, "NOT_FOUND", "SOP 不存在") return } - problems := ValidateGraph(version.StartNodeKey, nodes, edges) + problems, err := h.validateForPublish(item, version.StartNodeKey, nodes, edges, p.TenantID) + if err != nil { + response.Error(c, http.StatusInternalServerError, "VALIDATION_FAILED", "校验流程失败") + return + } response.OK(c, gin.H{"valid": len(problems) == 0, "problems": problems}) } @@ -210,7 +214,11 @@ func (h *Handler) SubmitReview(c *gin.Context) { response.Error(c, http.StatusConflict, "NO_DRAFT_VERSION", "没有可提交审核的草稿版本") return } - problems := ValidateGraph(version.StartNodeKey, nodes, edges) + problems, validationErr := h.validateForPublish(item, version.StartNodeKey, nodes, edges, p.TenantID) + if validationErr != nil { + response.Error(c, http.StatusInternalServerError, "VALIDATION_FAILED", "校验流程失败") + return + } if len(problems) > 0 { response.Error(c, http.StatusUnprocessableEntity, "INVALID_GRAPH", problems[0]) return @@ -240,7 +248,11 @@ func (h *Handler) Publish(c *gin.Context) { response.Error(c, http.StatusConflict, "NO_REVIEW_VERSION", "没有可发布的审核版本") return } - problems := ValidateGraph(version.StartNodeKey, nodes, edges) + problems, validationErr := h.validateForPublish(item, version.StartNodeKey, nodes, edges, p.TenantID) + if validationErr != nil { + response.Error(c, http.StatusInternalServerError, "VALIDATION_FAILED", "校验流程失败") + return + } if len(problems) > 0 { response.Error(c, http.StatusUnprocessableEntity, "INVALID_GRAPH", problems[0]) return @@ -368,6 +380,22 @@ func (h *Handler) loadLatest(sopID, tenantID uint64) (model.SOP, model.SOPVersio return item, version, nodes, edges, nil } +func (h *Handler) validateForPublish(item model.SOP, startNodeKey string, nodes []model.SOPNode, edges []model.SOPEdge, tenantID uint64) ([]string, error) { + var fields []model.ScenarioField + if err := h.db.Where("scenario_id = ? AND tenant_id = ?", item.ScenarioID, tenantID).Find(&fields).Error; err != nil { + return nil, err + } + var cards []model.KnowledgeCard + if err := h.db.Where("scenario_id = ? AND tenant_id = ? AND status = ?", item.ScenarioID, tenantID, "published").Find(&cards).Error; err != nil { + return nil, err + } + cardIDs := make(map[uint64]bool, len(cards)) + for _, card := range cards { + cardIDs[card.ID] = true + } + return ValidateForPublish(startNodeKey, nodes, edges, ValidationContext{Fields: fields, PublishedKnowledgeCardIDs: cardIDs}), nil +} + func toModels(tenantID, versionID uint64, input graphInput) ([]model.SOPNode, []model.SOPEdge) { nodes := make([]model.SOPNode, 0, len(input.Nodes)) for _, item := range input.Nodes { diff --git a/internal/sop/validator.go b/internal/sop/validator.go index 1f509b1..a8a470e 100644 --- a/internal/sop/validator.go +++ b/internal/sop/validator.go @@ -3,11 +3,18 @@ package sop import ( "encoding/json" "fmt" + "sort" "git.iwork-ai.com/xdc/iqudo-top1/internal/model" ) var allowedNodeTypes = map[string]bool{"start": true, "message": true, "question": true, "form": true, "choice": true, "condition": true, "knowledge": true, "escalate": true, "finish": true} +var allowedConditionOperators = map[string]bool{"equals": true, "not_equals": true, "contains": true, "greater_than": true, "less_than": true, "exists": true, "not_exists": true, "in": true} + +type ValidationContext struct { + Fields []model.ScenarioField + PublishedKnowledgeCardIDs map[uint64]bool +} func ValidateGraph(startNodeKey string, nodes []model.SOPNode, edges []model.SOPEdge) []string { var problems []string @@ -29,6 +36,9 @@ func ValidateGraph(startNodeKey string, nodes []model.SOPNode, edges []model.SOP if !allowedNodeTypes[node.Type] { problems = append(problems, fmt.Sprintf("节点 %s 类型不支持", node.Title)) } + if len(node.Config) > 0 && !json.Valid(node.Config) { + problems = append(problems, fmt.Sprintf("节点“%s”的配置不是有效 JSON", node.Title)) + } if node.Type == "start" { startCount++ } @@ -47,6 +57,7 @@ func ValidateGraph(startNodeKey string, nodes []model.SOPNode, edges []model.SOP } adjacency := make(map[string][]string) + reverse := make(map[string][]string) outgoing := make(map[string]int) for _, edge := range edges { if _, exists := nodeMap[edge.SourceNodeKey]; !exists { @@ -59,6 +70,7 @@ func ValidateGraph(startNodeKey string, nodes []model.SOPNode, edges []model.SOP problems = append(problems, fmt.Sprintf("连线 %s -> %s 的条件不是有效 JSON", edge.SourceNodeKey, edge.TargetNodeKey)) } adjacency[edge.SourceNodeKey] = append(adjacency[edge.SourceNodeKey], edge.TargetNodeKey) + reverse[edge.TargetNodeKey] = append(reverse[edge.TargetNodeKey], edge.SourceNodeKey) outgoing[edge.SourceNodeKey]++ } for _, node := range nodes { @@ -86,5 +98,193 @@ func ValidateGraph(startNodeKey string, nodes []model.SOPNode, edges []model.SOP problems = append(problems, fmt.Sprintf("节点“%s”无法从开始节点到达", node.Title)) } } + + canFinish := map[string]bool{} + var walkReverse func(string) + walkReverse = func(key string) { + if canFinish[key] { + return + } + canFinish[key] = true + for _, previous := range reverse[key] { + walkReverse(previous) + } + } + for _, node := range nodes { + if node.Type == "finish" || node.Type == "escalate" { + walkReverse(node.NodeKey) + } + } + for key, node := range nodeMap { + if visited[key] && !canFinish[key] { + problems = append(problems, fmt.Sprintf("节点“%s”所在路径无法结束", node.Title)) + } + } return problems } + +func ValidateForPublish(startNodeKey string, nodes []model.SOPNode, edges []model.SOPEdge, context ValidationContext) []string { + problems := ValidateGraph(startNodeKey, nodes, edges) + fieldMap := make(map[string]model.ScenarioField, len(context.Fields)) + for _, field := range context.Fields { + fieldMap[field.FieldKey] = field + } + collected := map[string]bool{} + nodeMap := make(map[string]model.SOPNode, len(nodes)) + adjacency := make(map[string][]string) + for _, node := range nodes { + nodeMap[node.NodeKey] = node + var config map[string]interface{} + if err := json.Unmarshal(node.Config, &config); err != nil { + continue + } + switch node.Type { + case "question", "choice": + fieldKey, _ := config["field_key"].(string) + if fieldKey == "" { + problems = append(problems, fmt.Sprintf("节点“%s”没有配置采集字段", node.Title)) + } else if _, exists := fieldMap[fieldKey]; !exists { + problems = append(problems, fmt.Sprintf("节点“%s”引用的字段 %s 不存在", node.Title, fieldKey)) + } else { + collected[fieldKey] = true + } + case "form": + keys, _ := config["field_keys"].([]interface{}) + if len(keys) == 0 { + problems = append(problems, fmt.Sprintf("节点“%s”没有配置表单字段", node.Title)) + } + for _, value := range keys { + fieldKey, ok := value.(string) + if !ok || fieldKey == "" { + problems = append(problems, fmt.Sprintf("节点“%s”包含无效的表单字段", node.Title)) + continue + } + if _, exists := fieldMap[fieldKey]; !exists { + problems = append(problems, fmt.Sprintf("节点“%s”引用的字段 %s 不存在", node.Title, fieldKey)) + continue + } + collected[fieldKey] = true + } + case "knowledge": + cardID := uint64FromJSON(config["knowledge_card_id"]) + if cardID == 0 || !context.PublishedKnowledgeCardIDs[cardID] { + problems = append(problems, fmt.Sprintf("节点“%s”没有关联已发布的知识卡", node.Title)) + } + } + } + for _, field := range context.Fields { + if field.Required && !collected[field.FieldKey] { + problems = append(problems, fmt.Sprintf("必填字段“%s”没有对应的采集节点", field.FieldName)) + } + } + + defaultPaths := map[string]int{} + for _, edge := range edges { + adjacency[edge.SourceNodeKey] = append(adjacency[edge.SourceNodeKey], edge.TargetNodeKey) + if isDefaultCondition(edge.Condition) { + defaultPaths[edge.SourceNodeKey]++ + continue + } + var rule interface{} + if err := json.Unmarshal(edge.Condition, &rule); err != nil { + continue + } + validateCondition(rule, fieldMap, fmt.Sprintf("路径 %s -> %s", edge.SourceNodeKey, edge.TargetNodeKey), &problems) + } + for source, count := range defaultPaths { + if count > 1 { + problems = append(problems, fmt.Sprintf("节点 %s 配置了多条默认路径", source)) + } + } + + for _, node := range nodes { + var config map[string]interface{} + _ = json.Unmarshal(node.Config, &config) + if config["risk_level"] != "high" { + continue + } + if !canReachType(node.NodeKey, "escalate", nodeMap, adjacency) { + problems = append(problems, fmt.Sprintf("高风险节点“%s”没有明确的转人工或转诊路径", node.Title)) + } + } + sort.Strings(problems) + return problems +} + +func validateCondition(value interface{}, fields map[string]model.ScenarioField, label string, problems *[]string) { + rule, ok := value.(map[string]interface{}) + if !ok { + *problems = append(*problems, label+"的条件结构不正确") + return + } + for _, group := range []string{"all", "any"} { + if raw, exists := rule[group]; exists { + items, ok := raw.([]interface{}) + if !ok || len(items) == 0 { + *problems = append(*problems, label+"的组合条件不能为空") + return + } + for _, item := range items { + validateCondition(item, fields, label, problems) + } + return + } + } + field, _ := rule["field"].(string) + operator, _ := rule["operator"].(string) + if _, exists := fields[field]; field == "" || !exists { + *problems = append(*problems, fmt.Sprintf("%s 引用了不存在的字段 %s", label, field)) + } + if !allowedConditionOperators[operator] { + *problems = append(*problems, fmt.Sprintf("%s 使用了不支持的运算符 %s", label, operator)) + } +} + +func isDefaultCondition(value []byte) bool { + if len(value) == 0 { + return true + } + var condition interface{} + if err := json.Unmarshal(value, &condition); err != nil || condition == nil { + return condition == nil && err == nil + } + object, ok := condition.(map[string]interface{}) + return ok && len(object) == 0 +} + +func uint64FromJSON(value interface{}) uint64 { + switch typed := value.(type) { + case float64: + if typed > 0 { + return uint64(typed) + } + case uint64: + return typed + case int: + if typed > 0 { + return uint64(typed) + } + } + return 0 +} + +func canReachType(start, nodeType string, nodes map[string]model.SOPNode, adjacency map[string][]string) bool { + visited := map[string]bool{} + var walk func(string) bool + walk = func(key string) bool { + if visited[key] { + return false + } + visited[key] = true + if nodes[key].Type == nodeType { + return true + } + for _, next := range adjacency[key] { + if walk(next) { + return true + } + } + return false + } + return walk(start) +} diff --git a/internal/sop/validator_test.go b/internal/sop/validator_test.go new file mode 100644 index 0000000..a0b0c5f --- /dev/null +++ b/internal/sop/validator_test.go @@ -0,0 +1,106 @@ +package sop + +import ( + "strings" + "testing" + + "git.iwork-ai.com/xdc/iqudo-top1/internal/model" + "gorm.io/datatypes" +) + +func TestValidateForPublishValidHighRiskFlow(t *testing.T) { + nodes, edges, context := validPublishGraph() + if problems := ValidateForPublish("start", nodes, edges, context); len(problems) != 0 { + t.Fatalf("ValidateForPublish() problems = %v", problems) + } +} + +func TestValidateForPublishBusinessRules(t *testing.T) { + tests := []struct { + name string + mutate func(*[]model.SOPNode, *[]model.SOPEdge, *ValidationContext) + want string + }{ + {name: "missing required collection", mutate: func(_ *[]model.SOPNode, _ *[]model.SOPEdge, context *ValidationContext) { + context.Fields = append(context.Fields, model.ScenarioField{FieldKey: "symptom", FieldName: "主要症状", Required: true}) + }, want: "没有对应的采集节点"}, + {name: "unknown condition field", mutate: func(_ *[]model.SOPNode, edges *[]model.SOPEdge, _ *ValidationContext) { + (*edges)[2].Condition = jsonData(`{"field":"missing","operator":"equals","value":true}`) + }, want: "不存在的字段 missing"}, + {name: "invalid operator", mutate: func(_ *[]model.SOPNode, edges *[]model.SOPEdge, _ *ValidationContext) { + (*edges)[2].Condition = jsonData(`{"field":"emergency","operator":"matches","value":true}`) + }, want: "不支持的运算符 matches"}, + {name: "unpublished knowledge", mutate: func(_ *[]model.SOPNode, _ *[]model.SOPEdge, context *ValidationContext) { + context.PublishedKnowledgeCardIDs = map[uint64]bool{} + }, want: "没有关联已发布的知识卡"}, + {name: "duplicate default path", mutate: func(_ *[]model.SOPNode, edges *[]model.SOPEdge, _ *ValidationContext) { + (*edges)[1].Condition = jsonData(`{}`) + }, want: "配置了多条默认路径"}, + {name: "high risk without escalation", mutate: func(_ *[]model.SOPNode, edges *[]model.SOPEdge, _ *ValidationContext) { + (*edges)[1].TargetNodeKey = "finish" + }, want: "没有明确的转人工或转诊路径"}, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + nodes, edges, context := validPublishGraph() + test.mutate(&nodes, &edges, &context) + problems := ValidateForPublish("start", nodes, edges, context) + if !containsProblem(problems, test.want) { + t.Fatalf("ValidateForPublish() problems = %v, want containing %q", problems, test.want) + } + }) + } +} + +func TestValidateGraphRejectsNonTerminatingCycle(t *testing.T) { + nodes := []model.SOPNode{ + {NodeKey: "start", Type: "start", Title: "开始", Config: jsonData(`{}`)}, + {NodeKey: "loop", Type: "message", Title: "循环", Config: jsonData(`{}`)}, + {NodeKey: "finish", Type: "finish", Title: "结束", Config: jsonData(`{}`)}, + } + edges := []model.SOPEdge{ + {SourceNodeKey: "start", TargetNodeKey: "loop", Condition: jsonData(`{}`)}, + {SourceNodeKey: "loop", TargetNodeKey: "loop", Condition: jsonData(`{}`)}, + } + if problems := ValidateGraph("start", nodes, edges); !containsProblem(problems, "所在路径无法结束") { + t.Fatalf("ValidateGraph() problems = %v", problems) + } +} + +func TestIsDefaultConditionAllowsJSONWhitespace(t *testing.T) { + if !isDefaultCondition([]byte(` { } `)) { + t.Fatal("isDefaultCondition() should accept an empty JSON object with whitespace") + } +} + +func validPublishGraph() ([]model.SOPNode, []model.SOPEdge, ValidationContext) { + nodes := []model.SOPNode{ + {NodeKey: "start", Type: "start", Title: "开始", Config: jsonData(`{}`)}, + {NodeKey: "screen", Type: "form", Title: "急症筛查", Config: jsonData(`{"field_keys":["emergency"],"risk_level":"high"}`)}, + {NodeKey: "knowledge", Type: "knowledge", Title: "用药原则", Config: jsonData(`{"knowledge_card_id":1}`)}, + {NodeKey: "escalate", Type: "escalate", Title: "转诊", Config: jsonData(`{}`)}, + {NodeKey: "finish", Type: "finish", Title: "结束", Config: jsonData(`{}`)}, + } + edges := []model.SOPEdge{ + {SourceNodeKey: "start", TargetNodeKey: "screen", Condition: jsonData(`{}`)}, + {SourceNodeKey: "screen", TargetNodeKey: "escalate", Condition: jsonData(`{"field":"emergency","operator":"equals","value":true}`)}, + {SourceNodeKey: "screen", TargetNodeKey: "knowledge", Condition: jsonData(`{}`)}, + {SourceNodeKey: "knowledge", TargetNodeKey: "finish", Condition: jsonData(`{}`)}, + } + context := ValidationContext{ + Fields: []model.ScenarioField{{FieldKey: "emergency", FieldName: "是否急症", Required: true}}, + PublishedKnowledgeCardIDs: map[uint64]bool{1: true}, + } + return nodes, edges, context +} + +func jsonData(value string) datatypes.JSON { return datatypes.JSON([]byte(value)) } + +func containsProblem(problems []string, want string) bool { + for _, problem := range problems { + if strings.Contains(problem, want) { + return true + } + } + return false +} diff --git a/scripts/seed-pet-doctor/main.go b/scripts/seed-pet-doctor/main.go index 9e58964..a8b5bff 100644 --- a/scripts/seed-pet-doctor/main.go +++ b/scripts/seed-pet-doctor/main.go @@ -222,11 +222,12 @@ func seedSOP(tx *gorm.DB, tenantID, userID, scenarioID uint64, knowledgeIDs map[ } var seededPublished int64 if err := tx.Table("sop_nodes n").Joins("JOIN sop_versions v ON v.id = n.sop_version_id").Where( - "v.sop_id = ? AND v.status = ? AND n.node_key IN ?", sop.ID, "published", []string{"emergency_screen", "emergency_escalate", "medication_safety"}, + "v.sop_id = ? AND n.node_key = ? AND JSON_UNQUOTE(JSON_EXTRACT(n.config, '$.seed_key')) = ?", + sop.ID, "start", "pet-doctor-v2", ).Count(&seededPublished).Error; err != nil { return err } - if seededPublished == 3 { + if seededPublished > 0 { return nil } @@ -291,12 +292,12 @@ func seedSOP(tx *gorm.DB, tenantID, userID, scenarioID uint64, knowledgeIDs map[ func petNodes(knowledgeCardID uint64) []nodeDefinition { return []nodeDefinition{ - {Key: "start", Type: "start", Title: "开始", Config: map[string]interface{}{"seed_key": "pet-doctor-v1"}}, + {Key: "start", Type: "start", Title: "开始", Config: map[string]interface{}{"seed_key": "pet-doctor-v2"}}, {Key: "opening", Type: "message", Title: "说明问诊流程", Content: "您好,我会先记录宠物的基本信息和症状,并优先确认是否存在需要立即就医的情况。线上沟通不能替代医生检查。", Config: map[string]interface{}{}}, {Key: "basic_info", Type: "form", Title: "采集宠物基本信息", Content: "请确认宠物名称、种类、年龄、体重、性别和绝育情况。", Config: map[string]interface{}{"field_keys": []string{"pet_name", "pet_type", "pet_age", "pet_weight", "pet_sex", "is_neutered"}}}, {Key: "chief_complaint", Type: "form", Title: "记录主诉", Content: "请让宠物主人按时间顺序描述最主要的症状和持续时间。", Config: map[string]interface{}{"field_keys": []string{"symptom", "symptom_duration"}}}, {Key: "emergency_screen", Type: "form", Title: "筛查急症红旗", Content: "逐项确认当前是否存在以下急症表现。任意一项为“是”都应优先转诊。", Config: map[string]interface{}{"field_keys": []string{"breathing_difficulty", "active_bleeding", "convulsion", "unable_to_urinate", "toxin_exposure", "has_emergency_sign"}}}, - {Key: "emergency_check", Type: "condition", Title: "判断是否需要立即转诊", Content: "系统根据急症筛查结果自动分流。", Config: map[string]interface{}{}}, + {Key: "emergency_check", Type: "condition", Title: "判断是否需要立即转诊", Content: "系统根据急症筛查结果自动分流。", Config: map[string]interface{}{"risk_level": "high"}}, {Key: "emergency_escalate", Type: "escalate", Title: "立即急诊或转诊", Content: "存在急症红旗,请停止常规线上问诊,建议立即前往最近的宠物急诊,并提前联系接诊机构。不要自行喂药、催吐或强行喂食。", Config: map[string]interface{}{"action": "urgent_referral"}}, {Key: "history_collection", Type: "form", Title: "补充状态与病史", Content: "继续了解食欲、精神状态、消化道表现、近期用药和药物过敏史。", Config: map[string]interface{}{"field_keys": []string{"appetite", "spirit_status", "vomiting", "diarrhea", "medication_history", "allergy_history"}}}, {Key: "medication_intent", Type: "question", Title: "确认用药诉求", Content: "请确认宠物主人是否正在咨询具体药物、剂量或疗程。", Config: map[string]interface{}{"field_key": "wants_medication", "required": true}}, diff --git a/web/dist/assets/ExecuteView-B0_AkMSt.js b/web/dist/assets/ExecuteView-B0_AkMSt.js new file mode 100644 index 0000000..afa76db --- /dev/null +++ b/web/dist/assets/ExecuteView-B0_AkMSt.js @@ -0,0 +1 @@ +import{A as e,Bt as t,D as n,F as r,I as i,O as a,P as o,Q as s,S as c,Tt as l,Y as u,_t as d,a as f,et as p,i as m,j as h,k as g,lt as _,n as v,r as y,t as b,tt as x,vt as S,zt as C}from"./client-CO11mUW5.js";import{a as w}from"./config-provider-kwhtQ-D4.js";import{t as T}from"./PlayCircleOutlined-C2UGH7h6.js";var E={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z`}}]},name:`safety-certificate`,theme:`outlined`};function D(e){for(var t=1;tE.value?.node.config||{}),G=n(()=>{if(!E.value)return[];let e=E.value.node;return e.type===`question`||e.type===`choice`?E.value.fields.filter(e=>e.field_key===W.value.field_key):e.type===`form`?E.value.fields.filter(e=>(W.value.field_keys||[]).includes(e.field_key)):[]});async function K(){f.value=!0;try{y.value=(await b.get(`/published-sops`)).items}catch(e){w.error(v(e))}finally{f.value=!1}}async function q(e){try{E.value=await b.post(`/runs`,{sop_id:e}),Object.keys(D).forEach(e=>delete D[e])}catch(e){w.error(v(e))}}async function J(){if(E.value){O.value=!0;try{E.value=await b.post(`/runs/${E.value.run.id}/answer`,{node_key:E.value.node.node_key,answers:{...D}}),Object.keys(D).forEach(e=>delete D[e])}catch(e){w.error(v(e))}finally{O.value=!1}}}function Y(e){return e.field_type}function X(){E.value=null,K()}return u(K),(n,i)=>{let u=x(`a-empty`),d=x(`a-button`),v=x(`a-input`),b=x(`a-textarea`),S=x(`a-input-number`),w=x(`a-radio`),K=x(`a-radio-group`),Z=x(`a-select`),Q=x(`a-date-picker`),$=x(`a-form-item`),re=x(`a-radio-button`),ie=x(`a-form`),ae=x(`a-spin`);return s(),h(`div`,A,[i[10]||=a(`div`,{class:`page-heading`},[a(`div`,null,[a(`h1`,null,`执行话术`),a(`p`,null,`选择已发布 SOP,系统会根据客户回答给出下一步。`)])],-1),r(ae,{spinning:f.value},{default:_(()=>[E.value?(s(),h(`div`,M,[a(`aside`,N,[a(`span`,P,`RUN-`+t(String(E.value.run.id).padStart(5,`0`)),1),i[4]||=a(`h2`,null,`执行进行中`,-1),i[5]||=a(`p`,null,`客户回答会自动保存在当前执行记录中。`,-1),a(`div`,F,[i[1]||=a(`span`,null,`当前节点`,-1),a(`b`,null,t(E.value.node.title),1)]),a(`div`,I,[i[2]||=a(`span`,null,`已采集字段`,-1),a(`b`,null,t(Object.keys(E.value.run.answers||{}).length),1)]),a(`div`,L,[r(l(k)),i[3]||=a(`span`,null,`敏感信息请遵循企业数据规范`,-1)])]),a(`main`,R,[a(`div`,z,[a(`span`,{class:C({done:E.value.run.status===`completed`})},null,2),a(`b`,null,t(E.value.run.status===`completed`?`流程已完成`:`正在执行`),1)]),a(`div`,B,[a(`small`,null,t(E.value.node.type.toUpperCase()),1),a(`h1`,null,t(E.value.node.title),1),E.value.node.content?(s(),h(`blockquote`,V,t(E.value.node.content),1)):e(``,!0)]),E.value.run.status===`completed`?(s(),h(`div`,H,[r(l(m)),a(`h3`,null,t(E.value.node.type===`escalate`?`已转交处理`:`本次执行已完成`),1),a(`p`,null,t(E.value.node.content),1),r(d,{type:`primary`,onClick:X},{default:_(()=>[...i[6]||=[o(`执行另一套 SOP`,-1)]]),_:1})])):(s(),h(c,{key:1},[r(ie,{layout:`vertical`,class:`answer-form`},{default:_(()=>[(s(!0),h(c,null,p(G.value,e=>(s(),g($,{key:e.id,label:e.field_name,required:e.required},{default:_(()=>[Y(e)===`text`?(s(),g(v,{key:0,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t},null,8,[`value`,`onUpdate:value`])):Y(e)===`textarea`?(s(),g(b,{key:1,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,rows:3},null,8,[`value`,`onUpdate:value`])):Y(e)===`number`?(s(),g(S,{key:2,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,style:{width:`100%`}},null,8,[`value`,`onUpdate:value`])):Y(e)===`boolean`?(s(),g(K,{key:3,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t},{default:_(()=>[r(w,{value:!0},{default:_(()=>[...i[7]||=[o(`是`,-1)]]),_:1}),r(w,{value:!1},{default:_(()=>[...i[8]||=[o(`否`,-1)]]),_:1})]),_:1},8,[`value`,`onUpdate:value`])):Y(e)===`select`?(s(),g(Z,{key:4,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,options:(e.options||[]).map(e=>({value:e,label:e}))},null,8,[`value`,`onUpdate:value`,`options`])):Y(e)===`multiselect`?(s(),g(Z,{key:5,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,mode:`multiple`,options:(e.options||[]).map(e=>({value:e,label:e}))},null,8,[`value`,`onUpdate:value`,`options`])):Y(e)===`date`?(s(),g(Q,{key:6,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,style:{width:`100%`}},null,8,[`value`,`onUpdate:value`])):(s(),g(v,{key:7,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t},null,8,[`value`,`onUpdate:value`]))]),_:2},1032,[`label`,`required`]))),128)),E.value.node.type===`choice`&&G.value.length===0?(s(),g($,{key:0},{default:_(()=>[r(K,{value:D[W.value.field_key],"onUpdate:value":i[0]||=e=>D[W.value.field_key]=e,class:`choice-group`},{default:_(()=>[(s(!0),h(c,null,p(W.value.options||[],e=>(s(),g(re,{key:e,value:e},{default:_(()=>[o(t(e),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`value`])]),_:1})):e(``,!0)]),_:1}),a(`div`,U,[a(`span`,null,t(G.value.length?`填写后继续下一步`:`确认当前话术已完成`),1),r(d,{type:`primary`,size:`large`,loading:O.value,onClick:J},{default:_(()=>[...i[9]||=[o(`继续下一步`,-1)]]),_:1},8,[`loading`])])],64))])])):(s(),h(`div`,ee,[(s(!0),h(c,null,p(y.value,e=>(s(),h(`button`,{key:e.id,class:`sop-entry surface`,onClick:t=>q(e.id)},[a(`span`,ne,t(String(e.id).padStart(2,`0`)),1),a(`div`,null,[a(`small`,null,t(e.scenario_name)+` · V`+t(e.version),1),a(`h2`,null,t(e.name),1),a(`p`,null,t(e.description||`按标准步骤执行这套话术流程。`),1)]),a(`span`,j,[r(l(T))])],8,te))),128)),y.value.length?e(``,!0):(s(),g(u,{key:0,description:`还没有已发布的 SOP`}))]))]),_:1},8,[`spinning`])])}}}),[[`__scopeId`,`data-v-d343fa7e`]]);export{W as default}; \ No newline at end of file diff --git a/web/dist/assets/ExecuteView-DQwv99Fb.js b/web/dist/assets/ExecuteView-DQwv99Fb.js deleted file mode 100644 index 308971d..0000000 --- a/web/dist/assets/ExecuteView-DQwv99Fb.js +++ /dev/null @@ -1 +0,0 @@ -import{A as e,Bt as t,D as n,F as r,I as i,O as a,P as o,Q as s,S as c,Tt as l,Y as u,_t as d,a as f,et as p,i as m,j as h,k as g,lt as _,n as v,r as y,t as b,tt as x,vt as S,zt as C}from"./client-CO11mUW5.js";import{a as w}from"./config-provider-kwhtQ-D4.js";import{t as T}from"./PlayCircleOutlined-C2UGH7h6.js";var E={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z`}}]},name:`safety-certificate`,theme:`outlined`};function D(e){for(var t=1;tE.value?.node.config||{}),G=n(()=>{if(!E.value)return[];let e=E.value.node;return e.type===`question`||e.type===`choice`?E.value.fields.filter(e=>e.field_key===W.value.field_key):e.type===`form`?E.value.fields.filter(e=>(W.value.field_keys||[]).includes(e.field_key)):[]});async function K(){f.value=!0;try{y.value=(await b.get(`/published-sops`)).items}catch(e){w.error(v(e))}finally{f.value=!1}}async function q(e){try{E.value=await b.post(`/runs`,{sop_id:e}),Object.keys(D).forEach(e=>delete D[e])}catch(e){w.error(v(e))}}async function J(){if(E.value){O.value=!0;try{E.value=await b.post(`/runs/${E.value.run.id}/answer`,{answers:{...D}}),Object.keys(D).forEach(e=>delete D[e])}catch(e){w.error(v(e))}finally{O.value=!1}}}function Y(e){return e.field_type}function X(){E.value=null,K()}return u(K),(n,i)=>{let u=x(`a-empty`),d=x(`a-button`),v=x(`a-input`),b=x(`a-textarea`),S=x(`a-input-number`),w=x(`a-radio`),K=x(`a-radio-group`),Z=x(`a-select`),Q=x(`a-date-picker`),$=x(`a-form-item`),re=x(`a-radio-button`),ie=x(`a-form`),ae=x(`a-spin`);return s(),h(`div`,A,[i[10]||=a(`div`,{class:`page-heading`},[a(`div`,null,[a(`h1`,null,`执行话术`),a(`p`,null,`选择已发布 SOP,系统会根据客户回答给出下一步。`)])],-1),r(ae,{spinning:f.value},{default:_(()=>[E.value?(s(),h(`div`,M,[a(`aside`,N,[a(`span`,P,`RUN-`+t(String(E.value.run.id).padStart(5,`0`)),1),i[4]||=a(`h2`,null,`执行进行中`,-1),i[5]||=a(`p`,null,`客户回答会自动保存在当前执行记录中。`,-1),a(`div`,F,[i[1]||=a(`span`,null,`当前节点`,-1),a(`b`,null,t(E.value.node.title),1)]),a(`div`,I,[i[2]||=a(`span`,null,`已采集字段`,-1),a(`b`,null,t(Object.keys(E.value.run.answers||{}).length),1)]),a(`div`,L,[r(l(k)),i[3]||=a(`span`,null,`敏感信息请遵循企业数据规范`,-1)])]),a(`main`,R,[a(`div`,z,[a(`span`,{class:C({done:E.value.run.status===`completed`})},null,2),a(`b`,null,t(E.value.run.status===`completed`?`流程已完成`:`正在执行`),1)]),a(`div`,B,[a(`small`,null,t(E.value.node.type.toUpperCase()),1),a(`h1`,null,t(E.value.node.title),1),E.value.node.content?(s(),h(`blockquote`,V,t(E.value.node.content),1)):e(``,!0)]),E.value.run.status===`completed`?(s(),h(`div`,H,[r(l(m)),a(`h3`,null,t(E.value.node.type===`escalate`?`已转交处理`:`本次执行已完成`),1),a(`p`,null,t(E.value.node.content),1),r(d,{type:`primary`,onClick:X},{default:_(()=>[...i[6]||=[o(`执行另一套 SOP`,-1)]]),_:1})])):(s(),h(c,{key:1},[r(ie,{layout:`vertical`,class:`answer-form`},{default:_(()=>[(s(!0),h(c,null,p(G.value,e=>(s(),g($,{key:e.id,label:e.field_name,required:e.required},{default:_(()=>[Y(e)===`text`?(s(),g(v,{key:0,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t},null,8,[`value`,`onUpdate:value`])):Y(e)===`textarea`?(s(),g(b,{key:1,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,rows:3},null,8,[`value`,`onUpdate:value`])):Y(e)===`number`?(s(),g(S,{key:2,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,style:{width:`100%`}},null,8,[`value`,`onUpdate:value`])):Y(e)===`boolean`?(s(),g(K,{key:3,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t},{default:_(()=>[r(w,{value:!0},{default:_(()=>[...i[7]||=[o(`是`,-1)]]),_:1}),r(w,{value:!1},{default:_(()=>[...i[8]||=[o(`否`,-1)]]),_:1})]),_:1},8,[`value`,`onUpdate:value`])):Y(e)===`select`?(s(),g(Z,{key:4,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,options:(e.options||[]).map(e=>({value:e,label:e}))},null,8,[`value`,`onUpdate:value`,`options`])):Y(e)===`multiselect`?(s(),g(Z,{key:5,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,mode:`multiple`,options:(e.options||[]).map(e=>({value:e,label:e}))},null,8,[`value`,`onUpdate:value`,`options`])):Y(e)===`date`?(s(),g(Q,{key:6,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t,style:{width:`100%`}},null,8,[`value`,`onUpdate:value`])):(s(),g(v,{key:7,value:D[e.field_key],"onUpdate:value":t=>D[e.field_key]=t},null,8,[`value`,`onUpdate:value`]))]),_:2},1032,[`label`,`required`]))),128)),E.value.node.type===`choice`&&G.value.length===0?(s(),g($,{key:0},{default:_(()=>[r(K,{value:D[W.value.field_key],"onUpdate:value":i[0]||=e=>D[W.value.field_key]=e,class:`choice-group`},{default:_(()=>[(s(!0),h(c,null,p(W.value.options||[],e=>(s(),g(re,{key:e,value:e},{default:_(()=>[o(t(e),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`value`])]),_:1})):e(``,!0)]),_:1}),a(`div`,U,[a(`span`,null,t(G.value.length?`填写后继续下一步`:`确认当前话术已完成`),1),r(d,{type:`primary`,size:`large`,loading:O.value,onClick:J},{default:_(()=>[...i[9]||=[o(`继续下一步`,-1)]]),_:1},8,[`loading`])])],64))])])):(s(),h(`div`,ee,[(s(!0),h(c,null,p(y.value,e=>(s(),h(`button`,{key:e.id,class:`sop-entry surface`,onClick:t=>q(e.id)},[a(`span`,ne,t(String(e.id).padStart(2,`0`)),1),a(`div`,null,[a(`small`,null,t(e.scenario_name)+` · V`+t(e.version),1),a(`h2`,null,t(e.name),1),a(`p`,null,t(e.description||`按标准步骤执行这套话术流程。`),1)]),a(`span`,j,[r(l(T))])],8,te))),128)),y.value.length?e(``,!0):(s(),g(u,{key:0,description:`还没有已发布的 SOP`}))]))]),_:1},8,[`spinning`])])}}}),[[`__scopeId`,`data-v-d94f7da9`]]);export{W as default}; \ No newline at end of file diff --git a/web/dist/assets/ExecuteView-_c1ZIw15.css b/web/dist/assets/ExecuteView-_c1ZIw15.css new file mode 100644 index 0000000..003f3a5 --- /dev/null +++ b/web/dist/assets/ExecuteView-_c1ZIw15.css @@ -0,0 +1 @@ +.execution-shell[data-v-d343fa7e]{max-width:1220px}.sop-catalog[data-v-d343fa7e]{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}.sop-entry[data-v-d343fa7e]{text-align:left;cursor:pointer;grid-template-columns:40px 1fr 42px;align-items:start;gap:14px;min-height:150px;padding:22px;display:grid}.sop-entry[data-v-d343fa7e]:hover{border-color:#9ac8b8;box-shadow:0 8px 24px #20282512}.entry-seq[data-v-d343fa7e]{color:#8c9893;font-family:monospace;font-size:12px}.sop-entry small[data-v-d343fa7e]{color:var(--green);font-weight:650}.sop-entry h2[data-v-d343fa7e]{margin:8px 0 7px;font-family:Noto Serif SC,serif;font-size:20px}.sop-entry p[data-v-d343fa7e]{color:var(--muted);margin:0;line-height:1.6}.play[data-v-d343fa7e]{color:#fff;background:#202825;border-radius:4px;place-items:center;width:38px;height:38px;font-size:18px;display:grid}.run-workspace[data-v-d343fa7e]{grid-template-columns:270px minmax(0,1fr);gap:18px;display:grid}.run-context[data-v-d343fa7e]{color:#fff;background:#202825;border-radius:6px;align-self:start;padding:24px;position:sticky;top:86px}.run-label[data-v-d343fa7e]{color:#72c9ab;font-size:11px;font-weight:700}.run-context h2[data-v-d343fa7e]{margin:12px 0 8px;font-family:Noto Serif SC,serif}.run-context>p[data-v-d343fa7e]{color:#aebdb7;margin:0 0 28px;line-height:1.6}.context-meta[data-v-d343fa7e]{border-top:1px solid #3a4742;justify-content:space-between;align-items:center;padding:13px 0;display:flex}.context-meta span[data-v-d343fa7e]{color:#9eada7;font-size:12px}.privacy-note[data-v-d343fa7e]{color:#889b93;gap:8px;margin-top:28px;font-size:11px;display:flex}.conversation[data-v-d343fa7e]{min-height:590px;padding:30px 34px}.conversation-progress[data-v-d343fa7e]{color:#66736d;align-items:center;gap:8px;font-size:12px;display:flex}.conversation-progress span[data-v-d343fa7e]{background:#d08736;border-radius:50%;width:8px;height:8px;box-shadow:0 0 0 4px #faefe1}.conversation-progress span.done[data-v-d343fa7e]{background:var(--green);box-shadow:0 0 0 4px #e4f1ec}.node-content[data-v-d343fa7e]{padding:44px 0 26px}.node-content small[data-v-d343fa7e]{color:var(--green);font-size:10px;font-weight:800}.node-content h1[data-v-d343fa7e]{margin:8px 0 22px;font-family:Noto Serif SC,serif;font-size:28px}.node-content blockquote[data-v-d343fa7e]{color:#29342f;border-left:3px solid var(--green);background:#f2f6f4;margin:0;padding:18px 20px;font-size:17px;line-height:1.8}.answer-form[data-v-d343fa7e]{max-width:680px}.choice-group[data-v-d343fa7e]{flex-wrap:wrap;display:flex}.run-actions[data-v-d343fa7e]{border-top:1px solid var(--line);color:var(--muted);justify-content:space-between;align-items:center;gap:16px;margin:24px -34px -30px;padding:18px 34px;font-size:12px;display:flex}.completed-state[data-v-d343fa7e]{text-align:center;padding:40px 0}.completed-state>span[data-v-d343fa7e]{color:var(--green);font-size:50px}.completed-state h3[data-v-d343fa7e]{margin:14px 0 8px;font-family:Noto Serif SC,serif;font-size:24px}.completed-state p[data-v-d343fa7e]{color:var(--muted);margin:0 0 24px}@media (width<=800px){.sop-catalog[data-v-d343fa7e],.run-workspace[data-v-d343fa7e]{grid-template-columns:1fr}.run-context[data-v-d343fa7e]{position:static}.conversation[data-v-d343fa7e]{padding:22px}.run-actions[data-v-d343fa7e]{margin:24px -22px -22px;padding:16px 22px}.run-actions span[data-v-d343fa7e]{display:none}} diff --git a/web/dist/assets/ExecuteView-iUcBfH4l.css b/web/dist/assets/ExecuteView-iUcBfH4l.css deleted file mode 100644 index 8cb552f..0000000 --- a/web/dist/assets/ExecuteView-iUcBfH4l.css +++ /dev/null @@ -1 +0,0 @@ -.execution-shell[data-v-d94f7da9]{max-width:1220px}.sop-catalog[data-v-d94f7da9]{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}.sop-entry[data-v-d94f7da9]{text-align:left;cursor:pointer;grid-template-columns:40px 1fr 42px;align-items:start;gap:14px;min-height:150px;padding:22px;display:grid}.sop-entry[data-v-d94f7da9]:hover{border-color:#9ac8b8;box-shadow:0 8px 24px #20282512}.entry-seq[data-v-d94f7da9]{color:#8c9893;font-family:monospace;font-size:12px}.sop-entry small[data-v-d94f7da9]{color:var(--green);font-weight:650}.sop-entry h2[data-v-d94f7da9]{margin:8px 0 7px;font-family:Noto Serif SC,serif;font-size:20px}.sop-entry p[data-v-d94f7da9]{color:var(--muted);margin:0;line-height:1.6}.play[data-v-d94f7da9]{color:#fff;background:#202825;border-radius:4px;place-items:center;width:38px;height:38px;font-size:18px;display:grid}.run-workspace[data-v-d94f7da9]{grid-template-columns:270px minmax(0,1fr);gap:18px;display:grid}.run-context[data-v-d94f7da9]{color:#fff;background:#202825;border-radius:6px;align-self:start;padding:24px;position:sticky;top:86px}.run-label[data-v-d94f7da9]{color:#72c9ab;font-size:11px;font-weight:700}.run-context h2[data-v-d94f7da9]{margin:12px 0 8px;font-family:Noto Serif SC,serif}.run-context>p[data-v-d94f7da9]{color:#aebdb7;margin:0 0 28px;line-height:1.6}.context-meta[data-v-d94f7da9]{border-top:1px solid #3a4742;justify-content:space-between;align-items:center;padding:13px 0;display:flex}.context-meta span[data-v-d94f7da9]{color:#9eada7;font-size:12px}.privacy-note[data-v-d94f7da9]{color:#889b93;gap:8px;margin-top:28px;font-size:11px;display:flex}.conversation[data-v-d94f7da9]{min-height:590px;padding:30px 34px}.conversation-progress[data-v-d94f7da9]{color:#66736d;align-items:center;gap:8px;font-size:12px;display:flex}.conversation-progress span[data-v-d94f7da9]{background:#d08736;border-radius:50%;width:8px;height:8px;box-shadow:0 0 0 4px #faefe1}.conversation-progress span.done[data-v-d94f7da9]{background:var(--green);box-shadow:0 0 0 4px #e4f1ec}.node-content[data-v-d94f7da9]{padding:44px 0 26px}.node-content small[data-v-d94f7da9]{color:var(--green);font-size:10px;font-weight:800}.node-content h1[data-v-d94f7da9]{margin:8px 0 22px;font-family:Noto Serif SC,serif;font-size:28px}.node-content blockquote[data-v-d94f7da9]{color:#29342f;border-left:3px solid var(--green);background:#f2f6f4;margin:0;padding:18px 20px;font-size:17px;line-height:1.8}.answer-form[data-v-d94f7da9]{max-width:680px}.choice-group[data-v-d94f7da9]{flex-wrap:wrap;display:flex}.run-actions[data-v-d94f7da9]{border-top:1px solid var(--line);color:var(--muted);justify-content:space-between;align-items:center;gap:16px;margin:24px -34px -30px;padding:18px 34px;font-size:12px;display:flex}.completed-state[data-v-d94f7da9]{text-align:center;padding:40px 0}.completed-state>span[data-v-d94f7da9]{color:var(--green);font-size:50px}.completed-state h3[data-v-d94f7da9]{margin:14px 0 8px;font-family:Noto Serif SC,serif;font-size:24px}.completed-state p[data-v-d94f7da9]{color:var(--muted);margin:0 0 24px}@media (width<=800px){.sop-catalog[data-v-d94f7da9],.run-workspace[data-v-d94f7da9]{grid-template-columns:1fr}.run-context[data-v-d94f7da9]{position:static}.conversation[data-v-d94f7da9]{padding:22px}.run-actions[data-v-d94f7da9]{margin:24px -22px -22px;padding:16px 22px}.run-actions span[data-v-d94f7da9]{display:none}} diff --git a/web/dist/assets/index-CsZhTuSf.js b/web/dist/assets/index-BETdHWCY.js similarity index 99% rename from web/dist/assets/index-CsZhTuSf.js rename to web/dist/assets/index-BETdHWCY.js index 5031cca..8ec0f7f 100644 --- a/web/dist/assets/index-CsZhTuSf.js +++ b/web/dist/assets/index-BETdHWCY.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-hyBivRM0.js","assets/client-CO11mUW5.js","assets/config-provider-kwhtQ-D4.js","assets/auth-D7KJ41TQ.js","assets/useApi-CROJJdhE-BlzMTLF9.js","assets/LoginView-BYK68e31.css","assets/DashboardView-BY1MVWq3.js","assets/PlusOutlined-5Urx-Evx.js","assets/AppstoreOutlined-BOx6VBGQ.js","assets/PlayCircleOutlined-C2UGH7h6.js","assets/DashboardView-S5ziOJC3.css","assets/ScenariosView-DZfzIhhk.js","assets/SearchOutlined-DRcWUFRC.js","assets/ScenariosView-CwB6WxAz.css","assets/ScenarioDetailView-BuBAV4IX.js","assets/DeleteOutlined-Dsl9pMnk.js","assets/ArrowLeftOutlined-m6YdiMlD.js","assets/ScenarioDetailView-EbGYJBey.css","assets/SOPEditorView-2uB6hvkh.js","assets/SOPEditorView-C7DDP1Zg.css","assets/ExecuteView-DQwv99Fb.js","assets/ExecuteView-iUcBfH4l.css","assets/RunHistoryView-CvqN7Go6.js","assets/RunHistoryView-DFSCNdR7.css","assets/KnowledgeView-W6lPD5mD.js","assets/BookOutlined-CNUY9qCc.js","assets/KnowledgeView-zQYEMPl4.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-hyBivRM0.js","assets/client-CO11mUW5.js","assets/config-provider-kwhtQ-D4.js","assets/auth-D7KJ41TQ.js","assets/useApi-CROJJdhE-BlzMTLF9.js","assets/LoginView-BYK68e31.css","assets/DashboardView-BY1MVWq3.js","assets/PlusOutlined-5Urx-Evx.js","assets/AppstoreOutlined-BOx6VBGQ.js","assets/PlayCircleOutlined-C2UGH7h6.js","assets/DashboardView-S5ziOJC3.css","assets/ScenariosView-DZfzIhhk.js","assets/SearchOutlined-DRcWUFRC.js","assets/ScenariosView-CwB6WxAz.css","assets/ScenarioDetailView-BuBAV4IX.js","assets/DeleteOutlined-Dsl9pMnk.js","assets/ArrowLeftOutlined-m6YdiMlD.js","assets/ScenarioDetailView-EbGYJBey.css","assets/SOPEditorView-2uB6hvkh.js","assets/SOPEditorView-C7DDP1Zg.css","assets/ExecuteView-B0_AkMSt.js","assets/ExecuteView-_c1ZIw15.css","assets/RunHistoryView-CvqN7Go6.js","assets/RunHistoryView-DFSCNdR7.css","assets/KnowledgeView-W6lPD5mD.js","assets/BookOutlined-CNUY9qCc.js","assets/KnowledgeView-zQYEMPl4.css"])))=>i.map(i=>d[i]); import{$ as e,A as t,Bt as n,C as r,Ct as i,D as a,E as o,F as s,G as c,H as l,Ht as u,I as d,J as f,K as p,L as m,O as h,P as g,Q as _,S as v,St as y,Tt as b,U as x,Ut as S,V as C,W as w,Wt as T,X as E,Y as D,Z as O,_t as k,a as A,at as j,bt as M,c as N,ct as P,ft as F,gt as I,i as L,j as ee,k as R,lt as z,mt as B,nt as te,q as V,r as ne,s as re,st as H,tt as U,ut as ie,vt as W,w as ae,wt as oe,xt as se,yt as ce,z as le,zt as ue}from"./client-CO11mUW5.js";import{$ as de,$t as G,A as fe,At as pe,B as me,Bt as he,C as ge,Ct as _e,D as K,Dt as ve,E as ye,Et as be,F as xe,Ft as Se,G as Ce,Gt as we,H as Te,Ht as Ee,I as De,It as Oe,J as ke,Jt as Ae,K as je,Kt as Me,L as Ne,Lt as Pe,M as Fe,Mt as Ie,N as Le,Nt as Re,O as ze,Ot as Be,P as Ve,Pt as He,Q as Ue,Qt as We,R as Ge,Rt as Ke,S as qe,St as q,T as J,Tt as Je,U as Ye,Ut as Xe,V as Ze,Vt as Qe,W as $e,Wt as et,Xt as tt,Y as nt,Yt as rt,Zt as it,_ as at,_t as Y,a as ot,an as st,at as ct,b as lt,bt as ut,ct as dt,d as ft,dt as pt,en as X,et as mt,f as ht,ft as gt,g as _t,gt as vt,h as yt,ht as bt,i as xt,it as St,j as Ct,jt as wt,k as Tt,kt as Et,l as Dt,lt as Ot,m as kt,mt as At,nn as jt,nt as Mt,o as Nt,on as Pt,ot as Ft,p as It,pt as Lt,q as Rt,qt as Z,r as zt,rn as Bt,rt as Vt,s as Ht,st as Ut,t as Wt,tn as Gt,tt as Kt,u as qt,ut as Jt,vt as Yt,w as Xt,wt as Zt,x as Qt,xt as $t,y as en,yt as Q,z as tn,zt as nn}from"./config-provider-kwhtQ-D4.js";import{n as rn,t as an}from"./auth-D7KJ41TQ.js";import{$ as on,A as sn,B as cn,C as ln,D as un,E as dn,F as fn,G as pn,H as mn,I as hn,J as gn,K as _n,L as vn,M as yn,N as bn,O as $,P as xn,Q as Sn,R as Cn,S as wn,T as Tn,U as En,V as Dn,W as On,X as kn,Y as An,Z as jn,_ as Mn,a as Nn,b as Pn,c as Fn,ct as In,d as Ln,dt as Rn,et as zn,f as Bn,ft as Vn,g as Hn,h as Un,i as Wn,it as Gn,j as Kn,k as qn,l as Jn,lt as Yn,m as Xn,n as Zn,nt as Qn,o as $n,ot as er,p as tr,q as nr,r as rr,rt as ir,s as ar,t as or,tt as sr,u as cr,ut as lr,v as ur,w as dr,x as fr,y as pr,z as mr}from"./DeleteOutlined-Dsl9pMnk.js";import{t as hr}from"./SearchOutlined-DRcWUFRC.js";import{t as gr}from"./PlusOutlined-5Urx-Evx.js";import{t as _r}from"./ArrowLeftOutlined-m6YdiMlD.js";import{n as vr,t as yr}from"./AppstoreOutlined-BOx6VBGQ.js";import{t as br}from"./BookOutlined-CNUY9qCc.js";import{t as xr}from"./PlayCircleOutlined-C2UGH7h6.js";import{a as Sr,c as Cr,d as wr,f as Tr,g as Er,h as Dr,i as Or,l as kr,m as Ar,n as jr,o as Mr,p as Nr,r as Pr,s as Fr,t as Ir,u as Lr}from"./useApi-CROJJdhE-BlzMTLF9.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Rr=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){!zr||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Kr?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!zr||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;Gr.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),Jr=(function(e,t){for(var n=0,r=Object.keys(t);n`u`||!(Element instanceof Object))){if(!(e instanceof Yr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new si(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof Yr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new ci(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),ui=typeof WeakMap<`u`?new WeakMap:new Rr,di=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new li(t,qr.getInstance(),this);ui.set(this,n)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){di.prototype[e]=function(){var t;return(t=ui.get(this))[e].apply(t,arguments)}});var fi=(function(){return Br.ResizeObserver===void 0?di:Br.ResizeObserver})(),pi=d({compatConfig:{MODE:3},name:`ResizeObserver`,props:{disabled:Boolean,onResize:Function},emits:[`resize`],setup(e,t){let{slots:n}=t,r=k({width:0,height:0,offsetHeight:0,offsetWidth:0}),i=null,a=null,o=()=>{a&&=(a.disconnect(),null)},s=t=>{let{onResize:n}=e,i=t[0].target,{width:a,height:o}=i.getBoundingClientRect(),{offsetWidth:s,offsetHeight:c}=i,l=Math.floor(a),u=Math.floor(o);if(r.width!==l||r.height!==u||r.offsetWidth!==s||r.offsetHeight!==c){let e={width:l,height:u,offsetWidth:s,offsetHeight:c};G(r,e),n&&Promise.resolve().then(()=>{n(G(G({},e),{offsetWidth:s,offsetHeight:c}),i)})}},c=m(),l=()=>{let{disabled:t}=e;if(t){o();return}let n=Et(c);n!==i&&(o(),i=n),!a&&n&&(a=new fi(s),a.observe(n))};return D(()=>{l()}),O(()=>{l()}),E(()=>{o()}),H(()=>e.disabled,()=>{l()},{flush:`post`}),()=>n.default?.call(n)[0]}});function mi(e){let t,n=n=>()=>{t=null,e(...n)},r=function(){t??=Rn(n([...arguments]))};return r.cancel=()=>{Rn.cancel(t),t=null},r}function hi(e){return e===window?{top:0,bottom:window.innerHeight}:e.getBoundingClientRect()}function gi(e,t,n){if(n!==void 0&&t.top>e.top-n)return`${n+t.top}px`}function _i(e,t,n){if(n!==void 0&&t.bottomt.target===e);n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},yi.push(n),vi.forEach(t=>{n.eventHandlers[t]=Yn(e,t,()=>{n.affixList.forEach(e=>{let{lazyUpdatePosition:t}=e.exposed;t()},(t===`touchstart`||t===`touchmove`)&&lr?{passive:!0}:!1)})}))}function xi(e){let t=yi.find(t=>{let n=t.affixList.some(t=>t===e);return n&&(t.affixList=t.affixList.filter(t=>t!==e)),n});t&&t.affixList.length===0&&(yi=yi.filter(e=>e!==t),vi.forEach(e=>{let n=t.eventHandlers[e];n&&n.remove&&n.remove()}))}function Si(e,t){let{path:n,parentSelectors:r}=t;In(!1,`[Ant Design Vue CSS-in-JS] ${n?`Error in '${n}': `:``}${e}${r.length?` Selector info: ${r.join(` -> `)}`:``}`)}function Ci(e){return(e.match(/:not\(([^)]*)\)/)?.[1]||``).split(/(\[[^[]*])|(?=[.#])/).filter(e=>e).length>1}function wi(e){return e.parentSelectors.reduce((e,t)=>e?t.includes(`&`)?t.replace(/&/g,e):`${e} ${t}`:t,``)}var Ti=(e,t,n)=>{let r=wi(n).match(/:not\([^)]*\)/g)||[];r.length>0&&r.some(Ci)&&Si(`Concat ':not' selector not support in legacy browsers.`,n)},Ei=(e,t,n)=>{switch(e){case`marginLeft`:case`marginRight`:case`paddingLeft`:case`paddingRight`:case`left`:case`right`:case`borderLeft`:case`borderLeftWidth`:case`borderLeftStyle`:case`borderLeftColor`:case`borderRight`:case`borderRightWidth`:case`borderRightStyle`:case`borderRightColor`:case`borderTopLeftRadius`:case`borderTopRightRadius`:case`borderBottomLeftRadius`:case`borderBottomRightRadius`:Si(`You seem to be using non-logical property '${e}' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n);return;case`margin`:case`padding`:case`borderWidth`:case`borderStyle`:if(typeof t==`string`){let r=t.split(` `).map(e=>e.trim());r.length===4&&r[1]!==r[3]&&Si(`You seem to be using '${e}' property with different left ${e} and right ${e}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n)}return;case`clear`:case`textAlign`:(t===`left`||t===`right`)&&Si(`You seem to be using non-logical value '${t}' of ${e}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n);return;case`borderRadius`:typeof t==`string`&&t.split(`/`).map(e=>e.trim()).reduce((e,t)=>{if(e)return e;let n=t.split(` `).map(e=>e.trim());return n.length>=2&&n[0]!==n[1]||n.length===3&&n[1]!==n[2]||n.length===4&&n[2]!==n[3]||e},!1)&&Si(`You seem to be using non-logical value '${t}' of ${e}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n);return}},Di=(e,t,n)=>{n.parentSelectors.some(e=>e.split(`,`).some(e=>e.split(`&`).length>2))&&Si("Should not use more than one `&` in a selector.",n)};function Oi(e){if(typeof e==`number`)return[e];let t=String(e).split(/\s+/),n=``,r=0;return t.reduce((e,t)=>(t.includes(`(`)?(n+=t,r+=t.split(`(`).length-1):t.includes(`)`)?(n+=` ${t}`,r-=t.split(`)`).length-1,r===0&&(e.push(n),n=``)):r>0?n+=` ${t}`:e.push(t),e),[])}function ki(e){return e.notSplit=!0,e}var Ai={inset:[`top`,`right`,`bottom`,`left`],insetBlock:[`top`,`bottom`],insetBlockStart:[`top`],insetBlockEnd:[`bottom`],insetInline:[`left`,`right`],insetInlineStart:[`left`],insetInlineEnd:[`right`],marginBlock:[`marginTop`,`marginBottom`],marginBlockStart:[`marginTop`],marginBlockEnd:[`marginBottom`],marginInline:[`marginLeft`,`marginRight`],marginInlineStart:[`marginLeft`],marginInlineEnd:[`marginRight`],paddingBlock:[`paddingTop`,`paddingBottom`],paddingBlockStart:[`paddingTop`],paddingBlockEnd:[`paddingBottom`],paddingInline:[`paddingLeft`,`paddingRight`],paddingInlineStart:[`paddingLeft`],paddingInlineEnd:[`paddingRight`],borderBlock:ki([`borderTop`,`borderBottom`]),borderBlockStart:ki([`borderTop`]),borderBlockEnd:ki([`borderBottom`]),borderInline:ki([`borderLeft`,`borderRight`]),borderInlineStart:ki([`borderLeft`]),borderInlineEnd:ki([`borderRight`]),borderBlockWidth:[`borderTopWidth`,`borderBottomWidth`],borderBlockStartWidth:[`borderTopWidth`],borderBlockEndWidth:[`borderBottomWidth`],borderInlineWidth:[`borderLeftWidth`,`borderRightWidth`],borderInlineStartWidth:[`borderLeftWidth`],borderInlineEndWidth:[`borderRightWidth`],borderBlockStyle:[`borderTopStyle`,`borderBottomStyle`],borderBlockStartStyle:[`borderTopStyle`],borderBlockEndStyle:[`borderBottomStyle`],borderInlineStyle:[`borderLeftStyle`,`borderRightStyle`],borderInlineStartStyle:[`borderLeftStyle`],borderInlineEndStyle:[`borderRightStyle`],borderBlockColor:[`borderTopColor`,`borderBottomColor`],borderBlockStartColor:[`borderTopColor`],borderBlockEndColor:[`borderBottomColor`],borderInlineColor:[`borderLeftColor`,`borderRightColor`],borderInlineStartColor:[`borderLeftColor`],borderInlineEndColor:[`borderRightColor`],borderStartStartRadius:[`borderTopLeftRadius`],borderStartEndRadius:[`borderTopRightRadius`],borderEndStartRadius:[`borderBottomLeftRadius`],borderEndEndRadius:[`borderBottomRightRadius`]};function ji(e){return{_skip_check_:!0,value:e}}var Mi={visit:e=>{let t={};return Object.keys(e).forEach(n=>{let r=e[n],i=Ai[n];if(i&&(typeof r==`number`||typeof r==`string`)){let e=Oi(r);i.length&&i.notSplit?i.forEach(e=>{t[e]=ji(r)}):i.length===1?t[i[0]]=ji(r):i.length===2?i.forEach((n,r)=>{t[n]=ji(e[r]??e[0])}):i.length===4?i.forEach((n,r)=>{t[n]=ji(e[r]??e[r-2]??e[0])}):t[n]=r}else t[n]=r}),t}},Ni=/url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;function Pi(e,t){let n=10**(t+1),r=Math.floor(e*n);return Math.round(r/10)*10/n}var Fi={Theme:ke,createTheme:Rt,useStyleRegister:$e,useCacheToken:je,createCache:Kt,useStyleInject:Mt,useStyleProvider:Vt,Keyframes:Te,extractStyle:Ye,legacyLogicalPropertiesTransformer:Mi,px2remTransformer:function(){let{rootValue:e=16,precision:t=5,mediaQuery:n=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(n,r)=>{if(!r)return n;let i=parseFloat(r);return i<=1?n:`${Pi(i/e,t)}rem`};return{visit:e=>{let t=G({},e);return Object.entries(e).forEach(e=>{let[i,a]=e;if(typeof a==`string`&&a.includes(`px`)){let e=a.replace(Ni,r);t[i]=e}!Ce[i]&&typeof a==`number`&&a!==0&&(t[i]=`${a}px`.replace(Ni,r));let o=i.trim();if(o.startsWith(`@`)&&o.includes(`px`)&&n){let e=i.replace(Ni,r);t[e]=t[i],delete t[i]}}),t}}},logicalPropertiesLinter:Ei,legacyNotSelectorLinter:Ti,parentSelectorLinter:Di,StyleProvider:mt},Ii=[`blue`,`purple`,`cyan`,`green`,`magenta`,`pink`,`red`,`orange`,`yellow`,`volcano`,`geekblue`,`lime`,`gold`],Li=e=>({color:e.colorLink,textDecoration:`none`,outline:`none`,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),Ri=(e,t,n,r,i)=>{let a=e/2,o=a,s=n*1/Math.sqrt(2),c=a-n*(1-1/Math.sqrt(2)),l=a-1/Math.sqrt(2)*t,u=n*(Math.sqrt(2)-1)+1/Math.sqrt(2)*t,d=2*a-l,f=u,p=2*a-s,m=c,h=2*a-0,g=o,_=a*Math.sqrt(2)+n*(Math.sqrt(2)-2),v=n*(Math.sqrt(2)-1);return{pointerEvents:`none`,width:e,height:e,overflow:`hidden`,"&::after":{content:`""`,position:`absolute`,width:_,height:_,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:i,zIndex:0,background:`transparent`},"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:e,height:e/2,background:r,clipPath:{_multi_value_:!0,value:[`polygon(${v}px 100%, 50% ${v}px, ${2*a-v}px 100%, ${v}px 100%)`,`path('M 0 ${o} A ${n} ${n} 0 0 0 ${s} ${c} L ${l} ${u} A ${t} ${t} 0 0 1 ${d} ${f} L ${p} ${m} A ${n} ${n} 0 0 0 ${h} ${g} Z')`]},content:`""`}}};function zi(e,t){return Ii.reduce((n,r)=>{let i=e[`${r}-1`],a=e[`${r}-3`],o=e[`${r}-6`],s=e[`${r}-7`];return G(G({},n),t(r,{lightColor:i,lightBorderColor:a,darkColor:o,textColor:s}))},{})}var Bi=e=>{let{componentCls:t}=e;return{[t]:{position:`fixed`,zIndex:e.zIndexPopup}}},Vi=Le(`Affix`,e=>[Bi(Fe(e,{zIndexPopup:e.zIndexBase+10}))]);function Hi(){return typeof window<`u`?window:null}var Ui;(function(e){e[e.None=0]=`None`,e[e.Prepare=1]=`Prepare`})(Ui||={});var Wi=d({compatConfig:{MODE:3},name:`AAffix`,inheritAttrs:!1,props:{offsetTop:Number,offsetBottom:Number,target:{type:Function,default:Hi},prefixCls:String,onChange:Function,onTestUpdatePosition:Function},setup(e,t){let{slots:n,emit:r,expose:i,attrs:o}=t,c=M(),l=M(),u=k({affixStyle:void 0,placeholderStyle:void 0,status:Ui.None,lastAffix:!1,prevTarget:null,timeout:null}),d=m(),f=a(()=>e.offsetBottom===void 0&&e.offsetTop===void 0?0:e.offsetTop),p=a(()=>e.offsetBottom),h=()=>{let{status:t,lastAffix:n}=u,{target:i}=e;if(t!==Ui.Prepare||!l.value||!c.value||!i)return;let a=i();if(!a)return;let o={status:Ui.None},s=hi(c.value);if(s.top===0&&s.left===0&&s.width===0&&s.height===0)return;let d=hi(a),m=gi(s,d,f.value),h=_i(s,d,p.value);if(s.top!==0||s.left!==0||s.width!==0||s.height!==0){if(m!==void 0){let e=`${s.width}px`,t=`${s.height}px`;o.affixStyle={position:`fixed`,top:m,width:e,height:t},o.placeholderStyle={width:e,height:t}}else if(h!==void 0){let e=`${s.width}px`,t=`${s.height}px`;o.affixStyle={position:`fixed`,bottom:h,width:e,height:t},o.placeholderStyle={width:e,height:t}}o.lastAffix=!!o.affixStyle,n!==o.lastAffix&&r(`change`,o.lastAffix),G(u,o)}},g=()=>{G(u,{status:Ui.Prepare,affixStyle:void 0,placeholderStyle:void 0})},_=mi(()=>{g()}),v=mi(()=>{let{target:t}=e,{affixStyle:n}=u;if(t&&n){let e=t();if(e&&c.value){let t=hi(e),r=hi(c.value),i=gi(r,t,f.value),a=_i(r,t,p.value);if(i!==void 0&&n.top===i||a!==void 0&&n.bottom===a)return}}g()});i({updatePosition:_,lazyUpdatePosition:v}),H(()=>e.target,e=>{let t=e?.()||null;u.prevTarget!==t&&(xi(d),t&&(bi(t,d),_()),u.prevTarget=t)}),H(()=>[e.offsetTop,e.offsetBottom],_),D(()=>{let{target:t}=e;t&&(u.timeout=setTimeout(()=>{bi(t(),d),_()}))}),O(()=>{h()}),E(()=>{clearTimeout(u.timeout),xi(d),_.cancel(),v.cancel()});let{prefixCls:y}=K(`affix`,e),[b,x]=Vi(y);return()=>{let{affixStyle:t,placeholderStyle:r,status:i}=u,a=Z({[y.value]:t,[x.value]:!0}),d=Gn(e,[`prefixCls`,`offsetTop`,`offsetBottom`,`target`,`onChange`,`onTestUpdatePosition`]);return b(s(pi,{onResize:_},{default:()=>[s(`div`,X(X(X({},d),o),{},{ref:c,"data-measure-status":i}),[t&&s(`div`,{style:r,"aria-hidden":`true`},null),s(`div`,{class:a,ref:l,style:t},[n.default?.call(n)])])]}))}}}),Gi=be(Wi);function Ki(e){return typeof e==`object`&&!!e&&e.nodeType===1}function qi(e,t){return(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`}function Ji(e,t){if(e.clientHeightt||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0}var Xi=function(e,t){var n=window,r=t.scrollMode,i=t.block,a=t.inline,o=t.boundary,s=t.skipOverflowHiddenElements,c=typeof o==`function`?o:function(e){return e!==o};if(!Ki(e))throw TypeError(`Invalid target`);for(var l,u=document.scrollingElement||document.documentElement,d=[],f=e;Ki(f)&&c(f);){if((f=(l=f).parentElement??(l.getRootNode().host||null))===u){d.push(f);break}f!=null&&f===document.body&&Ji(f)&&!Ji(document.documentElement)||f!=null&&Ji(f,s)&&d.push(f)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,_=e.getBoundingClientRect(),v=_.height,y=_.width,b=_.top,x=_.right,S=_.bottom,C=_.left,w=i===`start`||i===`nearest`?b:i===`end`?S:b+v/2,T=a===`center`?C+y/2:a===`end`?x:C,E=[],D=0;D=0&&C>=0&&S<=m&&x<=p&&b>=M&&S<=P&&C>=F&&x<=N)return E;var I=getComputedStyle(O),L=parseInt(I.borderLeftWidth,10),ee=parseInt(I.borderTopWidth,10),R=parseInt(I.borderRightWidth,10),z=parseInt(I.borderBottomWidth,10),B=0,te=0,V=`offsetWidth`in O?O.offsetWidth-O.clientWidth-L-R:0,ne=`offsetHeight`in O?O.offsetHeight-O.clientHeight-ee-z:0,re=`offsetWidth`in O?O.offsetWidth===0?0:j/O.offsetWidth:0,H=`offsetHeight`in O?O.offsetHeight===0?0:A/O.offsetHeight:0;if(u===O)B=i===`start`?w:i===`end`?w-m:i===`nearest`?Yi(g,g+m,m,ee,z,g+w,g+w+v,v):w-m/2,te=a===`start`?T:a===`center`?T-p/2:a===`end`?T-p:Yi(h,h+p,p,L,R,h+T,h+T+y,y),B=Math.max(0,B+g),te=Math.max(0,te+h);else{B=i===`start`?w-M-ee:i===`end`?w-P+z+ne:i===`nearest`?Yi(M,P,A,ee,z+ne,w,w+v,v):w-(M+A/2)+ne/2,te=a===`start`?T-F-L:a===`center`?T-(F+j/2)+V/2:a===`end`?T-N+R+V:Yi(F,N,j,L,R+V,T,T+y,y);var U=O.scrollLeft,ie=O.scrollTop;w+=ie-(B=Math.max(0,Math.min(ie+B/H,O.scrollHeight-A/H+ne))),T+=U-(te=Math.max(0,Math.min(U+te/re,O.scrollWidth-j/re+V)))}E.push({el:O,top:B,left:te})}return E};function Zi(e){return e===Object(e)&&Object.keys(e).length!==0}function Qi(e,t){t===void 0&&(t=`auto`);var n=`scrollBehavior`in document.body.style;e.forEach(function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)})}function $i(e){return e===!1?{block:`end`,inline:`nearest`}:Zi(e)?e:{block:`start`,inline:`nearest`}}function ea(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(Zi(t)&&typeof t.behavior==`function`)return t.behavior(n?Xi(e,t):[]);if(n){var r=$i(t);return Qi(Xi(e,r),r.behavior)}}function ta(e,t,n,r){let i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function na(e){return e!=null&&e===e.window}function ra(e,t){if(typeof window>`u`)return 0;let n=t?`scrollTop`:`scrollLeft`,r=0;return na(e)?r=e[t?`scrollY`:`scrollX`]:e instanceof Document?r=e.documentElement[n]:(e instanceof HTMLElement||e)&&(r=e[n]),e&&!na(e)&&typeof r!=`number`&&(r=(e.ownerDocument??e).documentElement?.[n]),r}function ia(e){let{getContainer:t=()=>window,callback:n,duration:r=450}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t(),a=ra(i,!0),o=Date.now(),s=()=>{let t=Date.now()-o,c=ta(t>r?r:t,a,e,r);na(i)?i.scrollTo(window.scrollX,c):i instanceof Document?i.documentElement.scrollTop=c:i.scrollTop=c,t{e(oa,t)},ca=()=>C(oa,{registerLink:aa,unregisterLink:aa,scrollTo:aa,activeLink:a(()=>``),handleClick:aa,direction:a(()=>`vertical`)}),la=e=>{let{componentCls:t,holderOffsetBlock:n,motionDurationSlow:r,lineWidthBold:i,colorPrimary:a,lineType:o,colorSplit:s}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:`transparent`,[t]:G(G({},Ne(e)),{position:`relative`,paddingInlineStart:i,[`${t}-link`]:{paddingBlock:e.anchorPaddingBlock,paddingInline:`${e.anchorPaddingInline}px 0`,"&-title":G(G({},tn),{position:`relative`,display:`block`,marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:`absolute`,left:{_skip_check_:!0,value:0},top:0,height:`100%`,borderInlineStart:`${i}px ${o} ${s}`,content:`" "`},[`${t}-ink`]:{position:`absolute`,left:{_skip_check_:!0,value:0},display:`none`,transform:`translateY(-50%)`,transition:`top ${r} ease-in-out`,width:i,backgroundColor:a,[`&${t}-ink-visible`]:{display:`inline-block`}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:`none`}}}},ua=e=>{let{componentCls:t,motionDurationSlow:n,lineWidthBold:r,colorPrimary:i}=e;return{[`${t}-wrapper-horizontal`]:{position:`relative`,"&::before":{position:`absolute`,left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:`" "`},[t]:{overflowX:`scroll`,position:`relative`,display:`flex`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:`absolute`,bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:r,backgroundColor:i}}}}},da=Le(`Anchor`,e=>{let{fontSize:t,fontSizeLG:n,padding:r,paddingXXS:i}=e,a=Fe(e,{holderOffsetBlock:i,anchorPaddingBlock:i,anchorPaddingBlockSecondary:i/2,anchorPaddingInline:r,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[la(a),ua(a)]}),fa=d({compatConfig:{MODE:3},name:`AAnchorLink`,inheritAttrs:!1,props:Vn({prefixCls:String,href:String,title:bt(),target:String,customTitleProps:ut()},{href:`#`}),slots:Object,setup(e,t){let{slots:n,attrs:r}=t,i=null,{handleClick:a,scrollTo:o,unregisterLink:c,registerLink:l,activeLink:u}=ca(),{prefixCls:d}=K(`anchor`,e),f=t=>{let{href:n}=e;a(t,{title:i,href:n}),o(n)};return H(()=>e.href,(e,t)=>{x(()=>{c(t),l(e)})}),D(()=>{l(e.href)}),p(()=>{c(e.href)}),()=>{let{href:t,target:a,title:o=n.title,customTitleProps:c={}}=e,l=d.value;i=typeof o==`function`?o(c):o;let p=u.value===t,m=Z(`${l}-link`,{[`${l}-link-active`]:p},r.class),h=Z(`${l}-link-title`,{[`${l}-link-title-active`]:p});return s(`div`,X(X({},r),{},{class:m}),[s(`a`,{class:h,href:t,title:typeof i==`string`?i:``,target:a,onClick:f},[n.customTitle?n.customTitle(c):i]),n.default?.call(n)])}}});function pa(){return window}function ma(e,t){if(!e.getClientRects().length)return 0;let n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}var ha=/#([\S ]+)$/,ga=d({compatConfig:{MODE:3},name:`AAnchor`,inheritAttrs:!1,props:{prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:vt(),direction:J.oneOf([`vertical`,`horizontal`]).def(`vertical`),onChange:Function,onClick:Function},setup(e,t){let{emit:n,attrs:r,slots:i,expose:o}=t,{prefixCls:c,getTargetContainer:l,direction:u}=K(`anchor`,e),d=a(()=>e.direction??`vertical`),f=W(null),m=W(),h=k({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),g=W(null),_=a(()=>{let{getContainer:t}=e;return t||l?.value||pa}),v=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=[],r=_.value();return h.links.forEach(i=>{let a=ha.exec(i.toString());if(!a)return;let o=document.getElementById(a[1]);if(o){let a=ma(o,r);at.top>e.top?t:e).link:``},y=t=>{let{getCurrentAnchor:r}=e;g.value!==t&&(g.value=typeof r==`function`?r(t):t,n(`change`,t))},b=t=>{let{offsetTop:n,targetOffset:r}=e;y(t);let i=ha.exec(t);if(!i)return;let a=document.getElementById(i[1]);if(!a)return;let o=_.value(),s=ra(o,!0)+ma(a,o);s-=r===void 0?n||0:r,h.animating=!0,ia(s,{callback:()=>{h.animating=!1},getContainer:_.value})};o({scrollTo:b});let S=()=>{if(h.animating)return;let{offsetTop:t,bounds:n,targetOffset:r}=e,i=v(r===void 0?t||0:r,n);y(i)},C=()=>{let e=m.value.querySelector(`.${c.value}-link-title-active`);if(e&&f.value){let t=d.value===`horizontal`;f.value.style.top=t?``:`${e.offsetTop+e.clientHeight/2}px`,f.value.style.height=t?``:`${e.clientHeight}px`,f.value.style.left=t?`${e.offsetLeft}px`:``,f.value.style.width=t?`${e.clientWidth}px`:``,t&&ea(e,{scrollMode:`if-needed`,block:`nearest`})}};sa({registerLink:e=>{h.links.includes(e)||h.links.push(e)},unregisterLink:e=>{let t=h.links.indexOf(e);t!==-1&&h.links.splice(t,1)},activeLink:g,scrollTo:b,handleClick:(e,t)=>{n(`click`,e,t)},direction:d}),D(()=>{x(()=>{let e=_.value();h.scrollContainer=e,h.scrollEvent=Yn(h.scrollContainer,`scroll`,S),S()})}),p(()=>{h.scrollEvent&&h.scrollEvent.remove()}),O(()=>{if(h.scrollEvent){let e=_.value();h.scrollContainer!==e&&(h.scrollContainer=e,h.scrollEvent.remove(),h.scrollEvent=Yn(h.scrollContainer,`scroll`,S),S())}C()});let w=e=>Array.isArray(e)?e.map(e=>{let{children:t,key:n,href:r,target:a,class:o,style:c,title:l}=e;return s(fa,{key:n,href:r,target:a,class:o,style:c,title:l,customTitleProps:e},{default:()=>[d.value===`vertical`?w(t):null],customTitle:i.customTitle})}):null,[T,E]=da(c);return()=>{let{offsetTop:t,affix:n,showInkInFixed:a}=e,o=c.value,l=Z(`${o}-ink`,{[`${o}-ink-visible`]:g.value}),p=Z(E.value,e.wrapperClass,`${o}-wrapper`,{[`${o}-wrapper-horizontal`]:d.value===`horizontal`,[`${o}-rtl`]:u.value===`rtl`}),h=Z(o,{[`${o}-fixed`]:!n&&!a}),v=G({maxHeight:t?`calc(100vh - ${t}px)`:`100vh`},e.wrapperStyle),y=s(`div`,{class:p,style:v,ref:m},[s(`div`,{class:h},[s(`span`,{class:l,ref:f},null),Array.isArray(e.items)?w(e.items):i.default?.call(i)])]);return T(n?s(Gi,X(X({},r),{},{offsetTop:t,target:_.value}),{default:()=>[y]}):y)}}});ga.Link=fa,ga.install=function(e){return e.component(ga.name,ga),e.component(ga.Link.name,ga.Link),e};var _a=ga;function va(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function ya(e,t){let{label:n,value:r,options:i}=e||{};return{label:n||(t?`children`:`label`),value:r||`value`,options:i||`options`}}function ba(e){let{fieldNames:t,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],{label:i,value:a,options:o}=ya(t,!1);function s(e,t){e.forEach(e=>{let c=e[i];if(t||!(o in e)){let n=e[a];r.push({key:va(e,r.length),groupOption:t,data:e,label:c,value:n})}else{let t=c;t===void 0&&n&&(t=e.label),r.push({key:va(e,r.length),group:!0,data:e,label:t}),s(e[o],!0)}})}return s(e,!1),r}function xa(e){let t=G({},e);return`props`in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Sa(e,t){if(!t||!t.length)return null;let n=!1;function r(e,t){let[i,...a]=t;if(!i)return[e];let o=e.split(i);return n||=o.length>1,o.reduce((e,t)=>[...e,...r(t,a)],[]).filter(e=>e)}let i=r(e,t);return n?i:null}function Ca(){return``}function wa(e){return e?e.ownerDocument:window.document}function Ta(){}var Ea=()=>({action:J.oneOfType([J.string,J.arrayOf(J.string)]).def([]),showAction:J.any.def([]),hideAction:J.any.def([]),getPopupClassNameFromAlign:J.any.def(Ca),onPopupVisibleChange:Function,afterPopupVisibleChange:J.func.def(Ta),popup:J.any,arrow:J.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:J.string.def(`rc-trigger-popup`),popupClassName:J.string.def(``),popupPlacement:String,builtinPlacements:J.object,popupTransitionName:String,popupAnimation:J.any,mouseEnterDelay:J.number.def(0),mouseLeaveDelay:J.number.def(.1),zIndex:Number,focusDelay:J.number.def(0),blurDelay:J.number.def(.15),getPopupContainer:Function,getDocument:J.func.def(wa),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:J.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),Da={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},Oa=G(G({},Da),{mobile:{type:Object}}),ka=G(G({},Da),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function Aa(e){let{prefixCls:t,visible:n,zIndex:r,mask:i,maskAnimation:a,maskTransitionName:o}=e;if(!i)return null;let c={};return(o||a)&&(c=Xt({prefixCls:t,transitionName:o,animation:a})),s(Gt,X({appear:!0},c),{default:()=>[ie(s(`div`,{style:{zIndex:r},class:`${t}-mask`},null),[[te(`if`),n]])]})}Aa.displayName=`Mask`;var ja=d({compatConfig:{MODE:3},name:`MobilePopupInner`,inheritAttrs:!1,props:Oa,emits:[`mouseenter`,`mouseleave`,`mousedown`,`touchstart`,`align`],setup(e,t){let{expose:n,slots:r}=t,i=W();return n({forceAlign:()=>{},getElement:()=>i.value}),()=>{let{zIndex:t,visible:n,prefixCls:a,mobile:{popupClassName:o,popupStyle:c,popupMotion:l={},popupRender:u}={}}=e,d=G({zIndex:t},c),f=pe(r.default?.call(r));f.length>1&&(f=s(`div`,{class:`${a}-content`},[f])),u&&(f=u(f));let p=Z(a,o);return s(Gt,X({ref:i},l),{default:()=>[n?s(`div`,{class:p,style:d},[f]):null]})}}}),Ma=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Na=[`measure`,`align`,null,`motion`],Pa=((e,t)=>{let n=M(null),r=M(),i=M(!1);function a(e){i.value||(n.value=e)}function o(){Rn.cancel(r.value)}function s(e){o(),r.value=Rn(()=>{let t=n.value;switch(n.value){case`align`:t=`motion`;break;case`motion`:t=`stable`}a(t),e?.()})}return H(e,()=>{a(`measure`)},{immediate:!0,flush:`post`}),D(()=>{H(n,()=>{n.value===`measure`&&t(),n.value&&(r.value=Rn(()=>Ma(void 0,void 0,void 0,function*(){let e=Na.indexOf(n.value),t=Na[e+1];t&&e!==-1&&a(t)})))},{immediate:!0,flush:`post`})}),p(()=>{i.value=!0,o()}),[n,s]}),Fa=(e=>{let t=M({width:0,height:0});function n(e){t.value={width:e.offsetWidth,height:e.offsetHeight}}return[a(()=>{let n={};if(e.value){let{width:r,height:i}=t.value;e.value.indexOf(`height`)!==-1&&i?n.height=`${i}px`:e.value.indexOf(`minHeight`)!==-1&&i&&(n.minHeight=`${i}px`),e.value.indexOf(`width`)!==-1&&r?n.width=`${r}px`:e.value.indexOf(`minWidth`)!==-1&&r&&(n.minWidth=`${r}px`)}return n}),n]});function Ia(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function La(e){for(var t=1;t=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Uo(e,t,n,r){var i=Lo.clone(e),a={width:t.width,height:t.height};return r.adjustX&&i.left=n.left&&i.left+a.width>n.right&&(a.width-=i.left+a.width-n.right),r.adjustX&&i.left+a.width>n.right&&(i.left=Math.max(n.right-a.width,n.left)),r.adjustY&&i.top=n.top&&i.top+a.height>n.bottom&&(a.height-=i.top+a.height-n.bottom),r.adjustY&&i.top+a.height>n.bottom&&(i.top=Math.max(n.bottom-a.height,n.top)),Lo.mix(i,a)}function Wo(e){var t,n,r;if(!Lo.isWindow(e)&&e.nodeType!==9)t=Lo.offset(e),n=Lo.outerWidth(e),r=Lo.outerHeight(e);else{var i=Lo.getWindow(e);t={left:Lo.getWindowScrollLeft(i),top:Lo.getWindowScrollTop(i)},n=Lo.viewportWidth(i),r=Lo.viewportHeight(i)}return t.width=n,t.height=r,t}function Go(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,a=e.height,o=e.left,s=e.top;return n===`c`?s+=a/2:n===`b`&&(s+=a),r===`c`?o+=i/2:r===`r`&&(o+=i),{left:o,top:s}}function Ko(e,t,n,r,i){var a=Go(t,n[1]),o=Go(e,n[0]),s=[o.left-a.left,o.top-a.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function qo(e,t,n){return e.leftn.right}function Jo(e,t,n){return e.topn.bottom}function Yo(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.right||r.top>=n.bottom}function rs(e,t,n){var r=n.target||t;return ts(e,Wo(r),n,!ns(r,n.overflow&&n.overflow.alwaysByViewport))}rs.__getOffsetParent=zo,rs.__getVisibleRectForElement=Ho;function is(e,t,n){var r,i,a=Lo.getDocument(e),o=a.defaultView||a.parentWindow,s=Lo.getWindowScrollLeft(o),c=Lo.getWindowScrollTop(o),l=Lo.viewportWidth(o),u=Lo.viewportHeight(o);r=`pageX`in t?t.pageX:s+t.clientX,i=`pageY`in t?t.pageY:c+t.clientY;var d={left:r,top:i,width:0,height:0},f=r>=0&&r<=s+l&&i>=0&&i<=c+u,p=[n.points[0],`cc`];return ts(e,d,La(La({},n),{},{points:p}),f)}function as(e,t){return e===t?!0:!e||!t?!1:`pageX`in t&&`pageY`in t?e.pageX===t.pageX&&e.pageY===t.pageY:`clientX`in t&&`clientY`in t&&e.clientX===t.clientX&&e.clientY===t.clientY}function os(e,t){e!==document.activeElement&&Ue(t,e)&&typeof e.focus==`function`&&e.focus()}function ss(e,t){let n=null,r=null;function i(e){let[{target:i}]=e;if(!document.documentElement.contains(i))return;let{width:a,height:o}=i.getBoundingClientRect(),s=Math.floor(a),c=Math.floor(o);(n!==s||r!==c)&&Promise.resolve().then(()=>{t({width:s,height:c})}),n=s,r=c}let a=new fi(i);return e&&a.observe(e),()=>{a.disconnect()}}var cs=((e,t)=>{let n=!1,r=null;function i(){clearTimeout(r)}function a(o){if(!n||o===!0){if(e()===!1)return;n=!0,i(),r=setTimeout(()=>{n=!1},t.value)}else i(),r=setTimeout(()=>{n=!1,a()},t.value)}return[a,()=>{n=!1,i()}]});function ls(){this.__data__=[],this.size=0}function us(e,t){return e===t||e!==e&&t!==t}function ds(e,t){for(var n=e.length;n--;)if(us(e[n][0],t))return n;return-1}var fs=Array.prototype.splice;function ps(e){var t=this.__data__,n=ds(t,e);return n<0?!1:(n==t.length-1?t.pop():fs.call(t,n,1),--this.size,!0)}function ms(e){var t=this.__data__,n=ds(t,e);return n<0?void 0:t[n][1]}function hs(e){return ds(this.__data__,e)>-1}function gs(e,t){var n=this.__data__,r=ds(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Zs?new qs:void 0;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e{let{disabled:t,target:n,align:r,onAlign:a}=e;if(!t&&n&&o.value){let e=o.value,t,s=Gc(n),c=Kc(n);i.value.element=s,i.value.point=c,i.value.align=r;let{activeElement:l}=document;return s&&Sn(s)?t=rs(e,s,r):c&&(t=is(e,c,r)),os(l,e),a&&t&&a(e,t),!0}return!1},a(()=>e.monitorBufferTime)),l=W({cancel:()=>{}}),u=W({cancel:()=>{}}),d=()=>{let t=e.target,n=Gc(t),r=Kc(t);o.value!==u.value.element&&(u.value.cancel(),u.value.element=o.value,u.value.cancel=ss(o.value,s)),(i.value.element!==n||!as(i.value.point,r)||!Uc(i.value.align,e.align))&&(s(),l.value.element!==n&&(l.value.cancel(),l.value.element=n,l.value.cancel=ss(n,s)))};D(()=>{x(()=>{d()})}),O(()=>{x(()=>{d()})}),H(()=>e.disabled,e=>{e?c():s()},{immediate:!0,flush:`post`});let f=W(null);return H(()=>e.monitorWindowResize,e=>{e?f.value||=Yn(window,`resize`,s):f.value&&=(f.value.remove(),null)},{flush:`post`}),E(()=>{l.value.cancel(),u.value.cancel(),f.value&&f.value.remove(),c()}),n({forceAlign:()=>s(!0)}),()=>{let e=r?.default();return e?on(e[0],{ref:o},!0,!0):null}}}),Jc=d({compatConfig:{MODE:3},name:`PopupInner`,inheritAttrs:!1,props:Da,emits:[`mouseenter`,`mouseleave`,`mousedown`,`touchstart`,`align`],setup(e,t){let{expose:n,attrs:r,slots:i}=t,o=M(),c=M(),l=M(),[u,d]=Fa(y(e,`stretch`)),f=()=>{e.stretch&&d(e.getRootDomNode())},p=M(!1),m;H(()=>e.visible,t=>{clearTimeout(m),t?m=setTimeout(()=>{p.value=e.visible}):p.value=!1},{immediate:!0});let[h,g]=Pa(p,f),_=M(),v=()=>e.point?e.point:e.getRootDomNode,b=()=>{var e;(e=o.value)==null||e.forceAlign()},x=(t,n)=>{var r;let i=e.getClassNameFromAlign(n),a=l.value;l.value!==i&&(l.value=i),h.value===`align`&&(a===i?g(()=>{var e;(e=_.value)==null||e.call(_)}):Promise.resolve().then(()=>{b()}),(r=e.onAlign)==null||r.call(e,t,n))},S=a(()=>{let t=typeof e.animation==`object`?e.animation:Xt(e);return[`onAfterEnter`,`onAfterLeave`].forEach(e=>{let n=t[e];t[e]=e=>{g(),h.value=`stable`,n?.(e)}}),t}),C=()=>new Promise(e=>{_.value=e});H([S,h],()=>{!S.value&&h.value===`motion`&&g()},{immediate:!0}),n({forceAlign:b,getElement:()=>c.value.$el||c.value});let w=a(()=>!(e.align?.points&&(h.value===`align`||h.value===`stable`)));return()=>{let{zIndex:t,align:n,prefixCls:a,destroyPopupOnHide:d,onMouseenter:f,onMouseleave:m,onTouchstart:g=()=>{},onMousedown:_}=e,y=h.value,b=[G(G({},u.value),{zIndex:t,opacity:y===`motion`||y===`stable`||!p.value?null:0,pointerEvents:!p.value&&y!==`stable`?`none`:null}),r.style],T=pe(i.default?.call(i,{visible:e.visible}));T.length>1&&(T=s(`div`,{class:`${a}-content`},[T]));let E=Z(a,r.class,l.value,!e.arrow&&`${a}-arrow-hidden`),D=p.value||!e.visible?ge(S.value.name,S.value):{};return s(Gt,X(X({ref:c},D),{},{onBeforeEnter:C}),{default:()=>!d||e.visible?ie(s(qc,{target:v(),key:`popup`,ref:o,monitorWindowResize:!0,disabled:w.value,align:n,onAlign:x},{default:()=>s(`div`,{class:E,onMouseenter:f,onMouseleave:m,onMousedown:Pt(_,[`capture`]),[lr?`onTouchstartPassive`:`onTouchstart`]:Pt(g,[`capture`]),style:b},[T])}),[[st,p.value]]):null})}}}),Yc=d({compatConfig:{MODE:3},name:`Popup`,inheritAttrs:!1,props:ka,setup(e,t){let{attrs:n,slots:r,expose:i}=t,a=M(!1),o=M(!1),c=M(),l=M();return H([()=>e.visible,()=>e.mobile],()=>{a.value=e.visible,e.visible&&e.mobile&&(o.value=!0)},{immediate:!0,flush:`post`}),i({forceAlign:()=>{var e;(e=c.value)==null||e.forceAlign()},getElement:()=>c.value?.getElement()}),()=>{let t=G(G(G({},e),n),{visible:a.value}),i=o.value?s(ja,X(X({},t),{},{mobile:e.mobile,ref:c}),{default:r.default}):s(Jc,X(X({},t),{},{ref:c}),{default:r.default});return s(`div`,{ref:l},[s(Aa,t,null),i])}}});function Xc(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Zc(e,t,n){let r=e[t]||{};return G(G({},r),n)}function Qc(e,t,n,r){let{points:i}=n,a=Object.keys(e);for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e==`function`?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){let e=this.getDerivedStateFromProps(He(this),G(G({},this.$data),n));if(e===null)return;n=G(G({},n),e||{})}G(this.$data,n),this._.isMounted&&this.$forceUpdate(),x(()=>{t&&t()})},__emit(){let e=[].slice.call(arguments,0),t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;let n=this.$props[t]||this.$attrs[t];if(e.length&&n){if(Array.isArray(n))for(let t=0,r=n.length;t{let{popupPlacement:t,popupAlign:n,builtinPlacements:r}=e;return t&&r?Zc(r,t,n):n}),n=M(null);return{vcTriggerContext:C(`vcTriggerContext`,{}),popupRef:n,setPopupRef:e=>{n.value=e},triggerRef:M(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){let e=this.$props,t;return t=this.popupVisible===void 0?!!e.defaultPopupVisible:!!e.popupVisible,el.forEach(e=>{this[`fire${e}`]=t=>{this.fireEvents(e,t)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){e(`vcTriggerContext`,{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),en(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Rn.cancel(this.attachId)},methods:{updatedCal(){let e=this.$props;if(this.$data.sPopupVisible){let t;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(t=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Yn(t,`mousedown`,this.onDocumentClick)),this.touchOutsideHandler||=(t||=e.getDocument(this.getRootDomNode()),Yn(t,`touchstart`,this.onDocumentClick,lr?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(t||=e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=Yn(t,`scroll`,this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=Yn(window,`blur`,this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){let{mouseEnterDelay:t}=this.$props;this.fireEvents(`onMouseenter`,e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents(`onMousemove`,e),this.setPoint(e)},onMouseleave(e){this.fireEvents(`onMouseleave`,e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){let{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&Ue(this.popupRef?.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);let{vcTriggerContext:t={}}=this;t.onPopupMouseleave&&t.onPopupMouseleave(e)},onFocus(e){this.fireEvents(`onFocus`,e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents(`onMousedown`,e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents(`onTouchstart`,e),this.preTouchTime=Date.now()},onBlur(e){Ue(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents(`onBlur`,e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents(`onContextmenu`,e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents(`onClick`,e),this.focusTime){let e;if(this.preClickTime&&this.preTouchTime?e=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?e=this.preClickTime:this.preTouchTime&&(e=this.preTouchTime),Math.abs(e-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();let t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){let{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;let t=e.target,n=this.getRootDomNode(),r=this.getPopupDomNode();(!Ue(n,t)||this.isContextMenuOnly())&&!Ue(r,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){return this.popupRef?.getElement()||null},getRootDomNode(){let{getTriggerDOMNode:e}=this.$props;if(e){let t=this.triggerRef?.$el?.nodeName===`#comment`?null:Et(this.triggerRef);return Et(e(t))}try{let e=this.triggerRef?.$el?.nodeName===`#comment`?null:Et(this.triggerRef);if(e)return e}catch{}return Et(this)},handleGetPopupClassFromAlign(e){let t=[],{popupPlacement:n,builtinPlacements:r,prefixCls:i,alignPoint:a,getPopupClassNameFromAlign:o}=this.$props;return n&&r&&t.push(Qc(r,i,e,a)),o&&t.push(o(e)),t.join(` `)},getPopupAlign(){let{popupPlacement:e,popupAlign:t,builtinPlacements:n}=this.$props;return e&&n?Zc(n,e,t):t},getComponent(){let e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[lr?`onTouchstartPassive`:`onTouchstart`]=this.onPopupMouseDown;let{handleGetPopupClassFromAlign:t,getRootDomNode:n,$attrs:r}=this,{prefixCls:i,destroyPopupOnHide:a,popupClassName:o,popupAnimation:c,popupTransitionName:l,popupStyle:u,mask:d,maskAnimation:f,maskTransitionName:p,zIndex:m,stretch:h,alignPoint:g,mobile:_,arrow:v,forceRender:y}=this.$props,{sPopupVisible:b,point:x}=this.$data,S=G(G({prefixCls:i,arrow:v,destroyPopupOnHide:a,visible:b,point:g?x:null,align:this.align,animation:c,getClassNameFromAlign:t,stretch:h,getRootDomNode:n,mask:d,zIndex:m,transitionName:l,maskAnimation:f,maskTransitionName:p,class:o,style:u,onAlign:r.onPopupAlign||Ta},e),{ref:this.setPopupRef,mobile:_,forceRender:y});return s(Yc,S,{default:this.$slots.popup||(()=>Ie(this,`popup`))})},attachParent(e){Rn.cancel(this.attachId);let{getPopupContainer:t,getDocument:n}=this.$props,r=this.getRootDomNode(),i;t?(r||t.length===0)&&(i=t(r)):i=n(this.getRootDomNode()).body,i?i.appendChild(e):this.attachId=Rn(()=>{this.attachParent(e)})},getContainer(){let{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement(`div`);return n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.width=`100%`,this.attachParent(n),n},setPopupVisible(e,t){let{alignPoint:n,sPopupVisible:r,onPopupVisibleChange:i}=this;this.clearDelayTimer(),r!==e&&(Ke(this,`popupVisible`)||this.setState({sPopupVisible:e,prevPopupVisible:r}),i&&i(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){let{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){let r=t*1e3;if(this.clearDelayTimer(),r){let t=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,t),this.clearDelayTimer()},r)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&=(clearTimeout(this.delayTimer),null)},clearOutsideHandler(){this.clickOutsideHandler&&=(this.clickOutsideHandler.remove(),null),this.contextmenuOutsideHandler1&&=(this.contextmenuOutsideHandler1.remove(),null),this.contextmenuOutsideHandler2&&=(this.contextmenuOutsideHandler2.remove(),null),this.touchOutsideHandler&&=(this.touchOutsideHandler.remove(),null)},createTwoChains(e){let t=()=>{},n=Re(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`click`)!==-1||t.indexOf(`click`)!==-1},isContextMenuOnly(){let{action:e}=this.$props;return e===`contextmenu`||e.length===1&&e[0]===`contextmenu`},isContextmenuToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`contextmenu`)!==-1||t.indexOf(`contextmenu`)!==-1},isClickToHide(){let{action:e,hideAction:t}=this.$props;return e.indexOf(`click`)!==-1||t.indexOf(`click`)!==-1},isMouseEnterToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`hover`)!==-1||t.indexOf(`mouseenter`)!==-1},isMouseLeaveToHide(){let{action:e,hideAction:t}=this.$props;return e.indexOf(`hover`)!==-1||t.indexOf(`mouseleave`)!==-1},isFocusToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`focus`)!==-1||t.indexOf(`focus`)!==-1},isBlurToHide(){let{action:e,hideAction:t}=this.$props;return e.indexOf(`focus`)!==-1||t.indexOf(`blur`)!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)==null||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);let n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){let{$attrs:e}=this,t=ve(Oe(this)),{alignPoint:n,getPopupContainer:r}=this.$props,i=t[0];this.childOriginEvents=Re(i);let a={key:`trigger`};a.onContextmenu=this.isContextmenuToShow()?this.onContextmenu:this.createTwoChains(`onContextmenu`),this.isClickToHide()||this.isClickToShow()?(a.onClick=this.onClick,a.onMousedown=this.onMousedown,a[lr?`onTouchstartPassive`:`onTouchstart`]=this.onTouchstart):(a.onClick=this.createTwoChains(`onClick`),a.onMousedown=this.createTwoChains(`onMousedown`),a[lr?`onTouchstartPassive`:`onTouchstart`]=this.createTwoChains(`onTouchstart`)),this.isMouseEnterToShow()?(a.onMouseenter=this.onMouseenter,n&&(a.onMousemove=this.onMouseMove)):a.onMouseenter=this.createTwoChains(`onMouseenter`),a.onMouseleave=this.isMouseLeaveToHide()?this.onMouseleave:this.createTwoChains(`onMouseleave`),this.isFocusToShow()||this.isBlurToHide()?(a.onFocus=this.onFocus,a.onBlur=this.onBlur):(a.onFocus=this.createTwoChains(`onFocus`),a.onBlur=e=>{e&&(!e.relatedTarget||!Ue(e.target,e.relatedTarget))&&this.createTwoChains(`onBlur`)(e)});let o=Z(i&&i.props&&i.props.class,e.class);o&&(a.class=o);let c=on(i,G(G({},a),{ref:`triggerRef`}),!0,!0),l=s(qn,{key:`portal`,getContainer:r&&(()=>r(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return s(v,null,[c,l])}}),nl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},il=d({name:`SelectTrigger`,inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:J.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:J.oneOfType([Number,Boolean]).def(!0),popupElement:J.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:n,attrs:r,expose:i}=t,o=a(()=>{let{dropdownMatchSelectWidth:t}=e;return rl(t)}),c=W();return i({getPopupElement:()=>c.value}),()=>{let t=G(G({},e),r),{empty:i=!1}=t,{visible:a,dropdownAlign:l,prefixCls:u,popupElement:d,dropdownClassName:f,dropdownStyle:p,direction:m=`ltr`,placement:h,dropdownMatchSelectWidth:g,containerWidth:_,dropdownRender:v,animation:y,transitionName:b,getPopupContainer:x,getTriggerDOMNode:S,onPopupVisibleChange:C,onPopupMouseEnter:w,onPopupFocusin:T,onPopupFocusout:E}=nl(t,[`empty`]),D=`${u}-dropdown`,O=d;v&&(O=v({menuNode:d,props:e}));let k=y?`${D}-${y}`:b,A=G({minWidth:`${_}px`},p);return typeof g==`number`?A.width=`${g}px`:g&&(A.width=`${_}px`),s(tl,X(X({},e),{},{showAction:C?[`click`]:[],hideAction:C?[`click`]:[],popupPlacement:h||(m===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:o.value,prefixCls:D,popupTransitionName:k,popupAlign:l,popupVisible:a,getPopupContainer:x,popupClassName:Z(f,{[`${D}-empty`]:i}),popupStyle:A,getTriggerDOMNode:S,onPopupVisibleChange:C}),{default:n.default,popup:()=>s(`div`,{ref:c,onMouseenter:w,onFocusin:T,onFocusout:E},[O])})}}}),al=(e,t)=>{let{slots:n}=t,{class:r,customizeIcon:i,customizeIconProps:a,onMousedown:c,onClick:u}=e,d;return d=typeof i==`function`?i(a):l(i)?o(i):i,s(`span`,{class:r,onMousedown:e=>{e.preventDefault(),c&&c(e)},style:{userSelect:`none`,WebkitUserSelect:`none`},unselectable:`on`,onClick:u,"aria-hidden":!0},[d===void 0?s(`span`,{class:r.split(/\s+/).map(e=>`${e}-icon`)},[n.default?.call(n)]):d])};al.inheritAttrs=!1,al.displayName=`TransBtn`,al.props={class:String,customizeIcon:J.any,customizeIconProps:J.any,onMousedown:Function,onClick:Function};var ol=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur()},input:r,setSelectionRange:(e,t,n)=>{var i;(i=r.value)==null||i.setSelectionRange(e,t,n)},select:()=>{var e;(e=r.value)==null||e.select()},getSelectionStart:()=>r.value?.selectionStart,getSelectionEnd:()=>r.value?.selectionEnd,getScrollTop:()=>r.value?.scrollTop}),()=>{let{tag:t,value:n}=e,i=ol(e,[`tag`,`value`]);return s(t,X(X({},i),{},{ref:r,value:n}),null)}}});function cl(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function ll(e){let t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.scrollX||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.scrollY||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function ul(e){return Array.prototype.slice.apply(e).map(t=>`${t}: ${e.getPropertyValue(t)};`).join(``)}function dl(e){return Object.keys(e).reduce((t,n)=>(e[n]==null||(t+=`${n}: ${e[n]};`),t),``)}var fl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);ie.value,l],()=>{l.value||(c.value=e.value)},{immediate:!0});let u=e=>{n(`change`,e)},d=e=>{l.value=!0,e.target.composing=!0,n(`compositionstart`,e)},f=e=>{l.value=!1,e.target.composing=!1,n(`compositionend`,e);let t=document.createEvent(`HTMLEvents`);t.initEvent(`input`,!0,!0),e.target.dispatchEvent(t),u(e)},p=t=>{if(l.value&&e.lazy){c.value=t.target.value;return}n(`input`,t)},m=e=>{n(`blur`,e)},h=e=>{n(`focus`,e)},g=()=>{o.value&&o.value.focus()},_=()=>{o.value&&o.value.blur()},v=e=>{n(`keydown`,e)},y=e=>{n(`keyup`,e)};i({focus:g,blur:_,input:a(()=>o.value?.input),setSelectionRange:(e,t,n)=>{var r;(r=o.value)==null||r.setSelectionRange(e,t,n)},select:()=>{var e;(e=o.value)==null||e.select()},getSelectionStart:()=>o.value?.getSelectionStart(),getSelectionEnd:()=>o.value?.getSelectionEnd(),getScrollTop:()=>o.value?.getScrollTop()});let b=e=>{n(`mousedown`,e)},x=e=>{n(`paste`,e)},S=a(()=>e.style&&typeof e.style!=`string`?dl(e.style):e.style);return()=>{let{style:t,lazy:n}=e,i=fl(e,[`style`,`lazy`]);return s(sl,X(X(X({},i),r),{},{style:S.value,onInput:p,onChange:u,onBlur:m,onFocus:h,ref:o,value:c.value,onCompositionstart:d,onCompositionend:f,onKeyup:y,onKeydown:v,onPaste:x,onMousedown:b}),null)}}}),ml={inputRef:J.any,prefixCls:String,id:String,inputElement:J.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:J.oneOfType([J.number,J.string]),attrs:J.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},hl=d({compatConfig:{MODE:3},name:`SelectInput`,inheritAttrs:!1,props:ml,setup(e){let t=null,n=C(`VCSelectContainerEvent`);return()=>{let{prefixCls:r,id:i,inputElement:a,disabled:o,tabindex:c,autofocus:l,autocomplete:u,editable:d,activeDescendantId:f,value:p,onKeydown:m,onMousedown:h,onChange:g,onPaste:_,onCompositionstart:v,onCompositionend:y,onFocus:b,onBlur:x,open:S,inputRef:C,attrs:w}=e,T=a||s(pl,null,null),E=T.props||{},{onKeydown:D,onInput:O,onFocus:k,onBlur:A,onMousedown:j,onCompositionstart:M,onCompositionend:N,style:P}=E;return T=on(T,G(G(G(G(G({type:`search`},E),{id:i,ref:C,disabled:o,tabindex:c,lazy:!1,autocomplete:u||`off`,autofocus:l,class:Z(`${r}-selection-search-input`,T?.props?.class),role:`combobox`,"aria-expanded":S,"aria-haspopup":`listbox`,"aria-owns":`${i}_list`,"aria-autocomplete":`list`,"aria-controls":`${i}_list`,"aria-activedescendant":f}),w),{value:d?p:``,readonly:!d,unselectable:d?null:`on`,style:G(G({},P),{opacity:d?null:0}),onKeydown:e=>{m(e),D&&D(e)},onMousedown:e=>{h(e),j&&j(e)},onInput:e=>{g(e),O&&O(e)},onCompositionstart(e){v(e),M&&M(e)},onCompositionend(e){y(e),N&&N(e)},onPaste:_,onFocus:function(){clearTimeout(t),k&&k(arguments.length<=0?void 0:arguments[0]),b&&b(arguments.length<=0?void 0:arguments[0]),n?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){var e=[...arguments];t=setTimeout(()=>{A&&A(e[0]),x&&x(e[0]),n?.blur(e[0])},100)}}),T.type===`textarea`?{}:{type:`search`}),!0,!0),T}}}),gl=Symbol(`OverflowContextProviderKey`),_l=d({compatConfig:{MODE:3},name:`OverflowContextProvider`,inheritAttrs:!1,props:{value:{type:Object}},setup(t,n){let{slots:r}=n;return e(gl,a(()=>t.value)),()=>r.default?.call(r)}}),vl=()=>C(gl,a(()=>null)),yl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);ie.responsive&&!e.display),o=W();r({itemNodeRef:o});function c(t){e.registerSize(e.itemKey,t)}return E(()=>{c(null)}),()=>{let{prefixCls:t,invalidate:r,item:a,renderItem:l,responsive:u,registerSize:d,itemKey:f,display:p,order:m,component:h=`div`}=e,g=yl(e,[`prefixCls`,`invalidate`,`item`,`renderItem`,`responsive`,`registerSize`,`itemKey`,`display`,`order`,`component`]),_=n.default?.call(n),v=l&&a!==bl?l(a):_,y;r||(y={opacity:+!i.value,height:i.value?0:bl,overflowY:i.value?`hidden`:bl,order:u?m:bl,pointerEvents:i.value?`none`:bl,position:i.value?`absolute`:bl});let b={};return i.value&&(b[`aria-hidden`]=!0),s(pi,{disabled:!u,onResize:e=>{let{offsetWidth:t}=e;c(t)}},{default:()=>s(h,X(X(X({class:Z(!r&&t),style:y},b),g),{},{ref:o}),{default:()=>[v]})})}}}),Sl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{if(!i.value){let{component:t=`div`}=e,i=Sl(e,[`component`]);return s(t,X(X({},i),r),{default:()=>[n.default?.call(n)]})}let t=i.value,{className:a}=t,o=Sl(t,[`className`]),{class:c}=r,l=Sl(r,[`class`]);return s(_l,{value:null},{default:()=>[s(xl,X(X(X({class:Z(a,c)},o),l),e),n)]})}}}),wl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);ie.ssr===`full`),c=M(null),l=a(()=>c.value||0),u=M(new Map),d=M(0),f=M(0),p=M(0),m=M(null),h=M(null),g=a(()=>h.value===null&&o.value?2**53-1:h.value||0),_=M(!1),v=a(()=>`${e.prefixCls}-item`),y=a(()=>Math.max(d.value,f.value)),b=a(()=>!!(e.data.length&&e.maxCount===Tl)),x=a(()=>e.maxCount===El),S=a(()=>b.value||typeof e.maxCount==`number`&&e.data.length>e.maxCount),C=a(()=>{let t=e.data;return b.value?t=c.value===null&&o.value?e.data:e.data.slice(0,Math.min(e.data.length,l.value/e.itemWidth)):typeof e.maxCount==`number`&&(t=e.data.slice(0,e.maxCount)),t}),w=a(()=>b.value?e.data.slice(g.value+1):e.data.slice(C.value.length)),T=(t,n)=>typeof e.itemKey==`function`?e.itemKey(t):(e.itemKey&&t?.[e.itemKey])??n,E=a(()=>e.renderItem||(e=>e)),D=(t,n)=>{h.value=t,n||(_.value=t{c.value=t.clientWidth},k=(e,t)=>{let n=new Map(u.value);t===null?n.delete(e):n.set(e,t),u.value=n},A=(e,t)=>{d.value=f.value,f.value=t},j=(e,t)=>{p.value=t},N=e=>u.value.get(T(C.value[e],e));return H([l,u,f,p,()=>e.itemKey,C],()=>{if(l.value&&y.value&&C.value){let t=p.value,n=C.value.length,r=n-1;if(!n){D(0),m.value=null;return}for(let e=0;el.value){D(e-1),m.value=t-n-p.value+f.value;break}}e.suffix&&N(0)+p.value>l.value&&(m.value=null)}}),()=>{let t=_.value&&!!w.value.length,{itemComponent:r,renderRawItem:a,renderRawRest:o,renderRest:c,prefixCls:l=`rc-overflow`,suffix:u,component:d=`div`,id:f,onMousedown:p}=e,{class:h,style:y}=n,D=wl(n,[`class`,`style`]),M={};m.value!==null&&b.value&&(M={position:`absolute`,left:`${m.value}px`,top:0});let N={prefixCls:v.value,responsive:b.value,component:r,invalidate:x.value},P=a?(e,t)=>{let n=T(e,t);return s(_l,{key:n,value:G(G({},N),{order:t,item:e,itemKey:n,registerSize:k,display:t<=g.value})},{default:()=>[a(e,t)]})}:(e,t)=>{let n=T(e,t);return s(xl,X(X({},N),{},{order:t,key:n,item:e,renderItem:E.value,itemKey:n,registerSize:k,display:t<=g.value}),null)},F=()=>null,I={order:t?g.value:2**53-1,className:`${v.value} ${v.value}-rest`,registerSize:A,display:t};if(o)o&&(F=()=>s(_l,{value:G(G({},N),I)},{default:()=>[o(w.value)]}));else{let e=c||Dl;F=()=>s(xl,X(X({},N),I),{default:()=>typeof e==`function`?e(w.value):e})}return s(pi,{disabled:!b.value,onResize:O},{default:()=>s(d,X({id:f,class:Z(!x.value&&l,h),style:y,onMousedown:p,role:e.role},D),{default:()=>[C.value.map(P),S.value?F():null,u&&s(xl,X(X({},N),{},{order:g.value,class:`${v.value}-suffix`,registerSize:j,display:!0,style:M}),{default:()=>u}),i.default?.call(i)]})})}}});Ol.Item=Cl,Ol.RESPONSIVE=Tl,Ol.INVALIDATE=El;var kl=Ol,Al=Symbol(`TreeSelectLegacyContextPropsKey`);function jl(t){return e(Al,t)}function Ml(){return C(Al,{})}var Nl={id:String,prefixCls:String,values:J.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:J.any,placeholder:J.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:J.oneOfType([J.number,J.string]),compositionStatus:Boolean,removeIcon:J.any,choiceTransitionName:String,maxTagCount:J.oneOfType([J.number,J.string]),maxTagTextLength:Number,maxTagPlaceholder:J.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Pl=e=>{e.preventDefault(),e.stopPropagation()},Fl=d({name:`MultipleSelectSelector`,inheritAttrs:!1,props:Nl,setup(e){let t=M(),n=M(0),r=M(!1),i=Ml(),o=a(()=>`${e.prefixCls}-selection`),c=a(()=>e.open||e.mode===`tags`?e.searchValue:``),l=a(()=>e.mode===`tags`||e.showSearch&&(e.open||r.value)),u=W(``);P(()=>{u.value=c.value}),D(()=>{H(u,()=>{n.value=t.value.scrollWidth},{flush:`post`,immediate:!0})});function d(t,n,r,i,a){return s(`span`,{class:Z(`${o.value}-item`,{[`${o.value}-item-disabled`]:r}),title:typeof t==`string`||typeof t==`number`?t.toString():void 0},[s(`span`,{class:`${o.value}-item-content`},[n]),i&&s(al,{class:`${o.value}-item-remove`,onMousedown:Pl,onClick:a,customizeIcon:e.removeIcon},{default:()=>[g(`×`)]})])}function f(t,n,r,a,o,c){let l=t=>{Pl(t),e.onToggleOpen(!open)},u=c;return i.keyEntities&&(u=i.keyEntities[t]?.node||{}),s(`span`,{key:t,onMousedown:l},[e.tagRender({label:n,value:t,disabled:r,closable:a,onClose:o,option:u})])}function p(t){let{disabled:n,label:r,value:i,option:a}=t,o=!e.disabled&&!n,s=r;if(typeof e.maxTagTextLength==`number`&&(typeof r==`string`||typeof r==`number`)){let t=String(s);t.length>e.maxTagTextLength&&(s=`${t.slice(0,e.maxTagTextLength)}...`)}let c=n=>{var r;n&&n.stopPropagation(),(r=e.onRemove)==null||r.call(e,t)};return typeof e.tagRender==`function`?f(i,s,n,o,c,a):d(r,s,n,o,c)}function m(t){let{maxTagPlaceholder:n=e=>`+ ${e.length} ...`}=e,r=typeof n==`function`?n(t):n;return d(r,r,!1)}let h=t=>{let n=t.target.composing;u.value=t.target.value,n||e.onInputChange(t)};return()=>{let{id:i,prefixCls:a,values:d,open:f,inputRef:_,placeholder:y,disabled:b,autofocus:x,autocomplete:S,activeDescendantId:C,tabindex:w,compositionStatus:T,onInputPaste:E,onInputKeyDown:D,onInputMouseDown:O,onInputCompositionStart:k,onInputCompositionEnd:A}=e,j=s(`div`,{class:`${o.value}-search`,style:{width:n.value+`px`},key:`input`},[s(hl,{inputRef:_,open:f,prefixCls:a,id:i,inputElement:null,disabled:b,autofocus:x,autocomplete:S,editable:l.value,activeDescendantId:C,value:u.value,onKeydown:D,onMousedown:O,onChange:h,onPaste:E,onCompositionstart:k,onCompositionend:A,tabindex:w,attrs:un(e,!0),onFocus:()=>r.value=!0,onBlur:()=>r.value=!1},null),s(`span`,{ref:t,class:`${o.value}-search-mirror`,"aria-hidden":!0},[u.value,g(`\xA0`)])]),M=s(kl,{prefixCls:`${o.value}-overflow`,data:d,renderItem:p,renderRest:m,suffix:j,itemKey:`key`,maxCount:e.maxTagCount,key:`overflow`},null);return s(v,null,[M,!d.length&&!c.value&&!T&&s(`span`,{class:`${o.value}-placeholder`},[y])])}}}),Il={inputElement:J.any,id:String,prefixCls:String,values:J.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:J.any,placeholder:J.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:J.oneOfType([J.number,J.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Ll=d({name:`SingleSelector`,setup(e){let t=M(!1),n=a(()=>e.mode===`combobox`),r=a(()=>n.value||e.showSearch),i=a(()=>{let r=e.searchValue||``;return n.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),o=Ml();H([n,()=>e.activeValue],()=>{n.value&&(t.value=!1)},{immediate:!0});let c=a(()=>e.mode!==`combobox`&&!e.open&&!e.showSearch?!1:!!i.value||e.compositionStatus),l=a(()=>{let t=e.values[0];return t&&(typeof t.label==`string`||typeof t.label==`number`)?t.label.toString():void 0}),u=()=>{if(e.values[0])return null;let t=c.value?{visibility:`hidden`}:void 0;return s(`span`,{class:`${e.prefixCls}-selection-placeholder`,style:t},[e.placeholder])},d=n=>{n.target.composing||(t.value=!0,e.onInputChange(n))};return()=>{let{inputElement:t,prefixCls:a,id:f,values:p,inputRef:m,disabled:h,autofocus:g,autocomplete:_,activeDescendantId:y,open:b,tabindex:x,optionLabelRender:S,onInputKeyDown:C,onInputMouseDown:w,onInputPaste:T,onInputCompositionStart:E,onInputCompositionEnd:D}=e,O=p[0],k=null;if(O&&o.customSlots){let e=O.key??O.value,t=o.keyEntities[e]?.node||{};k=o.customSlots[t.slots?.title]||o.customSlots.title||O.label,typeof k==`function`&&(k=k(t))}else k=S&&O?S(O.option):O?.label;return s(v,null,[s(`span`,{class:`${a}-selection-search`},[s(hl,{inputRef:m,prefixCls:a,id:f,open:b,inputElement:t,disabled:h,autofocus:g,autocomplete:_,editable:r.value,activeDescendantId:y,value:i.value,onKeydown:C,onMousedown:w,onChange:d,onPaste:T,onCompositionstart:E,onCompositionend:D,tabindex:x,attrs:un(e,!0)},null)]),!n.value&&O&&!c.value&&s(`span`,{class:`${a}-selection-item`,title:l.value},[s(v,{key:O.key??O.value},[k])]),u()])}}});Ll.props=Il,Ll.inheritAttrs=!1;function Rl(e){return![$.ESC,$.SHIFT,$.BACKSPACE,$.TAB,$.WIN_KEY,$.ALT,$.META,$.WIN_KEY_RIGHT,$.CTRL,$.SEMICOLON,$.EQUALS,$.CAPS_LOCK,$.CONTEXT_MENU,$.F1,$.F2,$.F3,$.F4,$.F5,$.F6,$.F7,$.F8,$.F9,$.F10,$.F11,$.F12].includes(e)}function zl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,n;p(()=>{clearTimeout(n)});function r(r){(r||t===null)&&(t=r),clearTimeout(n),n=setTimeout(()=>{t=null},e)}return[()=>t,r]}function Bl(){let e=t=>{e.current=t};return e}var Vl=d({name:`Selector`,inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:J.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:J.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:J.oneOfType([J.number,J.string]),disabled:{type:Boolean,default:void 0},placeholder:J.any,removeIcon:J.any,maxTagCount:J.oneOfType([J.number,J.string]),maxTagTextLength:Number,maxTagPlaceholder:J.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:n}=t,r=Bl(),i=W(!1),[a,o]=zl(0),c=t=>{let{which:n}=t;(n===$.UP||n===$.DOWN)&&t.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(t),n===$.ENTER&&e.mode===`tags`&&!i.value&&!e.open&&e.onSearchSubmit(t.target.value),Rl(n)&&e.onToggleOpen(!0)},l=()=>{o(!0)},u=null,d=t=>{e.onSearch(t,!0,i.value)!==!1&&e.onToggleOpen(!0)},f=()=>{i.value=!0},p=t=>{i.value=!1,e.mode!==`combobox`&&d(t.target.value)},m=t=>{let{target:{value:n}}=t;if(e.tokenWithEnter&&u&&/[\r\n]/.test(u)){let e=u.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);n=n.replace(e,u)}u=null,d(n)},h=e=>{let{clipboardData:t}=e;u=t.getData(`text`)},g=e=>{let{target:t}=e;t!==r.current&&(document.body.style.msTouchAction===void 0?r.current.focus():setTimeout(()=>{r.current.focus()}))},_=t=>{let n=a();t.target!==r.current&&!n&&t.preventDefault(),(e.mode!==`combobox`&&(!e.showSearch||!n)||!e.open)&&(e.open&&e.onSearch(``,!0,!1),e.onToggleOpen())};return n({focus:()=>{r.current.focus()},blur:()=>{r.current.blur()}}),()=>{let{prefixCls:t,domRef:n,mode:a}=e,o={inputRef:r,onInputKeyDown:c,onInputMouseDown:l,onInputChange:m,onInputPaste:h,compositionStatus:i.value,onInputCompositionStart:f,onInputCompositionEnd:p},u=s(a===`multiple`||a===`tags`?Fl:Ll,X(X({},e),o),null);return s(`div`,{ref:n,class:`${t}-selector`,onClick:g,onMousedown:_},[u])}}});function Hl(e,t,n){function r(r){let i=r.target;i.shadowRoot&&r.composed&&(i=r.composedPath()[0]||i);let a=[e[0]?.value,(e[1]?.value)?.getPopupElement()];t.value&&a.every(e=>e&&!e.contains(i)&&e!==i)&&n(!1)}D(()=>{window.addEventListener(`mousedown`,r)}),p(()=>{window.removeEventListener(`mousedown`,r)})}function Ul(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=M(!1),n,r=()=>{clearTimeout(n)};return D(()=>{r()}),[t,(i,a)=>{r(),n=setTimeout(()=>{t.value=i,a&&a()},e)},r]}var Wl=Symbol(`BaseSelectContextKey`);function Gl(t){return e(Wl,t)}function Kl(){return C(Wl,{})}var ql=(()=>{if(typeof navigator>`u`||typeof window>`u`)return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substring(0,4))});function Jl(e){if(!B(e))return k(e);let t=new Proxy({},{get(t,n,r){return Reflect.get(e.value,n,r)},set(t,n,r){return e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return k(t)}var Yl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:J.any,emptyOptions:Boolean}),Ql=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:J.any,placeholder:J.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:J.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:J.any,clearIcon:J.any,removeIcon:J.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),$l=()=>G(G({},Zl()),Ql());function eu(e){return e===`tags`||e===`multiple`}var tu=d({compatConfig:{MODE:3},name:`BaseSelect`,inheritAttrs:!1,props:Vn($l(),{showAction:[],notFoundContent:`Not Found`}),setup(t,n){let{attrs:r,expose:o,slots:c}=n,l=a(()=>eu(t.mode)),u=a(()=>t.showSearch===void 0?l.value||t.mode===`combobox`:t.showSearch),d=M(!1);D(()=>{d.value=ql()});let f=Ml(),m=M(null),h=Bl(),_=M(null),v=M(null),y=M(null),b=W(!1),[x,S,C]=Ul();o({focus:()=>{var e;(e=v.value)==null||e.focus()},blur:()=>{var e;(e=v.value)==null||e.blur()},scrollTo:e=>y.value?.scrollTo(e)});let w=a(()=>{if(t.mode!==`combobox`)return t.searchValue;let e=t.displayValues[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``}),T=t.open===void 0?t.defaultOpen:t.open,E=M(T),O=M(T),k=e=>{E.value=t.open===void 0?e:t.open,O.value=E.value};H(()=>t.open,()=>{k(t.open)});let A=a(()=>!t.notFoundContent&&t.emptyOptions);P(()=>{O.value=E.value,(t.disabled||A.value&&O.value&&t.mode===`combobox`)&&(O.value=!1)});let j=a(()=>!A.value&&O.value),N=e=>{let n=e===void 0?!O.value:e;O.value!==n&&!t.disabled&&(k(n),t.onDropdownVisibleChange&&t.onDropdownVisibleChange(n),!n&&re.value&&(re.value=!1,S(!1,()=>{V.value=!1,b.value=!1})))},F=a(()=>(t.tokenSeparators||[]).some(e=>[` `,`\r `].includes(e))),I=(e,n,r)=>{var i,a;let o=!0,s=e;(i=t.onActiveValueChange)==null||i.call(t,null);let c=r?null:Sa(e,t.tokenSeparators);return t.mode!==`combobox`&&c&&(s=``,(a=t.onSearchSplit)==null||a.call(t,c),N(!1),o=!1),t.onSearch&&w.value!==s&&t.onSearch(s,{source:n?`typing`:`effect`}),o},L=e=>{var n;!e||!e.trim()||(n=t.onSearch)==null||n.call(t,e,{source:`submit`})};H(O,()=>{!O.value&&!l.value&&t.mode!==`combobox`&&I(``,!1,!1)},{immediate:!0,flush:`post`}),H(()=>t.disabled,()=>{E.value&&t.disabled&&k(!1),t.disabled&&!b.value&&S(!1)},{immediate:!0});let[ee,R]=zl(),z=function(e){var n;let r=ee(),{which:i}=e;if(i===$.ENTER&&(t.mode!==`combobox`&&e.preventDefault(),O.value||N(!0)),R(!!w.value),i===$.BACKSPACE&&!r&&l.value&&!w.value&&t.displayValues.length){let e=[...t.displayValues],n=null;for(let t=e.length-1;t>=0;--t){let r=e[t];if(!r.disabled){e.splice(t,1),n=r;break}}n&&t.onDisplayValuesChange(e,{type:`remove`,values:[n]})}var a=[...arguments].slice(1);O.value&&y.value&&y.value.onKeydown(e,...a),(n=t.onKeydown)==null||n.call(t,e,...a)},B=function(e){var n=[...arguments].slice(1);O.value&&y.value&&y.value.onKeyup(e,...n),t.onKeyup&&t.onKeyup(e,...n)},te=e=>{let n=t.displayValues.filter(t=>t!==e);t.onDisplayValuesChange(n,{type:`remove`,values:[e]})},V=M(!1),ne=function(){S(!0),t.disabled||(t.onFocus&&!V.value&&t.onFocus(...arguments),t.showAction&&t.showAction.includes(`focus`)&&N(!0)),V.value=!0},re=W(!1),U=function(){if(re.value||(b.value=!0,S(!1,()=>{V.value=!1,b.value=!1,N(!1)}),t.disabled))return;let e=w.value;e&&(t.mode===`tags`?t.onSearch(e,{source:`submit`}):t.mode===`multiple`&&t.onSearch(``,{source:`blur`})),t.onBlur&&t.onBlur(...arguments)},ie=()=>{re.value=!0},ae=()=>{re.value=!1};e(`VCSelectContainerEvent`,{focus:ne,blur:U});let oe=[];D(()=>{oe.forEach(e=>clearTimeout(e)),oe.splice(0,oe.length)}),p(()=>{oe.forEach(e=>clearTimeout(e)),oe.splice(0,oe.length)});let se=function(e){var n;let{target:r}=e,i=_.value?.getPopupElement();if(i&&i.contains(r)){let e=setTimeout(()=>{var t;let n=oe.indexOf(e);n!==-1&&oe.splice(n,1),C(),!d.value&&!i.contains(document.activeElement)&&((t=v.value)==null||t.focus())});oe.push(e)}var a=[...arguments].slice(1);(n=t.onMousedown)==null||n.call(t,e,...a)},ce=M(null),le=()=>{};return D(()=>{H(j,()=>{if(j.value){let e=Math.ceil(m.value?.offsetWidth);ce.value!==e&&!Number.isNaN(e)&&(ce.value=e)}},{immediate:!0,flush:`post`})}),Hl([m,_],j,N),Gl(Jl(G(G({},i(t)),{open:O,triggerOpen:j,showSearch:u,multiple:l,toggleOpen:N}))),()=>{let e=G(G({},t),r),{prefixCls:n,id:i,open:a,defaultOpen:o,mode:d,showSearch:p,searchValue:b,onSearch:S,allowClear:C,clearIcon:T,showArrow:E,inputIcon:D,disabled:k,loading:A,getInputElement:M,getPopupContainer:P,placement:ee,animation:R,transitionName:V,dropdownStyle:ne,dropdownClassName:re,dropdownMatchSelectWidth:H,dropdownRender:U,dropdownAlign:W,showAction:oe,direction:ue,tokenSeparators:de,tagRender:fe,optionLabelRender:pe,onPopupScroll:me,onDropdownVisibleChange:he,onFocus:ge,onBlur:_e,onKeyup:K,onKeydown:ve,onMousedown:ye,onClear:be,omitDomProps:xe,getRawInputElement:Se,displayValues:Ce,onDisplayValuesChange:we,emptyOptions:Te,activeDescendantId:Ee,activeValue:De,OptionList:Oe}=e,ke=Yl(e,`prefixCls.id.open.defaultOpen.mode.showSearch.searchValue.onSearch.allowClear.clearIcon.showArrow.inputIcon.disabled.loading.getInputElement.getPopupContainer.placement.animation.transitionName.dropdownStyle.dropdownClassName.dropdownMatchSelectWidth.dropdownRender.dropdownAlign.showAction.direction.tokenSeparators.tagRender.optionLabelRender.onPopupScroll.onDropdownVisibleChange.onFocus.onBlur.onKeyup.onKeydown.onMousedown.onClear.omitDomProps.getRawInputElement.displayValues.onDisplayValuesChange.emptyOptions.activeDescendantId.activeValue.OptionList`.split(`.`)),Ae=d===`combobox`&&M&&M()||null,je=typeof Se==`function`&&Se(),Me=G({},ke),Ne;je&&(Ne=e=>{N(e)}),Xl.forEach(e=>{delete Me[e]}),xe?.forEach(e=>{delete Me[e]});let Pe=E===void 0?A||!l.value&&d!==`combobox`:E,Fe;Pe&&(Fe=s(al,{class:Z(`${n}-arrow`,{[`${n}-arrow-loading`]:A}),customizeIcon:D,customizeIconProps:{loading:A,searchValue:w.value,open:O.value,focused:x.value,showSearch:u.value}},null));let Ie;!k&&C&&(Ce.length||w.value)&&(Ie=s(al,{class:`${n}-clear`,onMousedown:()=>{be?.(),we([],{type:`clear`,values:Ce}),I(``,!1,!1)},customizeIcon:T},{default:()=>[g(`×`)]}));let Le=s(Oe,{ref:y},G(G({},f.customSlots),{option:c.option})),Re=Z(n,r.class,{[`${n}-focused`]:x.value,[`${n}-multiple`]:l.value,[`${n}-single`]:!l.value,[`${n}-allow-clear`]:C,[`${n}-show-arrow`]:Pe,[`${n}-disabled`]:k,[`${n}-loading`]:A,[`${n}-open`]:O.value,[`${n}-customize-input`]:Ae,[`${n}-show-search`]:u.value}),ze=s(il,{ref:_,disabled:k,prefixCls:n,visible:j.value,popupElement:Le,containerWidth:ce.value,animation:R,transitionName:V,dropdownStyle:ne,dropdownClassName:re,direction:ue,dropdownMatchSelectWidth:H,dropdownRender:U,dropdownAlign:W,placement:ee,getPopupContainer:P,empty:Te,getTriggerDOMNode:()=>h.current,onPopupVisibleChange:Ne,onPopupMouseEnter:le,onPopupFocusin:ie,onPopupFocusout:ae},{default:()=>je?Xe(je)&&on(je,{ref:h},!1,!0):s(Vl,X(X({},t),{},{domRef:h,prefixCls:n,inputElement:Ae,ref:v,id:i,showSearch:u.value,mode:d,activeDescendantId:Ee,tagRender:fe,optionLabelRender:pe,values:Ce,open:O.value,onToggleOpen:N,activeValue:De,searchValue:w.value,onSearch:I,onSearchSubmit:L,onRemove:te,tokenWithEnter:F.value}),null)}),Be;return Be=je?ze:s(`div`,X(X({},Me),{},{class:Re,ref:m,onMousedown:se,onKeydown:z,onKeyup:B}),[x.value&&!O.value&&s(`span`,{style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0},"aria-live":`polite`},[`${Ce.map(e=>{let{label:t,value:n}=e;return[`number`,`string`].includes(typeof t)?t:n}).join(`, `)}`]),ze,Fe,Ie]),Be}}}),nu=(e,t)=>{let{height:n,offset:r,prefixCls:i,onInnerResize:a}=e,{slots:o}=t,c={},l={display:`flex`,flexDirection:`column`};return r!==void 0&&(c={height:`${n}px`,position:`relative`,overflow:`hidden`},l=G(G({},l),{transform:`translateY(${r}px)`,position:`absolute`,left:0,right:0,top:0})),s(`div`,{style:c},[s(pi,{onResize:e=>{let{offsetHeight:t}=e;t&&a&&a()}},{default:()=>[s(`div`,{style:l,class:Z({[`${i}-holder-inner`]:i})},[o.default?.call(o)])]})])};nu.displayName=`Filter`,nu.inheritAttrs=!1,nu.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};var ru=(e,t)=>{let{setRef:n}=e,{slots:r}=t,i=pe(r.default?.call(r));return i&&i.length?o(i[0],{ref:n}):i};ru.props={setRef:{type:Function,default:()=>{}}};var iu=20;function au(e){return`touches`in e?e.touches[0].pageY:e.pageY}var ou=d({compatConfig:{MODE:3},name:`ScrollBar`,inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Bl(),thumbRef:Bl(),visibleTimeout:null,state:k({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:`post`}},mounted(){var e,t;(e=this.scrollbarRef.current)==null||e.addEventListener(`touchstart`,this.onScrollbarTouchStart,lr?{passive:!1}:!1),(t=this.thumbRef.current)==null||t.addEventListener(`touchstart`,this.onMouseDown,lr?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener(`mousemove`,this.onMouseMove),window.addEventListener(`mouseup`,this.onMouseUp),this.thumbRef.current.addEventListener(`touchmove`,this.onMouseMove,lr?{passive:!1}:!1),this.thumbRef.current.addEventListener(`touchend`,this.onMouseUp)},removeEvents(){window.removeEventListener(`mousemove`,this.onMouseMove),window.removeEventListener(`mouseup`,this.onMouseUp),this.scrollbarRef.current.removeEventListener(`touchstart`,this.onScrollbarTouchStart,lr?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener(`touchstart`,this.onMouseDown,lr?{passive:!1}:!1),this.thumbRef.current.removeEventListener(`touchmove`,this.onMouseMove,lr?{passive:!1}:!1),this.thumbRef.current.removeEventListener(`touchend`,this.onMouseUp)),Rn.cancel(this.moveRaf)},onMouseDown(e){let{onStartMove:t}=this.$props;G(this.state,{dragging:!0,pageY:au(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){let{dragging:t,pageY:n,startTop:r}=this.state,{onScroll:i}=this.$props;if(Rn.cancel(this.moveRaf),t){let t=r+(au(e)-n),a=this.getEnableScrollRange(),o=this.getEnableHeightRange(),s=o?t/o:0,c=Math.ceil(s*a);this.moveRaf=Rn(()=>{i(c)})}},onMouseUp(){let{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){let{height:e,scrollHeight:t}=this.$props,n=e/t*100;return n=Math.max(n,iu),n=Math.min(n,e/2),Math.floor(n)},getEnableScrollRange(){let{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){let{height:e}=this.$props;return e-this.getSpinHeight()||0},getTop(){let{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),n=this.getEnableHeightRange();return e===0||t===0?0:e/t*n},showScroll(){let{height:e,scrollHeight:t}=this.$props;return t>e}},render(){let{dragging:e,visible:t}=this.state,{prefixCls:n}=this.$props,r=this.getSpinHeight()+`px`,i=this.getTop()+`px`,a=this.showScroll(),o=a&&t;return s(`div`,{ref:this.scrollbarRef,class:Z(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:a}),style:{width:`8px`,top:0,bottom:0,right:0,position:`absolute`,display:o?void 0:`none`},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[s(`div`,{ref:this.thumbRef,class:Z(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:e}),style:{width:`100%`,height:r,top:i,left:0,position:`absolute`,background:`rgba(0, 0, 0, 0.5)`,borderRadius:`99px`,cursor:`pointer`,userSelect:`none`},onMousedown:this.onMouseDown},null)])}});function su(e,t,n,r){let i=new Map,a=new Map,o=W(Symbol(`update`));H(e,()=>{o.value=Symbol(`update`)});let s;function c(){Rn.cancel(s)}function l(){c(),s=Rn(()=>{i.forEach((e,t)=>{if(e&&e.offsetParent){let{offsetHeight:n}=e;a.get(t)!==n&&(o.value=Symbol(`update`),a.set(t,e.offsetHeight))}})})}function u(e,a){let o=t(e),s=i.get(o);a?(i.set(o,a.$el||a),l()):i.delete(o),!s!=!a&&(a?n?.(e):r?.(e))}return E(()=>{c()}),[u,l,a,o]}function cu(e,t,n,r,i,a,o,s){let c;return l=>{if(l==null){s();return}Rn.cancel(c);let u=t.value,d=r.itemHeight;if(typeof l==`number`)o(l);else if(l&&typeof l==`object`){let t,{align:r}=l;`index`in l?{index:t}=l:t=u.findIndex(e=>i(e)===l.key);let{offset:s=0}=l,f=(l,p)=>{if(l<0||!e.value)return;let m=e.value.clientHeight,h=!1,g=p;if(m){let a=p||r,c=0,l=0,f=0,_=Math.min(u.length,t);for(let e=0;e<=_;e+=1){let r=i(u[e]);l=c;let a=n.get(r);f=l+(a===void 0?d:a),c=f,e===t&&a===void 0&&(h=!0)}let v=e.value.scrollTop,y=null;switch(a){case`top`:y=l-s;break;case`bottom`:y=f-m+s;break;default:{let e=v+m;le&&(g=`bottom`)}}y!==null&&y!==v&&o(y)}c=Rn(()=>{h&&a(),f(l-1,g)},2)};f(5)}}}var lu=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),uu=((e,t)=>{let n=!1,r=null;function i(){clearTimeout(r),n=!0,r=setTimeout(()=>{n=!1},50)}return function(a){let o=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=a<0&&e.value||a>0&&t.value;return o&&s?(clearTimeout(r),n=!1):(!s||n)&&i(),!n&&s}});function du(e,t,n,r){let i=0,a=null,o=null,s=!1,c=uu(t,n);function l(t){if(!e.value)return;Rn.cancel(a);let{deltaY:n}=t;i+=n,o=n,!c(n)&&(lu||t.preventDefault(),a=Rn(()=>{r(i*(s?10:1)),i=0}))}function u(t){e.value&&(s=t.detail===o)}return[l,u]}var fu=14/15;function pu(e,t,n){let r=!1,i=0,a=null,o=null,s=()=>{a&&(a.removeEventListener(`touchmove`,c),a.removeEventListener(`touchend`,l))},c=e=>{if(r){let t=Math.ceil(e.touches[0].pageY),r=i-t;i=t,n(r)&&e.preventDefault(),clearInterval(o),o=setInterval(()=>{r*=fu,(!n(r,!0)||Math.abs(r)<=.1)&&clearInterval(o)},16)}},l=()=>{r=!1,s()},u=e=>{s(),e.touches.length===1&&!r&&(r=!0,i=Math.ceil(e.touches[0].pageY),a=e.target,a.addEventListener(`touchmove`,c,{passive:!1}),a.addEventListener(`touchend`,l))},d=()=>{};D(()=>{document.addEventListener(`touchmove`,d,{passive:!1}),H(e,e=>{t.value.removeEventListener(`touchstart`,u),s(),clearInterval(o),e&&t.value.addEventListener(`touchstart`,u,{passive:!1})},{immediate:!0})}),p(()=>{document.removeEventListener(`touchmove`,d)})}var mu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let a=i(e,t+n,{}),c=o(e);return s(ru,{key:c,setRef:t=>r(e,t)},{default:()=>[a]})})}var vu=d({compatConfig:{MODE:3},name:`List`,inheritAttrs:!1,props:{prefixCls:String,data:J.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:n}=t,r=a(()=>{let{height:t,itemHeight:n,virtual:r}=e;return!!(r!==!1&&t&&n)}),i=a(()=>{let{height:t,itemHeight:n,data:i}=e;return r.value&&i&&n*i.length>t}),o=k({scrollTop:0,scrollMoving:!1}),s=a(()=>e.data||hu),c=M([]);H(s,()=>{c.value=se(s.value).slice()},{immediate:!0});let l=M(e=>void 0);H(()=>e.itemKey,e=>{typeof e==`function`?l.value=e:l.value=t=>t?.[e]},{immediate:!0});let u=M(),d=M(),f=M(),m=e=>l.value(e),h={getKey:m};function g(e){let t;t=typeof e==`function`?e(o.scrollTop):e;let n=T(t);u.value&&(u.value.scrollTop=n),o.scrollTop=n}let[_,v,y,b]=su(c,m,null,null),S=k({scrollHeight:void 0,start:0,end:0,offset:void 0}),C=M(0);D(()=>{x(()=>{C.value=d.value?.offsetHeight||0})}),O(()=>{x(()=>{C.value=d.value?.offsetHeight||0})}),H([r,c],()=>{r.value||G(S,{scrollHeight:void 0,start:0,end:c.value.length-1,offset:void 0})},{immediate:!0}),H([r,c,C,i],()=>{r.value&&!i.value&&G(S,{scrollHeight:C.value,start:0,end:c.value.length-1,offset:void 0}),u.value&&(o.scrollTop=u.value.scrollTop)},{immediate:!0}),H([i,r,()=>o.scrollTop,c,b,()=>e.height,C],()=>{if(!r.value||!i.value)return;let t=0,n,a,s,l=c.value.length,u=c.value,d=o.scrollTop,{itemHeight:f,height:p}=e,h=d+p;for(let e=0;e=d&&(n=e,a=t),s===void 0&&c>h&&(s=e),t=c}n===void 0&&(n=0,a=0,s=Math.ceil(p/f)),s===void 0&&(s=l-1),s=Math.min(s+1,l),G(S,{scrollHeight:t,start:n,end:s,offset:a})},{immediate:!0});let w=a(()=>S.scrollHeight-e.height);function T(e){let t=e;return Number.isNaN(w.value)||(t=Math.min(t,w.value)),t=Math.max(t,0),t}let E=a(()=>o.scrollTop<=0),A=a(()=>o.scrollTop>=w.value),j=uu(E,A);function N(e){g(e)}function F(t){var n;let{scrollTop:r}=t.currentTarget;r!==o.scrollTop&&g(r),(n=e.onScroll)==null||n.call(e,t)}let[I,L]=du(r,E,A,e=>{g(t=>t+e)});pu(r,u,(e,t)=>!j(e,t)&&(I({preventDefault(){},deltaY:e}),!0));function ee(e){r.value&&e.preventDefault()}let R=()=>{u.value&&(u.value.removeEventListener(`wheel`,I,lr?{passive:!1}:!1),u.value.removeEventListener(`DOMMouseScroll`,L),u.value.removeEventListener(`MozMousePixelScroll`,ee))};P(()=>{x(()=>{u.value&&(R(),u.value.addEventListener(`wheel`,I,lr?{passive:!1}:!1),u.value.addEventListener(`DOMMouseScroll`,L),u.value.addEventListener(`MozMousePixelScroll`,ee))})}),p(()=>{R()}),n({scrollTo:cu(u,c,y,e,m,v,g,()=>{var e;(e=f.value)==null||e.delayHidden()})});let z=a(()=>{let t=null;return e.height&&(t=G({[e.fullHeight?`height`:`maxHeight`]:e.height+`px`},gu),r.value&&(t.overflowY=`hidden`,o.scrollMoving&&(t.pointerEvents=`none`))),t});return H([()=>S.start,()=>S.end,c],()=>{if(e.onVisibleChange){let t=c.value.slice(S.start,S.end+1);e.onVisibleChange(t,c.value)}},{flush:`post`}),{state:o,mergedData:c,componentStyle:z,onFallbackScroll:F,onScrollBar:N,componentRef:u,useVirtual:r,calRes:S,collectHeight:v,setInstance:_,sharedConfig:h,scrollBarRef:f,fillerInnerRef:d,delayHideScrollBar:()=>{var e;(e=f.value)==null||e.delayHidden()}}},render(){let e=G(G({},this.$props),this.$attrs),{prefixCls:t=`rc-virtual-list`,height:n,itemHeight:r,fullHeight:i,data:a,itemKey:o,virtual:c,component:l=`div`,onScroll:u,children:d=this.$slots.default,style:f,class:p}=e,m=mu(e,[`prefixCls`,`height`,`itemHeight`,`fullHeight`,`data`,`itemKey`,`virtual`,`component`,`onScroll`,`children`,`style`,`class`]),h=Z(t,p),{scrollTop:g}=this.state,{scrollHeight:_,offset:v,start:y,end:b}=this.calRes,{componentStyle:x,onFallbackScroll:S,onScrollBar:C,useVirtual:w,collectHeight:T,sharedConfig:E,setInstance:D,mergedData:O,delayHideScrollBar:k}=this;return s(`div`,X({style:G(G({},f),{position:`relative`}),class:h},m),[s(l,{class:`${t}-holder`,style:x,ref:`componentRef`,onScroll:S,onMouseenter:k},{default:()=>[s(nu,{prefixCls:t,height:_,offset:v,onInnerResize:T,ref:`fillerInnerRef`},{default:()=>_u(O,y,b,D,d,E)})]}),w&&s(ou,{ref:`scrollBarRef`,prefixCls:t,scrollTop:g,height:n,scrollHeight:_,count:O.length,onScroll:C,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function yu(e,t,n){let r=W(e());return H(t,(t,i)=>{n?n(t,i)&&(r.value=e()):r.value=e()}),r}function bu(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xu=Symbol(`SelectContextKey`);function Su(t){return e(xu,t)}function Cu(){return C(xu,{})}var wu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i`${i.prefixCls}-item`),l=yu(()=>o.flattenOptions,[()=>i.open,()=>o.flattenOptions],e=>e[0]),u=Bl(),d=e=>{e.preventDefault()},f=e=>{u.current&&u.current.scrollTo(typeof e==`number`?{index:e}:e)},p=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=l.value.length;for(let r=0;r1&&arguments[1]!==void 0&&arguments[1];m.activeIndex=e;let n={source:t?`keyboard`:`mouse`},r=l.value[e];if(!r){o.onActiveValue(null,-1,n);return}o.onActiveValue(r.value,e,n)};H([()=>l.value.length,()=>i.searchValue],()=>{h(o.defaultActiveFirstOption===!1?-1:p(0))},{immediate:!0});let g=e=>o.rawValues.has(e)&&i.mode!==`combobox`;H([()=>i.open,()=>i.searchValue],()=>{if(!i.multiple&&i.open&&o.rawValues.size===1){let e=Array.from(o.rawValues)[0],t=se(l.value).findIndex(t=>{let{data:n}=t;return n[o.fieldNames.value]===e});t!==-1&&(h(t),x(()=>{f(t)}))}i.open&&x(()=>{var e;(e=u.current)==null||e.scrollTo(void 0)})},{immediate:!0,flush:`post`});let _=e=>{e!==void 0&&o.onSelect(e,{selected:!o.rawValues.has(e)}),i.multiple||i.toggleOpen(!1)},y=e=>typeof e.label==`function`?e.label():e.label;function b(e){let t=l.value[e];if(!t)return null;let n=t.data||{},{value:r}=n,{group:a}=t,o=un(n,!0),c=y(t);return t?s(`div`,X(X({"aria-label":typeof c==`string`&&!a?c:null},o),{},{key:e,role:a?`presentation`:`option`,id:`${i.id}_list_${e}`,"aria-selected":g(r)}),[r]):null}return n({onKeydown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case $.N:case $.P:case $.UP:case $.DOWN:{let e=0;if(t===$.UP?e=-1:t===$.DOWN?e=1:bu()&&n&&(t===$.N?e=1:t===$.P&&(e=-1)),e!==0){let t=p(m.activeIndex+e,e);f(t),h(t,!0)}break}case $.ENTER:{let t=l.value[m.activeIndex];t&&!t.data.disabled?_(t.value):_(void 0),i.open&&e.preventDefault();break}case $.ESC:i.toggleOpen(!1),i.open&&e.stopPropagation()}},onKeyup:()=>{},scrollTo:e=>{f(e)}}),()=>{let{id:e,notFoundContent:t,onPopupScroll:n}=i,{menuItemSelectedIcon:a,fieldNames:f,virtual:p,listHeight:x,listItemHeight:S}=o,C=r.option,{activeIndex:w}=m,T=Object.keys(f).map(e=>f[e]);return l.value.length===0?s(`div`,{role:`listbox`,id:`${e}_list`,class:`${c.value}-empty`,onMousedown:d},[t]):s(v,null,[s(`div`,{role:`listbox`,id:`${e}_list`,style:{height:0,width:0,overflow:`hidden`}},[b(w-1),b(w),b(w+1)]),s(vu,{itemKey:`key`,ref:u,data:l.value,height:x,itemHeight:S,fullHeight:!1,onMousedown:d,onScroll:n,virtual:p},{default:(e,t)=>{let{group:n,groupOption:r,data:i,value:o}=e,{key:l}=i,u=typeof e.label==`function`?e.label():e.label;if(n){let e=i.title??(Tu(u)&&u);return s(`div`,{class:Z(c.value,`${c.value}-group`),title:e},[C?C(i):u===void 0?l:u])}let{disabled:d,title:f,children:p,style:m,class:v,className:b}=i,x=wu(i,[`disabled`,`title`,`children`,`style`,`class`,`className`]),S=Gn(x,T),E=g(o),D=`${c.value}-option`,O=Z(c.value,D,v,b,{[`${D}-grouped`]:r,[`${D}-active`]:w===t&&!d,[`${D}-disabled`]:d,[`${D}-selected`]:E}),k=y(e),A=!a||typeof a==`function`||E,j=typeof k==`number`?k:k||o,M=Tu(j)?j.toString():void 0;return f!==void 0&&(M=f),s(`div`,X(X({},S),{},{"aria-selected":E,class:O,title:M,onMousemove:e=>{x.onMousemove&&x.onMousemove(e),!(w===t||d)&&h(t)},onClick:e=>{d||_(o),x.onClick&&x.onClick(e)},style:m}),[s(`div`,{class:`${D}-content`},[C?C(i):j]),Xe(a)||E,A&&s(al,{class:`${c.value}-option-state`,customizeIcon:a,customizeIconProps:{isSelected:E}},{default:()=>[E?`✓`:null]})])}})])}}}),Du=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i1&&arguments[1]!==void 0&&arguments[1];return pe(e).map((e,n)=>{if(!Xe(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,children:a,props:o}=e;if(t||!r)return Ou(e);let s=a&&a.default?a.default():void 0,c=o?.label||a.label?.call(a)||i;return G(G({key:`__RC_SELECT_GRP__${i===null?n:String(i)}__`},o),{label:c,options:ku(s||[])})}).filter(e=>e)}function Au(e,t,n){let r=M(),i=M(),a=M(),o=M([]);return H([e,t],()=>{e.value?o.value=se(e.value).slice():o.value=ku(t.value)},{immediate:!0,deep:!0}),P(()=>{let e=o.value,t=new Map,s=new Map,c=n.value;function l(e){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(let r=0;r0&&arguments[0]!==void 0?arguments[0]:W(``),t=`rc_select_${Nu()}`;return e.value||t}function Fu(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function Iu(e,t){return Fu(e).join(``).toUpperCase().includes(t)}var Lu=((e,t,n,r,i)=>a(()=>{let a=n.value,o=i?.value,s=r?.value;if(!a||s===!1)return e.value;let{options:c,label:l,value:u}=t.value,d=[],f=typeof s==`function`,p=a.toUpperCase(),m=f?s:(e,t)=>o?Iu(t[o],p):t[c]?Iu(t[l===`children`?`label`:l],p):Iu(t[u],p),h=f?e=>xa(e):e=>e;return e.value.forEach(e=>{if(e[c]){if(m(a,h(e)))d.push(e);else{let t=e[c].filter(e=>m(a,h(e)));t.length&&d.push(G(G({},e),{[c]:t}))}return}m(a,h(e))&&d.push(e)}),d})),Ru=((e,t)=>{let n=M({values:new Map,options:new Map});return[a(()=>{let{values:r,options:i}=n.value,a=e.value.map(e=>e.label===void 0?G(G({},e),{label:r.get(e.value)?.label}):e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.value.get(e.value)||i.get(e.value))}),n.value.values=o,n.value.options=s,a}),e=>t.value.get(e)||n.value.options.get(e)]});function zu(e,t){let{defaultValue:n,value:r=W()}=t||{},i=typeof e==`function`?e():e;r.value!==void 0&&(i=b(r)),n!==void 0&&(i=typeof n==`function`?n():n);let a=W(i),o=W(i);P(()=>{let e=r.value===void 0?a.value:r.value;t.postState&&(e=t.postState(e)),o.value=e});function s(e){let n=o.value;a.value=e,se(o.value)!==e&&t.onChange&&t.onChange(e,n)}return H(r,()=>{a.value=r.value}),[o,s]}var Bu=[`inputValue`];function Vu(){return G(G({},Ql()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:J.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:J.any,defaultValue:J.any,onChange:Function,children:Array})}function Hu(e){return!e||typeof e!=`object`}var Uu=d({compatConfig:{MODE:3},name:`VcSelect`,inheritAttrs:!1,props:Vn(Vu(),{prefixCls:`vc-select`,autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:n,attrs:r,slots:i}=t,o=Pu(y(e,`id`)),c=a(()=>eu(e.mode)),l=a(()=>!!(!e.options&&e.children)),u=a(()=>e.filterOption===void 0&&e.mode===`combobox`?!1:e.filterOption),d=a(()=>ya(e.fieldNames,l.value)),[f,p]=zu(``,{value:a(()=>e.searchValue===void 0?e.inputValue:e.searchValue),postState:e=>e||``}),m=Au(y(e,`options`),y(e,`children`),d),{valueOptions:h,labelOptions:g,options:_}=m,v=t=>Fu(t).map(t=>{let n,r,i,a;Hu(t)?n=t:(i=t.key,r=t.label,n=t.value??i);let o=h.value.get(n);return o&&(r===void 0&&(r=o?.[e.optionLabelProp||d.value.label]),i===void 0&&(i=o?.key??n),a=o?.disabled),{label:r,value:n,key:i,disabled:a,option:o}}),[b,x]=zu(e.defaultValue,{value:y(e,`value`)}),[S,C]=Ru(a(()=>{let t=v(b.value);return e.mode===`combobox`&&!t[0]?.value?[]:t}),h),w=a(()=>{if(!e.mode&&S.value.length===1){let e=S.value[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return S.value.map(e=>G(G({},e),{label:(typeof e.label==`function`?e.label():e.label)??e.value}))}),T=a(()=>new Set(S.value.map(e=>e.value)));P(()=>{if(e.mode===`combobox`){let e=S.value[0]?.value;e!=null&&p(String(e))}},{flush:`post`});let E=(e,t)=>{let n=t??e;return{[d.value.value]:e,[d.value.label]:n}},D=M();P(()=>{if(e.mode!==`tags`){D.value=_.value;return}let t=_.value.slice(),n=e=>h.value.has(e);[...S.value].sort((e,t)=>e.value{let r=e.value;n(r)||t.push(E(r,e.label))}),D.value=t});let O=Lu(D,d,f,u,y(e,`optionFilterProp`)),k=a(()=>e.mode!==`tags`||!f.value||O.value.some(t=>t[e.optionFilterProp||`value`]===f.value)?O.value:[E(f.value),...O.value]),A=a(()=>e.filterSort?[...k.value].sort((t,n)=>e.filterSort(t,n)):k.value),j=a(()=>ba(A.value,{fieldNames:d.value,childrenAsData:l.value})),N=t=>{let n=v(t);if(x(n),e.onChange&&(n.length!==S.value.length||n.some((e,t)=>S.value[t]?.value!==e?.value))){let t=e.labelInValue?n.map(e=>G(G({},e),{originLabel:e.label,label:typeof e.label==`function`?e.label():e.label})):n.map(e=>e.value),r=n.map(e=>xa(C(e.value)));e.onChange(c.value?t:t[0],c.value?r:r[0])}},[F,I]=dn(null),[L,ee]=dn(0),R=a(()=>e.defaultActiveFirstOption===void 0?e.mode!==`combobox`:e.defaultActiveFirstOption),z=function(t,n){let{source:r=`keyboard`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ee(n),e.backfill&&e.mode===`combobox`&&t!==null&&r===`keyboard`&&I(String(t))},B=(t,n)=>{let r=()=>{let n=C(t),r=n?.[d.value.label];return[e.labelInValue?{label:typeof r==`function`?r():r,originLabel:r,value:t,key:n?.key??t}:t,xa(n)]};if(n&&e.onSelect){let[t,n]=r();e.onSelect(t,n)}else if(!n&&e.onDeselect){let[t,n]=r();e.onDeselect(t,n)}},te=(t,n)=>{let r,i=!c.value||n.selected;r=i?c.value?[...S.value,t]:[t]:S.value.filter(e=>e.value!==t),N(r),B(t,i),e.mode===`combobox`?I(``):(!c.value||e.autoClearSearchValue)&&(p(``),I(``))},V=(e,t)=>{N(e),(t.type===`remove`||t.type===`clear`)&&t.values.forEach(e=>{B(e.value,!1)})},ne=(t,n)=>{var r;if(p(t),I(null),n.source===`submit`){let e=(t||``).trim();if(e){let t=Array.from(new Set([...T.value,e]));N(t),B(e,!0),p(``)}return}n.source!==`blur`&&(e.mode===`combobox`&&N(t),(r=e.onSearch)==null||r.call(e,t))},re=t=>{let n=t;e.mode!==`tags`&&(n=t.map(e=>g.value.get(e)?.value).filter(e=>e!==void 0));let r=Array.from(new Set([...T.value,...n]));N(r),r.forEach(e=>{B(e,!0)})},H=a(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);Su(Jl(G(G({},m),{flattenOptions:j,onActiveValue:z,defaultActiveFirstOption:R,onSelect:te,menuItemSelectedIcon:y(e,`menuItemSelectedIcon`),rawValues:T,fieldNames:d,virtual:H,listHeight:y(e,`listHeight`),listItemHeight:y(e,`listItemHeight`),childrenAsData:l})));let U=W();n({focus(){var e;(e=U.value)==null||e.focus()},blur(){var e;(e=U.value)==null||e.blur()},scrollTo(e){var t;(t=U.value)==null||t.scrollTo(e)}});let ie=a(()=>Gn(e,`id.mode.prefixCls.backfill.fieldNames.inputValue.searchValue.onSearch.autoClearSearchValue.onSelect.onDeselect.dropdownMatchSelectWidth.filterOption.filterSort.optionFilterProp.optionLabelProp.options.children.defaultActiveFirstOption.menuItemSelectedIcon.virtual.listHeight.listItemHeight.value.defaultValue.labelInValue.onChange`.split(`.`)));return()=>s(tu,X(X(X({},ie.value),r),{},{id:o,prefixCls:e.prefixCls,ref:U,omitDomProps:Bu,mode:e.mode,displayValues:w.value,onDisplayValuesChange:V,searchValue:f.value,onSearch:ne,onSearchSplit:re,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Eu,emptyOptions:!j.value.length,activeValue:F.value,activeDescendantId:`${o}_list_${L.value}`}),i)}}),Wu=()=>null;Wu.isSelectOption=!0,Wu.displayName=`ASelectOption`;var Gu=()=>null;Gu.isSelectOptGroup=!0,Gu.displayName=`ASelectOptGroup`;var Ku=Uu,qu={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function Ju(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},{loading:n,multiple:r,prefixCls:i,hasFeedback:a,feedbackIcon:o,showArrow:c}=e,l=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),u=e.clearIcon||t.clearIcon&&t.clearIcon(),d=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),f=e.removeIcon||t.removeIcon&&t.removeIcon(),p=u??s(yt,null,null),m=e=>s(v,null,[c!==!1&&e,a&&o]),h=null;if(l!==void 0)h=m(l);else if(n)h=m(s(at,{spin:!0},null));else{let e=`${i}-suffix`;h=t=>{let{open:n,showSearch:r}=t;return m(s(n&&r?hr:Xu,{class:e},null))}}let g=null;g=d===void 0?r?s(ed,null,null):null:d;let _=null;return _=f===void 0?s(_t,null,null):f,{clearIcon:p,suffixIcon:h,itemIcon:g,removeIcon:_}}var nd=Symbol(`ContextProps`),rd=Symbol(`InternalContextProps`),id=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a(()=>!0),r=W(new Map);m(),H([n,r],()=>{}),e(nd,t),e(rd,{addFormItemField:(e,t)=>{r.value.set(e,t),r.value=new Map(r.value)},removeFormItemField:e=>{r.value.delete(e),r.value=new Map(r.value)}})},ad={id:a(()=>void 0),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},od={addFormItemField:()=>{},removeFormItemField:()=>{}},sd=()=>{let t=C(rd,od),n=Symbol(`FormItemFieldKey`),r=m();return t.addFormItemField(n,r.type),p(()=>{t.removeFormItemField(n)}),e(rd,od),e(nd,ad),C(nd,ad)},cd=d({compatConfig:{MODE:3},name:`AFormItemRest`,setup(t,n){let{slots:r}=n;return e(rd,od),e(nd,ad),()=>r.default?.call(r)}}),ld=Tn({}),ud=d({name:`NoFormStatus`,setup(e,t){let{slots:n}=t;return ld.useProvide({}),()=>n.default?.call(n)}});function dd(e,t,n){return Z({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n})}var fd=(e,t)=>t||e,pd=`[object Symbol]`;function md(e){return typeof e==`symbol`||On(e)&&An(e)==pd}function hd(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=Bd)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Wd(e){return function(){return e}}var Gd=function(){try{var e=nr(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Kd=Ud(Gd?function(e,t){return Gd(e,`toString`,{configurable:!0,enumerable:!1,value:Wd(t),writable:!0})}:Pd);function qd(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}function $d(e,t,n){t==`__proto__`&&Gd?Gd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ef=Object.prototype.hasOwnProperty;function tf(e,t,n){var r=e[t];(!(ef.call(e,t)&&us(r,n))||n===void 0&&!(t in e))&&$d(e,t,n)}function nf(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a0&&n(s)?t>1?kf(s,t-1,n,r,i):vc(i,s):r||(i[i.length]=s)}return i}function Af(e){return e!=null&&e.length?kf(e,1):[]}function jf(e){return Kd(af(e,void 0,Af),e+``)}var Mf=hn(Object.getPrototypeOf,Object),Nf=`[object Object]`,Pf=Function.prototype,Ff=Object.prototype,If=Pf.toString,Lf=Ff.hasOwnProperty,Rf=If.call(Object);function zf(e){if(!On(e)||An(e)!=Nf)return!1;var t=Mf(e);if(t===null)return!0;var n=Lf.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&If.call(n)==Rf}function Bf(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=t||n<0||d&&r>=a}function _(){var e=Hm();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Hm())}function x(){var e=Hm(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function qm(e){return On(e)&&xn(e)}function Jm(e,t,n){for(var r=-1,i=e==null?0:e.length;++r-1?i[a?t[o]:o]:void 0}}var Zm=Math.max;function Qm(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Nd(n);return i<0&&(i=Zm(r+i,0)),Jd(e,Nm(t,3),i)}var $m=Xm(Qm);function eh(e){for(var t=-1,n=e==null?0:e.length,r={};++t=120&&u.length>=120)?new qs(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d1,t}),nf(e,Zf(e),n),r&&(n=pm(n,dh|fh|ph,uh));for(var i=t.length;i--;)lh(n,t[i]);return n});function hh(e,t,n,r){if(!gn(e))return e;t=Sf(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i=xh){var l=t?null:bh(e);if(l)return tc(l);o=!1,i=Ys,c=new qs}else c=t?[]:s;outer:for(;++r{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Ah[t];return[Pn(r,i,a,e.motionDurationMid),{[` @@ -324,4 +324,4 @@ import{$ as e,A as t,Bt as n,C as r,Ct as i,D as a,E as o,F as s,G as c,H as l,H `]:{color:e.colorTextDisabled}}}}}},pq=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSize:i,lineHeight:a}=e,o=`${t}-list-item`,s=`${o}-actions`,c=`${o}-action`,l=Math.round(i*a);return{[`${t}-wrapper`]:{[`${t}-list`]:G(G({},Ve()),{lineHeight:e.lineHeight,[o]:{position:`relative`,height:e.lineHeight*i,marginTop:e.marginXS,fontSize:i,display:`flex`,alignItems:`center`,transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${o}-name`]:G(G({},tn),{padding:`0 ${e.paddingXS}px`,lineHeight:a,flex:`auto`,transition:`all ${e.motionDurationSlow}`}),[s]:{[c]:{opacity:0},[`${c}${n}-btn-sm`]:{height:l,border:0,lineHeight:1,"> span":{transform:`scale(1)`}},[` ${c}:focus, &.picture ${c} - `]:{opacity:1},[r]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${r}`]:{color:e.colorText}},[`${t}-icon ${r}`]:{color:e.colorTextDescription,fontSize:i},[`${o}-progress`]:{position:`absolute`,bottom:-e.uploadProgressOffset,width:`100%`,paddingInlineStart:i+e.paddingXS,fontSize:i,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${o}:hover ${c}`]:{opacity:1,color:e.colorText},[`${o}-error`]:{color:e.colorError,[`${o}-name, ${t}-icon ${r}`]:{color:e.colorError},[s]:{[`${r}, ${r}:hover`]:{color:e.colorError},[c]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:`table`,width:0,height:0,content:`""`}}})}}},mq=new Te(`uploadAnimateInlineIn`,{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),hq=new Te(`uploadAnimateInlineOut`,{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),gq=e=>{let{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${n}-appear, ${n}-enter`]:{animationName:mq},[`${n}-leave`]:{animationName:hq}}},mq,hq]},_q=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i}=e,a=`${t}-list`,o=`${a}-item`;return{[`${t}-wrapper`]:{[`${a}${a}-picture, ${a}${a}-picture-card`]:{[o]:{position:`relative`,height:r+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${o}-thumbnail`]:G(G({},tn),{width:r,height:r,lineHeight:`${r+e.paddingSM}px`,textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}}),[`${o}-progress`]:{bottom:i,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:r+e.paddingXS}},[`${o}-error`]:{borderColor:e.colorError,[`${o}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${o}-uploading`]:{borderStyle:`dashed`,[`${o}-name`]:{marginBottom:i}}}}}},vq=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i}=e,a=`${t}-list`,o=`${a}-item`,s=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:G(G({},Ve()),{display:`inline-block`,width:`100%`,[`${t}${t}-select`]:{width:s,height:s,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card`]:{[`${a}-item-container`]:{display:`inline-block`,width:s,height:s,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:`top`},"&::after":{display:`none`},[o]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${o}:hover`]:{[`&::before, ${o}-actions`]:{opacity:1}},[`${o}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:r,margin:`0 ${e.marginXXS}px`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`}},[`${o}-actions, ${o}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new me(i).setAlpha(.65).toRgbString(),"&:hover":{color:i}}},[`${o}-thumbnail, ${o}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${o}-name`]:{display:`none`,textAlign:`center`},[`${o}-file + ${o}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${e.paddingXS*2}px)`},[`${o}-uploading`]:{[`&${o}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${o}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},yq=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},bq=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:G(G({},Ne(e)),{[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}})}},xq=Le(`Upload`,e=>{let{fontSizeHeading3:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightLG:a}=e,o=Math.round(n*r),s=Fe(e,{uploadThumbnailSize:t*2,uploadProgressOffset:o/2+i,uploadPicCardSize:a*2.55});return[bq(s),fq(s),_q(s),vq(s),pq(s),gq(s),yq(s),Hh(s)]}),Sq=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Cq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iu.value??p.value),[h,g]=zu(e.defaultFileList||[],{value:y(e,`fileList`),postState:e=>{let t=Date.now();return(e??[]).map((e,n)=>(!e.uid&&!Object.isFrozen(e)&&(e.uid=`__AUTO__${t}_${n}__`),e))}}),_=W(`drop`),v=W(null);D(()=>{ir(e.fileList!==void 0||r.value===void 0,`Upload`,"`value` is not a valid prop, do you mean `fileList`?"),ir(e.transformFile===void 0,`Upload`,"`transformFile` is deprecated. Please use `beforeUpload` directly."),ir(e.remove===void 0,`Upload`,"`remove` props is deprecated. Please use `remove` event.")});let b=(t,n,r)=>{var i,a;let s=[...n];e.maxCount===1?s=s.slice(-1):e.maxCount&&(s=s.slice(0,e.maxCount)),g(s);let c={file:t,fileList:s};r&&(c.event=r),(i=e[`onUpdate:fileList`])==null||i.call(e,c.fileList),(a=e.onChange)==null||a.call(e,c),o.onFieldChange()},x=(t,n)=>Sq(this,void 0,void 0,function*(){let{beforeUpload:r,transformFile:i}=e,a=t;if(r){let e=yield r(t,n);if(e===!1)return!1;if(delete t[wq],e===wq)return Object.defineProperty(t,wq,{value:!0,configurable:!0}),!1;typeof e==`object`&&e&&(a=e)}return i&&(a=yield i(a)),a}),S=e=>{let t=e.filter(e=>!e.file[wq]);if(!t.length)return;let n=t.map(e=>XK(e.file)),r=[...h.value];n.forEach(e=>{r=ZK(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}b(i,r)})},C=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!QK(t,h.value))return;let r=XK(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n;let i=ZK(r,h.value);b(r,i)},w=(e,t)=>{if(!QK(t,h.value))return;let n=XK(t);n.status=`uploading`,n.percent=e.percent;let r=ZK(n,h.value);b(n,r,e)},T=(e,t,n)=>{if(!QK(n,h.value))return;let r=XK(n);r.error=e,r.response=t,r.status=`error`;let i=ZK(r,h.value);b(r,i)},E=t=>{let n,r=e.onRemove||e.remove;Promise.resolve(typeof r==`function`?r(t):r).then(e=>{var r,i;if(e===!1)return;let a=$K(t,h.value);a&&(n=G(G({},t),{status:`removed`}),(r=h.value)==null||r.forEach(e=>{let t=n.uid===void 0?`name`:`uid`;e[t]===n[t]&&!Object.isFrozen(e)&&(e.status=`removed`)}),(i=v.value)==null||i.abort(n),b(n,a))})},O=t=>{var n;_.value=t.type,t.type===`drop`&&((n=e.onDrop)==null||n.call(e,t))};i({onBatchStart:S,onSuccess:C,onProgress:w,onError:T,fileList:h,upload:v});let[k]=Ft(`Upload`,Ut.Upload,a(()=>e.locale)),A=(t,r)=>{let{removeIcon:i,previewIcon:a,downloadIcon:o,previewFile:l,onPreview:u,onDownload:d,isImageUrl:f,progress:p,itemRender:g,iconRender:_,showUploadList:v}=e,{showDownloadIcon:y,showPreviewIcon:b,showRemoveIcon:x}=typeof v==`boolean`?{}:v;return v?s(dq,{prefixCls:c.value,listType:e.listType,items:h.value,previewFile:l,onPreview:u,onDownload:d,onRemove:E,showRemoveIcon:!m.value&&x,showPreviewIcon:b,showDownloadIcon:y,removeIcon:i,previewIcon:a,downloadIcon:o,iconRender:_,locale:k.value,isImageUrl:f,progress:p,itemRender:g,appendActionVisible:r,appendAction:t},G({},n)):t?.()};return()=>{let{listType:t,type:i}=e,{class:a,style:u}=r,p=Cq(r,[`class`,`style`]),g=G(G(G({onBatchStart:S,onError:T,onProgress:w,onSuccess:C},p),e),{id:e.id??o.id.value,prefixCls:c.value,beforeUpload:x,onChange:void 0,disabled:m.value});delete g.remove,(!n.default||m.value)&&delete g.id;let y={[`${c.value}-rtl`]:l.value===`rtl`};if(i===`drag`){let e=Z(c.value,{[`${c.value}-drag`]:!0,[`${c.value}-drag-uploading`]:h.value.some(e=>e.status===`uploading`),[`${c.value}-drag-hover`]:_.value===`dragover`,[`${c.value}-disabled`]:m.value,[`${c.value}-rtl`]:l.value===`rtl`},r.class,f.value);return d(s(`span`,X(X({},r),{},{class:Z(`${c.value}-wrapper`,y,a,f.value)}),[s(`div`,{class:e,onDrop:O,onDragover:O,onDragleave:O,style:r.style},[s(FK,X(X({},g),{},{ref:v,class:`${c.value}-btn`}),X({default:()=>[s(`div`,{class:`${c.value}-drag-container`},[n.default?.call(n)])]},n))]),A()]))}let b=Z(c.value,{[`${c.value}-select`]:!0,[`${c.value}-select-${t}`]:!0,[`${c.value}-disabled`]:m.value,[`${c.value}-rtl`]:l.value===`rtl`}),E=pe(n.default?.call(n)),D=e=>s(`div`,{class:b,style:e},[s(FK,X(X({},g),{},{ref:v}),n)]);return d(t===`picture-card`?s(`span`,X(X({},r),{},{class:Z(`${c.value}-wrapper`,`${c.value}-picture-card-wrapper`,y,r.class,f.value)}),[A(D,!!(E&&E.length))]):s(`span`,X(X({},r),{},{class:Z(`${c.value}-wrapper`,y,r.class,f.value)}),[D(E&&E.length?void 0:{display:`none`}),A()]))}}}),Eq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{height:t}=e,i=Eq(e,[`height`]),{style:a}=r,o=Eq(r,[`style`]),c=G(G(G({},i),o),{type:`drag`,style:G(G({},a),{height:typeof t==`number`?`${t}px`:t})});return s(Tq,c,n)}}}),Oq=Dq,kq=G(Tq,{Dragger:Dq,LIST_IGNORE:wq,install(e){return e.component(Tq.name,Tq),e.component(Dq.name,Dq),e}});function Aq(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()}function jq(e){return Object.keys(e).map(t=>`${Aq(t)}: ${e[t]};`).join(` `)}function Mq(){return window.devicePixelRatio||1}function Nq(e,t,n,r){e.translate(t,n),e.rotate(Math.PI/180*Number(r)),e.translate(-t,-n)}var Pq=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(e=>e===t)),e.type===`attributes`&&e.target===t&&(n=!0),n},Fq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i2&&arguments[2]!==void 0?arguments[2]:{},{window:r=qx}=n,i=Fq(n,[`window`]),a,o=Gx(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=H(()=>Ux(e),e=>{s(),o.value&&r&&e&&(a=new MutationObserver(t),a.observe(e,i))},{immediate:!0}),l=()=>{s(),c()};return Vx(l),{isSupported:o,stop:l}}var Lq=2,Rq=3,zq=d({name:`AWatermark`,inheritAttrs:!1,props:Vn({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:$t([String,Array]),font:ut(),rootClassName:String,gap:vt(),offset:vt()},{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:r}=t,[,i]=Ct(),o=M(),c=M(),l=M(!1),u=a(()=>e.gap?.[0]??100),d=a(()=>e.gap?.[1]??100),f=a(()=>u.value/2),m=a(()=>d.value/2),h=a(()=>e.offset?.[0]??f.value),g=a(()=>e.offset?.[1]??m.value),_=a(()=>e.font?.fontSize??i.value.fontSizeLG),v=a(()=>e.font?.fontWeight??`normal`),y=a(()=>e.font?.fontStyle??`normal`),b=a(()=>e.font?.fontFamily??`sans-serif`),x=a(()=>e.font?.color??i.value.colorFill),S=a(()=>{let t={zIndex:e.zIndex??9,position:`absolute`,left:0,top:0,width:`100%`,height:`100%`,pointerEvents:`none`,backgroundRepeat:`repeat`},n=h.value-f.value,r=g.value-m.value;return n>0&&(t.left=`${n}px`,t.width=`calc(100% - ${n}px)`,n=0),r>0&&(t.top=`${r}px`,t.height=`calc(100% - ${r}px)`,r=0),t.backgroundPosition=`${n}px ${r}px`,t}),C=()=>{c.value&&=(c.value.remove(),void 0)},w=(e,t)=>{var n;o.value&&c.value&&(l.value=!0,c.value.setAttribute(`style`,jq(G(G({},S.value),{backgroundImage:`url('${e}')`,backgroundSize:`${(u.value+t)*Lq}px`}))),(n=o.value)==null||n.append(c.value),setTimeout(()=>{l.value=!1}))},T=t=>{let n=120,r=64,i=e.content,a=e.image,o=e.width,s=e.height;if(!a&&t.measureText){t.font=`${Number(_.value)}px ${b.value}`;let e=Array.isArray(i)?i:[i],a=e.map(e=>t.measureText(e).width);n=Math.ceil(Math.max(...a)),r=Number(_.value)*e.length+(e.length-1)*Rq}return[o??n,s??r]},E=(t,n,r,i,a)=>{let o=Mq(),s=e.content,c=Number(_.value)*o;t.font=`${y.value} normal ${v.value} ${c}px/${a}px ${b.value}`,t.fillStyle=x.value,t.textAlign=`center`,t.textBaseline=`top`,t.translate(i/2,0),(Array.isArray(s)?s:[s])?.forEach((e,i)=>{t.fillText(e??``,n,r+i*(c+Rq*o))})},O=()=>{let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=e.image,i=e.rotate??-22;if(n){c.value||=document.createElement(`div`);let e=Mq(),[a,o]=T(n),s=(u.value+a)*e,l=(d.value+o)*e;t.setAttribute(`width`,`${s*Lq}px`),t.setAttribute(`height`,`${l*Lq}px`);let f=u.value*e/2,p=d.value*e/2,m=a*e,h=o*e,g=(m+u.value*e)/2,_=(h+d.value*e)/2,v=f+s,y=p+l,b=g+s,x=_+l;if(n.save(),Nq(n,g,_,i),r){let e=new Image;e.onload=()=>{n.drawImage(e,f,p,m,h),n.restore(),Nq(n,b,x,i),n.drawImage(e,v,y,m,h),w(t.toDataURL(),a)},e.crossOrigin=`anonymous`,e.referrerPolicy=`no-referrer`,e.src=r}else E(n,f,p,m,h),n.restore(),Nq(n,b,x,i),E(n,v,y,m,h),w(t.toDataURL(),a)}};return D(()=>{O()}),H(()=>[e,i.value.colorFill,i.value.fontSizeLG],()=>{O()},{deep:!0,flush:`post`}),p(()=>{C()}),Iq(o,e=>{l.value||e.forEach(e=>{Pq(e,c.value)&&(C(),O())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:[`style`,`class`]}),()=>s(`div`,X(X({},r),{},{ref:o,class:[r.class,e.rootClassName],style:[{position:`relative`},r.style]}),[n.default?.call(n)])}}),Bq=be(zq);function Vq(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:`not-allowed`}}}function Hq(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}var Uq=G({overflow:`hidden`},tn),Wq=e=>{let{componentCls:t}=e;return{[t]:G(G(G(G(G({},Ne(e)),{display:`inline-block`,padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:`relative`,display:`flex`,alignItems:`stretch`,justifyItems:`flex-start`,width:`100%`},[`&${t}-rtl`]:{direction:`rtl`},[`&${t}-block`]:{display:`flex`},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:`relative`,textAlign:`center`,cursor:`pointer`,transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":G(G({},Hq(e)),{color:e.labelColorHover}),"&::after":{content:`""`,position:`absolute`,width:`100%`,height:`100%`,top:0,insetInlineStart:0,borderRadius:`inherit`,transition:`background-color ${e.motionDurationMid}`,pointerEvents:`none`},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":G({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},Uq),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:`none`}},[`${t}-thumb`]:G(G({},Hq(e)),{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:0,height:`100%`,padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:`transparent`}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),Vq(`&-disabled ${t}-item`,e)),Vq(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:`transform, width`}})}},Gq=Le(`Segmented`,e=>{let{lineWidthBold:t,lineWidth:n,colorTextLabel:r,colorText:i,colorFillSecondary:a,colorBgLayout:o,colorBgElevated:s}=e;return[Wq(Fe(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:r,labelColorHover:i,bgColor:o,bgColorHover:a,bgColorSelected:s}))]}),Kq=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,qq=e=>e===void 0?void 0:`${e}px`,Jq=d({props:{value:bt(),getValueIndex:bt(),prefixCls:bt(),motionName:bt(),onMotionStart:bt(),onMotionEnd:bt(),direction:bt(),containerRef:bt()},emits:[`motionStart`,`motionEnd`],setup(e,t){let{emit:n}=t,r=W(),i=t=>{let n=e.getValueIndex(t),r=e.containerRef.value?.querySelectorAll(`.${e.prefixCls}-item`)[n];return r?.offsetParent&&r},o=W(null),c=W(null);H(()=>e.value,(e,t)=>{let r=i(t),a=i(e),s=Kq(r),l=Kq(a);o.value=s,c.value=l,n(r&&a?`motionStart`:`motionEnd`)},{flush:`post`});let l=a(()=>e.direction===`rtl`?qq(-o.value?.right):qq(o.value?.left)),u=a(()=>e.direction===`rtl`?qq(-c.value?.right):qq(c.value?.left)),d,f=e=>{clearTimeout(d),x(()=>{e&&(e.style.transform=`translateX(var(--thumb-start-left))`,e.style.width=`var(--thumb-start-width)`)})},m=t=>{d=setTimeout(()=>{t&&(Zv(t,`${e.motionName}-appear-active`),t.style.transform=`translateX(var(--thumb-active-left))`,t.style.width=`var(--thumb-active-width)`)})},h=t=>{o.value=null,c.value=null,t&&(t.style.transform=null,t.style.width=null,Qv(t,`${e.motionName}-appear-active`)),n(`motionEnd`)},g=a(()=>({"--thumb-start-left":l.value,"--thumb-start-width":qq(o.value?.width),"--thumb-active-left":u.value,"--thumb-active-width":qq(c.value?.width)}));return p(()=>{clearTimeout(d)}),()=>{let t={ref:r,style:g.value,class:[`${e.prefixCls}-thumb`]};return s(Gt,{appear:!0,onBeforeEnter:f,onEnter:m,onAfterEnter:h},{default:()=>[!o.value||!c.value?null:s(`div`,t,null)]})}}});function Yq(e){return e.map(e=>typeof e==`object`&&e?e:{label:e?.toString(),title:e?.toString(),value:e})}var Xq=()=>({prefixCls:String,options:vt(),block:Y(),disabled:Y(),size:q(),value:G(G({},$t([String,Number])),{required:!0}),motionName:String,onChange:Q(),"onUpdate:value":Q()}),Zq=(e,t)=>{let{slots:n,emit:r}=t,{value:i,disabled:a,payload:o,title:c,prefixCls:l,label:u=n.label,checked:d,className:f}=e,p=e=>{a||r(`change`,e,i)};return s(`label`,{class:Z({[`${l}-item-disabled`]:a},f)},[s(`input`,{class:`${l}-item-input`,type:`radio`,disabled:a,checked:d,onChange:p},null),s(`div`,{class:`${l}-item-label`,title:typeof c==`string`?c:``},[typeof u==`function`?u({value:i,disabled:a,payload:o,title:c}):u??i])])};Zq.inheritAttrs=!1;var Qq=d({name:`ASegmented`,inheritAttrs:!1,props:Vn(Xq(),{options:[],motionName:`thumb-motion`}),slots:Object,setup(e,t){let{emit:n,slots:r,attrs:i}=t,{prefixCls:o,direction:c,size:l}=K(`segmented`,e),[u,d]=Gq(o),f=M(),p=M(!1),m=a(()=>Yq(e.options)),h=(t,r)=>{e.disabled||(n(`update:value`,r),n(`change`,r))};return()=>{let t=o.value;return u(s(`div`,X(X({},i),{},{class:Z(t,{[d.value]:!0,[`${t}-block`]:e.block,[`${t}-disabled`]:e.disabled,[`${t}-lg`]:l.value==`large`,[`${t}-sm`]:l.value==`small`,[`${t}-rtl`]:c.value===`rtl`},i.class),ref:f}),[s(`div`,{class:`${t}-group`},[s(Jq,{containerRef:f,prefixCls:t,value:e.value,motionName:`${t}-${e.motionName}`,direction:c.value,getValueIndex:e=>m.value.findIndex(t=>t.value===e),onMotionStart:()=>{p.value=!0},onMotionEnd:()=>{p.value=!1}},null),m.value.map(n=>s(Zq,X(X({key:n.value,prefixCls:t,checked:n.value===e.value,onChange:h},n),{},{className:Z(n.className,`${t}-item`,{[`${t}-item-selected`]:n.value===e.value&&!p.value}),disabled:!!e.disabled||!!n.disabled}),r))])]))}}}),$q=be(Qq),eJ=e=>{let{componentCls:t}=e;return{[t]:G(G({},Ne(e)),{display:`flex`,justifyContent:`center`,alignItems:`center`,padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:`relative`,width:`100%`,height:`100%`,overflow:`hidden`,[`& > ${t}-mask`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:10,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`,color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:`center`,[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:`transparent`}}},tJ=Le(`QRCode`,e=>eJ(Fe(e,{QRCodeTextColor:`rgba(0, 0, 0, 0.88)`,QRCodeMaskBackgroundColor:`rgba(255, 255, 255, 0.96)`}))),nJ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function rJ(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:q(`canvas`),color:String,bgColor:String,includeMargin:Boolean,imageSettings:ut()}),DJ=()=>G(G({},EJ()),{errorLevel:q(`M`),icon:String,iconSize:{type:Number,default:40},status:q(`active`),bordered:{type:Boolean,default:!0}}),OJ;(function(e){class t{static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=o&&o<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=o;;u++){let n=t.getNumDataCodewords(u,r)*8,i=a.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthm[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e>>9)*1335;let a=(t<<10|n)^21522;i(!(a>>>15));for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(!(t>>>18));for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;ne+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(!(n>>>8)),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return!!(e>>>t&1)}function i(e){if(!e)throw Error(`Assertion error`)}class a{static makeBytes(e){let t=[];for(let r of e)n(r,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw RangeError(`String contains non-numeric characters`);let t=[];for(let r=0;r=1<1&&arguments[1]!==void 0?arguments[1]:0,n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function BJ(e,t){return e.slice().map((e,n)=>n=t.y+t.h?e:e.map((e,n)=>n=t.x+t.w?e:!1))}function VJ(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*RJ),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);d={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}return{x:l,y:u,h:c,w:s,excavation:d}}function HJ(e,t){return t==null?e?IJ:LJ:Math.floor(t)}var UJ=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),WJ=d({name:`QRCodeCanvas`,inheritAttrs:!1,props:G(G({},EJ()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:r}=t,i=a(()=>e.imageSettings?.src),o=M(null),c=M(null),l=M(!1);return r({toDataURL:(e,t)=>o.value?.toDataURL(e,t)}),P(()=>{let{value:t,size:n=jJ,level:r=MJ,bgColor:i=NJ,fgColor:a=PJ,includeMargin:s=FJ,marginSize:u,imageSettings:d}=e;if(o.value!=null){let e=o.value,f=e.getContext(`2d`);if(!f)return;let p=kJ.QrCode.encodeText(t,AJ[r]).getModules(),m=HJ(s,u),h=p.length+m*2,g=VJ(p,n,m,d),_=c.value,v=l.value&&g!=null&&_!==null&&_.complete&&_.naturalHeight!==0&&_.naturalWidth!==0;v&&g.excavation!=null&&(p=BJ(p,g.excavation));let y=window.devicePixelRatio||1;e.height=e.width=n*y;let b=n/h*y;f.scale(b,b),f.fillStyle=i,f.fillRect(0,0,h,h),f.fillStyle=a,UJ?f.fill(new Path2D(zJ(p,m))):p.forEach(function(e,t){e.forEach(function(e,n){e&&f.fillRect(n+m,t+m,1,1)})}),v&&f.drawImage(_,g.x+m,g.y+m,g.w,g.h)}},{flush:`post`}),H(i,()=>{l.value=!1}),()=>{let t=e.size??jJ,r={height:`${t}px`,width:`${t}px`},a=null;return i.value!=null&&(a=s(`img`,{src:i.value,key:i.value,style:{display:`none`},onLoad:()=>{l.value=!0},ref:c},null)),s(v,null,[s(`canvas`,X(X({},n),{},{style:[r,n.style],ref:o}),null),a])}}}),GJ=d({name:`QRCodeSVG`,inheritAttrs:!1,props:G(G({},EJ()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,r=null,i=null,a=null,o=null;return P(()=>{let{value:c,size:l=jJ,level:u=MJ,includeMargin:d=FJ,marginSize:f,imageSettings:p}=e;t=kJ.QrCode.encodeText(c,AJ[u]).getModules(),n=HJ(d,f),r=t.length+n*2,i=VJ(t,l,n,p),p!=null&&i!=null&&(i.excavation!=null&&(t=BJ(t,i.excavation)),o=s(`image`,{"xlink:href":p.src,height:i.h,width:i.w,x:i.x+n,y:i.y+n,preserveAspectRatio:`none`},null)),a=zJ(t,n)}),()=>{let t=e.bgColor&&NJ,n=e.fgColor&&PJ;return s(`svg`,{height:e.size,width:e.size,viewBox:`0 0 ${r} ${r}`},[!!e.title&&s(`title`,null,[e.title]),s(`path`,{fill:t,d:`M0,0 h${r}v${r}H0z`,"shape-rendering":`crispEdges`},null),s(`path`,{fill:n,d:a,"shape-rendering":`crispEdges`},null),o])}}}),KJ=d({name:`AQrcode`,inheritAttrs:!1,props:DJ(),emits:[`refresh`],setup(e,t){let{emit:n,attrs:r,expose:i}=t,[o]=Ft(`QRCode`),{prefixCls:c}=K(`qrcode`,e),[l,u]=tJ(c),[,d]=Ct(),f=W();i({toDataURL:(e,t)=>f.value?.toDataURL(e,t)});let p=a(()=>{let{value:t,icon:n=``,size:r=160,iconSize:i=40,color:a=d.value.colorText,bgColor:o=`transparent`,errorLevel:s=`M`}=e,c={src:n,x:void 0,y:void 0,height:i,width:i,excavate:!0};return{value:t,size:r-(d.value.paddingSM+d.value.lineWidth)*2,level:s,bgColor:o,fgColor:a,imageSettings:n?c:void 0}});return()=>{let t=c.value;return l(s(`div`,X(X({},r),{},{style:[r.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:p.value.bgColor}],class:[u.value,t,{[`${t}-borderless`]:!e.bordered}]}),[e.status!==`active`&&s(`div`,{class:`${t}-mask`},[e.status===`loading`&&s(bF,null,null),e.status===`expired`&&s(v,null,[s(`p`,{class:`${t}-expired`},[o.value.expired]),s(Ln,{type:`link`,onClick:e=>n(`refresh`,e)},{default:()=>[o.value.refresh],icon:()=>s(TJ,null,null)})]),e.status===`scanned`&&s(`p`,{class:`${t}-scanned`},[o.value.scanned])]),e.type===`canvas`?s(WJ,X({ref:f},p.value),null):s(GJ,p.value,null)]))}}}),qJ=be(KJ);function JJ(e){let t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:r,right:i,bottom:a,left:o}=e.getBoundingClientRect();return r>=0&&o>=0&&i<=t&&a<=n}function YJ(e,t,n,r){let[i,o]=dn(void 0);P(()=>{let t=typeof e.value==`function`?e.value():e.value;o(t||null)},{flush:`post`});let[s,c]=dn(null),l=()=>{if(!t.value){c(null);return}if(i.value){!JJ(i.value)&&t.value&&i.value.scrollIntoView(r.value);let{left:e,top:n,width:a,height:o}=i.value.getBoundingClientRect(),l={left:e,top:n,width:a,height:o,radius:0};JSON.stringify(s.value)!==JSON.stringify(l)&&c(l)}else c(null)};return D(()=>{H([t,i],()=>{l()},{flush:`post`,immediate:!0}),window.addEventListener(`resize`,l)}),p(()=>{window.removeEventListener(`resize`,l)}),[a(()=>{if(!s.value)return s.value;let e=n.value?.offset||6,t=n.value?.radius||2;return{left:s.value.left-e,top:s.value.top-e,width:s.value.width+e*2,height:s.value.height+e*2,radius:t}}),i]}var XJ=()=>({arrow:$t([Boolean,Object]),target:$t([String,Function,Object]),title:$t([String,Object]),description:$t([String,Object]),placement:q(),mask:$t([Object,Boolean],!0),className:{type:String},style:ut(),scrollIntoViewOptions:$t([Boolean,Object])}),ZJ=()=>G(G({},XJ()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:Q(),onFinish:Q(),renderPanel:Q(),onPrev:Q(),onNext:Q()}),QJ=d({name:`DefaultPanel`,inheritAttrs:!1,props:ZJ(),setup(e,t){let{attrs:n}=t;return()=>{let{prefixCls:t,current:r,total:i,title:a,description:o,onClose:c,onPrev:l,onNext:u,onFinish:d}=e;return s(`div`,X(X({},n),{},{class:Z(`${t}-content`,n.class)}),[s(`div`,{class:`${t}-inner`},[s(`button`,{type:`button`,onClick:c,"aria-label":`Close`,class:`${t}-close`},[s(`span`,{class:`${t}-close-x`},[g(`×`)])]),s(`div`,{class:`${t}-header`},[s(`div`,{class:`${t}-title`},[a])]),s(`div`,{class:`${t}-description`},[o]),s(`div`,{class:`${t}-footer`},[s(`div`,{class:`${t}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((e,t)=>s(`span`,{key:e,class:t===r?`active`:``},null)):null]),s(`div`,{class:`${t}-buttons`},[r===0?null:s(`button`,{class:`${t}-prev-btn`,onClick:l},[g(`Prev`)]),r===i-1?s(`button`,{class:`${t}-finish-btn`,onClick:d},[g(`Finish`)]):s(`button`,{class:`${t}-next-btn`,onClick:u},[g(`Next`)])])])])])}}}),$J=d({name:`TourStep`,inheritAttrs:!1,props:ZJ(),setup(e,t){let{attrs:n}=t;return()=>{let{current:t,renderPanel:r}=e;return s(v,null,[typeof r==`function`?r(G(G({},n),e),t):s(QJ,X(X({},n),e),null)])}}}),eY=0,tY=de();function nY(){let e;return tY?(e=eY,eY+=1):e=`TEST_OR_SSR`,e}function rY(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W(``),t=`vc_unique_${nY()}`;return e.value||t}var iY={fill:`transparent`,"pointer-events":`auto`},aY=d({name:`TourMask`,props:{prefixCls:{type:String},pos:ut(),rootClassName:{type:String},showMask:Y(),fill:{type:String,default:`rgba(0,0,0,0.5)`},open:Y(),animated:$t([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t,r=rY();return()=>{let{prefixCls:t,open:i,rootClassName:a,pos:o,showMask:c,fill:l,animated:u,zIndex:d}=e,f=`${t}-mask-${r}`,p=typeof u==`object`?u?.placeholder:u;return s(qn,{visible:i,autoLock:!0},{default:()=>i&&s(`div`,X(X({},n),{},{class:Z(`${t}-mask`,a,n.class),style:[{position:`fixed`,left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:`none`},n.style]}),[c?s(`svg`,{style:{width:`100%`,height:`100%`}},[s(`defs`,null,[s(`mask`,{id:f},[s(`rect`,{x:`0`,y:`0`,width:`100vw`,height:`100vh`,fill:`white`},null),o&&s(`rect`,{x:o.left,y:o.top,rx:o.radius,width:o.width,height:o.height,fill:`black`,class:p?`${t}-placeholder-animated`:``},null)])]),s(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:l,mask:`url(#${f})`},null),o&&s(v,null,[s(`rect`,X(X({},iY),{},{x:`0`,y:`0`,width:`100%`,height:o.top}),null),s(`rect`,X(X({},iY),{},{x:`0`,y:`0`,width:o.left,height:`100%`}),null),s(`rect`,X(X({},iY),{},{x:`0`,y:o.top+o.height,width:`100%`,height:`calc(100vh - ${o.top+o.height}px)`}),null),s(`rect`,X(X({},iY),{},{x:o.left+o.width,y:`0`,width:`calc(100vw - ${o.left+o.width}px)`,height:`100%`}),null)])]):null])})}}}),oY=[0,0],sY={left:{points:[`cr`,`cl`],offset:[-8,0]},right:{points:[`cl`,`cr`],offset:[8,0]},top:{points:[`bc`,`tc`],offset:[0,-8]},bottom:{points:[`tc`,`bc`],offset:[0,8]},topLeft:{points:[`bl`,`tl`],offset:[0,-8]},leftTop:{points:[`tr`,`tl`],offset:[-8,0]},topRight:{points:[`br`,`tr`],offset:[0,-8]},rightTop:{points:[`tl`,`tr`],offset:[8,0]},bottomRight:{points:[`tr`,`br`],offset:[0,8]},rightBottom:{points:[`bl`,`br`],offset:[8,0]},bottomLeft:{points:[`tl`,`bl`],offset:[0,8]},leftBottom:{points:[`br`,`bl`],offset:[-8,0]}};function cY(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t={};return Object.keys(sY).forEach(n=>{t[n]=G(G({},sY[n]),{autoArrow:e,targetOffset:oY})}),t}cY();var lY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{builtinPlacements:e,popupAlign:t}=Ea();return{builtinPlacements:e,popupAlign:t,steps:vt(),open:Y(),defaultCurrent:{type:Number},current:{type:Number},onChange:Q(),onClose:Q(),onFinish:Q(),mask:$t([Boolean,Object],!0),arrow:$t([Boolean,Object],!0),rootClassName:{type:String},placement:q(`bottom`),prefixCls:{type:String,default:`rc-tour`},renderPanel:Q(),gap:ut(),animated:$t([Boolean,Object]),scrollIntoViewOptions:$t([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},fY=d({name:`Tour`,inheritAttrs:!1,props:Vn(dY(),{}),setup(e){let{defaultCurrent:t,placement:n,mask:r,scrollIntoViewOptions:o,open:c,gap:l,arrow:u}=i(e),d=W(),[f,p]=zu(0,{value:a(()=>e.current),defaultValue:t.value}),[m,h]=zu(void 0,{value:a(()=>e.open),postState:t=>f.value<0||f.value>=e.steps.length?!1:t??!0}),g=M(m.value);P(()=>{m.value&&!g.value&&p(0),g.value=m.value});let _=a(()=>e.steps[f.value]||{}),y=a(()=>_.value.placement??n.value),b=a(()=>m.value&&(_.value.mask??r.value)),x=a(()=>_.value.scrollIntoViewOptions??o.value),[S,C]=YJ(a(()=>_.value.target),c,l,x),w=a(()=>C.value?_.value.arrow===void 0?u.value:_.value.arrow:!1),T=a(()=>typeof w.value==`object`&&w.value.pointAtCenter);H(T,()=>{var e;(e=d.value)==null||e.forcePopupAlign()}),H(f,()=>{var e;(e=d.value)==null||e.forcePopupAlign()});let E=t=>{var n;p(t),(n=e.onChange)==null||n.call(e,t)};return()=>{let{prefixCls:t,steps:n,onClose:r,onFinish:i,rootClassName:o,renderPanel:c,animated:l,zIndex:u}=e,p=lY(e,[`prefixCls`,`steps`,`onClose`,`onFinish`,`rootClassName`,`renderPanel`,`animated`,`zIndex`]);if(C.value===void 0)return null;let g=()=>{h(!1),r?.(f.value)},x=typeof b.value==`boolean`?b.value:!!b.value,D=typeof b.value==`boolean`?void 0:b.value,O=()=>C.value||document.body,k=()=>s($J,X({arrow:w.value,key:`content`,prefixCls:t,total:n.length,renderPanel:c,onPrev:()=>{E(f.value-1)},onNext:()=>{E(f.value+1)},onClose:g,current:f.value,onFinish:()=>{g(),i?.()}},_.value),null),A=a(()=>{let e=S.value||uY,t={};return Object.keys(e).forEach(n=>{typeof e[n]==`number`?t[n]=`${e[n]}px`:t[n]=e[n]}),t});return m.value?s(v,null,[s(aY,{zIndex:u,prefixCls:t,pos:S.value,showMask:x,style:D?.style,fill:D?.color,open:m.value,animated:l,rootClassName:o},null),s(tl,X(X({},p),{},{arrow:!!p.arrow,builtinPlacements:_.value.target?p.builtinPlacements??cY(T.value):void 0,ref:d,popupStyle:_.value.target?_.value.style:G(G({},_.value.style),{position:`fixed`,left:uY.left,top:uY.top,transform:`translate(-50%, -50%)`}),popupPlacement:y.value,popupVisible:m.value,popupClassName:Z(o,_.value.className),prefixCls:t,popup:k,forceRender:!1,destroyPopupOnHide:!0,zIndex:u,mask:!1,getTriggerDOMNode:O}),{default:()=>[s(qn,{visible:m.value,autoLock:!0},{default:()=>[s(`div`,{class:Z(o,`${t}-target-placeholder`),style:G(G({},A.value),{position:`fixed`,pointerEvents:`none`})},null)]})]})]):null}}}),pY=()=>G(G({},dY()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),mY=d({name:`ATourPanel`,inheritAttrs:!1,props:G(G({},ZJ()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),setup(e,t){let{attrs:n,slots:r}=t,{current:o,total:c}=i(e),l=a(()=>o.value===c.value-1),u=t=>{var n;let r=e.prevButtonProps;(n=e.onPrev)==null||n.call(e,t),typeof r?.onClick==`function`&&r?.onClick()},d=t=>{var n,r;let i=e.nextButtonProps;l.value?(n=e.onFinish)==null||n.call(e,t):(r=e.onNext)==null||r.call(e,t),typeof i?.onClick==`function`&&i?.onClick()};return()=>{let{prefixCls:t,title:i,onClose:a,cover:f,description:p,type:m,arrow:h}=e,g=e.prevButtonProps,_=e.nextButtonProps,v;i&&(v=s(`div`,{class:`${t}-header`},[s(`div`,{class:`${t}-title`},[i])]));let y;p&&(y=s(`div`,{class:`${t}-description`},[p]));let b;f&&(b=s(`div`,{class:`${t}-cover`},[f]));let x;x=r.indicatorsRender?r.indicatorsRender({current:o.value,total:c}):[...Array.from({length:c.value}).keys()].map((e,n)=>s(`span`,{key:e,class:Z(n===o.value&&`${t}-indicator-active`,`${t}-indicator`)},null));let S=m===`primary`?`default`:`primary`,C={type:`default`,ghost:m===`primary`};return s(ct,{componentName:`Tour`,defaultLocale:Ut.Tour},{default:e=>s(`div`,X(X({},n),{},{class:Z(m===`primary`?`${t}-primary`:``,n.class,`${t}-content`)}),[h&&s(`div`,{class:`${t}-arrow`,key:`arrow`},null),s(`div`,{class:`${t}-inner`},[s(_t,{class:`${t}-close`,onClick:a},null),b,v,y,s(`div`,{class:`${t}-footer`},[c.value>1&&s(`div`,{class:`${t}-indicators`},[x]),s(`div`,{class:`${t}-buttons`},[o.value===0?null:s(Ln,X(X(X({},C),g),{},{onClick:u,size:`small`,class:Z(`${t}-prev-btn`,g?.className)}),{default:()=>[it(g?.children)?g.children():g?.children??e.Previous]}),s(Ln,X(X({type:S},_),{},{onClick:d,size:`small`,class:Z(`${t}-next-btn`,_?.className)}),{default:()=>[it(_?.children)?_?.children():l.value?e.Finish:e.Next]})])])])])})}}}),hY=e=>{let{defaultType:t,steps:n,current:r,defaultCurrent:i}=e,o=W(i?.value),s=a(()=>r?.value);H(s,e=>{o.value=e??i?.value},{immediate:!0});let c=e=>{o.value=e},l=a(()=>typeof o.value==`number`?n&&n.value?.[o.value]?.type:t?.value);return{currentMergedType:a(()=>l.value??t?.value),updateInnerCurrent:c}},gY=e=>{let{componentCls:t,lineHeight:n,padding:r,paddingXS:i,borderRadius:a,borderRadiusXS:o,colorPrimary:s,colorText:c,colorFill:l,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:p,fontSize:m,colorBgContainer:h,fontWeightStrong:g,marginXS:_,colorTextLightSolid:v,tourBorderRadius:y,colorWhite:b,colorBgTextHover:x,tourCloseSize:S,motionDurationSlow:C,antCls:w}=e;return[{[t]:G(G({},Ne(e)),{color:c,position:`absolute`,zIndex:p,display:`block`,visibility:`visible`,fontSize:m,lineHeight:n,width:520,"--antd-arrow-background-color":h,"&-pure":{maxWidth:`100%`,position:`relative`},[`&${t}-hidden`]:{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-inner`]:{textAlign:`start`,textDecoration:`none`,borderRadius:y,boxShadow:f,position:`relative`,backgroundColor:h,border:`none`,backgroundClip:`padding-box`,[`${t}-close`]:{position:`absolute`,top:r,insetInlineEnd:r,color:e.colorIcon,outline:`none`,width:S,height:S,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:`flex`,alignItems:`center`,justifyContent:`center`,"&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?`transparent`:e.colorFillContent}},[`${t}-cover`]:{textAlign:`center`,padding:`${r+S+i}px ${r}px 0`,img:{width:`100%`}},[`${t}-header`]:{padding:`${r}px ${r}px ${i}px`,[`${t}-title`]:{lineHeight:n,fontSize:m,fontWeight:g}},[`${t}-description`]:{padding:`0 ${r}px`,lineHeight:n,wordWrap:`break-word`},[`${t}-footer`]:{padding:`${i}px ${r}px ${r}px`,textAlign:`end`,borderRadius:`0 0 ${o}px ${o}px`,display:`flex`,[`${t}-indicators`]:{display:`inline-block`,[`${t}-indicator`]:{width:d,height:u,display:`inline-block`,borderRadius:`50%`,background:l,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:s}}},[`${t}-buttons`]:{marginInlineStart:`auto`,[`${w}-btn`]:{marginInlineStart:_}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":s,[`${t}-inner`]:{color:v,textAlign:`start`,textDecoration:`none`,backgroundColor:s,borderRadius:a,boxShadow:f,[`${t}-close`]:{color:v},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new me(v).setAlpha(.15).toRgbString(),"&-active":{background:v}}},[`${t}-prev-btn`]:{color:v,borderColor:new me(v).setAlpha(.15).toRgbString(),backgroundColor:s,"&:hover":{backgroundColor:new me(v).setAlpha(.15).toRgbString(),borderColor:`transparent`}},[`${t}-next-btn`]:{color:s,borderColor:`transparent`,background:b,"&:hover":{background:new me(x).onBackground(b).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${C}`}},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${t}-inner`]:{borderRadius:Math.min(y,8)}}},s_(e,{colorBg:`var(--antd-arrow-background-color)`,contentRadius:y,limitVerticalRadius:!0})]},_Y=Le(`Tour`,e=>{let{borderRadiusLG:t,fontSize:n,lineHeight:r}=e;return[gY(Fe(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*r}))]}),vY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{steps:t,current:i,type:c,rootClassName:l}=e,u=vY(e,[`steps`,`current`,`type`,`rootClassName`]),d=Z({[`${f.value}-primary`]:g.value===`primary`,[`${f.value}-rtl`]:p.value===`rtl`},h.value,l),v=(e,t)=>s(mY,X(X({},e),{},{type:c,current:t}),{indicatorsRender:o.indicatorsRender}),y=e=>{_(e),r(`update:current`,e),r(`change`,e)},b=a(()=>Qg({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return m(s(fY,X(X(X({},n),u),{},{rootClassName:d,prefixCls:f.value,current:i,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:v,onChange:y,steps:t,builtinPlacements:b.value}),null))}}}),bY=be(yY),xY=Symbol(`appConfigContext`),SY=t=>e(xY,t),CY=()=>C(xY,{}),wY=Symbol(`appContext`),TY=t=>e(wY,t),EY=k({message:{},notification:{},modal:{}}),DY=()=>C(wY,EY),OY=e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a}}},kY=Le(`App`,e=>[OY(e)]),AY=()=>({rootClassName:String,message:ut(),notification:ut()}),jY=()=>DY(),MY=d({name:`AApp`,props:Vn(AY(),{}),setup(e,t){let{slots:n}=t,{prefixCls:r}=K(`app`,e),[i,o]=kY(r),c=a(()=>Z(o.value,r.value,e.rootClassName)),l=CY(),u=a(()=>({message:G(G({},l.message),e.message),notification:G(G({},l.notification),e.notification)}));SY(u.value);let[d,f]=Nt(u.value.message),[p,m]=xt(u.value.notification),[h,g]=rr();return TY(a(()=>({message:d,notification:p,modal:h})).value),()=>i(s(`div`,{class:c.value},[g(),f(),m(),n.default?.call(n)]))}});MY.useApp=jY,MY.install=function(e){e.component(MY.name,MY)};var NY=[`wrap`,`nowrap`,`wrap-reverse`],PY=[`flex-start`,`flex-end`,`start`,`end`,`center`,`space-between`,`space-around`,`space-evenly`,`stretch`,`normal`,`left`,`right`],FY=[`center`,`start`,`end`,`flex-start`,`flex-end`,`self-start`,`self-end`,`baseline`,`normal`,`stretch`],IY=(e,t)=>{let n={};return NY.forEach(r=>{n[`${e}-wrap-${r}`]=t.wrap===r}),n},LY=(e,t)=>{let n={};return FY.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},RY=(e,t)=>{let n={};return PY.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n};function zY(e,t){return Z(G(G(G({},IY(e,t)),LY(e,t)),RY(e,t)))}var BY=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`},"&:empty":{display:`none`}}}},VY=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},HY=e=>{let{componentCls:t}=e,n={};return NY.forEach(e=>{n[`${t}-wrap-${e}`]={flexWrap:e}}),n},UY=e=>{let{componentCls:t}=e,n={};return FY.forEach(e=>{n[`${t}-align-${e}`]={alignItems:e}}),n},WY=e=>{let{componentCls:t}=e,n={};return PY.forEach(e=>{n[`${t}-justify-${e}`]={justifyContent:e}}),n},GY=Le(`Flex`,e=>{let t=Fe(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[BY(t),VY(t),HY(t),UY(t),WY(t)]});function KY(e){return[`small`,`middle`,`large`].includes(e)}var qY=()=>({prefixCls:q(),vertical:Y(),wrap:q(),justify:q(),align:q(),flex:$t([Number,String]),gap:$t([Number,String]),component:bt()}),JY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i[c.value,u.value,zY(c.value,e),{[`${c.value}-rtl`]:o.value===`rtl`,[`${c.value}-gap-${e.gap}`]:KY(e.gap),[`${c.value}-vertical`]:e.vertical??i?.value.vertical}]);return()=>{let{flex:t,gap:i,component:a=`div`}=e,o=JY(e,[`flex`,`gap`,`component`]),c={};return t&&(c.flex=t),i&&!KY(i)&&(c.gap=`${i}px`),l(s(a,X({class:[r.class,d.value],style:[r.style,c]},Gn(o,[`justify`,`wrap`,`align`,`vertical`])),{default:()=>[n.default?.call(n)]}))}}}),XY=be(YY),ZY=S({Affix:()=>Gi,Alert:()=>Eg,Anchor:()=>_a,AnchorLink:()=>fa,App:()=>MY,AutoComplete:()=>hg,AutoCompleteOptGroup:()=>pg,AutoCompleteOption:()=>fg,Avatar:()=>S_,AvatarGroup:()=>x_,BackTop:()=>hM,Badge:()=>V_,BadgeRibbon:()=>R_,Breadcrumb:()=>Dy,BreadcrumbItem:()=>gv,BreadcrumbSeparator:()=>Ey,Button:()=>Ln,ButtonGroup:()=>Bn,Calendar:()=>nC,Card:()=>Mw,CardGrid:()=>jw,CardMeta:()=>Aw,Carousel:()=>ZT,Cascader:()=>nA,CheckableTag:()=>CA,Checkbox:()=>dA,CheckboxGroup:()=>uA,Col:()=>pA,Collapse:()=>Ww,CollapsePanel:()=>Uw,Comment:()=>_A,Compact:()=>fr,ConfigProvider:()=>Wt,DatePicker:()=>aj,Descriptions:()=>yj,DescriptionsItem:()=>fj,DirectoryTree:()=>lU,Divider:()=>Cj,Drawer:()=>Uj,Dropdown:()=>wj,DropdownButton:()=>ov,Empty:()=>fe,Flex:()=>XY,FloatButton:()=>gM,FloatButtonGroup:()=>uM,Form:()=>Wk,FormItem:()=>Fk,FormItemRest:()=>cd,Grid:()=>fA,Image:()=>iP,ImagePreviewGroup:()=>rP,Input:()=>dN,InputGroup:()=>NM,InputNumber:()=>LP,InputPassword:()=>uN,InputSearch:()=>FM,Layout:()=>sF,LayoutContent:()=>oF,LayoutFooter:()=>iF,LayoutHeader:()=>rF,LayoutSider:()=>aF,List:()=>aI,ListItem:()=>eI,ListItemMeta:()=>ZF,LocaleProvider:()=>Ht,Mentions:()=>LI,MentionsOption:()=>II,Menu:()=>vy,MenuDivider:()=>ty,MenuItem:()=>Bv,MenuItemGroup:()=>ey,Modal:()=>Zn,MonthPicker:()=>ej,PageHeader:()=>oL,Pagination:()=>XF,Popconfirm:()=>dL,Popover:()=>b_,Progress:()=>KL,QRCode:()=>qJ,QuarterPicker:()=>rj,Radio:()=>xS,RadioButton:()=>bS,RadioGroup:()=>yS,RangePicker:()=>ij,Rate:()=>sR,Result:()=>ER,Row:()=>DR,Segmented:()=>$q,Select:()=>ag,SelectOptGroup:()=>sg,SelectOption:()=>og,Skeleton:()=>Dw,SkeletonAvatar:()=>Ew,SkeletonButton:()=>Sw,SkeletonImage:()=>Tw,SkeletonInput:()=>Cw,SkeletonTitle:()=>QC,Slider:()=>cz,Space:()=>nL,Spin:()=>bF,Statistic:()=>YI,StatisticCountdown:()=>JI,Step:()=>jz,Steps:()=>Mz,SubMenu:()=>Yv,Switch:()=>Vz,TabPane:()=>BC,Table:()=>rW,TableColumn:()=>QU,TableColumnGroup:()=>$U,TableSummary:()=>nW,TableSummaryCell:()=>tW,TableSummaryRow:()=>eW,Tabs:()=>HC,Tag:()=>wA,Textarea:()=>QM,TimePicker:()=>hG,TimeRangePicker:()=>mG,Timeline:()=>bG,TimelineItem:()=>gG,Tooltip:()=>m_,Tour:()=>bY,Transfer:()=>OW,Tree:()=>dU,TreeNode:()=>uU,TreeSelect:()=>uG,TreeSelectNode:()=>lG,Typography:()=>bK,TypographyLink:()=>dK,TypographyParagraph:()=>pK,TypographyText:()=>hK,TypographyTitle:()=>yK,Upload:()=>kq,UploadDragger:()=>Oq,Watermark:()=>Bq,WeekPicker:()=>$A,message:()=>ot,notification:()=>zt}),QY={version:Ze,install:function(e){return Object.keys(ZY).forEach(t=>{let n=ZY[t];n.install&&e.use(n)}),e.use(Fi.StyleProvider),e.config.globalProperties.$message=ot,e.config.globalProperties.$notification=zt,e.config.globalProperties.$info=Zn.info,e.config.globalProperties.$success=Zn.success,e.config.globalProperties.$error=Zn.error,e.config.globalProperties.$warning=Zn.warning,e.config.globalProperties.$confirm=Zn.confirm,e.config.globalProperties.$destroyAll=Zn.destroyAll,e}},$Y={};function eX(e,t){let n=U(`router-view`);return _(),R(n)}var tX=ne($Y,[[`render`,eX]]),nX=typeof document<`u`,rX=/#/g,iX=/&/g,aX=/\//g,oX=/=/g,sX=/\?/g,cX=/\+/g,lX=/%5B/g,uX=/%5D/g,dX=/%5E/g,fX=/%60/g,pX=/%7B/g,mX=/%7C/g,hX=/%7D/g,gX=/%20/g;function _X(e){return e==null?``:encodeURI(``+e).replace(mX,`|`).replace(lX,`[`).replace(uX,`]`)}function vX(e){return _X(e).replace(pX,`{`).replace(hX,`}`).replace(dX,`^`)}function yX(e){return _X(e).replace(cX,`%2B`).replace(gX,`+`).replace(rX,`%23`).replace(iX,`%26`).replace(fX,"`").replace(pX,`{`).replace(hX,`}`).replace(dX,`^`)}function bX(e){return yX(e).replace(oX,`%3D`)}function xX(e){return _X(e).replace(rX,`%23`).replace(sX,`%3F`)}function SX(e){return xX(e).replace(aX,`%2F`)}function CX(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var wX=/\/$/,TX=e=>e.replace(wX,``);function EX(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=PX(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:CX(o)}}function DX(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function OX(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function kX(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&AX(t.matched[r],n.matched[i])&&jX(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function AX(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function jX(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!MX(e[n],t[n]))return!1;return!0}function MX(e,t){return Or(e)?NX(e,t):Or(t)?NX(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function NX(e,t){return Or(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function PX(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var FX={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function IX(e){if(!e){if(nX){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),TX(e)}var LX=/^[^#]+#/;function RX(e,t){return e.replace(LX,`#`)+t}function zX(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var BX=()=>({left:window.scrollX,top:window.scrollY});function VX(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=zX(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function HX(e,t){return(history.state?history.state.position-t:-1)+e}var UX=new Map;function WX(e,t){UX.set(e,t)}function GX(e){let t=UX.get(e);return UX.delete(e),t}function KX(e){return typeof e==`string`||e&&typeof e==`object`}function qX(e){return typeof e==`string`||typeof e==`symbol`}function JX(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&yX(e)):[r&&yX(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function XX(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Or(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function ZX(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function QX(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Pr(4,{from:n,to:t})):e instanceof Error?c(e):KX(e)?c(Pr(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function $X(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(Fr(s)){let c=(s.__vccOpts||s)[t];c&&a.push(QX(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Sr(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&QX(c,n,r,o,e,i)()}))}}}return a}function eZ(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oAX(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>AX(e,s))||i.push(s))}return[n,r,i]}var tZ=()=>location.protocol+`//`+location.host;function nZ(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),OX(n,``)}return OX(n,e)+r+i}function rZ(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=nZ(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(jr({},e.state,{scroll:BX()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function iZ(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?BX():null}}function aZ(e){let{history:t,location:n}=window,r={value:nZ(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:tZ()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,jr({},t.state,iZ(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=jr({},i.value,t.state,{forward:e,scroll:BX()});a(o.current,o,!0),a(e,jr({},iZ(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function oZ(e){e=IX(e);let t=aZ(e),n=rZ(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=jr({location:``,base:e,go:r,createHref:RX.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var sZ={type:0,value:``},cZ=/[a-zA-Z0-9_]/;function lZ(e){if(!e)return[[]];if(e===`/`)return[[sZ]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===80?1:-1:0}function hZ(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var _Z={strict:!1,end:!0,sensitive:!1};function vZ(e,t,n){let r=pZ(lZ(e.path),n),i=jr(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function yZ(e,t){let n=[],r=new Map;t=kr(_Z,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=xZ(e);s.aliasOf=r&&r.record;let l=kr(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(xZ(jr({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=vZ(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!CZ(d)&&o(e.name)),DZ(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Lr}function o(e){if(qX(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=TZ(e,n);n.splice(t,0,e),e.record.name&&!CZ(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Pr(1,{location:e});s=i.record.name,a=jr(bZ(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&bZ(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Pr(1,{location:e,currentLocation:t});s=i.record.name,a=jr({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:wZ(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function bZ(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function xZ(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:SZ(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function SZ(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function CZ(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function wZ(e){return e.reduce((e,t)=>jr(e,t.meta),{})}function TZ(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;hZ(e,t[i])<0?r=i:n=i+1}let i=EZ(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function EZ(e){let t=e;for(;t=t.parent;)if(DZ(t)&&hZ(e,t)===0)return t}function DZ({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function OZ(e){let t=C(Tr),n=C(wr),r=a(()=>{let n=b(e.to);return t.resolve(n)}),i=a(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(AX.bind(null,i));if(o>-1)return o;let s=NZ(e[t-2]);return t>1&&NZ(i)===s&&a[a.length-1].path!==s?a.findIndex(AX.bind(null,e[t-2])):o}),o=a(()=>i.value>-1&&MZ(n.params,r.value.params)),s=a(()=>i.value>-1&&i.value===n.matched.length-1&&jX(n.params,r.value.params));function c(n={}){if(jZ(n)){let n=t[b(e.replace)?`replace`:`push`](b(e.to)).catch(Lr);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:a(()=>r.value.href),isActive:o,isExactActive:s,navigate:c}}function kZ(e){return e.length===1?e[0]:e}var AZ=d({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:OZ,setup(e,{slots:t}){let n=k(OZ(e)),{options:r}=C(Tr),i=a(()=>({[PZ(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[PZ(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&kZ(t.default(n));return e.custom?r:le(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function jZ(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function MZ(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Or(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function NZ(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var PZ=(e,t,n)=>e??t??n,FZ=d({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:n,slots:r}){let i=C(Nr),o=a(()=>t.route||i.value),s=C(Er,0),c=a(()=>{let e=b(s),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),l=a(()=>o.value.matched[c.value]);e(Er,a(()=>c.value+1)),e(Cr,l),e(Nr,o);let u=W();return H(()=>[u.value,l.value,t.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!AX(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let e=o.value,i=t.name,a=l.value,s=a&&a.components[i];if(!s)return IZ(r.default,{Component:s,route:e});let c=a.props[i],d=c?c===!0?e.params:typeof c==`function`?c(e):c:null,f=le(s,jr({},d,n,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[i]=null)},ref:u}));return IZ(r.default,{Component:f,route:e})||f}}});function IZ(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var LZ=FZ;function RZ(e){let t=yZ(e.routes,e),n=e.parseQuery||JX,r=e.stringifyQuery||YX,i=e.history,a=ZX(),o=ZX(),s=ZX(),c=M(FX),l=FX;nX&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Ir.bind(null,e=>``+e),d=Ir.bind(null,SX),f=Ir.bind(null,CX);function p(e,n){let r,i;return qX(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=jr({},a||c.value),typeof e==`string`){let r=EX(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return jr(r,o,{params:f(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=jr({},e,{path:EX(n,e.path,a.path).path});else{let t=jr({},e.params);for(let e in t)t[e]??delete t[e];o=jr({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=DX(r,jr({},e,{hash:vX(l),path:s.path})),m=i.createHref(p);return jr({fullPath:p,hash:l,query:r===YX?XX(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?EX(n,e,c.value.path):jr({},e)}function y(e,t){if(l!==e)return Pr(8,{from:t,to:e})}function S(e){return T(e)}function C(e){return S(jr(v(e),{replace:!0}))}function w(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),jr({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function T(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=w(n,i);if(u)return T(jr(v(u),{state:typeof u==`object`?jr({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&kX(r,i,n)&&(f=Pr(16,{to:d,from:i}),z(i,i,!0,!1)),(f?Promise.resolve(f):O(d,i)).catch(e=>Mr(e)?Mr(e,2)?e:R(e):L(e,d,i)).then(e=>{if(e){if(Mr(e,2))return T(jr({replace:s},v(e.to),{state:typeof e.to==`object`?jr({},a,e.to.state):a,force:o}),t||d)}else e=A(d,i,!0,s,a);return k(d,i,e),e})}function E(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){let t=V.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function O(e,t){let n,[r,i,s]=eZ(e,t);n=$X(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(QX(r,e,t))});let c=E.bind(null,e,t);return n.push(c),re(n).then(()=>{n=[];for(let r of a.list())n.push(QX(r,e,t));return n.push(c),re(n)}).then(()=>{n=$X(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(QX(r,e,t))});return n.push(c),re(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter){if(Or(r.beforeEnter))for(let i of r.beforeEnter)n.push(QX(i,e,t));else n.push(QX(r.beforeEnter,e,t))}return n.push(c),re(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=$X(s,`beforeRouteEnter`,e,t,D),n.push(c),re(n))).then(()=>{n=[];for(let r of o.list())n.push(QX(r,e,t));return n.push(c),re(n)}).catch(e=>Mr(e,8)?e:Promise.reject(e))}function k(e,t,n){s.list().forEach(r=>D(()=>r(e,t,n)))}function A(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===FX,l=nX?history.state:{};n&&(r||s?i.replace(e.fullPath,jr({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,z(e,t,n,s),R()}let j;function N(){j||=i.listen((e,t,n)=>{if(!ne.listening)return;let r=_(e),a=w(r,ne.currentRoute.value);if(a){T(jr(a,{replace:!0,force:!0}),r).catch(Lr);return}l=r;let o=c.value;nX&&WX(HX(o.fullPath,n.delta),BX()),O(r,o).catch(e=>Mr(e,12)?e:Mr(e,2)?(T(jr(v(e.to),{force:!0}),r).then(e=>{Mr(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(Lr),Promise.reject()):(n.delta&&i.go(-n.delta,!1),L(e,r,o))).then(e=>{e||=A(r,o,!1),e&&(n.delta&&!Mr(e,8)?i.go(-n.delta,!1):n.type===`pop`&&Mr(e,20)&&i.go(-1,!1)),k(r,o,e)}).catch(Lr)})}let P=ZX(),F=ZX(),I;function L(e,t,n){R(e);let r=F.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ee(){return I&&c.value!==FX?Promise.resolve():new Promise((e,t)=>{P.add([e,t])})}function R(e){return I||(I=!e,N(),P.list().forEach(([t,n])=>e?n(e):t()),P.reset()),e}function z(t,n,r,i){let{scrollBehavior:a}=e;if(!nX||!a)return Promise.resolve();let o=!r&&GX(HX(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return x().then(()=>a(t,n,o)).then(e=>t===c.value&&e&&VX(e)).catch(e=>t===c.value&&L(e,t,n))}let B=e=>i.go(e),te,V=new Set,ne={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:S,replace:C,go:B,back:()=>B(-1),forward:()=>B(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:F.add,isReady:ee,install(e){e.component(`RouterLink`,AZ),e.component(`RouterView`,LZ),e.config.globalProperties.$router=ne,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>b(c)}),nX&&!te&&c.value===FX&&(te=!0,S(i.location).catch(e=>{}));let t={};for(let e in FX)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Tr,ne),e.provide(wr,ce(t)),e.provide(Nr,c);let n=e.unmount;V.add(e),e.unmount=function(){V.delete(e),V.size<1&&(l=FX,j&&j(),j=null,c.value=FX,te=!1,I=!1),n()}}};function re(e){return e.reduce((e,t)=>e.then(()=>D(t)),Promise.resolve())}return ne}var zZ={key:0,class:`brand-copy`},BZ={key:0},VZ={class:`topbar-title`},HZ={class:`user-button`},UZ={class:`avatar`},WZ={class:`user-copy`},GZ=ne(d({__name:`AppLayout`,setup(e){let r=W(!1),i=Ar(),o=Dr(),c=an(),l=a(()=>i.path.startsWith(`/scenarios`)||i.path.startsWith(`/sops`)?[`scenarios`]:i.path.startsWith(`/execute`)?[`execute`]:i.path.startsWith(`/runs`)?[`runs`]:i.path.startsWith(`/knowledge`)?[`knowledge`]:[`dashboard`]),u={dashboard:`工作台`,scenarios:`场景与 SOP`,execute:`执行话术`,runs:`执行记录`,knowledge:`知识卡`},d=a(()=>u[l.value[0]]||`销冠 SOP`);D(()=>c.loadUser().catch(()=>c.logout()));function f({key:e}){o.push({dashboard:`/`,scenarios:`/scenarios`,execute:`/execute`,runs:`/runs`,knowledge:`/knowledge`}[e])}function p(){c.logout(),o.push(`/login`)}return(e,i)=>{let a=U(`a-menu-item`),o=U(`a-menu`),u=U(`a-layout-sider`),m=U(`a-button`),v=U(`a-dropdown`),y=U(`a-layout-header`),x=U(`router-view`),S=U(`a-layout-content`),C=U(`a-layout`);return _(),R(C,{class:`app-frame`},{default:z(()=>[s(u,{collapsed:r.value,"onUpdate:collapsed":i[0]||=e=>r.value=e,trigger:null,collapsible:``,width:224,class:`side-panel`},{default:z(()=>[h(`div`,{class:ue([`brand`,{compact:r.value}])},[i[3]||=h(`div`,{class:`brand-mark`},[h(`span`),h(`span`),h(`span`)],-1),r.value?t(``,!0):(_(),ee(`div`,zZ,[...i[2]||=[h(`strong`,null,`销冠 SOP`,-1),h(`small`,null,`经验执行系统`,-1)]]))],2),s(o,{mode:`inline`,theme:`dark`,"selected-keys":l.value,onClick:f},{default:z(()=>[s(a,{key:`dashboard`},{default:z(()=>[s(b(aJ)),i[4]||=h(`span`,null,`工作台`,-1)]),_:1}),s(a,{key:`scenarios`},{default:z(()=>[s(b(yr)),i[5]||=h(`span`,null,`场景与 SOP`,-1)]),_:1}),s(a,{key:`execute`},{default:z(()=>[s(b(xr)),i[6]||=h(`span`,null,`执行话术`,-1)]),_:1}),s(a,{key:`runs`},{default:z(()=>[s(b(lJ)),i[7]||=h(`span`,null,`执行记录`,-1)]),_:1}),s(a,{key:`knowledge`},{default:z(()=>[s(b(br)),i[8]||=h(`span`,null,`知识卡`,-1)]),_:1})]),_:1},8,[`selected-keys`]),h(`div`,{class:ue([`sider-foot`,{compact:r.value}])},[i[9]||=h(`span`,{class:`online-dot`},null,-1),r.value?t(``,!0):(_(),ee(`span`,BZ,`服务运行正常`))],2)]),_:1},8,[`collapsed`]),s(C,null,{default:z(()=>[s(y,{class:`topbar`},{default:z(()=>[s(m,{type:`text`,class:`collapse-button`,"aria-label":r.value?`展开导航`:`收起导航`,onClick:i[1]||=e=>r.value=!r.value},{default:z(()=>[r.value?(_(),R(b(xJ),{key:0})):(_(),R(b(_J),{key:1}))]),_:1},8,[`aria-label`]),h(`div`,VZ,n(d.value),1),s(v,{placement:`bottomRight`},{overlay:z(()=>[s(o,null,{default:z(()=>[s(a,{key:`logout`,onClick:p},{default:z(()=>[s(b(pJ)),i[10]||=g(` 退出登录`,-1)]),_:1})]),_:1})]),default:z(()=>[h(`button`,HZ,[h(`span`,UZ,n((b(c).user?.display_name||`管`).slice(0,1)),1),h(`span`,WZ,[h(`strong`,null,n(b(c).user?.display_name||`平台管理员`),1),h(`small`,null,n(b(c).user?.role_code===`admin`?`企业管理员`:b(c).user?.role_code),1)])])]),_:1})]),_:1}),s(S,{class:`content-area`},{default:z(()=>[s(x)]),_:1})]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-291a5059`]]),KZ=`modulepreload`,qZ=function(e){return`/`+e},JZ={},YZ=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=qZ(t,n),t=s(t),t in JZ)return;JZ[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:KZ,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},XZ=RZ({history:oZ(),routes:[{path:`/login`,component:()=>YZ(()=>import(`./LoginView-hyBivRM0.js`),__vite__mapDeps([0,1,2,3,4,5])),meta:{public:!0}},{path:`/`,component:GZ,children:[{path:``,name:`dashboard`,component:()=>YZ(()=>import(`./DashboardView-BY1MVWq3.js`),__vite__mapDeps([6,1,7,8,9,4,10]))},{path:`scenarios`,name:`scenarios`,component:()=>YZ(()=>import(`./ScenariosView-DZfzIhhk.js`),__vite__mapDeps([11,1,2,12,7,4,13]))},{path:`scenarios/:id`,name:`scenario-detail`,component:()=>YZ(()=>import(`./ScenarioDetailView-BuBAV4IX.js`),__vite__mapDeps([14,1,2,15,7,16,4,17]))},{path:`sops/:id`,name:`sop-editor`,component:()=>YZ(()=>import(`./SOPEditorView-2uB6hvkh.js`),__vite__mapDeps([18,1,2,15,7,16,4,19]))},{path:`execute`,name:`execute`,component:()=>YZ(()=>import(`./ExecuteView-DQwv99Fb.js`),__vite__mapDeps([20,1,2,9,21]))},{path:`runs`,name:`runs`,component:()=>YZ(()=>import(`./RunHistoryView-CvqN7Go6.js`),__vite__mapDeps([22,1,2,23]))},{path:`knowledge`,name:`knowledge`,component:()=>YZ(()=>import(`./KnowledgeView-W6lPD5mD.js`),__vite__mapDeps([24,1,2,15,7,25,26]))}]}]});XZ.beforeEach(e=>{if(!e.meta.public&&!localStorage.getItem(`access_token`))return`/login`;if(e.path===`/login`&&localStorage.getItem(`access_token`))return`/`}),Bt(tX).use(rn()).use(XZ).use(QY).mount(`#app`); \ No newline at end of file + `]:{opacity:1},[r]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${r}`]:{color:e.colorText}},[`${t}-icon ${r}`]:{color:e.colorTextDescription,fontSize:i},[`${o}-progress`]:{position:`absolute`,bottom:-e.uploadProgressOffset,width:`100%`,paddingInlineStart:i+e.paddingXS,fontSize:i,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${o}:hover ${c}`]:{opacity:1,color:e.colorText},[`${o}-error`]:{color:e.colorError,[`${o}-name, ${t}-icon ${r}`]:{color:e.colorError},[s]:{[`${r}, ${r}:hover`]:{color:e.colorError},[c]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:`table`,width:0,height:0,content:`""`}}})}}},mq=new Te(`uploadAnimateInlineIn`,{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),hq=new Te(`uploadAnimateInlineOut`,{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),gq=e=>{let{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${n}-appear, ${n}-enter`]:{animationName:mq},[`${n}-leave`]:{animationName:hq}}},mq,hq]},_q=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i}=e,a=`${t}-list`,o=`${a}-item`;return{[`${t}-wrapper`]:{[`${a}${a}-picture, ${a}${a}-picture-card`]:{[o]:{position:`relative`,height:r+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${o}-thumbnail`]:G(G({},tn),{width:r,height:r,lineHeight:`${r+e.paddingSM}px`,textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}}),[`${o}-progress`]:{bottom:i,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:r+e.paddingXS}},[`${o}-error`]:{borderColor:e.colorError,[`${o}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${o}-uploading`]:{borderStyle:`dashed`,[`${o}-name`]:{marginBottom:i}}}}}},vq=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i}=e,a=`${t}-list`,o=`${a}-item`,s=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:G(G({},Ve()),{display:`inline-block`,width:`100%`,[`${t}${t}-select`]:{width:s,height:s,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card`]:{[`${a}-item-container`]:{display:`inline-block`,width:s,height:s,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:`top`},"&::after":{display:`none`},[o]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${o}:hover`]:{[`&::before, ${o}-actions`]:{opacity:1}},[`${o}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:r,margin:`0 ${e.marginXXS}px`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`}},[`${o}-actions, ${o}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new me(i).setAlpha(.65).toRgbString(),"&:hover":{color:i}}},[`${o}-thumbnail, ${o}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${o}-name`]:{display:`none`,textAlign:`center`},[`${o}-file + ${o}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${e.paddingXS*2}px)`},[`${o}-uploading`]:{[`&${o}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${o}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},yq=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},bq=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:G(G({},Ne(e)),{[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}})}},xq=Le(`Upload`,e=>{let{fontSizeHeading3:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightLG:a}=e,o=Math.round(n*r),s=Fe(e,{uploadThumbnailSize:t*2,uploadProgressOffset:o/2+i,uploadPicCardSize:a*2.55});return[bq(s),fq(s),_q(s),vq(s),pq(s),gq(s),yq(s),Hh(s)]}),Sq=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Cq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iu.value??p.value),[h,g]=zu(e.defaultFileList||[],{value:y(e,`fileList`),postState:e=>{let t=Date.now();return(e??[]).map((e,n)=>(!e.uid&&!Object.isFrozen(e)&&(e.uid=`__AUTO__${t}_${n}__`),e))}}),_=W(`drop`),v=W(null);D(()=>{ir(e.fileList!==void 0||r.value===void 0,`Upload`,"`value` is not a valid prop, do you mean `fileList`?"),ir(e.transformFile===void 0,`Upload`,"`transformFile` is deprecated. Please use `beforeUpload` directly."),ir(e.remove===void 0,`Upload`,"`remove` props is deprecated. Please use `remove` event.")});let b=(t,n,r)=>{var i,a;let s=[...n];e.maxCount===1?s=s.slice(-1):e.maxCount&&(s=s.slice(0,e.maxCount)),g(s);let c={file:t,fileList:s};r&&(c.event=r),(i=e[`onUpdate:fileList`])==null||i.call(e,c.fileList),(a=e.onChange)==null||a.call(e,c),o.onFieldChange()},x=(t,n)=>Sq(this,void 0,void 0,function*(){let{beforeUpload:r,transformFile:i}=e,a=t;if(r){let e=yield r(t,n);if(e===!1)return!1;if(delete t[wq],e===wq)return Object.defineProperty(t,wq,{value:!0,configurable:!0}),!1;typeof e==`object`&&e&&(a=e)}return i&&(a=yield i(a)),a}),S=e=>{let t=e.filter(e=>!e.file[wq]);if(!t.length)return;let n=t.map(e=>XK(e.file)),r=[...h.value];n.forEach(e=>{r=ZK(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}b(i,r)})},C=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!QK(t,h.value))return;let r=XK(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n;let i=ZK(r,h.value);b(r,i)},w=(e,t)=>{if(!QK(t,h.value))return;let n=XK(t);n.status=`uploading`,n.percent=e.percent;let r=ZK(n,h.value);b(n,r,e)},T=(e,t,n)=>{if(!QK(n,h.value))return;let r=XK(n);r.error=e,r.response=t,r.status=`error`;let i=ZK(r,h.value);b(r,i)},E=t=>{let n,r=e.onRemove||e.remove;Promise.resolve(typeof r==`function`?r(t):r).then(e=>{var r,i;if(e===!1)return;let a=$K(t,h.value);a&&(n=G(G({},t),{status:`removed`}),(r=h.value)==null||r.forEach(e=>{let t=n.uid===void 0?`name`:`uid`;e[t]===n[t]&&!Object.isFrozen(e)&&(e.status=`removed`)}),(i=v.value)==null||i.abort(n),b(n,a))})},O=t=>{var n;_.value=t.type,t.type===`drop`&&((n=e.onDrop)==null||n.call(e,t))};i({onBatchStart:S,onSuccess:C,onProgress:w,onError:T,fileList:h,upload:v});let[k]=Ft(`Upload`,Ut.Upload,a(()=>e.locale)),A=(t,r)=>{let{removeIcon:i,previewIcon:a,downloadIcon:o,previewFile:l,onPreview:u,onDownload:d,isImageUrl:f,progress:p,itemRender:g,iconRender:_,showUploadList:v}=e,{showDownloadIcon:y,showPreviewIcon:b,showRemoveIcon:x}=typeof v==`boolean`?{}:v;return v?s(dq,{prefixCls:c.value,listType:e.listType,items:h.value,previewFile:l,onPreview:u,onDownload:d,onRemove:E,showRemoveIcon:!m.value&&x,showPreviewIcon:b,showDownloadIcon:y,removeIcon:i,previewIcon:a,downloadIcon:o,iconRender:_,locale:k.value,isImageUrl:f,progress:p,itemRender:g,appendActionVisible:r,appendAction:t},G({},n)):t?.()};return()=>{let{listType:t,type:i}=e,{class:a,style:u}=r,p=Cq(r,[`class`,`style`]),g=G(G(G({onBatchStart:S,onError:T,onProgress:w,onSuccess:C},p),e),{id:e.id??o.id.value,prefixCls:c.value,beforeUpload:x,onChange:void 0,disabled:m.value});delete g.remove,(!n.default||m.value)&&delete g.id;let y={[`${c.value}-rtl`]:l.value===`rtl`};if(i===`drag`){let e=Z(c.value,{[`${c.value}-drag`]:!0,[`${c.value}-drag-uploading`]:h.value.some(e=>e.status===`uploading`),[`${c.value}-drag-hover`]:_.value===`dragover`,[`${c.value}-disabled`]:m.value,[`${c.value}-rtl`]:l.value===`rtl`},r.class,f.value);return d(s(`span`,X(X({},r),{},{class:Z(`${c.value}-wrapper`,y,a,f.value)}),[s(`div`,{class:e,onDrop:O,onDragover:O,onDragleave:O,style:r.style},[s(FK,X(X({},g),{},{ref:v,class:`${c.value}-btn`}),X({default:()=>[s(`div`,{class:`${c.value}-drag-container`},[n.default?.call(n)])]},n))]),A()]))}let b=Z(c.value,{[`${c.value}-select`]:!0,[`${c.value}-select-${t}`]:!0,[`${c.value}-disabled`]:m.value,[`${c.value}-rtl`]:l.value===`rtl`}),E=pe(n.default?.call(n)),D=e=>s(`div`,{class:b,style:e},[s(FK,X(X({},g),{},{ref:v}),n)]);return d(t===`picture-card`?s(`span`,X(X({},r),{},{class:Z(`${c.value}-wrapper`,`${c.value}-picture-card-wrapper`,y,r.class,f.value)}),[A(D,!!(E&&E.length))]):s(`span`,X(X({},r),{},{class:Z(`${c.value}-wrapper`,y,r.class,f.value)}),[D(E&&E.length?void 0:{display:`none`}),A()]))}}}),Eq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{height:t}=e,i=Eq(e,[`height`]),{style:a}=r,o=Eq(r,[`style`]),c=G(G(G({},i),o),{type:`drag`,style:G(G({},a),{height:typeof t==`number`?`${t}px`:t})});return s(Tq,c,n)}}}),Oq=Dq,kq=G(Tq,{Dragger:Dq,LIST_IGNORE:wq,install(e){return e.component(Tq.name,Tq),e.component(Dq.name,Dq),e}});function Aq(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()}function jq(e){return Object.keys(e).map(t=>`${Aq(t)}: ${e[t]};`).join(` `)}function Mq(){return window.devicePixelRatio||1}function Nq(e,t,n,r){e.translate(t,n),e.rotate(Math.PI/180*Number(r)),e.translate(-t,-n)}var Pq=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(e=>e===t)),e.type===`attributes`&&e.target===t&&(n=!0),n},Fq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i2&&arguments[2]!==void 0?arguments[2]:{},{window:r=qx}=n,i=Fq(n,[`window`]),a,o=Gx(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=H(()=>Ux(e),e=>{s(),o.value&&r&&e&&(a=new MutationObserver(t),a.observe(e,i))},{immediate:!0}),l=()=>{s(),c()};return Vx(l),{isSupported:o,stop:l}}var Lq=2,Rq=3,zq=d({name:`AWatermark`,inheritAttrs:!1,props:Vn({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:$t([String,Array]),font:ut(),rootClassName:String,gap:vt(),offset:vt()},{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:r}=t,[,i]=Ct(),o=M(),c=M(),l=M(!1),u=a(()=>e.gap?.[0]??100),d=a(()=>e.gap?.[1]??100),f=a(()=>u.value/2),m=a(()=>d.value/2),h=a(()=>e.offset?.[0]??f.value),g=a(()=>e.offset?.[1]??m.value),_=a(()=>e.font?.fontSize??i.value.fontSizeLG),v=a(()=>e.font?.fontWeight??`normal`),y=a(()=>e.font?.fontStyle??`normal`),b=a(()=>e.font?.fontFamily??`sans-serif`),x=a(()=>e.font?.color??i.value.colorFill),S=a(()=>{let t={zIndex:e.zIndex??9,position:`absolute`,left:0,top:0,width:`100%`,height:`100%`,pointerEvents:`none`,backgroundRepeat:`repeat`},n=h.value-f.value,r=g.value-m.value;return n>0&&(t.left=`${n}px`,t.width=`calc(100% - ${n}px)`,n=0),r>0&&(t.top=`${r}px`,t.height=`calc(100% - ${r}px)`,r=0),t.backgroundPosition=`${n}px ${r}px`,t}),C=()=>{c.value&&=(c.value.remove(),void 0)},w=(e,t)=>{var n;o.value&&c.value&&(l.value=!0,c.value.setAttribute(`style`,jq(G(G({},S.value),{backgroundImage:`url('${e}')`,backgroundSize:`${(u.value+t)*Lq}px`}))),(n=o.value)==null||n.append(c.value),setTimeout(()=>{l.value=!1}))},T=t=>{let n=120,r=64,i=e.content,a=e.image,o=e.width,s=e.height;if(!a&&t.measureText){t.font=`${Number(_.value)}px ${b.value}`;let e=Array.isArray(i)?i:[i],a=e.map(e=>t.measureText(e).width);n=Math.ceil(Math.max(...a)),r=Number(_.value)*e.length+(e.length-1)*Rq}return[o??n,s??r]},E=(t,n,r,i,a)=>{let o=Mq(),s=e.content,c=Number(_.value)*o;t.font=`${y.value} normal ${v.value} ${c}px/${a}px ${b.value}`,t.fillStyle=x.value,t.textAlign=`center`,t.textBaseline=`top`,t.translate(i/2,0),(Array.isArray(s)?s:[s])?.forEach((e,i)=>{t.fillText(e??``,n,r+i*(c+Rq*o))})},O=()=>{let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=e.image,i=e.rotate??-22;if(n){c.value||=document.createElement(`div`);let e=Mq(),[a,o]=T(n),s=(u.value+a)*e,l=(d.value+o)*e;t.setAttribute(`width`,`${s*Lq}px`),t.setAttribute(`height`,`${l*Lq}px`);let f=u.value*e/2,p=d.value*e/2,m=a*e,h=o*e,g=(m+u.value*e)/2,_=(h+d.value*e)/2,v=f+s,y=p+l,b=g+s,x=_+l;if(n.save(),Nq(n,g,_,i),r){let e=new Image;e.onload=()=>{n.drawImage(e,f,p,m,h),n.restore(),Nq(n,b,x,i),n.drawImage(e,v,y,m,h),w(t.toDataURL(),a)},e.crossOrigin=`anonymous`,e.referrerPolicy=`no-referrer`,e.src=r}else E(n,f,p,m,h),n.restore(),Nq(n,b,x,i),E(n,v,y,m,h),w(t.toDataURL(),a)}};return D(()=>{O()}),H(()=>[e,i.value.colorFill,i.value.fontSizeLG],()=>{O()},{deep:!0,flush:`post`}),p(()=>{C()}),Iq(o,e=>{l.value||e.forEach(e=>{Pq(e,c.value)&&(C(),O())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:[`style`,`class`]}),()=>s(`div`,X(X({},r),{},{ref:o,class:[r.class,e.rootClassName],style:[{position:`relative`},r.style]}),[n.default?.call(n)])}}),Bq=be(zq);function Vq(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:`not-allowed`}}}function Hq(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}var Uq=G({overflow:`hidden`},tn),Wq=e=>{let{componentCls:t}=e;return{[t]:G(G(G(G(G({},Ne(e)),{display:`inline-block`,padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:`relative`,display:`flex`,alignItems:`stretch`,justifyItems:`flex-start`,width:`100%`},[`&${t}-rtl`]:{direction:`rtl`},[`&${t}-block`]:{display:`flex`},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:`relative`,textAlign:`center`,cursor:`pointer`,transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":G(G({},Hq(e)),{color:e.labelColorHover}),"&::after":{content:`""`,position:`absolute`,width:`100%`,height:`100%`,top:0,insetInlineStart:0,borderRadius:`inherit`,transition:`background-color ${e.motionDurationMid}`,pointerEvents:`none`},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":G({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},Uq),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:`none`}},[`${t}-thumb`]:G(G({},Hq(e)),{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:0,height:`100%`,padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:`transparent`}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),Vq(`&-disabled ${t}-item`,e)),Vq(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:`transform, width`}})}},Gq=Le(`Segmented`,e=>{let{lineWidthBold:t,lineWidth:n,colorTextLabel:r,colorText:i,colorFillSecondary:a,colorBgLayout:o,colorBgElevated:s}=e;return[Wq(Fe(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:r,labelColorHover:i,bgColor:o,bgColorHover:a,bgColorSelected:s}))]}),Kq=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,qq=e=>e===void 0?void 0:`${e}px`,Jq=d({props:{value:bt(),getValueIndex:bt(),prefixCls:bt(),motionName:bt(),onMotionStart:bt(),onMotionEnd:bt(),direction:bt(),containerRef:bt()},emits:[`motionStart`,`motionEnd`],setup(e,t){let{emit:n}=t,r=W(),i=t=>{let n=e.getValueIndex(t),r=e.containerRef.value?.querySelectorAll(`.${e.prefixCls}-item`)[n];return r?.offsetParent&&r},o=W(null),c=W(null);H(()=>e.value,(e,t)=>{let r=i(t),a=i(e),s=Kq(r),l=Kq(a);o.value=s,c.value=l,n(r&&a?`motionStart`:`motionEnd`)},{flush:`post`});let l=a(()=>e.direction===`rtl`?qq(-o.value?.right):qq(o.value?.left)),u=a(()=>e.direction===`rtl`?qq(-c.value?.right):qq(c.value?.left)),d,f=e=>{clearTimeout(d),x(()=>{e&&(e.style.transform=`translateX(var(--thumb-start-left))`,e.style.width=`var(--thumb-start-width)`)})},m=t=>{d=setTimeout(()=>{t&&(Zv(t,`${e.motionName}-appear-active`),t.style.transform=`translateX(var(--thumb-active-left))`,t.style.width=`var(--thumb-active-width)`)})},h=t=>{o.value=null,c.value=null,t&&(t.style.transform=null,t.style.width=null,Qv(t,`${e.motionName}-appear-active`)),n(`motionEnd`)},g=a(()=>({"--thumb-start-left":l.value,"--thumb-start-width":qq(o.value?.width),"--thumb-active-left":u.value,"--thumb-active-width":qq(c.value?.width)}));return p(()=>{clearTimeout(d)}),()=>{let t={ref:r,style:g.value,class:[`${e.prefixCls}-thumb`]};return s(Gt,{appear:!0,onBeforeEnter:f,onEnter:m,onAfterEnter:h},{default:()=>[!o.value||!c.value?null:s(`div`,t,null)]})}}});function Yq(e){return e.map(e=>typeof e==`object`&&e?e:{label:e?.toString(),title:e?.toString(),value:e})}var Xq=()=>({prefixCls:String,options:vt(),block:Y(),disabled:Y(),size:q(),value:G(G({},$t([String,Number])),{required:!0}),motionName:String,onChange:Q(),"onUpdate:value":Q()}),Zq=(e,t)=>{let{slots:n,emit:r}=t,{value:i,disabled:a,payload:o,title:c,prefixCls:l,label:u=n.label,checked:d,className:f}=e,p=e=>{a||r(`change`,e,i)};return s(`label`,{class:Z({[`${l}-item-disabled`]:a},f)},[s(`input`,{class:`${l}-item-input`,type:`radio`,disabled:a,checked:d,onChange:p},null),s(`div`,{class:`${l}-item-label`,title:typeof c==`string`?c:``},[typeof u==`function`?u({value:i,disabled:a,payload:o,title:c}):u??i])])};Zq.inheritAttrs=!1;var Qq=d({name:`ASegmented`,inheritAttrs:!1,props:Vn(Xq(),{options:[],motionName:`thumb-motion`}),slots:Object,setup(e,t){let{emit:n,slots:r,attrs:i}=t,{prefixCls:o,direction:c,size:l}=K(`segmented`,e),[u,d]=Gq(o),f=M(),p=M(!1),m=a(()=>Yq(e.options)),h=(t,r)=>{e.disabled||(n(`update:value`,r),n(`change`,r))};return()=>{let t=o.value;return u(s(`div`,X(X({},i),{},{class:Z(t,{[d.value]:!0,[`${t}-block`]:e.block,[`${t}-disabled`]:e.disabled,[`${t}-lg`]:l.value==`large`,[`${t}-sm`]:l.value==`small`,[`${t}-rtl`]:c.value===`rtl`},i.class),ref:f}),[s(`div`,{class:`${t}-group`},[s(Jq,{containerRef:f,prefixCls:t,value:e.value,motionName:`${t}-${e.motionName}`,direction:c.value,getValueIndex:e=>m.value.findIndex(t=>t.value===e),onMotionStart:()=>{p.value=!0},onMotionEnd:()=>{p.value=!1}},null),m.value.map(n=>s(Zq,X(X({key:n.value,prefixCls:t,checked:n.value===e.value,onChange:h},n),{},{className:Z(n.className,`${t}-item`,{[`${t}-item-selected`]:n.value===e.value&&!p.value}),disabled:!!e.disabled||!!n.disabled}),r))])]))}}}),$q=be(Qq),eJ=e=>{let{componentCls:t}=e;return{[t]:G(G({},Ne(e)),{display:`flex`,justifyContent:`center`,alignItems:`center`,padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:`relative`,width:`100%`,height:`100%`,overflow:`hidden`,[`& > ${t}-mask`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:10,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`,color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:`center`,[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:`transparent`}}},tJ=Le(`QRCode`,e=>eJ(Fe(e,{QRCodeTextColor:`rgba(0, 0, 0, 0.88)`,QRCodeMaskBackgroundColor:`rgba(255, 255, 255, 0.96)`}))),nJ={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`};function rJ(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:q(`canvas`),color:String,bgColor:String,includeMargin:Boolean,imageSettings:ut()}),DJ=()=>G(G({},EJ()),{errorLevel:q(`M`),icon:String,iconSize:{type:Number,default:40},status:q(`active`),bordered:{type:Boolean,default:!0}}),OJ;(function(e){class t{static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=o&&o<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=o;;u++){let n=t.getNumDataCodewords(u,r)*8,i=a.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthm[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e>>9)*1335;let a=(t<<10|n)^21522;i(!(a>>>15));for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(!(t>>>18));for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;ne+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(!(n>>>8)),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return!!(e>>>t&1)}function i(e){if(!e)throw Error(`Assertion error`)}class a{static makeBytes(e){let t=[];for(let r of e)n(r,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw RangeError(`String contains non-numeric characters`);let t=[];for(let r=0;r=1<1&&arguments[1]!==void 0?arguments[1]:0,n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function BJ(e,t){return e.slice().map((e,n)=>n=t.y+t.h?e:e.map((e,n)=>n=t.x+t.w?e:!1))}function VJ(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*RJ),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);d={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}return{x:l,y:u,h:c,w:s,excavation:d}}function HJ(e,t){return t==null?e?IJ:LJ:Math.floor(t)}var UJ=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),WJ=d({name:`QRCodeCanvas`,inheritAttrs:!1,props:G(G({},EJ()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:r}=t,i=a(()=>e.imageSettings?.src),o=M(null),c=M(null),l=M(!1);return r({toDataURL:(e,t)=>o.value?.toDataURL(e,t)}),P(()=>{let{value:t,size:n=jJ,level:r=MJ,bgColor:i=NJ,fgColor:a=PJ,includeMargin:s=FJ,marginSize:u,imageSettings:d}=e;if(o.value!=null){let e=o.value,f=e.getContext(`2d`);if(!f)return;let p=kJ.QrCode.encodeText(t,AJ[r]).getModules(),m=HJ(s,u),h=p.length+m*2,g=VJ(p,n,m,d),_=c.value,v=l.value&&g!=null&&_!==null&&_.complete&&_.naturalHeight!==0&&_.naturalWidth!==0;v&&g.excavation!=null&&(p=BJ(p,g.excavation));let y=window.devicePixelRatio||1;e.height=e.width=n*y;let b=n/h*y;f.scale(b,b),f.fillStyle=i,f.fillRect(0,0,h,h),f.fillStyle=a,UJ?f.fill(new Path2D(zJ(p,m))):p.forEach(function(e,t){e.forEach(function(e,n){e&&f.fillRect(n+m,t+m,1,1)})}),v&&f.drawImage(_,g.x+m,g.y+m,g.w,g.h)}},{flush:`post`}),H(i,()=>{l.value=!1}),()=>{let t=e.size??jJ,r={height:`${t}px`,width:`${t}px`},a=null;return i.value!=null&&(a=s(`img`,{src:i.value,key:i.value,style:{display:`none`},onLoad:()=>{l.value=!0},ref:c},null)),s(v,null,[s(`canvas`,X(X({},n),{},{style:[r,n.style],ref:o}),null),a])}}}),GJ=d({name:`QRCodeSVG`,inheritAttrs:!1,props:G(G({},EJ()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,r=null,i=null,a=null,o=null;return P(()=>{let{value:c,size:l=jJ,level:u=MJ,includeMargin:d=FJ,marginSize:f,imageSettings:p}=e;t=kJ.QrCode.encodeText(c,AJ[u]).getModules(),n=HJ(d,f),r=t.length+n*2,i=VJ(t,l,n,p),p!=null&&i!=null&&(i.excavation!=null&&(t=BJ(t,i.excavation)),o=s(`image`,{"xlink:href":p.src,height:i.h,width:i.w,x:i.x+n,y:i.y+n,preserveAspectRatio:`none`},null)),a=zJ(t,n)}),()=>{let t=e.bgColor&&NJ,n=e.fgColor&&PJ;return s(`svg`,{height:e.size,width:e.size,viewBox:`0 0 ${r} ${r}`},[!!e.title&&s(`title`,null,[e.title]),s(`path`,{fill:t,d:`M0,0 h${r}v${r}H0z`,"shape-rendering":`crispEdges`},null),s(`path`,{fill:n,d:a,"shape-rendering":`crispEdges`},null),o])}}}),KJ=d({name:`AQrcode`,inheritAttrs:!1,props:DJ(),emits:[`refresh`],setup(e,t){let{emit:n,attrs:r,expose:i}=t,[o]=Ft(`QRCode`),{prefixCls:c}=K(`qrcode`,e),[l,u]=tJ(c),[,d]=Ct(),f=W();i({toDataURL:(e,t)=>f.value?.toDataURL(e,t)});let p=a(()=>{let{value:t,icon:n=``,size:r=160,iconSize:i=40,color:a=d.value.colorText,bgColor:o=`transparent`,errorLevel:s=`M`}=e,c={src:n,x:void 0,y:void 0,height:i,width:i,excavate:!0};return{value:t,size:r-(d.value.paddingSM+d.value.lineWidth)*2,level:s,bgColor:o,fgColor:a,imageSettings:n?c:void 0}});return()=>{let t=c.value;return l(s(`div`,X(X({},r),{},{style:[r.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:p.value.bgColor}],class:[u.value,t,{[`${t}-borderless`]:!e.bordered}]}),[e.status!==`active`&&s(`div`,{class:`${t}-mask`},[e.status===`loading`&&s(bF,null,null),e.status===`expired`&&s(v,null,[s(`p`,{class:`${t}-expired`},[o.value.expired]),s(Ln,{type:`link`,onClick:e=>n(`refresh`,e)},{default:()=>[o.value.refresh],icon:()=>s(TJ,null,null)})]),e.status===`scanned`&&s(`p`,{class:`${t}-scanned`},[o.value.scanned])]),e.type===`canvas`?s(WJ,X({ref:f},p.value),null):s(GJ,p.value,null)]))}}}),qJ=be(KJ);function JJ(e){let t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:r,right:i,bottom:a,left:o}=e.getBoundingClientRect();return r>=0&&o>=0&&i<=t&&a<=n}function YJ(e,t,n,r){let[i,o]=dn(void 0);P(()=>{let t=typeof e.value==`function`?e.value():e.value;o(t||null)},{flush:`post`});let[s,c]=dn(null),l=()=>{if(!t.value){c(null);return}if(i.value){!JJ(i.value)&&t.value&&i.value.scrollIntoView(r.value);let{left:e,top:n,width:a,height:o}=i.value.getBoundingClientRect(),l={left:e,top:n,width:a,height:o,radius:0};JSON.stringify(s.value)!==JSON.stringify(l)&&c(l)}else c(null)};return D(()=>{H([t,i],()=>{l()},{flush:`post`,immediate:!0}),window.addEventListener(`resize`,l)}),p(()=>{window.removeEventListener(`resize`,l)}),[a(()=>{if(!s.value)return s.value;let e=n.value?.offset||6,t=n.value?.radius||2;return{left:s.value.left-e,top:s.value.top-e,width:s.value.width+e*2,height:s.value.height+e*2,radius:t}}),i]}var XJ=()=>({arrow:$t([Boolean,Object]),target:$t([String,Function,Object]),title:$t([String,Object]),description:$t([String,Object]),placement:q(),mask:$t([Object,Boolean],!0),className:{type:String},style:ut(),scrollIntoViewOptions:$t([Boolean,Object])}),ZJ=()=>G(G({},XJ()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:Q(),onFinish:Q(),renderPanel:Q(),onPrev:Q(),onNext:Q()}),QJ=d({name:`DefaultPanel`,inheritAttrs:!1,props:ZJ(),setup(e,t){let{attrs:n}=t;return()=>{let{prefixCls:t,current:r,total:i,title:a,description:o,onClose:c,onPrev:l,onNext:u,onFinish:d}=e;return s(`div`,X(X({},n),{},{class:Z(`${t}-content`,n.class)}),[s(`div`,{class:`${t}-inner`},[s(`button`,{type:`button`,onClick:c,"aria-label":`Close`,class:`${t}-close`},[s(`span`,{class:`${t}-close-x`},[g(`×`)])]),s(`div`,{class:`${t}-header`},[s(`div`,{class:`${t}-title`},[a])]),s(`div`,{class:`${t}-description`},[o]),s(`div`,{class:`${t}-footer`},[s(`div`,{class:`${t}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((e,t)=>s(`span`,{key:e,class:t===r?`active`:``},null)):null]),s(`div`,{class:`${t}-buttons`},[r===0?null:s(`button`,{class:`${t}-prev-btn`,onClick:l},[g(`Prev`)]),r===i-1?s(`button`,{class:`${t}-finish-btn`,onClick:d},[g(`Finish`)]):s(`button`,{class:`${t}-next-btn`,onClick:u},[g(`Next`)])])])])])}}}),$J=d({name:`TourStep`,inheritAttrs:!1,props:ZJ(),setup(e,t){let{attrs:n}=t;return()=>{let{current:t,renderPanel:r}=e;return s(v,null,[typeof r==`function`?r(G(G({},n),e),t):s(QJ,X(X({},n),e),null)])}}}),eY=0,tY=de();function nY(){let e;return tY?(e=eY,eY+=1):e=`TEST_OR_SSR`,e}function rY(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W(``),t=`vc_unique_${nY()}`;return e.value||t}var iY={fill:`transparent`,"pointer-events":`auto`},aY=d({name:`TourMask`,props:{prefixCls:{type:String},pos:ut(),rootClassName:{type:String},showMask:Y(),fill:{type:String,default:`rgba(0,0,0,0.5)`},open:Y(),animated:$t([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t,r=rY();return()=>{let{prefixCls:t,open:i,rootClassName:a,pos:o,showMask:c,fill:l,animated:u,zIndex:d}=e,f=`${t}-mask-${r}`,p=typeof u==`object`?u?.placeholder:u;return s(qn,{visible:i,autoLock:!0},{default:()=>i&&s(`div`,X(X({},n),{},{class:Z(`${t}-mask`,a,n.class),style:[{position:`fixed`,left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:`none`},n.style]}),[c?s(`svg`,{style:{width:`100%`,height:`100%`}},[s(`defs`,null,[s(`mask`,{id:f},[s(`rect`,{x:`0`,y:`0`,width:`100vw`,height:`100vh`,fill:`white`},null),o&&s(`rect`,{x:o.left,y:o.top,rx:o.radius,width:o.width,height:o.height,fill:`black`,class:p?`${t}-placeholder-animated`:``},null)])]),s(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:l,mask:`url(#${f})`},null),o&&s(v,null,[s(`rect`,X(X({},iY),{},{x:`0`,y:`0`,width:`100%`,height:o.top}),null),s(`rect`,X(X({},iY),{},{x:`0`,y:`0`,width:o.left,height:`100%`}),null),s(`rect`,X(X({},iY),{},{x:`0`,y:o.top+o.height,width:`100%`,height:`calc(100vh - ${o.top+o.height}px)`}),null),s(`rect`,X(X({},iY),{},{x:o.left+o.width,y:`0`,width:`calc(100vw - ${o.left+o.width}px)`,height:`100%`}),null)])]):null])})}}}),oY=[0,0],sY={left:{points:[`cr`,`cl`],offset:[-8,0]},right:{points:[`cl`,`cr`],offset:[8,0]},top:{points:[`bc`,`tc`],offset:[0,-8]},bottom:{points:[`tc`,`bc`],offset:[0,8]},topLeft:{points:[`bl`,`tl`],offset:[0,-8]},leftTop:{points:[`tr`,`tl`],offset:[-8,0]},topRight:{points:[`br`,`tr`],offset:[0,-8]},rightTop:{points:[`tl`,`tr`],offset:[8,0]},bottomRight:{points:[`tr`,`br`],offset:[0,8]},rightBottom:{points:[`bl`,`br`],offset:[8,0]},bottomLeft:{points:[`tl`,`bl`],offset:[0,8]},leftBottom:{points:[`br`,`bl`],offset:[-8,0]}};function cY(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t={};return Object.keys(sY).forEach(n=>{t[n]=G(G({},sY[n]),{autoArrow:e,targetOffset:oY})}),t}cY();var lY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{builtinPlacements:e,popupAlign:t}=Ea();return{builtinPlacements:e,popupAlign:t,steps:vt(),open:Y(),defaultCurrent:{type:Number},current:{type:Number},onChange:Q(),onClose:Q(),onFinish:Q(),mask:$t([Boolean,Object],!0),arrow:$t([Boolean,Object],!0),rootClassName:{type:String},placement:q(`bottom`),prefixCls:{type:String,default:`rc-tour`},renderPanel:Q(),gap:ut(),animated:$t([Boolean,Object]),scrollIntoViewOptions:$t([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},fY=d({name:`Tour`,inheritAttrs:!1,props:Vn(dY(),{}),setup(e){let{defaultCurrent:t,placement:n,mask:r,scrollIntoViewOptions:o,open:c,gap:l,arrow:u}=i(e),d=W(),[f,p]=zu(0,{value:a(()=>e.current),defaultValue:t.value}),[m,h]=zu(void 0,{value:a(()=>e.open),postState:t=>f.value<0||f.value>=e.steps.length?!1:t??!0}),g=M(m.value);P(()=>{m.value&&!g.value&&p(0),g.value=m.value});let _=a(()=>e.steps[f.value]||{}),y=a(()=>_.value.placement??n.value),b=a(()=>m.value&&(_.value.mask??r.value)),x=a(()=>_.value.scrollIntoViewOptions??o.value),[S,C]=YJ(a(()=>_.value.target),c,l,x),w=a(()=>C.value?_.value.arrow===void 0?u.value:_.value.arrow:!1),T=a(()=>typeof w.value==`object`&&w.value.pointAtCenter);H(T,()=>{var e;(e=d.value)==null||e.forcePopupAlign()}),H(f,()=>{var e;(e=d.value)==null||e.forcePopupAlign()});let E=t=>{var n;p(t),(n=e.onChange)==null||n.call(e,t)};return()=>{let{prefixCls:t,steps:n,onClose:r,onFinish:i,rootClassName:o,renderPanel:c,animated:l,zIndex:u}=e,p=lY(e,[`prefixCls`,`steps`,`onClose`,`onFinish`,`rootClassName`,`renderPanel`,`animated`,`zIndex`]);if(C.value===void 0)return null;let g=()=>{h(!1),r?.(f.value)},x=typeof b.value==`boolean`?b.value:!!b.value,D=typeof b.value==`boolean`?void 0:b.value,O=()=>C.value||document.body,k=()=>s($J,X({arrow:w.value,key:`content`,prefixCls:t,total:n.length,renderPanel:c,onPrev:()=>{E(f.value-1)},onNext:()=>{E(f.value+1)},onClose:g,current:f.value,onFinish:()=>{g(),i?.()}},_.value),null),A=a(()=>{let e=S.value||uY,t={};return Object.keys(e).forEach(n=>{typeof e[n]==`number`?t[n]=`${e[n]}px`:t[n]=e[n]}),t});return m.value?s(v,null,[s(aY,{zIndex:u,prefixCls:t,pos:S.value,showMask:x,style:D?.style,fill:D?.color,open:m.value,animated:l,rootClassName:o},null),s(tl,X(X({},p),{},{arrow:!!p.arrow,builtinPlacements:_.value.target?p.builtinPlacements??cY(T.value):void 0,ref:d,popupStyle:_.value.target?_.value.style:G(G({},_.value.style),{position:`fixed`,left:uY.left,top:uY.top,transform:`translate(-50%, -50%)`}),popupPlacement:y.value,popupVisible:m.value,popupClassName:Z(o,_.value.className),prefixCls:t,popup:k,forceRender:!1,destroyPopupOnHide:!0,zIndex:u,mask:!1,getTriggerDOMNode:O}),{default:()=>[s(qn,{visible:m.value,autoLock:!0},{default:()=>[s(`div`,{class:Z(o,`${t}-target-placeholder`),style:G(G({},A.value),{position:`fixed`,pointerEvents:`none`})},null)]})]})]):null}}}),pY=()=>G(G({},dY()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),mY=d({name:`ATourPanel`,inheritAttrs:!1,props:G(G({},ZJ()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),setup(e,t){let{attrs:n,slots:r}=t,{current:o,total:c}=i(e),l=a(()=>o.value===c.value-1),u=t=>{var n;let r=e.prevButtonProps;(n=e.onPrev)==null||n.call(e,t),typeof r?.onClick==`function`&&r?.onClick()},d=t=>{var n,r;let i=e.nextButtonProps;l.value?(n=e.onFinish)==null||n.call(e,t):(r=e.onNext)==null||r.call(e,t),typeof i?.onClick==`function`&&i?.onClick()};return()=>{let{prefixCls:t,title:i,onClose:a,cover:f,description:p,type:m,arrow:h}=e,g=e.prevButtonProps,_=e.nextButtonProps,v;i&&(v=s(`div`,{class:`${t}-header`},[s(`div`,{class:`${t}-title`},[i])]));let y;p&&(y=s(`div`,{class:`${t}-description`},[p]));let b;f&&(b=s(`div`,{class:`${t}-cover`},[f]));let x;x=r.indicatorsRender?r.indicatorsRender({current:o.value,total:c}):[...Array.from({length:c.value}).keys()].map((e,n)=>s(`span`,{key:e,class:Z(n===o.value&&`${t}-indicator-active`,`${t}-indicator`)},null));let S=m===`primary`?`default`:`primary`,C={type:`default`,ghost:m===`primary`};return s(ct,{componentName:`Tour`,defaultLocale:Ut.Tour},{default:e=>s(`div`,X(X({},n),{},{class:Z(m===`primary`?`${t}-primary`:``,n.class,`${t}-content`)}),[h&&s(`div`,{class:`${t}-arrow`,key:`arrow`},null),s(`div`,{class:`${t}-inner`},[s(_t,{class:`${t}-close`,onClick:a},null),b,v,y,s(`div`,{class:`${t}-footer`},[c.value>1&&s(`div`,{class:`${t}-indicators`},[x]),s(`div`,{class:`${t}-buttons`},[o.value===0?null:s(Ln,X(X(X({},C),g),{},{onClick:u,size:`small`,class:Z(`${t}-prev-btn`,g?.className)}),{default:()=>[it(g?.children)?g.children():g?.children??e.Previous]}),s(Ln,X(X({type:S},_),{},{onClick:d,size:`small`,class:Z(`${t}-next-btn`,_?.className)}),{default:()=>[it(_?.children)?_?.children():l.value?e.Finish:e.Next]})])])])])})}}}),hY=e=>{let{defaultType:t,steps:n,current:r,defaultCurrent:i}=e,o=W(i?.value),s=a(()=>r?.value);H(s,e=>{o.value=e??i?.value},{immediate:!0});let c=e=>{o.value=e},l=a(()=>typeof o.value==`number`?n&&n.value?.[o.value]?.type:t?.value);return{currentMergedType:a(()=>l.value??t?.value),updateInnerCurrent:c}},gY=e=>{let{componentCls:t,lineHeight:n,padding:r,paddingXS:i,borderRadius:a,borderRadiusXS:o,colorPrimary:s,colorText:c,colorFill:l,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:p,fontSize:m,colorBgContainer:h,fontWeightStrong:g,marginXS:_,colorTextLightSolid:v,tourBorderRadius:y,colorWhite:b,colorBgTextHover:x,tourCloseSize:S,motionDurationSlow:C,antCls:w}=e;return[{[t]:G(G({},Ne(e)),{color:c,position:`absolute`,zIndex:p,display:`block`,visibility:`visible`,fontSize:m,lineHeight:n,width:520,"--antd-arrow-background-color":h,"&-pure":{maxWidth:`100%`,position:`relative`},[`&${t}-hidden`]:{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-inner`]:{textAlign:`start`,textDecoration:`none`,borderRadius:y,boxShadow:f,position:`relative`,backgroundColor:h,border:`none`,backgroundClip:`padding-box`,[`${t}-close`]:{position:`absolute`,top:r,insetInlineEnd:r,color:e.colorIcon,outline:`none`,width:S,height:S,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:`flex`,alignItems:`center`,justifyContent:`center`,"&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?`transparent`:e.colorFillContent}},[`${t}-cover`]:{textAlign:`center`,padding:`${r+S+i}px ${r}px 0`,img:{width:`100%`}},[`${t}-header`]:{padding:`${r}px ${r}px ${i}px`,[`${t}-title`]:{lineHeight:n,fontSize:m,fontWeight:g}},[`${t}-description`]:{padding:`0 ${r}px`,lineHeight:n,wordWrap:`break-word`},[`${t}-footer`]:{padding:`${i}px ${r}px ${r}px`,textAlign:`end`,borderRadius:`0 0 ${o}px ${o}px`,display:`flex`,[`${t}-indicators`]:{display:`inline-block`,[`${t}-indicator`]:{width:d,height:u,display:`inline-block`,borderRadius:`50%`,background:l,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:s}}},[`${t}-buttons`]:{marginInlineStart:`auto`,[`${w}-btn`]:{marginInlineStart:_}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":s,[`${t}-inner`]:{color:v,textAlign:`start`,textDecoration:`none`,backgroundColor:s,borderRadius:a,boxShadow:f,[`${t}-close`]:{color:v},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new me(v).setAlpha(.15).toRgbString(),"&-active":{background:v}}},[`${t}-prev-btn`]:{color:v,borderColor:new me(v).setAlpha(.15).toRgbString(),backgroundColor:s,"&:hover":{backgroundColor:new me(v).setAlpha(.15).toRgbString(),borderColor:`transparent`}},[`${t}-next-btn`]:{color:s,borderColor:`transparent`,background:b,"&:hover":{background:new me(x).onBackground(b).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${C}`}},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${t}-inner`]:{borderRadius:Math.min(y,8)}}},s_(e,{colorBg:`var(--antd-arrow-background-color)`,contentRadius:y,limitVerticalRadius:!0})]},_Y=Le(`Tour`,e=>{let{borderRadiusLG:t,fontSize:n,lineHeight:r}=e;return[gY(Fe(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*r}))]}),vY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let{steps:t,current:i,type:c,rootClassName:l}=e,u=vY(e,[`steps`,`current`,`type`,`rootClassName`]),d=Z({[`${f.value}-primary`]:g.value===`primary`,[`${f.value}-rtl`]:p.value===`rtl`},h.value,l),v=(e,t)=>s(mY,X(X({},e),{},{type:c,current:t}),{indicatorsRender:o.indicatorsRender}),y=e=>{_(e),r(`update:current`,e),r(`change`,e)},b=a(()=>Qg({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return m(s(fY,X(X(X({},n),u),{},{rootClassName:d,prefixCls:f.value,current:i,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:v,onChange:y,steps:t,builtinPlacements:b.value}),null))}}}),bY=be(yY),xY=Symbol(`appConfigContext`),SY=t=>e(xY,t),CY=()=>C(xY,{}),wY=Symbol(`appContext`),TY=t=>e(wY,t),EY=k({message:{},notification:{},modal:{}}),DY=()=>C(wY,EY),OY=e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a}}},kY=Le(`App`,e=>[OY(e)]),AY=()=>({rootClassName:String,message:ut(),notification:ut()}),jY=()=>DY(),MY=d({name:`AApp`,props:Vn(AY(),{}),setup(e,t){let{slots:n}=t,{prefixCls:r}=K(`app`,e),[i,o]=kY(r),c=a(()=>Z(o.value,r.value,e.rootClassName)),l=CY(),u=a(()=>({message:G(G({},l.message),e.message),notification:G(G({},l.notification),e.notification)}));SY(u.value);let[d,f]=Nt(u.value.message),[p,m]=xt(u.value.notification),[h,g]=rr();return TY(a(()=>({message:d,notification:p,modal:h})).value),()=>i(s(`div`,{class:c.value},[g(),f(),m(),n.default?.call(n)]))}});MY.useApp=jY,MY.install=function(e){e.component(MY.name,MY)};var NY=[`wrap`,`nowrap`,`wrap-reverse`],PY=[`flex-start`,`flex-end`,`start`,`end`,`center`,`space-between`,`space-around`,`space-evenly`,`stretch`,`normal`,`left`,`right`],FY=[`center`,`start`,`end`,`flex-start`,`flex-end`,`self-start`,`self-end`,`baseline`,`normal`,`stretch`],IY=(e,t)=>{let n={};return NY.forEach(r=>{n[`${e}-wrap-${r}`]=t.wrap===r}),n},LY=(e,t)=>{let n={};return FY.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},RY=(e,t)=>{let n={};return PY.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n};function zY(e,t){return Z(G(G(G({},IY(e,t)),LY(e,t)),RY(e,t)))}var BY=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`},"&:empty":{display:`none`}}}},VY=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},HY=e=>{let{componentCls:t}=e,n={};return NY.forEach(e=>{n[`${t}-wrap-${e}`]={flexWrap:e}}),n},UY=e=>{let{componentCls:t}=e,n={};return FY.forEach(e=>{n[`${t}-align-${e}`]={alignItems:e}}),n},WY=e=>{let{componentCls:t}=e,n={};return PY.forEach(e=>{n[`${t}-justify-${e}`]={justifyContent:e}}),n},GY=Le(`Flex`,e=>{let t=Fe(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[BY(t),VY(t),HY(t),UY(t),WY(t)]});function KY(e){return[`small`,`middle`,`large`].includes(e)}var qY=()=>({prefixCls:q(),vertical:Y(),wrap:q(),justify:q(),align:q(),flex:$t([Number,String]),gap:$t([Number,String]),component:bt()}),JY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i[c.value,u.value,zY(c.value,e),{[`${c.value}-rtl`]:o.value===`rtl`,[`${c.value}-gap-${e.gap}`]:KY(e.gap),[`${c.value}-vertical`]:e.vertical??i?.value.vertical}]);return()=>{let{flex:t,gap:i,component:a=`div`}=e,o=JY(e,[`flex`,`gap`,`component`]),c={};return t&&(c.flex=t),i&&!KY(i)&&(c.gap=`${i}px`),l(s(a,X({class:[r.class,d.value],style:[r.style,c]},Gn(o,[`justify`,`wrap`,`align`,`vertical`])),{default:()=>[n.default?.call(n)]}))}}}),XY=be(YY),ZY=S({Affix:()=>Gi,Alert:()=>Eg,Anchor:()=>_a,AnchorLink:()=>fa,App:()=>MY,AutoComplete:()=>hg,AutoCompleteOptGroup:()=>pg,AutoCompleteOption:()=>fg,Avatar:()=>S_,AvatarGroup:()=>x_,BackTop:()=>hM,Badge:()=>V_,BadgeRibbon:()=>R_,Breadcrumb:()=>Dy,BreadcrumbItem:()=>gv,BreadcrumbSeparator:()=>Ey,Button:()=>Ln,ButtonGroup:()=>Bn,Calendar:()=>nC,Card:()=>Mw,CardGrid:()=>jw,CardMeta:()=>Aw,Carousel:()=>ZT,Cascader:()=>nA,CheckableTag:()=>CA,Checkbox:()=>dA,CheckboxGroup:()=>uA,Col:()=>pA,Collapse:()=>Ww,CollapsePanel:()=>Uw,Comment:()=>_A,Compact:()=>fr,ConfigProvider:()=>Wt,DatePicker:()=>aj,Descriptions:()=>yj,DescriptionsItem:()=>fj,DirectoryTree:()=>lU,Divider:()=>Cj,Drawer:()=>Uj,Dropdown:()=>wj,DropdownButton:()=>ov,Empty:()=>fe,Flex:()=>XY,FloatButton:()=>gM,FloatButtonGroup:()=>uM,Form:()=>Wk,FormItem:()=>Fk,FormItemRest:()=>cd,Grid:()=>fA,Image:()=>iP,ImagePreviewGroup:()=>rP,Input:()=>dN,InputGroup:()=>NM,InputNumber:()=>LP,InputPassword:()=>uN,InputSearch:()=>FM,Layout:()=>sF,LayoutContent:()=>oF,LayoutFooter:()=>iF,LayoutHeader:()=>rF,LayoutSider:()=>aF,List:()=>aI,ListItem:()=>eI,ListItemMeta:()=>ZF,LocaleProvider:()=>Ht,Mentions:()=>LI,MentionsOption:()=>II,Menu:()=>vy,MenuDivider:()=>ty,MenuItem:()=>Bv,MenuItemGroup:()=>ey,Modal:()=>Zn,MonthPicker:()=>ej,PageHeader:()=>oL,Pagination:()=>XF,Popconfirm:()=>dL,Popover:()=>b_,Progress:()=>KL,QRCode:()=>qJ,QuarterPicker:()=>rj,Radio:()=>xS,RadioButton:()=>bS,RadioGroup:()=>yS,RangePicker:()=>ij,Rate:()=>sR,Result:()=>ER,Row:()=>DR,Segmented:()=>$q,Select:()=>ag,SelectOptGroup:()=>sg,SelectOption:()=>og,Skeleton:()=>Dw,SkeletonAvatar:()=>Ew,SkeletonButton:()=>Sw,SkeletonImage:()=>Tw,SkeletonInput:()=>Cw,SkeletonTitle:()=>QC,Slider:()=>cz,Space:()=>nL,Spin:()=>bF,Statistic:()=>YI,StatisticCountdown:()=>JI,Step:()=>jz,Steps:()=>Mz,SubMenu:()=>Yv,Switch:()=>Vz,TabPane:()=>BC,Table:()=>rW,TableColumn:()=>QU,TableColumnGroup:()=>$U,TableSummary:()=>nW,TableSummaryCell:()=>tW,TableSummaryRow:()=>eW,Tabs:()=>HC,Tag:()=>wA,Textarea:()=>QM,TimePicker:()=>hG,TimeRangePicker:()=>mG,Timeline:()=>bG,TimelineItem:()=>gG,Tooltip:()=>m_,Tour:()=>bY,Transfer:()=>OW,Tree:()=>dU,TreeNode:()=>uU,TreeSelect:()=>uG,TreeSelectNode:()=>lG,Typography:()=>bK,TypographyLink:()=>dK,TypographyParagraph:()=>pK,TypographyText:()=>hK,TypographyTitle:()=>yK,Upload:()=>kq,UploadDragger:()=>Oq,Watermark:()=>Bq,WeekPicker:()=>$A,message:()=>ot,notification:()=>zt}),QY={version:Ze,install:function(e){return Object.keys(ZY).forEach(t=>{let n=ZY[t];n.install&&e.use(n)}),e.use(Fi.StyleProvider),e.config.globalProperties.$message=ot,e.config.globalProperties.$notification=zt,e.config.globalProperties.$info=Zn.info,e.config.globalProperties.$success=Zn.success,e.config.globalProperties.$error=Zn.error,e.config.globalProperties.$warning=Zn.warning,e.config.globalProperties.$confirm=Zn.confirm,e.config.globalProperties.$destroyAll=Zn.destroyAll,e}},$Y={};function eX(e,t){let n=U(`router-view`);return _(),R(n)}var tX=ne($Y,[[`render`,eX]]),nX=typeof document<`u`,rX=/#/g,iX=/&/g,aX=/\//g,oX=/=/g,sX=/\?/g,cX=/\+/g,lX=/%5B/g,uX=/%5D/g,dX=/%5E/g,fX=/%60/g,pX=/%7B/g,mX=/%7C/g,hX=/%7D/g,gX=/%20/g;function _X(e){return e==null?``:encodeURI(``+e).replace(mX,`|`).replace(lX,`[`).replace(uX,`]`)}function vX(e){return _X(e).replace(pX,`{`).replace(hX,`}`).replace(dX,`^`)}function yX(e){return _X(e).replace(cX,`%2B`).replace(gX,`+`).replace(rX,`%23`).replace(iX,`%26`).replace(fX,"`").replace(pX,`{`).replace(hX,`}`).replace(dX,`^`)}function bX(e){return yX(e).replace(oX,`%3D`)}function xX(e){return _X(e).replace(rX,`%23`).replace(sX,`%3F`)}function SX(e){return xX(e).replace(aX,`%2F`)}function CX(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var wX=/\/$/,TX=e=>e.replace(wX,``);function EX(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=PX(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:CX(o)}}function DX(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function OX(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function kX(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&AX(t.matched[r],n.matched[i])&&jX(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function AX(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function jX(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!MX(e[n],t[n]))return!1;return!0}function MX(e,t){return Or(e)?NX(e,t):Or(t)?NX(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function NX(e,t){return Or(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function PX(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var FX={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function IX(e){if(!e){if(nX){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),TX(e)}var LX=/^[^#]+#/;function RX(e,t){return e.replace(LX,`#`)+t}function zX(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var BX=()=>({left:window.scrollX,top:window.scrollY});function VX(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=zX(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function HX(e,t){return(history.state?history.state.position-t:-1)+e}var UX=new Map;function WX(e,t){UX.set(e,t)}function GX(e){let t=UX.get(e);return UX.delete(e),t}function KX(e){return typeof e==`string`||e&&typeof e==`object`}function qX(e){return typeof e==`string`||typeof e==`symbol`}function JX(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&yX(e)):[r&&yX(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function XX(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Or(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function ZX(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function QX(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Pr(4,{from:n,to:t})):e instanceof Error?c(e):KX(e)?c(Pr(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function $X(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(Fr(s)){let c=(s.__vccOpts||s)[t];c&&a.push(QX(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Sr(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&QX(c,n,r,o,e,i)()}))}}}return a}function eZ(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oAX(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>AX(e,s))||i.push(s))}return[n,r,i]}var tZ=()=>location.protocol+`//`+location.host;function nZ(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),OX(n,``)}return OX(n,e)+r+i}function rZ(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=nZ(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(jr({},e.state,{scroll:BX()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function iZ(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?BX():null}}function aZ(e){let{history:t,location:n}=window,r={value:nZ(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:tZ()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,jr({},t.state,iZ(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=jr({},i.value,t.state,{forward:e,scroll:BX()});a(o.current,o,!0),a(e,jr({},iZ(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function oZ(e){e=IX(e);let t=aZ(e),n=rZ(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=jr({location:``,base:e,go:r,createHref:RX.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var sZ={type:0,value:``},cZ=/[a-zA-Z0-9_]/;function lZ(e){if(!e)return[[]];if(e===`/`)return[[sZ]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===80?1:-1:0}function hZ(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var _Z={strict:!1,end:!0,sensitive:!1};function vZ(e,t,n){let r=pZ(lZ(e.path),n),i=jr(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function yZ(e,t){let n=[],r=new Map;t=kr(_Z,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=xZ(e);s.aliasOf=r&&r.record;let l=kr(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(xZ(jr({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=vZ(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!CZ(d)&&o(e.name)),DZ(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Lr}function o(e){if(qX(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=TZ(e,n);n.splice(t,0,e),e.record.name&&!CZ(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Pr(1,{location:e});s=i.record.name,a=jr(bZ(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&bZ(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Pr(1,{location:e,currentLocation:t});s=i.record.name,a=jr({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:wZ(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function bZ(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function xZ(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:SZ(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function SZ(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function CZ(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function wZ(e){return e.reduce((e,t)=>jr(e,t.meta),{})}function TZ(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;hZ(e,t[i])<0?r=i:n=i+1}let i=EZ(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function EZ(e){let t=e;for(;t=t.parent;)if(DZ(t)&&hZ(e,t)===0)return t}function DZ({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function OZ(e){let t=C(Tr),n=C(wr),r=a(()=>{let n=b(e.to);return t.resolve(n)}),i=a(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(AX.bind(null,i));if(o>-1)return o;let s=NZ(e[t-2]);return t>1&&NZ(i)===s&&a[a.length-1].path!==s?a.findIndex(AX.bind(null,e[t-2])):o}),o=a(()=>i.value>-1&&MZ(n.params,r.value.params)),s=a(()=>i.value>-1&&i.value===n.matched.length-1&&jX(n.params,r.value.params));function c(n={}){if(jZ(n)){let n=t[b(e.replace)?`replace`:`push`](b(e.to)).catch(Lr);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:a(()=>r.value.href),isActive:o,isExactActive:s,navigate:c}}function kZ(e){return e.length===1?e[0]:e}var AZ=d({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:OZ,setup(e,{slots:t}){let n=k(OZ(e)),{options:r}=C(Tr),i=a(()=>({[PZ(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[PZ(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&kZ(t.default(n));return e.custom?r:le(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function jZ(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function MZ(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Or(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function NZ(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var PZ=(e,t,n)=>e??t??n,FZ=d({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:n,slots:r}){let i=C(Nr),o=a(()=>t.route||i.value),s=C(Er,0),c=a(()=>{let e=b(s),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),l=a(()=>o.value.matched[c.value]);e(Er,a(()=>c.value+1)),e(Cr,l),e(Nr,o);let u=W();return H(()=>[u.value,l.value,t.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!AX(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let e=o.value,i=t.name,a=l.value,s=a&&a.components[i];if(!s)return IZ(r.default,{Component:s,route:e});let c=a.props[i],d=c?c===!0?e.params:typeof c==`function`?c(e):c:null,f=le(s,jr({},d,n,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[i]=null)},ref:u}));return IZ(r.default,{Component:f,route:e})||f}}});function IZ(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var LZ=FZ;function RZ(e){let t=yZ(e.routes,e),n=e.parseQuery||JX,r=e.stringifyQuery||YX,i=e.history,a=ZX(),o=ZX(),s=ZX(),c=M(FX),l=FX;nX&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Ir.bind(null,e=>``+e),d=Ir.bind(null,SX),f=Ir.bind(null,CX);function p(e,n){let r,i;return qX(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=jr({},a||c.value),typeof e==`string`){let r=EX(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return jr(r,o,{params:f(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=jr({},e,{path:EX(n,e.path,a.path).path});else{let t=jr({},e.params);for(let e in t)t[e]??delete t[e];o=jr({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=DX(r,jr({},e,{hash:vX(l),path:s.path})),m=i.createHref(p);return jr({fullPath:p,hash:l,query:r===YX?XX(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?EX(n,e,c.value.path):jr({},e)}function y(e,t){if(l!==e)return Pr(8,{from:t,to:e})}function S(e){return T(e)}function C(e){return S(jr(v(e),{replace:!0}))}function w(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),jr({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function T(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=w(n,i);if(u)return T(jr(v(u),{state:typeof u==`object`?jr({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&kX(r,i,n)&&(f=Pr(16,{to:d,from:i}),z(i,i,!0,!1)),(f?Promise.resolve(f):O(d,i)).catch(e=>Mr(e)?Mr(e,2)?e:R(e):L(e,d,i)).then(e=>{if(e){if(Mr(e,2))return T(jr({replace:s},v(e.to),{state:typeof e.to==`object`?jr({},a,e.to.state):a,force:o}),t||d)}else e=A(d,i,!0,s,a);return k(d,i,e),e})}function E(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){let t=V.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function O(e,t){let n,[r,i,s]=eZ(e,t);n=$X(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(QX(r,e,t))});let c=E.bind(null,e,t);return n.push(c),re(n).then(()=>{n=[];for(let r of a.list())n.push(QX(r,e,t));return n.push(c),re(n)}).then(()=>{n=$X(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(QX(r,e,t))});return n.push(c),re(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter){if(Or(r.beforeEnter))for(let i of r.beforeEnter)n.push(QX(i,e,t));else n.push(QX(r.beforeEnter,e,t))}return n.push(c),re(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=$X(s,`beforeRouteEnter`,e,t,D),n.push(c),re(n))).then(()=>{n=[];for(let r of o.list())n.push(QX(r,e,t));return n.push(c),re(n)}).catch(e=>Mr(e,8)?e:Promise.reject(e))}function k(e,t,n){s.list().forEach(r=>D(()=>r(e,t,n)))}function A(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===FX,l=nX?history.state:{};n&&(r||s?i.replace(e.fullPath,jr({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,z(e,t,n,s),R()}let j;function N(){j||=i.listen((e,t,n)=>{if(!ne.listening)return;let r=_(e),a=w(r,ne.currentRoute.value);if(a){T(jr(a,{replace:!0,force:!0}),r).catch(Lr);return}l=r;let o=c.value;nX&&WX(HX(o.fullPath,n.delta),BX()),O(r,o).catch(e=>Mr(e,12)?e:Mr(e,2)?(T(jr(v(e.to),{force:!0}),r).then(e=>{Mr(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(Lr),Promise.reject()):(n.delta&&i.go(-n.delta,!1),L(e,r,o))).then(e=>{e||=A(r,o,!1),e&&(n.delta&&!Mr(e,8)?i.go(-n.delta,!1):n.type===`pop`&&Mr(e,20)&&i.go(-1,!1)),k(r,o,e)}).catch(Lr)})}let P=ZX(),F=ZX(),I;function L(e,t,n){R(e);let r=F.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ee(){return I&&c.value!==FX?Promise.resolve():new Promise((e,t)=>{P.add([e,t])})}function R(e){return I||(I=!e,N(),P.list().forEach(([t,n])=>e?n(e):t()),P.reset()),e}function z(t,n,r,i){let{scrollBehavior:a}=e;if(!nX||!a)return Promise.resolve();let o=!r&&GX(HX(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return x().then(()=>a(t,n,o)).then(e=>t===c.value&&e&&VX(e)).catch(e=>t===c.value&&L(e,t,n))}let B=e=>i.go(e),te,V=new Set,ne={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:S,replace:C,go:B,back:()=>B(-1),forward:()=>B(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:F.add,isReady:ee,install(e){e.component(`RouterLink`,AZ),e.component(`RouterView`,LZ),e.config.globalProperties.$router=ne,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>b(c)}),nX&&!te&&c.value===FX&&(te=!0,S(i.location).catch(e=>{}));let t={};for(let e in FX)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Tr,ne),e.provide(wr,ce(t)),e.provide(Nr,c);let n=e.unmount;V.add(e),e.unmount=function(){V.delete(e),V.size<1&&(l=FX,j&&j(),j=null,c.value=FX,te=!1,I=!1),n()}}};function re(e){return e.reduce((e,t)=>e.then(()=>D(t)),Promise.resolve())}return ne}var zZ={key:0,class:`brand-copy`},BZ={key:0},VZ={class:`topbar-title`},HZ={class:`user-button`},UZ={class:`avatar`},WZ={class:`user-copy`},GZ=ne(d({__name:`AppLayout`,setup(e){let r=W(!1),i=Ar(),o=Dr(),c=an(),l=a(()=>i.path.startsWith(`/scenarios`)||i.path.startsWith(`/sops`)?[`scenarios`]:i.path.startsWith(`/execute`)?[`execute`]:i.path.startsWith(`/runs`)?[`runs`]:i.path.startsWith(`/knowledge`)?[`knowledge`]:[`dashboard`]),u={dashboard:`工作台`,scenarios:`场景与 SOP`,execute:`执行话术`,runs:`执行记录`,knowledge:`知识卡`},d=a(()=>u[l.value[0]]||`销冠 SOP`);D(()=>c.loadUser().catch(()=>c.logout()));function f({key:e}){o.push({dashboard:`/`,scenarios:`/scenarios`,execute:`/execute`,runs:`/runs`,knowledge:`/knowledge`}[e])}function p(){c.logout(),o.push(`/login`)}return(e,i)=>{let a=U(`a-menu-item`),o=U(`a-menu`),u=U(`a-layout-sider`),m=U(`a-button`),v=U(`a-dropdown`),y=U(`a-layout-header`),x=U(`router-view`),S=U(`a-layout-content`),C=U(`a-layout`);return _(),R(C,{class:`app-frame`},{default:z(()=>[s(u,{collapsed:r.value,"onUpdate:collapsed":i[0]||=e=>r.value=e,trigger:null,collapsible:``,width:224,class:`side-panel`},{default:z(()=>[h(`div`,{class:ue([`brand`,{compact:r.value}])},[i[3]||=h(`div`,{class:`brand-mark`},[h(`span`),h(`span`),h(`span`)],-1),r.value?t(``,!0):(_(),ee(`div`,zZ,[...i[2]||=[h(`strong`,null,`销冠 SOP`,-1),h(`small`,null,`经验执行系统`,-1)]]))],2),s(o,{mode:`inline`,theme:`dark`,"selected-keys":l.value,onClick:f},{default:z(()=>[s(a,{key:`dashboard`},{default:z(()=>[s(b(aJ)),i[4]||=h(`span`,null,`工作台`,-1)]),_:1}),s(a,{key:`scenarios`},{default:z(()=>[s(b(yr)),i[5]||=h(`span`,null,`场景与 SOP`,-1)]),_:1}),s(a,{key:`execute`},{default:z(()=>[s(b(xr)),i[6]||=h(`span`,null,`执行话术`,-1)]),_:1}),s(a,{key:`runs`},{default:z(()=>[s(b(lJ)),i[7]||=h(`span`,null,`执行记录`,-1)]),_:1}),s(a,{key:`knowledge`},{default:z(()=>[s(b(br)),i[8]||=h(`span`,null,`知识卡`,-1)]),_:1})]),_:1},8,[`selected-keys`]),h(`div`,{class:ue([`sider-foot`,{compact:r.value}])},[i[9]||=h(`span`,{class:`online-dot`},null,-1),r.value?t(``,!0):(_(),ee(`span`,BZ,`服务运行正常`))],2)]),_:1},8,[`collapsed`]),s(C,null,{default:z(()=>[s(y,{class:`topbar`},{default:z(()=>[s(m,{type:`text`,class:`collapse-button`,"aria-label":r.value?`展开导航`:`收起导航`,onClick:i[1]||=e=>r.value=!r.value},{default:z(()=>[r.value?(_(),R(b(xJ),{key:0})):(_(),R(b(_J),{key:1}))]),_:1},8,[`aria-label`]),h(`div`,VZ,n(d.value),1),s(v,{placement:`bottomRight`},{overlay:z(()=>[s(o,null,{default:z(()=>[s(a,{key:`logout`,onClick:p},{default:z(()=>[s(b(pJ)),i[10]||=g(` 退出登录`,-1)]),_:1})]),_:1})]),default:z(()=>[h(`button`,HZ,[h(`span`,UZ,n((b(c).user?.display_name||`管`).slice(0,1)),1),h(`span`,WZ,[h(`strong`,null,n(b(c).user?.display_name||`平台管理员`),1),h(`small`,null,n(b(c).user?.role_code===`admin`?`企业管理员`:b(c).user?.role_code),1)])])]),_:1})]),_:1}),s(S,{class:`content-area`},{default:z(()=>[s(x)]),_:1})]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-291a5059`]]),KZ=`modulepreload`,qZ=function(e){return`/`+e},JZ={},YZ=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=qZ(t,n),t=s(t),t in JZ)return;JZ[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:KZ,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},XZ=RZ({history:oZ(),routes:[{path:`/login`,component:()=>YZ(()=>import(`./LoginView-hyBivRM0.js`),__vite__mapDeps([0,1,2,3,4,5])),meta:{public:!0}},{path:`/`,component:GZ,children:[{path:``,name:`dashboard`,component:()=>YZ(()=>import(`./DashboardView-BY1MVWq3.js`),__vite__mapDeps([6,1,7,8,9,4,10]))},{path:`scenarios`,name:`scenarios`,component:()=>YZ(()=>import(`./ScenariosView-DZfzIhhk.js`),__vite__mapDeps([11,1,2,12,7,4,13]))},{path:`scenarios/:id`,name:`scenario-detail`,component:()=>YZ(()=>import(`./ScenarioDetailView-BuBAV4IX.js`),__vite__mapDeps([14,1,2,15,7,16,4,17]))},{path:`sops/:id`,name:`sop-editor`,component:()=>YZ(()=>import(`./SOPEditorView-2uB6hvkh.js`),__vite__mapDeps([18,1,2,15,7,16,4,19]))},{path:`execute`,name:`execute`,component:()=>YZ(()=>import(`./ExecuteView-B0_AkMSt.js`),__vite__mapDeps([20,1,2,9,21]))},{path:`runs`,name:`runs`,component:()=>YZ(()=>import(`./RunHistoryView-CvqN7Go6.js`),__vite__mapDeps([22,1,2,23]))},{path:`knowledge`,name:`knowledge`,component:()=>YZ(()=>import(`./KnowledgeView-W6lPD5mD.js`),__vite__mapDeps([24,1,2,15,7,25,26]))}]}]});XZ.beforeEach(e=>{if(!e.meta.public&&!localStorage.getItem(`access_token`))return`/login`;if(e.path===`/login`&&localStorage.getItem(`access_token`))return`/`}),Bt(tX).use(rn()).use(XZ).use(QY).mount(`#app`); \ No newline at end of file diff --git a/web/dist/index.html b/web/dist/index.html index 89b9ac7..b1c4feb 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -5,7 +5,7 @@ 销冠 SOP 平台 - + diff --git a/web/src/views/ExecuteView.vue b/web/src/views/ExecuteView.vue index 11c1b31..4a9c6c8 100644 --- a/web/src/views/ExecuteView.vue +++ b/web/src/views/ExecuteView.vue @@ -12,7 +12,7 @@ const currentConfig=computed(()=>active.value?.node.config||{}) const currentFields=computed(()=>{if(!active.value)return[];const node=active.value.node;if(node.type==='question'||node.type==='choice')return active.value.fields.filter(f=>f.field_key===currentConfig.value.field_key);if(node.type==='form')return active.value.fields.filter(f=>(currentConfig.value.field_keys||[]).includes(f.field_key));return[]}) async function load(){loading.value=true;try{sops.value=(await api.get<{items:PublishedSOP[]}>('/published-sops')).items}catch(error){message.error(apiMessage(error))}finally{loading.value=false}} async function start(sopID:number){try{active.value=await api.post('/runs',{sop_id:sopID});Object.keys(answers).forEach(k=>delete answers[k])}catch(error){message.error(apiMessage(error))}} -async function next(){if(!active.value)return;submitting.value=true;try{active.value=await api.post(`/runs/${active.value.run.id}/answer`,{answers:{...answers}});Object.keys(answers).forEach(k=>delete answers[k])}catch(error){message.error(apiMessage(error))}finally{submitting.value=false}} +async function next(){if(!active.value)return;submitting.value=true;try{active.value=await api.post(`/runs/${active.value.run.id}/answer`,{node_key:active.value.node.node_key,answers:{...answers}});Object.keys(answers).forEach(k=>delete answers[k])}catch(error){message.error(apiMessage(error))}finally{submitting.value=false}} function inputFor(field:ScenarioField){return field.field_type} function reset(){active.value=null;load()} onMounted(load)