diff --git a/.claude/settings.local.json b/.claude/settings.local.json
index 5837243..0ba7446 100644
--- a/.claude/settings.local.json
+++ b/.claude/settings.local.json
@@ -1,7 +1,11 @@
{
"permissions": {
"allow": [
- "Bash(findstr:*)"
+ "Bash(findstr:*)",
+ "mcp__zai-mcp-server__extract_text_from_screenshot",
+ "Bash(pandoc:*)",
+ "mcp__zread__read_file",
+ "mcp__zread__search_doc"
]
}
}
diff --git a/doc/modules/01-项目管理模块.md b/doc/modules/01-项目管理模块.md
new file mode 100644
index 0000000..caaddd2
--- /dev/null
+++ b/doc/modules/01-项目管理模块.md
@@ -0,0 +1,145 @@
+# 01-项目管理模块
+
+## 模块概述
+
+项目管理模块是系统的首页和入口,用于管理所有历史创建的核查项目。该模块提供项目的创建、查询、状态管理、归档等核心功能,是用户进行项目管理和监控的主要界面。
+
+## 模块结构
+
+```
+项目管理模块
+├── 导航与搜索区
+├── 项目列表区
+└── 快捷入口区
+```
+
+## 功能分解
+
+### 1.1 导航与搜索区
+
+**功能描述**: 位于页面顶部,提供项目搜索和新建项目的入口功能。
+
+**功能点**:
+- **项目搜索**: 支持通过输入关键词对项目名称进行模糊搜索
+- **新建项目**: 点击打开标准表单,填写项目名称、人员等完整信息创建新项目
+- **导入历史项目**: 复制历史项目配置(人员范围、流水、征信数据配置)快速创建新项目
+
+**数据要素**:
+- 项目名称(搜索关键词)
+- 项目配置模板
+
+### 1.2 项目列表区
+
+**功能描述**: 以表格形式展示所有初核项目,是用户进行项目管理和监控的核心面板。
+
+**功能点**:
+- **项目信息展示**: 显示项目名称、简要描述、创建日期、状态、目标人数、预警人数
+- **项目状态标识**: 通过色块直观标识项目状态(进行中、已完成等)
+- **预警人数动态更新**: 对于"进行中"项目,预警人数数据动态更新
+- **查看结果**: 适用于已完成项目,跳转至该项目的初核结果页
+- **重新分析**: 适用于已完成项目,基于原有数据重新运行风险模型,更新分析结果
+- **归档项目**: 将已结束且无需日常关注的项目移入归档库,生成PDF文件导出
+- **进入项目**: 适用于进行中项目,进入该项目的工作台开展具体工作
+
+**数据要素**:
+- 项目名称
+- 项目描述
+- 创建时间
+- 项目状态(进行中、已完成)
+- 目标人数
+- 预警人数
+
+### 1.3 快捷入口区
+
+**功能描述**: 提供一键触达的高频操作按钮,提升常用工作流的启动效率。
+
+**功能点**:
+- **导入历史项目**: 复制历史项目的配置(人员范围、流水、征信数据),快速创建新项目
+- **创建季度初核**: 快速启动标准化季度周期性排查项目,系统预填当前季度时间范围等配置
+- **创建新员工排查**: 为特定新员工创建专项排查任务
+
+**数据要素**:
+- 历史项目模板
+- 当前季度时间范围
+- 新员工信息
+
+## 数据模型
+
+### 项目实体 (Project)
+
+| 字段名 | 类型 | 说明 | 必填 |
+|-------|------|------|-----|
+| projectId | Long | 项目ID | 是 |
+| projectName | String | 项目名称 | 是 |
+| description | String | 项目描述 | 否 |
+| createTime | DateTime | 创建时间 | 是 |
+| status | String | 状态(进行中/已完成) | 是 |
+| targetCount | Integer | 目标人数 | 是 |
+| warningCount | Integer | 预警人数 | 是 |
+| isArchived | Boolean | 是否归档 | 否 |
+
+## 页面原型
+
+### 原型设计文档
+
+详细的页面原型设计请查看:[06-页面原型设计.md](./06-页面原型设计.md)
+
+### 主要页面
+
+1. **首页** - 项目列表展示页面
+ - 搜索和操作区
+ - 项目列表表格
+ - 快捷入口卡片
+
+2. **新建项目弹窗页** - 项目信息录入表单
+ - 基本信息表单
+ - 人员选择器
+ - 时间范围选择器
+
+3. **导入历史项目弹窗页** - 历史项目选择列表
+ - 项目列表(带单选)
+ - 项目详情预览
+ - 新项目配置
+
+### 原型资源
+
+- **墨刀原型**: [../../纪检初核系统-离线演示包/演示模式.html](../../纪检初核系统-离线演示包/演示模式.html)
+- **设计规范**: 基于 Element UI 2.15 组件库
+
+## 子文档索引
+
+本模块包含以下详细文档:
+
+- [README.md](./README.md) - 模块总览
+- [01-导航与搜索区.md](./01-导航与搜索区.md) - 导航与搜索区详细设计
+- [02-项目列表区.md](./02-项目列表区.md) - 项目列表区详细设计
+- [03-快捷入口区.md](./03-快捷入口区.md) - 快捷入口区详细设计
+- [04-数据模型.md](./04-数据模型.md) - 数据模型定义
+- [05-业务规则.md](./05-业务规则.md) - 业务规则说明
+- [06-页面原型设计.md](./06-页面原型设计.md) - 页面原型详细设计
+- [复核报告.md](./复核报告.md) - 需求复核报告
+
+## 业务规则
+
+1. **项目状态流转**: 新建 → 进行中 → 已完成 → 已归档
+2. **预警人数更新**: 进行中项目的预警人数需要实时更新
+3. **归档条件**: 只有已完成的项目才能归档
+4. **重新分析**: 只能对已完成项目执行重新分析
+
+## 交互关系
+
+| 关联模块 | 交互说明 |
+|---------|---------|
+| 项目工作台 | 点击"进入项目"跳转到项目工作台 |
+| 初核结果总览 | 点击"查看结果"跳转到结果页 |
+
+## 功能点统计
+
+- 二级功能: 3个
+- 三级功能点: 12个
+
+## 版本信息
+
+- **文档版本**: V1.0
+- **创建日期**: 2026-01-27
+- **基于原文档**: 纪检初核系统功能说明书V1.0 第9-62行
diff --git a/doc/modules/01-项目管理模块/06-页面原型设计.md b/doc/modules/01-项目管理模块/06-页面原型设计.md
new file mode 100644
index 0000000..0a9be05
--- /dev/null
+++ b/doc/modules/01-项目管理模块/06-页面原型设计.md
@@ -0,0 +1,528 @@
+# 项目管理模块 - 页面原型设计
+
+## 设计概述
+
+本文档定义项目管理模块的页面原型设计,基于若依框架 + Element UI组件库的设计规范。
+
+## 设计规范
+
+### 颜色规范
+
+| 颜色类型 | 颜色值 | 用途 |
+|---------|-------|------|
+| 主题色 | #409EFF | 主按钮、链接、高亮 |
+| 成功色 | #67C23A | 成功状态、已完成项目 |
+| 警告色 | #E6A23C | 警告提示 |
+| 危险色 | #F56C6C | 危险操作、删除 |
+| 信息色 | #909399 | 次要信息、禁用状态 |
+| 文字色 | #303133 | 主要文字 |
+| 次要文字 | #606266 | 次要文字 |
+| 边框色 | #DCDFE6 | 边框、分割线 |
+| 背景色 | #F5F7FA | 页面背景 |
+
+### 字体规范
+
+| 类型 | 字体大小 | 字重 | 行高 |
+|-----|---------|------|------|
+| 页面标题 | 20px | 500 | 28px |
+| 卡片标题 | 16px | 500 | 24px |
+| 正文 | 14px | 400 | 22px |
+| 小字 | 12px | 400 | 20px |
+
+### 间距规范
+
+| 间距类型 | 数值 |
+|---------|------|
+| 页面边距 | 20px |
+| 卡片间距 | 16px |
+| 元素间距 | 8px |
+| 小间距 | 4px |
+
+---
+
+## 页面1: 项目管理首页
+
+### 页面布局
+
+```
++------------------------------------------------------------------+
+| Logo | 纪检初核系统 首页 | 项目工作台 | 系统管理 | 用户▼ |
++------------------------------------------------------------------+
+| 项目管理 |
+| +------------------------------------------------------------+ |
+| | 🔍 项目搜索: [________________] [新建项目] [导入历史项目] | |
+| +------------------------------------------------------------+ |
+| |
+| +------------------------------------------------------------+ |
+| | 项目列表 | |
+| +------------------------------------------------------------+ |
+| | 序号 | 项目名称 | 创建时间 | 状态 | 目标 | 预警 | 操作| |
+| |------|--------------|------------|------|------|------|-----| |
+| | 1 | 2024年Q1初核 | 2024-01-01 | ⏳进行中| 500 | 15 |[详情]| |
+| | 2 | 2023年Q4初核 | 2023-10-01 | ✅已完成| 480 | 23 |[查看]| |
+| +------------------------------------------------------------+ |
+| |
+| +------------------------------------------------------------+ |
+| | 快捷入口 | |
+| +------------------------------------------------------------+ |
+| | [📋 导入历史项目] [📅 创建季度初核] [👤 创建新员工排查] | |
+| +------------------------------------------------------------+ |
++------------------------------------------------------------------+
+```
+
+### 详细组件说明
+
+#### 1. 顶部导航栏
+
+**位置**: 固定在页面顶部
+
+**组件**:
+- 左侧: Logo + 系统名称
+- 中间: 主导航菜单
+- 右侧: 用户信息下拉菜单
+
+**代码示例**:
+```vue
+
\u672C\u5730\u6BCD\u7248\u8D44\u6E90
\n\u5F53\u524D\u6587\u4EF6\u6240\u521B\u5EFA\u7684\u6BCD\u7248\u90FD\u88AB\u6574\u5408\u5230\u4E86\u672C\u5730\u6BCD\u7248\u8D44\u6E90\u4E2D\u3002
',offset:{x:4,y:-3},arrowPosition:{left:-2},hasKnow:!0,howToShow:ne=>{let{currentUser:B}=ne;setTimeout(()=>{if(MB.commonGuideHelper.checkGuideHasShown(r.c.GUIDE_2506_LIB_INTERGRATED))return;const l=(0,T.yX)();l!=null&&l.isCompleted&&(0,I.Wq)(B)&&MB.commonGuideHelper.tryToShowGuide(r.c.GUIDE_2506_LIB_INTERGRATED)},1e3)}},[r.c.GUIDE_2506_LIB_INTERGRATED_RIGHT_LAYOUT]:{selector:"."+r.c.GUIDE_2506_LIB_INTERGRATED,relativePos:"right",content:'\n\u672C\u5730\u6BCD\u7248\u8D44\u6E90
\n\u5F53\u524D\u6587\u4EF6\u6240\u521B\u5EFA\u7684\u6BCD\u7248\u90FD\u88AB\u6574\u5408\u5230\u4E86\u672C\u5730\u6BCD\u7248\u8D44\u6E90\u4E2D\u3002
',offset:{x:-558,y:0},arrowPosition:{left:297},hasKnow:!0,howToShow:ne=>{let{currentUser:B}=ne;setTimeout(()=>{if(MB.commonGuideHelper.checkGuideHasShown(r.c.GUIDE_2506_LIB_INTERGRATED))return;const l=(0,T.yX)();l!=null&&l.isCompleted&&(0,I.Wq)(B)&&MB.commonGuideHelper.tryToShowGuide(r.c.GUIDE_2506_LIB_INTERGRATED_RIGHT_LAYOUT)},1e3)}}})},8702:(Qn,qe,s)=>{"use strict";s.d(qe,{A:()=>Gl});var r=s(18381),I=s(12211),J=s(70933),N=s(28173),T=s(10472),te=s(7457),q=s(67588),ne=s(60651),B=s(81973),l=s(78915),U=s(95549),C=s(38502),M=s(17307),w=s(67787),y=s(72214);class j extends C.PureComponent{constructor(){super(...arguments),(0,U.A)(this,"handleDoubleClick",()=>{const{dispatch:ia}=this.props;ia({type:"entry:auto:create:combo:on:screenList"})})}render(){return(0,y.jsx)(Q,{onDoubleClick:this.handleDoubleClick,children:(0,y.jsxs)("div",{className:"main",children:[(0,y.jsx)(M.C,{name:"art_board/empty/combo"}),(0,y.jsx)("span",{className:"none",children:"\u6682\u65E0\u7EC4\u4EF6"}),(0,y.jsx)("span",{className:"double",children:"\u53CC\u51FB\u521B\u5EFA\u7EC4\u4EF6"})]})})}}const Q=w.Ay.div.withConfig({displayName:"EmptyEditCombo__StyledEmptyEditCombo",componentId:"sc-19i6v5g-0"})(["width:100%;height:100%;display:flex;justify-content:center;align-items:center;transition:background 0.2s ease-in-out;background:rgba(31,41,46,0.3);cursor:pointer;pointer-events:auto;.main{display:flex;flex-direction:column;align-items:center;svg.svg-icon{width:90px;}span{display:inline-block;&.none{margin-top:22px;color:",";}&.double{margin-top:12px;color:",";}}}"],vo=>vo.theme.color_text_L2,vo=>vo.theme.color_text_L1);var ze=s(93257),me=s(3876);const Se=w.Ay.div.withConfig({displayName:"styles__StyledStickyBoard",componentId:"sc-1hpbcbf-0"})(["z-index:4;position:absolute;left:32px;top:",";display:flex;justify-content:center;gap:12px;align-items:center;.stickyBoardItem{width:30px;height:30px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(39,54,78,0.08);border-radius:4px;white-space:nowrap;cursor:pointer;pointer-events:auto;background-color:",";.svg-icon{width:30px;height:30px;color:",";}.undoIcon,.redoIcon{width:24px;height:24px;path{fill:",";}}&.disabled{cursor:not-allowed;.undoIcon,.redoIcon{path{fill:",";}}}&:not(.disabled):hover{background-color:",";}&.linking{background:",";color:",";}}.stickyBoardContainer{display:flex;align-items:center;justify-content:center;margin-left:8px;border-radius:4px;box-shadow:0 2px 6px rgba(39,54,78,0.08);overflow:hidden;position:relative;.stickyBoardItem{border-radius:0;box-shadow:none;position:relative;&:first-child{&::after{content:'';display:inline-block;width:1px;height:16px;background:",";position:absolute;right:0;}}}}"],vo=>vo.showPanelEditBreadNav?"76px":"30px",vo=>vo.theme.color_bg_white,vo=>vo.theme.color_text_L1,vo=>vo.theme.color_text_L2,vo=>vo.theme.color_text_disabled01,vo=>vo.theme.color_btn_secondary_active,vo=>vo.theme.color_btn_secondary_active,vo=>vo.theme.color_text_L2,vo=>vo.theme.color_btn_secondary_active),De=vo=>{let{showPanelEditBreadNav:ia,dispatch:na}=vo;const Sa=()=>{na({type:"modal:update:state",payload:{linkBackModal:{isOpen:!0}}})},Na=(0,r.d4)(te.nF);return(0,y.jsx)(Se,{showPanelEditBreadNav:ia,children:Na&&(0,y.jsx)(ze.A,{content:I18N.ArtBoard.link_to_prev,direction:"down",children:(0,y.jsx)("div",{className:"stickyBoardItem interactive-target-hotspot","data-interactive-target-key":"source","data-interactive-target-type":me.E.canvas,onClick:Sa,children:(0,y.jsx)(M.C,{name:"art_board/linkBack",className:"linkBackIcon"})})})})};var tt=s(15974),at=s(79287),ht=s.n(at),Je=s(53732),$=s.n(Je),mt=s(39e3),yt=s(93413),Le=s(88670),He=s(83199),ye=s(21677),je=s(8228);const ot=w.Ay.div.withConfig({displayName:"styles__StyledHelperButton",componentId:"sc-83yeen-0"})(["z-index:106;position:absolute;right:20px;bottom:20px;pointer-events:auto;cursor:pointer;display:flex;align-items:center;height:34px;padding:0 8px;background:",";box-shadow:0px 3.25px 4.875px 0px rgba(0,0,0,0.10);border-radius:17px;&.only-helpButton{padding:0;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;}.round{width:28px;height:28px;display:flex;justify-content:center;align-items:center;position:relative;color:",";svg{width:100%;height:100%;path{fill:currentColor;}}}.expand-panel{position:absolute;border-radius:8px;right:0;bottom:44px;width:176px;padding:8px;background-color:",";font-size:12px;color:",";box-shadow:",";line-height:0px;.box-icon{width:18px;height:18px;display:flex;align-items:center;justify-content:center;position:relative;svg path{fill:",";}&.tempDisabled,&.tempDisabled + span{opacity:0.4;}.video{font-size:14px;}}.show-task-list{position:relative;.text-icon{font-size:14px;}.task-list-text{position:relative;.task-tips{top:0;left:100%;}}}& > div{height:28px;display:flex;justify-content:flex-start;align-items:center;& > *{margin-left:13px;&.qr-code-box{margin:0;}}&:hover{background-color:",";.in{border-color:",";}}}}.expand-panel{border:1px solid ",";.box-icon{svg path{color:",";}}& > div{border-radius:4px;.in{border-color:",";}}}.question-button{pointer-events:none;path{fill:",";}}.ai-semantic{width:26px;height:26px;position:relative;svg{width:100%;height:100%;}.semantic-tip{background-color:#1684FC;right:-4px;}}.line{width:1px;height:24px;background-color:",";margin:0 6px;}"],vo=>vo.theme.help_button_background_color,vo=>vo.theme.color_text_L1,vo=>vo.theme.color_bg_white,vo=>vo.theme.color_text_L1,vo=>vo.theme.shadow_m,vo=>vo.theme.color_text_L1,vo=>vo.theme.color_btn_secondary_hover,vo=>vo.theme.color_btn_secondary_hover,vo=>vo.theme.color_bg_border_01,vo=>vo.theme.color_text_L1,vo=>vo.theme.color_bg_white,vo=>vo.theme.help_button_question_fill_color,vo=>vo.theme.help_button_line_color),we=w.Ay.span.withConfig({displayName:"styles__StyledDivider",componentId:"sc-83yeen-1"})(["display:inline-block;width:160px;height:1px;background:",";margin:8px 0;"],vo=>vo.theme.color_bg_border_01),$e=w.Ay.div.withConfig({displayName:"styles__StyledBlueTips",componentId:"sc-83yeen-2"})(["position:absolute;top:0;right:0;display:inline-block;width:10px;height:10px;background:#1684fc;border:2px solid ",";border-radius:50%;&.in{top:-2px;right:-2px;border-color:#333;}"],vo=>vo.theme.color_bg_menu);var ge=s(56202);function Ze(vo){let{isShowBlueTips:ia,setShowBlueTips:na,onClose:Sa}=vo;const Na=(0,r.wA)(),Tt=(0,C.useMemo)(()=>{const Rn=(0,ge.cX)()?"\u2318 K":"Ctrl + K";return(0,He.u)({text:I18N.ChatGPT.ai_semantic,key:""+Rn+""})},[]),mn=Rn=>{Rn.stopPropagation(),Na({type:Le.X.AIToggleOpenSemantic,payload:{source:"\u5DE6\u4FA7AI\u5165\u53E3"}}),na(!1),(0,ye.Z)(je.SR.Semantic),Sa&&Sa()};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(He.A,{content:Tt,direction:"down",children:(0,y.jsxs)("div",{className:"ai-semantic",onClick:mn,children:[(0,y.jsx)(M.C,{name:"chatGPT/ai-semantic",isColorPure:!0}),ia&&(0,y.jsx)($e,{className:"semantic-tip"})]})}),(0,y.jsx)("div",{className:"line"})]})}const W=(0,C.memo)(Ze);function an(vo){let{isShowBlueTips:ia,isOpen:na,onClick:Sa}=vo;return(0,y.jsx)(He.A,{content:I18N.ToolBar.help,direction:"down",children:(0,y.jsxs)("div",{className:"round",onClick:Sa,children:[(0,y.jsx)(M.C,{className:"question-button",name:na?"common/question_close":"common/question_mark",isColorPure:!0}),ia&&(0,y.jsx)($e,{})]})})}const _t=(0,C.memo)(an);var nn=s(5209);let Oe=function(vo){return vo.ChatGroup="\u65B0\u7248\u4EA4\u6D41\u7FA4",vo.TaskList="\u65B0\u4EBA\u5F15\u5BFC",vo.NewFeature="\u65B0\u7248\u672C\u529F\u80FD",vo.NewbieVideo="\u5FEB\u901F\u5165\u95E8",vo.ShortcutKey="\u5FEB\u6377\u952E",vo.HelperCenter="\u5E2E\u52A9\u4E2D\u5FC3",vo.Feedback="\u9700\u6C42\u53CD\u9988",vo.OnlineSupport="\u5728\u7EBF\u5BA2\u670D",vo.LayoutV9="\u65B0\u7248\u5E03\u5C40\u5207\u6362",vo}({}),sn=!1;const It=()=>{sn=!0},Pt=vo=>{(0,nn.kH)("v8_q_action",{click_options:vo,is_v7_upgrade:sn})},dt=(0,y.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6021 2.58107C10.8632 2.31128 11.283 2.27488 11.5866 2.4957C12.0089 2.80289 12.1251 3.38255 11.8539 3.82883L11.7189 4.05107H9.17989L10.6021 2.58107ZM7.98585 5.05107C7.99153 5.05123 7.99723 5.0513 8.00294 5.05126C8.00682 5.05124 8.0107 5.05118 8.01457 5.05107L11.9829 5.05107C11.994 5.05144 12.0051 5.05144 12.0162 5.05107H13.4989L13.4989 6.45066H2.50098V5.05107H4.0178C4.02871 5.05142 4.03963 5.05142 4.05056 5.05107L7.98585 5.05107ZM6.80237 4.05107L5.37883 2.61155C5.12745 2.35735 4.72897 2.32256 4.43734 2.52935C4.01231 2.83074 3.89891 3.41281 4.17972 3.85172L4.30726 4.05107H6.80237ZM3.16345 4.05107C2.83495 3.22072 3.10435 2.24869 3.8589 1.71363C4.54995 1.2236 5.4942 1.30603 6.08988 1.9084L7.9963 3.83623L9.88345 1.88573C10.491 1.25778 11.4682 1.17303 12.1748 1.68702C12.9267 2.23396 13.1926 3.2136 12.8571 4.05107H13.4989C14.0512 4.05107 14.4989 4.49878 14.4989 5.05107V6.45066C14.4989 6.96917 14.1043 7.39551 13.599 7.44572V13.1495C13.599 13.9779 12.9274 14.6495 12.099 14.6495H7.99994H3.90075C3.07232 14.6495 2.40075 13.9779 2.40075 13.1495V7.4457C1.89553 7.39542 1.50098 6.96912 1.50098 6.45066V5.05107C1.50098 4.49878 1.94869 4.05107 2.50098 4.05107H3.16345ZM7.49994 7.4507H3.40075V13.1495C3.40075 13.4256 3.62461 13.6495 3.90075 13.6495H7.49994V7.4507ZM8.49994 13.6495V7.4507H12.599V13.1495C12.599 13.4256 12.3752 13.6495 12.099 13.6495H8.49994Z",fill:"#333333"})});function Vn(vo){let{onClose:ia}=vo;const na=(0,r.wA)(),Sa=(0,C.useCallback)(Na=>{Na.stopPropagation(),na({type:"entry:show:taskList"}),ia&&ia(),Pt(Oe.TaskList)},[na,ia]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"show-task-list",onClick:Sa,children:[(0,y.jsx)("div",{className:"box-icon",children:dt}),(0,y.jsx)("span",{className:"task-list-text",children:I18N.CommonGuides.show_novice_tasks})]}),(0,y.jsx)(we,{})]})}const o=(0,C.memo)(Vn),Gn=(0,y.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.1001 3.50156C3.1001 3.28065 3.27918 3.10156 3.5001 3.10156H12.5001C12.721 3.10156 12.9001 3.28065 12.9001 3.50156V12.5016C12.9001 12.7225 12.721 12.9016 12.5001 12.9016H3.5001C3.27918 12.9016 3.1001 12.7225 3.1001 12.5016V3.50156ZM3.5001 2.10156C2.7269 2.10156 2.1001 2.72836 2.1001 3.50156V12.5016C2.1001 13.2748 2.7269 13.9016 3.5001 13.9016H12.5001C13.2733 13.9016 13.9001 13.2748 13.9001 12.5016V3.50156C13.9001 2.72836 13.2733 2.10156 12.5001 2.10156H3.5001ZM6.6001 5.23022C6.4454 5.1409 6.2548 5.1409 6.1001 5.23022C5.9454 5.31954 5.8501 5.4846 5.8501 5.66323V8.00149V10.3398C5.8501 10.5184 5.9454 10.6834 6.1001 10.7728C6.2548 10.8621 6.4454 10.8621 6.6001 10.7728L8.6251 9.60364L10.6501 8.43451C10.8048 8.34519 10.9001 8.18013 10.9001 8.00149C10.9001 7.82286 10.8048 7.6578 10.6501 7.56848L8.6251 6.39935L6.6001 5.23022ZM6.8501 8.00149V6.52926L8.1251 7.26538L9.40009 8.00149L8.1251 8.73761L6.8501 9.47373V8.00149Z",fill:"black",fillOpacity:"0.85"})});function xt(vo){let{isShowBlueTips:ia,setShowBlueTips:na,onClose:Sa}=vo;const Na=(0,r.wA)(),Tt=(0,C.useCallback)(()=>{Na({type:"newbieVideoPanelState:toggle",payload:{show:!0}}),MB.commonGuideHelper.markGuideAsRead(yt.c.GUIDE_NEWBIE_VIDEO),na(!1),Sa&&Sa(),Pt(Oe.NewbieVideo)},[Na,na,Sa]);return(0,y.jsxs)("div",{onClick:Tt,children:[(0,y.jsxs)("div",{className:"box-icon",children:[Gn,ia&&(0,y.jsx)($e,{className:"in"})]}),(0,y.jsx)("span",{children:I18N.ToolBar.newbie_video})]})}const Ot=(0,C.memo)(xt),wt=(0,y.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 4H13.5V12H2.5L2.5 4ZM1.5 4C1.5 3.44772 1.94772 3 2.5 3H13.5C14.0523 3 14.5 3.44772 14.5 4V12C14.5 12.5523 14.0523 13 13.5 13H2.5C1.94772 13 1.5 12.5523 1.5 12V4ZM4 7C4 6.72386 4.22386 6.5 4.5 6.5H5.09929C5.37543 6.5 5.59929 6.72386 5.59929 7C5.59929 7.27614 5.37543 7.5 5.09929 7.5H4.5C4.22386 7.5 4 7.27614 4 7ZM7.19971 6.5C6.92356 6.5 6.69971 6.72386 6.69971 7C6.69971 7.27614 6.92356 7.5 7.19971 7.5H7.799C8.07514 7.5 8.299 7.27614 8.299 7C8.299 6.72386 8.07514 6.5 7.799 6.5H7.19971ZM9.09961 7C9.09961 6.72386 9.32347 6.5 9.59961 6.5H11.6994C11.9756 6.5 12.1994 6.72386 12.1994 7C12.1994 7.27614 11.9756 7.5 11.6994 7.5H9.59961C9.32347 7.5 9.09961 7.27614 9.09961 7ZM4.5 9.19971C4.22386 9.19971 4 9.42356 4 9.69971C4 9.97585 4.22386 10.1997 4.5 10.1997H11.6993C11.9755 10.1997 12.1993 9.97585 12.1993 9.69971C12.1993 9.42356 11.9755 9.19971 11.6993 9.19971H4.5Z",fill:"black",fillOpacity:"0.85"})});function Kt(vo){let{isShowBlueTips:ia,setShowBlueTips:na,onClose:Sa}=vo;const Na=(0,r.wA)(),Tt=(0,C.useCallback)(()=>{Na({type:"toggle:showShortCutArtBoard",payload:{helpCenterModal:{index:1}}}),MB.commonGuideHelper.markGuideAsRead(yt.c.GUIDE_SHORT_CUT_PANEL),na(!1),Sa&&Sa(),Pt(Oe.ShortcutKey)},[Na,na,Sa]);return(0,y.jsxs)("div",{onClick:Tt,children:[(0,y.jsxs)("div",{className:"box-icon",children:[wt,ia&&(0,y.jsx)($e,{className:"in"})]}),(0,y.jsx)("span",{children:I18N.ArtBoard.shortCutKey})]})}const fe=(0,C.memo)(Kt);var bt=s(86964),un=s(25582),gt=s.n(un),Wt=s(95358);Un.propTypes={productId:gt().string,children:gt().oneOfType([gt().array,gt().string,gt().node]),isWonderShare:gt().bool,className:gt().string,wsLink:gt().string,onClick:gt().func,data:gt().object,params:gt().string,disabled:gt().bool,canClick:gt().bool};function Un(vo){let{isWonderShare:ia=!1,wsLink:na="https://mockitt.wondershare.com/feedback.html",productId:Sa="315118",className:Na="",params:Tt="",data:mn,children:Rn,onClick:gn=null,disabled:Tn,canClick:wo}=vo;const io=()=>{if(Tn){wo&&gn&&gn();return}gn&&gn(),(0,Wt.v)({productId:Sa,data:mn,params:Tt,isWonderShare:ia,wsLink:na})};return(0,y.jsx)("div",{className:Na,onClick:io,children:Rn})}var Jn=s(47163),Yt=s(37342);const rt=(0,y.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 13C10.7614 13 13 10.7614 13 8C13 5.23858 10.7614 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13ZM8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",fill:"black",fillOpacity:"0.85"}),(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 5C7.17157 5 6.5 5.67157 6.5 6.5C6.5 6.77614 6.27614 7 6 7C5.72386 7 5.5 6.77614 5.5 6.5C5.5 5.11929 6.61929 4 8 4C9.38071 4 10.5 5.11929 10.5 6.5C10.5 7.07815 10.3472 7.51571 10.0838 7.85811C9.83337 8.18368 9.50835 8.38604 9.25952 8.53714C9.24553 8.54564 9.2318 8.55396 9.21833 8.56214C8.96702 8.71457 8.80401 8.81345 8.6832 8.94692C8.58235 9.05834 8.5 9.209 8.5 9.5C8.5 9.77614 8.27614 10 8 10C7.72386 10 7.5 9.77614 7.5 9.5C7.5 8.97141 7.66765 8.57876 7.9418 8.27587C8.16636 8.02776 8.45515 7.8541 8.67487 7.72197C8.69752 7.70835 8.71944 7.69516 8.74048 7.68239C8.99165 7.52987 9.16663 7.41033 9.29119 7.2484C9.4028 7.10331 9.5 6.88779 9.5 6.5C9.5 5.67157 8.82843 5 8 5Z",fill:"black",fillOpacity:"0.85"}),(0,y.jsx)("path",{d:"M8.75 11.5C8.75 11.9142 8.41421 12.25 8 12.25C7.58579 12.25 7.25 11.9142 7.25 11.5C7.25 11.0858 7.58579 10.75 8 10.75C8.41421 10.75 8.75 11.0858 8.75 11.5Z",fill:"black",fillOpacity:"0.85"})]}),An=(0,y.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("g",{clipPath:"url(#clip0_2026_37846)",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 4.00684V12C1.5 12.5523 1.94772 13 2.5 13H13.5C14.0523 13 14.5 12.5523 14.5 12V4C14.5 3.44772 14.0523 3 13.5 3H2.5C1.95143 3 1.50603 3.44171 1.50006 3.98886C1.50002 3.99257 1.5 3.99628 1.5 4M2.5 4.93426L7.72265 8.41603C7.89679 8.53212 8.12482 8.52747 8.29409 8.40437L13.5 4.61825V12H2.5L2.5 4.93426ZM12.6499 4H2.90139L7.98757 7.39079L12.6499 4Z",fill:"black",fillOpacity:"0.85"})}),(0,y.jsx)("defs",{children:(0,y.jsx)("clipPath",{id:"clip0_2026_37846",children:(0,y.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]}),Nt=(0,y.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("g",{clipPath:"url(#clip0_2026_37851)",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97058 2.25C2.1584 2.25 1.5 2.9084 1.5 3.72058V10.7794C1.5 11.5916 2.1584 12.25 2.97058 12.25H3.6V13.25C3.6 13.4233 3.68973 13.5842 3.83713 13.6753C3.98454 13.7664 4.16861 13.7747 4.32361 13.6972L7.21803 12.25H13.0294C13.8416 12.25 14.5 11.5916 14.5 10.7794V3.72058C14.5 2.9084 13.8416 2.25 13.0294 2.25H2.97058ZM2.5 3.72058C2.5 3.46069 2.71069 3.25 2.97058 3.25H13.0294C13.2893 3.25 13.5 3.46069 13.5 3.72058V10.7794C13.5 11.0393 13.2893 11.25 13.0294 11.25H7.1C7.02238 11.25 6.94582 11.2681 6.87639 11.3028L4.6 12.441V11.75C4.6 11.4739 4.37614 11.25 4.1 11.25H2.97058C2.71069 11.25 2.5 11.0393 2.5 10.7794V3.72058ZM10.5996 5.44995C10.5996 5.17381 10.3758 4.94995 10.0996 4.94995C9.82347 4.94995 9.59961 5.17381 9.59961 5.44995V5.74995C9.59961 6.02609 9.82347 6.24995 10.0996 6.24995C10.3758 6.24995 10.5996 6.02609 10.5996 5.74995V5.44995ZM5.90039 4.94995C6.17653 4.94995 6.40039 5.17381 6.40039 5.44995V5.74995C6.40039 6.02609 6.17653 6.24995 5.90039 6.24995C5.62425 6.24995 5.40039 6.02609 5.40039 5.74995V5.44995C5.40039 5.17381 5.62425 4.94995 5.90039 4.94995ZM5.67678 7.70293C5.92363 7.57951 6.22376 7.67943 6.34739 7.92611L6.34719 7.92572L6.34714 7.92548C6.34918 7.92924 6.3534 7.93689 6.35987 7.94786C6.37284 7.96987 6.39461 8.0049 6.42559 8.04864C6.48794 8.13666 6.58517 8.25653 6.72007 8.37644C6.98568 8.61253 7.39679 8.85015 8.00039 8.85015C8.60399 8.85015 9.0151 8.61253 9.28071 8.37644C9.41561 8.25653 9.51284 8.13666 9.57519 8.04864C9.60617 8.0049 9.62794 7.96987 9.64091 7.94786C9.64738 7.93689 9.6516 7.92924 9.65364 7.92548L9.65359 7.92572L9.65339 7.92612C9.77701 7.67944 10.0771 7.57951 10.324 7.70293C10.571 7.82643 10.6711 8.12676 10.5476 8.37375L10.1004 8.15015C10.5476 8.37375 10.5475 8.37398 10.5474 8.3742L10.5471 8.37468L10.5466 8.37573L10.5454 8.37815L10.5422 8.38432L10.5329 8.40176C10.5254 8.41558 10.5153 8.43372 10.5024 8.45555C10.4767 8.49917 10.4399 8.5579 10.3912 8.62666C10.2942 8.76363 10.1477 8.94377 9.94507 9.12385C9.53568 9.48776 8.89679 9.85015 8.00039 9.85015C7.10399 9.85015 6.4651 9.48776 6.05571 9.12385C5.85311 8.94377 5.70659 8.76363 5.60957 8.62666C5.56086 8.5579 5.52403 8.49917 5.49833 8.45555C5.48546 8.43372 5.47533 8.41558 5.46785 8.40176L5.45858 8.38432L5.4554 8.37815L5.45417 8.37573L5.45364 8.37468L5.4534 8.3742C5.45329 8.37398 5.45318 8.37375 5.90039 8.15015L5.45318 8.37375C5.32968 8.12676 5.42979 7.82643 5.67678 7.70293ZM9.65364 7.92548L9.65395 7.925L9.65452 7.92388L9.65504 7.92286L9.65505 7.92284C9.65505 7.92284 9.65458 7.92374 9.65364 7.92548ZM6.34714 7.92548L6.34683 7.925L6.34626 7.92388L6.34574 7.92286L6.34573 7.92284C6.34573 7.92284 6.3462 7.92374 6.34714 7.92548Z",fill:"black",fillOpacity:"0.85"})}),(0,y.jsx)("defs",{children:(0,y.jsx)("clipPath",{id:"clip0_2026_37851",children:(0,y.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]});function jt(vo){let{onClose:ia}=vo;const na=(0,r.wA)(),Sa=(0,C.useCallback)(()=>{(0,Jn.k)()?na({type:"modal:update:state",payload:{helpCenterModal:{isOpen:!0,productName:"a10_proto_tool_v8"}}}):(0,Yt.JW)("https://mockitt.wondershare.com/guide/","_blank","noreferrer"),ia&&ia(),Pt(Oe.HelperCenter)},[na,ia]),Na=(0,C.useCallback)(()=>{Pt(Oe.Feedback),ia&&ia()},[ia]),Tt=(0,C.useCallback)(()=>{Pt(Oe.OnlineSupport),ia&&ia()},[ia]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{onClick:Sa,children:[(0,y.jsx)("div",{className:"box-icon",children:rt}),(0,y.jsx)("span",{children:I18N.ArtBoard.helpCenter})]}),(0,y.jsxs)(Un,{isWonderShare:ENV.IS_MO,data:{nickname:MB.user.name,avatar:MB.user.avatar,openid:MB.user.cid},canClick:!0,onClick:Na,children:[(0,y.jsx)("div",{className:"box-icon",children:An}),(0,y.jsx)("span",{children:I18N.ArtBoard.feedBack})]}),(0,y.jsxs)(bt.kN,{isWonderShare:ENV.IS_MO,canClick:!0,onClick:Tt,children:[(0,y.jsx)("div",{className:"box-icon",children:Nt}),(0,y.jsx)("span",{children:I18N.ArtBoard.onLine})]})]})}const vn=(0,C.memo)(jt);var Dt=s(15515),$t=s(18501);const kn="2022-08-17",Kn=(0,I.j8)({rootProject:J.PL,currentUser:J.HW,currentOrg:J.wA,isHideTaskList:J.SD,isCompleteTaskList:J.jj,currentViewType:ne.jx,currentEditMode:T.r,showAISemanticTip:$t.tK,layoutV9:q.MZ});function dn(){const{rootProject:vo,currentUser:ia,currentOrg:na,isHideTaskList:Sa,isCompleteTaskList:Na,currentViewType:Tt,currentEditMode:{isEditingProjectMain:mn},showAISemanticTip:Rn,layoutV9:gn}=(0,r.d4)(Kn),[Tn,wo]=(0,C.useState)(!1),io=(0,C.useRef)(null),fo=(0,C.useCallback)(()=>wo(Za=>!Za),[]),co=(0,C.useCallback)(()=>wo(!1),[]),ga=(0,C.useCallback)(Za=>{var Nr;let{target:ii}=Za;!((Nr=io.current)!=null&&Nr.contains(ii))&&wo(!1)},[]),[Fo,Eo]=(0,C.useState)(()=>!MB.commonGuideHelper.checkGuideHasShown(yt.c.GUIDE_SEMANTIC_PANEL)),[Oa,Ra]=(0,C.useState)(()=>{const Za=ia?ht()(ia==null?void 0:ia.created_at).isAfter(ht()(kn)):!1;return!ENV.IS_MO&&Za&&!MB.commonGuideHelper.checkGuideHasShown(yt.c.GUIDE_NEWBIE_VIDEO)}),[tr,Ar]=(0,C.useState)(()=>{const Za=ia?ht()(ia==null?void 0:ia.created_at).isAfter(ht()(kn)):!1;return!ENV.IS_MO&&Za&&!MB.commonGuideHelper.checkGuideHasShown(yt.c.GUIDE_SHORT_CUT_PANEL)}),nr=(0,Dt.Yt)("UPGRADED_PROJECT_"+(vo==null?void 0:vo.cid),!1,Dt.qW.String),[$a,Rr]=(0,C.useState)(nr&&!MB.commonGuideHelper.checkGuideHasShown(yt.c.UPGRADE_V8_COMMUNITY_GROUP)),or=!ENV.IS_ON_PREMISES&&!Na&&Sa,Ba=!1,Ja=tr||$a||Oa;return(0,y.jsxs)(ot,{ref:io,className:$()(!Ba&&"only-helpButton"),children:[Ba&&(0,y.jsx)(W,{isShowBlueTips:Fo&&Rn,setShowBlueTips:Eo}),(0,y.jsx)(_t,{isOpen:Tn,isShowBlueTips:Ja,onClick:fo}),Tn&&(0,y.jsxs)("div",{className:"expand-panel",children:[or&&Rn&&(0,y.jsx)(o,{onClose:co}),!ENV.IS_MO&&(0,y.jsx)(Ot,{isShowBlueTips:Oa,setShowBlueTips:Ra,onClose:co}),(0,y.jsx)(fe,{isShowBlueTips:tr,setShowBlueTips:Ar,onClose:co}),!ENV.IS_MO&&!ENV.IS_ON_PREMISES&&(0,y.jsx)(we,{}),!ENV.IS_ON_PREMISES&&(0,y.jsx)(vn,{onClose:co})]}),Tn&&(0,y.jsx)(mt.A,{target:document,onClick:ga})]})}const ft=(0,C.memo)(dn);var Lt=s(51582),bn=s(58603),Yn=s(28681);const on=(0,w.DU)(["::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar{width:6px;height:6px;}::-webkit-scrollbar-thumb{background-color:rgb(222,222,228);border-radius:4px;}::-webkit-scrollbar-corner{background-color:transparent;}"]),yn=w.Ay.div.withConfig({displayName:"styled__StyledShortCut",componentId:"sc-e1juno-0"})(["position:absolute;background:#333;border:1px solid rgba(0,0,0,0.11);border-radius:8px;color:#fff;header{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;border:1px solid rgba(255,255,255,0.1);padding:0 10%;position:relative;a{margin:auto;line-height:32px;cursor:pointer;p{margin:0 auto;width:fit-content;opacity:0.6;line-height:1.2;padding-top:12px;padding-bottom:8px;}&.is-active p{opacity:1;font-weight:500;}}}.indicator{position:absolute;height:2px;width:28px;background-color:#fff;bottom:0px;display:inline-block;transition:0.2s all ease-out;}.close-icon{position:absolute;right:14px;top:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1;svg{width:24px;height:24px;path{fill:#fff;}}}.shortcut-content{overflow-x:auto;height:calc(100% - 34px);padding:27px 50px;.shortcut-box{display:flex;height:100%;justify-content:space-start;margin:0 auto;.shortcut-column{&.has-border{border-right:1px solid rgba(255,255,255,0.1);}}.shortcut-item{padding:10px 40px;min-width:275px;line-height:1.33;display:flex;justify-content:space-between;p{margin:0px;}&:first-child{padding-top:0px;}&:last-child{padding-bottom:0px;}&:lang(en){min-width:325px;}.left-svg{margin-left:5px;}}}}"]),lo=w.Ay.div.withConfig({displayName:"styled__ShortcutItemStyled",componentId:"sc-e1juno-1"})(["color:",";.shortcut-item{padding:2px 10px;cursor:pointer;&:hover{background-color:",";}}"],vo=>vo.theme.color_text_L1,vo=>vo.theme.color_btn_secondary_hover);class qn extends C.PureComponent{constructor(ia){super(ia),(0,U.A)(this,"state",{activeIndex:this.props.defaultIndex||0,isOpenDropdown:!1}),(0,U.A)(this,"maxColumn",0),(0,U.A)(this,"formatData",()=>{let{list:na,maxRows:Sa}=this.props,Na=[];na.map((Tt,mn)=>{Na[mn]=Na[mn]||[],Na[mn].label=Tt.label,Na[mn].title=Tt.title;let Rn=[];Tt.data.map((gn,Tn)=>{let wo=Math.floor(Tn/Sa);Rn[wo]=Rn[wo]||[],Rn[wo].push(gn),wo>this.maxColumn&&(this.maxColumn=wo)}),Na[mn].data=Rn}),this.list=Na}),(0,U.A)(this,"componentDidMount",()=>{let na=document.querySelector(".shortcut-content").offsetWidth,Sa=document.querySelector(".shortcut-column").offsetWidth*(this.maxColumn+1);Sa":Ot,Je=Ot=>Ot.toLowerCase(),$=Ot=>{const wt={"<":"<",">":">","&":"&"};return Ot.replace(/(<|>|&)/g,Kt=>wt[Kt])},mt=function(Ot,wt){return wt===void 0&&(wt="-"),Ot.toString().split(wt).map(Kt=>isNaN(parseInt(Kt))?Kt:parseInt(Kt))},yt=Ot=>Ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Le=Ot=>{const wt=yt(Ot);return new RegExp(wt,"ig")},He=Ot=>{let{isCurrentScreen:wt,currentScreenCid:Kt}=Ot;const fe=(bt,un,gt,Wt)=>{var Un;const Jn=[];if(!bt)return Jn;const{key:Yt,sub:rt,hotAttr:An}=bt,Nt=(Un=An.bunch)!=null?Un:An.type;if([J.x.RbPage,J.x.Canvas,J.x.WWrap].includes(Nt)){const jt=rt.map(Dt=>sdkStore.getHotItem(Dt)).sort((Dt,$t)=>{var kn,Kn;return((kn=$t.hotAttr)==null?void 0:kn.zIndex)-((Kn=Dt.hotAttr)==null?void 0:Kn.zIndex)}),vn=Nt===J.x.RbPage?bt.key:un;Jn.push(...jt.map(Dt=>[...fe(Dt,vn,gt,Wt)]).flat(1/0))}else if(Nt===J.x.WBasket&&An.basket==="bMuban"){const jt=rt.map(Dt=>sdkStore.getHotItem(Dt)).sort((Dt,$t)=>{var kn,Kn;return((kn=$t.hotAttr)==null?void 0:kn.zIndex)-((Kn=Dt.hotAttr)==null?void 0:Kn.zIndex)}),vn=un;Jn.push(...jt.map(Dt=>[...fe(Dt,vn,!0)]).flat(1/0))}else if(Nt===J.x.WMind&&rt.length){const jt=sdkStore.getHotItem(An.refContentKey);Jn.push(...fe(jt,un,gt,Yt))}else if(Nt===J.x.WMindNode){if(gt&&An.basket==="bDanli")return Jn;Jn.push({...bt,pageKey:un,mindKey:Wt});const jt=rt.map(vn=>sdkStore.getHotItem(vn)).sort((vn,Dt)=>{var $t,kn;return(($t=vn.hotAttr)==null?void 0:$t.order)-((kn=Dt.hotAttr)==null?void 0:kn.order)});Jn.push(...jt.map(vn=>[...fe(vn,un,gt,Wt)]).flat(1/0))}else{if(gt&&An.basket==="bDanli")return Jn;Jn.push({...bt,pageKey:un})}return Jn};if(wt){const bt=sdkStore.getHotItem(Kt);return fe(bt,Kt,!1)}else return sdkStore.getSubHotItemList("B@main").filter(un=>{var gt;return((gt=un.hotAttr.bunch)!=null?gt:un.hotAttr.type)===J.x.RbPage}).sort((un,gt)=>{var Wt,Un;return((Wt=gt.hotAttr)==null?void 0:Wt.zIndex)-((Un=un.hotAttr)==null?void 0:Un.zIndex)}).map(un=>[...fe(un,un.key,!1)]).flat(1/0)},ye=Ot=>{let{widgetList:wt,searchValue:Kt,findWidgetList:fe,findWidgetPanelList:bt,mubans:un,parent:gt=null}=Ot,Wt=!0;Wt&&wt.forEach(Un=>{const{hotAttr:{type:Jn,refRBPageKey:Yt},pageKey:rt,mindKey:An}=Un;if(Jn===J.x.WBasket&&Un.hotAttr.basket==="bDanli"){const Nt=He({isCurrentScreen:!0,currentScreenCid:Yt});ye({widgetList:Nt,searchValue:Kt,findWidgetList:fe,findWidgetPanelList:bt,mubans:un,parent:{widget:Un,pageKey:rt}})}else{const Nt=je(Un,Kt);if((Nt==null?void 0:Nt.length)>0&&(Nt.forEach((jt,vn)=>{fe.push({widget:Un,parent:gt,index:vn,pageKey:rt,mindKey:An})}),gt)){const{widget:{hotAttr:{type:jt,refRBPageKey:vn,basket:Dt}}}=gt,$t=jt===J.x.WBasket&&Dt==="bMuban";Wt=!$t||!un.has(vn),$t&&un.add(vn),!$t&&bt.push(gt)}}})},je=function(Ot,wt,Kt){Kt===void 0&&(Kt=0);const{hotAttr:{type:fe,textV0:bt,textV1:un,tableData:gt,chartData:Wt,optionData:Un}}=Ot;if(w.includes(fe)){wt=$(wt);const Jn=(0,te.YZ)(un,!0);return Ze({str:Jn,matchValue:wt,replaceEndIndex:Kt})}else if(ze.includes(fe)){const Jn=bt.text,Yt=j.includes(fe);return wt=j.includes(fe)?wt:$(wt),Ze({str:Jn,matchValue:wt,pureHTML:Yt,replaceEndIndex:Kt})}else{if(fe===J.x.WMSelect)return bt.text.split(/\n/).map((Yt,rt)=>Ze({str:Yt,matchValue:wt,pureHTML:!0}).map(Nt=>rt+"-"+Nt)).flat();if(fe===J.x.WTable){const Jn=[];if(wt=$(wt),(0,C.SS)(Ot.hotAttr))for(const[Yt,rt]of Object.entries(Ot.hotAttr.cells)){const An=Ze({str:rt.data,matchValue:wt,pureHTML:!0});An.length>0&&Jn.push(An.map(Nt=>Yt+"-"+Nt))}else gt.data.forEach((rt,An)=>{rt.forEach((Nt,jt)=>{const vn=Ze({str:Nt,matchValue:wt,pureHTML:!0});vn.length>0&&Jn.push(vn.map(Dt=>An+"-"+jt+"-"+Dt))})});return Jn.flat()}else if(fe===J.x.WChart){const{xAxis:Jn,series:Yt}=Wt,rt=Yt.map(jt=>{let{name:vn}=jt;return vn}),An=Jn.map((jt,vn)=>Ze({str:jt,matchValue:wt,pureHTML:!0}).map($t=>Me+"-"+vn+"-"+$t)),Nt=rt.map((jt,vn)=>Ze({str:jt,matchValue:wt,pureHTML:!0}).map($t=>De+"-"+vn+"-"+$t));return An.concat(Nt).flat()}else if(Q.includes(fe)){const Jn=fe===J.x.WDropMenu?bt.text:"",Yt=[];W(Un,Yt,wt);const rt=Ze({str:Jn,matchValue:wt,pureHTML:!0});return Yt.push(rt.map(An=>at+"/"+An)),Yt.flat()}}return Se},ot=function(Ot,wt,Kt){return Kt===void 0&&(Kt=0),Je(Ot).indexOf(Je(wt),Kt)},we=function(Ot,wt,Kt){Kt===void 0&&(Kt=0);let fe=[],bt=ot(Ot,wt,Kt);for(;bt!==-1;)fe.push(bt),bt=ot(Ot,wt,bt+wt.length);return fe=fe.sort((un,gt)=>un-gt),fe},$e=Ot=>{const wt=[...Ot.matchAll(me)];return wt&&wt.length>0?wt.map(Kt=>({...Kt,0:Kt[0].replace(">",""),index:Kt.index+1})):Se},ge=function(Ot,wt,Kt){Kt===void 0&&(Kt=0);const fe=$e(Ot),bt=[];if(fe&&fe.length>0){const un=Je(wt.substring(0,1)),gt=Je(wt.substring(wt.length-1)),Wt=fe.map((jt,vn)=>Je(jt[0]).includes(un)?vn:null).filter(jt=>jt!==null),Un=fe.map((jt,vn)=>Je(jt[0]).includes(gt)?vn:null).filter(jt=>jt!==null),Jn=[],Yt=[];Wt.forEach(jt=>{const vn=fe[jt][0];we(vn,un).forEach($t=>{Jn.push(jt+"-"+$t)})}),Un.forEach(jt=>{const vn=fe[jt][0];we(vn,gt).forEach($t=>{Yt.push(jt+"-"+$t)})});const rt=[];Jn.forEach(jt=>{const vn=mt(jt);Yt.forEach(Dt=>{const $t=mt(Dt);$t[0]===vn[0]?$t[1]>=vn[1]&&rt.push({start:jt,end:Dt}):$t[0]>vn[0]&&rt.push({start:jt,end:Dt})})});const An=rt.map(jt=>{let{start:vn,end:Dt}=jt;const $t=mt(vn),kn=mt(Dt),Kn={contents:[],startIndex:$t[1],endIndex:kn[1]};return fe.forEach((dn,ft)=>{ft>=$t[0]&&ft<=kn[0]&&Kn.contents.push(dn)}),Kn}),Nt=[];An.forEach(jt=>{const{contents:vn,startIndex:Dt,endIndex:$t}=jt;if(vn.length===1)Je(vn[0][0].substring(Dt,$t+1))===Je(wt)&&Nt.push(jt);else{const kn=vn.reduce((Kn,dn,ft)=>ft===0?Kn+dn[0].substring(Dt):ft===vn.length-1?Kn+dn[0].substring(0,$t+1):Kn+dn[0],"");Je(kn)===Je(wt)&&Nt.push(jt)}}),Nt.forEach(jt=>{const vn=jt.contents[0].index+jt.startIndex;if(vn>=Kt)if(bt.length>0){const{contents:Dt,endIndex:$t}=bt[bt.length-1],kn=Dt[Dt.length-1].index+$t;vn>kn&&bt.push(jt)}else bt.push(jt)})}return bt},Ze=Ot=>{let{str:wt,matchValue:Kt,pureHTML:fe=!1,replaceEndIndex:bt=0}=Ot,un=[];return wt&&(fe||$e(wt).length===0?un=we(wt,Kt,bt):un=ge(wt,Kt,bt)),un},W=function(Ot,wt,Kt,fe){fe===void 0&&(fe=""),Ot.forEach((bt,un)=>{let{data:gt,children:Wt}=bt;const Un=fe.length>0?fe+"-"+un:""+un,Jn=Ze({str:gt.name,matchValue:Kt,pureHTML:!0});wt.push(Jn.map(Yt=>tt+"/"+Un+"/"+Yt)),Wt&&Wt.length>0&&W(Wt,wt,Kt,Un)})},an=Ot=>{let{hotItem:wt,matchValue:Kt,replaceValue:fe,current:bt}=Ot;const{hotAttr:{type:un,textV0:gt,textV1:Wt,tableData:Un,chartData:Jn,optionData:Yt,refVars:rt}}=wt,An=(0,M.m5)(wt.hotAttr);if(w.includes(un)){const Dt=(0,te.YZ)(Wt,!0);fe=$(fe);const{newHtml:$t,replaceEndIndex:kn}=Pt(Dt,bt,Kt,fe),Kn=un===J.x.WTear||un===J.x.WSticky?B.a.COMMON:un===J.x.WRichText?B.a.TEXT:B.a.BASIC,dn=(0,ne.A)({html:$t,componentType:Kn,isSearchReplace:!0}),ft=q.z6.createFromBlockArray(dn.contentBlocks,dn.entityMap),bn=q.$t.createWithContent(ft).getCurrentContent(),Yn=(0,q.dM)(bn),on=(0,T.qn)(Yn),yn={...wt.hotAttr,textV1:on},lo=bn.getPlainText();return An&&lo!==(0,M.U_)(An)&&(yn.refVars={...rt,textV1:(0,M.JK)(rt==null?void 0:rt.textV1,"text")}),un===J.x.WRichText&&(0,l.PQ)(yn),{newItem:{...wt,hotAttr:yn},replaceEndIndex:kn}}else if(y.includes(un)){const Dt=gt.text;if(fe=$(fe),isNaN(bt)){const{newHtml:$t,replaceEndIndex:kn}=Pt(Dt,bt,Kt,fe),Kn=ht($t),dn={...wt.hotAttr,textV0:{...wt.hotAttr.textV0,text:Kn}};return An&&Kn!==(0,M.U_)(An)&&(dn.refVars={...rt,textV0:(0,M.JK)(rt==null?void 0:rt.textV0,"text")}),{newItem:{...wt,hotAttr:dn},replaceEndIndex:kn}}else{const{newData:$t,replaceEndIndex:kn}=dt(Dt,bt,Kt,fe),Kn=ht($t),dn={...wt.hotAttr,textV0:{...wt.hotAttr.textV0,text:Kn}};return An&&Kn!==(0,M.U_)(An)&&(dn.refVars={...rt,textV0:(0,M.JK)(rt==null?void 0:rt.textV0,"text")}),{newItem:{...wt,hotAttr:dn},replaceEndIndex:kn}}}else if(un===J.x.WMSelect){const Dt=gt.text.split(/\n/),$t=mt(bt),Kn=Vn({data:Dt,indexArr:$t,matchValue:Kt,replaceValue:fe}).join("\n"),dn={...wt.hotAttr,textV0:{...wt.hotAttr.textV0,text:Kn}};return An&&Kn!==(0,M.U_)(An)&&(dn.refVars={...rt,textV0:(0,M.JK)(rt==null?void 0:rt.textV0,"text")}),{newItem:{...wt,hotAttr:dn}}}else if(un===J.x.WTable){const Dt=mt(bt);if(fe=$(fe),Kt=$(Kt),(0,C.SS)(wt.hotAttr)){const $t={...wt.hotAttr.cells},kn={...rt==null?void 0:rt.cells},Kn={...wt.hotAttr,cells:$t,refVars:{...wt.hotAttr.refVars,cells:kn}};for(const[dn,ft]of Object.entries($t))if(dn===""+Dt[0]){var Nt;const{newData:Lt}=dt(ft.data||"",Dt[1],Kt,fe);$t[dn].data=Lt;const bn=kn==null||(Nt=kn[dn])==null?void 0:Nt.data;bn&&Lt!==(0,M.U_)(bn)&&(kn[dn].data=void 0)}return{newItem:{...wt,hotAttr:Kn}}}else{const kn=Un.data.map((Kn,dn)=>dn===Dt[0]?Kn.map((ft,Lt)=>{if(Lt===Dt[1]){const{newData:bn}=dt(ft,Dt[2],Kt,fe);return bn}return ft}):Kn);return{newItem:{...wt,hotAttr:{...wt.hotAttr,tableData:{...wt.hotAttr.tableData,data:kn}}}}}}else if(un===J.x.WChart){const{xAxis:Dt,series:$t}=Jn,kn=mt(bt),Kn=kn[0]===Me;let dn=[];return Kn?dn=Vn({data:Dt,indexArr:kn.slice(1),matchValue:Kt,replaceValue:fe}):dn=$t.map((ft,Lt)=>{if(Lt===kn[1]){const{newData:bn}=dt(ft.name,kn[2],Kt,fe);return{...ft,name:bn}}return ft}),Kn?{newItem:{...wt,hotAttr:{...wt.hotAttr,chartData:{...wt.hotAttr.chartData,xAxis:dn}}}}:{newItem:{...wt,hotAttr:{...wt.hotAttr,chartData:{...wt.hotAttr.chartData,series:dn}}}}}else if(j.includes(un)){const Dt=gt.text,{newData:$t,replaceEndIndex:kn}=dt(Dt,bt,Kt,fe),Kn={...wt.hotAttr,textV0:{...wt.hotAttr.textV0,text:$t}};return An&&$t!==(0,M.U_)(An)&&(Kn.refVars={...rt,textV0:(0,M.JK)(rt==null?void 0:rt.textV0,"text")}),{newItem:{...wt,hotAttr:{...wt.hotAttr,textV0:{...wt.hotAttr.textV0,text:$t}}},replaceEndIndex:kn}}else if(Q.includes(un)){const Dt=bt.split("/");if(Dt[0]===tt){const $t=I()(Yt),kn=I()(rt==null?void 0:rt.optionData)||[],Kn=Dt[1],dn=mt(Kn);if(dn.length===1){var jt;const Lt=$t[dn[0]],{newData:bn}=dt(Lt.data.name,parseInt(Dt[2]),Kt,fe);$t[dn[0]].data={...$t[dn[0]].data,name:bn};const Yn=(jt=kn[dn[0]])==null||(jt=jt.data)==null?void 0:jt.name;Yn&&bn!==(0,M.U_)(Yn)&&(kn[dn[0]].data.name=void 0)}else{var vn;let Lt;const bn=(yn,lo)=>{const{newData:qn}=dt(yn.data.name,parseInt(Dt[2]),Kt,fe);yn.data={...yn.data,name:qn},Lt=qn};(0,N.PM)({newOptionData:$t,pathArr:dn.slice(),onUpdate:bn});const Yn=dn.reduce((yn,lo,qn)=>{if(qn===0)return yn[lo];if(qn<=dn.length-1){var Wn;return yn==null||(Wn=yn.children)==null?void 0:Wn[lo]}},kn),on=Yn==null||(vn=Yn.data)==null?void 0:vn.name;on&&Lt!==(0,M.U_)(on)&&(Yn.data.name=void 0)}return{newItem:{...wt,hotAttr:{...wt.hotAttr,optionData:$t,refVars:{...rt,optionData:kn}}}}}else{const $t=gt.text,{newData:kn}=dt($t,Dt[1],Kt,fe),Kn={...wt.hotAttr,textV0:{...wt.hotAttr.textV0,text:kn}};return An&&kn!==(0,M.U_)(An)&&(Kn.refVars={...rt,textV0:(0,M.JK)(rt==null?void 0:rt.textV0,"text")}),{newItem:{...wt,hotAttr:Kn}}}}return null},_t=(Ot,wt)=>{const{widget:{key:Kt},pageKey:fe}=Ot,{widget:{key:bt},pageKey:un}=wt;return Kt===bt&&fe===un},nn=(Ot,wt,Kt)=>{const fe=Ot.find((gt,Wt)=>Wt===wt-1),un=Ot.filter(gt=>_t(fe,gt)).filter(gt=>{let{index:Wt}=gt;return Wt!==fe.index}).map((gt,Wt)=>({...gt,newIndex:Wt}));return Ot.filter((gt,Wt)=>Wt!==wt-1).map(gt=>{const{index:Wt}=gt,Un=un.find(Jn=>{let{index:Yt,...rt}=Jn;return _t(gt,rt)&&Wt===Yt});return Un?{...gt,index:Un.newIndex,widget:Kt}:gt})},Oe=Ot=>{const wt=new Map;return Ot.forEach(Kt=>{const{widget:{key:fe},pageKey:bt}=Kt,un=bt+"-"+fe;if(wt.has(un))wt.get(un).push(Kt);else{const gt=[Kt];wt.set(un,gt)}}),[...wt.values()]},sn=Ot=>{let{hotItem:wt,matchValue:Kt,replaceValue:fe,indexs:bt}=Ot,un=Le(Kt);const{hotAttr:{type:gt,textV0:Wt,tableData:Un,chartData:Jn,optionData:Yt}}=wt;if(w.concat(y).concat(j).includes(gt)){let rt=wt;const An=bt.length;let Nt=0;for(;bt.length&&Nt
1\u3001\u4E0B\u8F7D\u63D2\u4EF6\u5E76\u89E3\u538B
\n2\u3001\u5728\u6D4F\u89C8\u5668\u53F3\u4E0A\u89D2\u70B9\u51FB\u66F4\u591A\u56FE\u6807 > \u6269\u5C55\u7A0B\u5E8F > \u7BA1\u7406\u6269\u5C55\u7A0B\u5E8F
\n3\u3001\u6253\u5F00\u53F3\u4E0A\u89D2\u201C\u5F00\u53D1\u8005\u6A21\u5F0F\u201D\uFF0C\u70B9\u51FB\u201C\u52A0\u8F7D\u5DF2\u89E3\u538B\u7684\u6269\u5C55\u7A0B\u5E8F\u201D\uFF0C\u9009\u62E9\u5DF2\u89E3\u538B\u7684\u6587\u4EF6\u5939
\n ",QQBrowser:"\n1\u3001\u4E0B\u8F7D\u63D2\u4EF6\u5E76\u89E3\u538B
\n2\u3001\u5728QQ\u6D4F\u89C8\u5668\u53F3\u4E0A\u89D2\u70B9\u51FB\u66F4\u591A\u56FE\u6807 > \u5E94\u7528\u4E2D\u5FC3
\n3\u3001\u6253\u5F00\u53F3\u4E0A\u89D2\u201C\u5F00\u53D1\u8005\u6A21\u5F0F\u201D\uFF0C\u70B9\u51FB\u201C\u52A0\u8F7D\u5DF2\u89E3\u538B\u7684\u6269\u5C55\u7A0B\u5E8F\u201D\uFF0C\u9009\u62E9\u5DF2\u89E3\u538B\u7684\u6587\u4EF6\u5939
\n ","360Browser":"\n1\u3001\u4E0B\u8F7D\u63D2\u4EF6\u5E76\u89E3\u538B
\n2\u3001\u5728360\u6D4F\u89C8\u5668\u53F3\u4E0A\u89D2\u70B9\u51FB\u62D3\u5C55\u7A0B\u5E8F > \u6DFB\u52A0\u66F4\u591A\u62D3\u5C55 > \u5934\u50CF > \u6211\u7684\u62D3\u5C55
\n3\u3001\u6253\u5F00\u53F3\u4E0A\u89D2\u201C\u5F00\u53D1\u8005\u6A21\u5F0F\u201D\uFF0C\u70B9\u51FB\u201C\u52A0\u8F7D\u5DF2\u89E3\u538B\u7684\u6269\u5C55\u7A0B\u5E8F\u201D\uFF0C\u9009\u62E9\u5DF2\u89E3\u538B\u7684\u6587\u4EF6\u5939
\n ",Edge:"\n1\u3001\u4E0B\u8F7D\u63D2\u4EF6\u5E76\u89E3\u538B
\n2\u3001\u5728Edge\u6D4F\u89C8\u5668\u53F3\u4E0A\u89D2\u70B9\u51FB\u66F4\u591A\u56FE\u6807 > \u6269\u5C55 > \u7BA1\u7406\u6269\u5C55
\n3\u3001\u70B9\u51FB\u201C\u52A0\u8F7D\u5DF2\u89E3\u538B\u7684\u6269\u5C55\u7A0B\u5E8F\u201D\uFF0C\u9009\u62E9\u5DF2\u89E3\u538B\u7684\u6587\u4EF6\u5939
\n ",other:"\n\u5438\u7BA1\u5DE5\u5177\u4EC5\u652F\u6301\u5728Chrome\u6D4F\u89C8\u5668\u6216\u5BA2\u6237\u7AEF\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u4F7F\u7528Chrome\u6D4F\u89C8\u5668\u6216\u4E0B\u8F7D\u58A8\u5200\u5BA2\u6237\u7AEF
\n "},ra=e=>{const{isOpen:t,onClose:n}=e,a=(0,yd.VK)().name,i=()=>ENV.IS_ON_PREMISES?(0,o.jsx)(o.Fragment,{}):(0,o.jsxs)("a",{className:"installation-tutorial",target:"_blank",rel:"noreferrer",href:"https://modao.cc/hc/articles/333#%E5%AE%89%E8%A3%85%E5%8F%96%E8%89%B2%E5%99%A8%E6%8F%92%E4%BB%B6",children:[(0,o.jsx)("span",{children:"\u5B89\u88C5\u6559\u7A0B"}),">"]}),c=()=>(0,o.jsx)(Mn.A,{type:"secondary",onClick:()=>{n()},children:"\u53D6\u6D88"}),d=()=>{const F=ENV.IS_ON_PREMISES?Do:yo;window.open(F,"_blank")},p=()=>{window.open("https://modao.cc/feature/downloads.html#part1","_blank")},h=()=>{window.open("https://www.google.com/chrome/","_blank")},m=Wo.indexOf(a)===-1,x=Ro[m?"other":a],v={shouldCloseOnAction:!1},A={type:"secondary",shouldCloseOnAction:!1,onClick:h},k={type:"secondary"},R={type:"primary",shouldCloseOnAction:!1,onClick:d};return m?(0,o.jsx)(Gt,{className:"color-pick-download-modal",portalClassName:"color-pick-download-modal-portal",title:"\u6D4F\u89C8\u5668\u4E2D\u4F7F\u7528\u53D6\u8272\u5668\u9700\u5B89\u88C5\u63D2\u4EF6",isOpen:t,canConfirm:!0,mask:!1,onClose:n,cancelText:"\u524D\u5F80Chrome",confirmText:"\u4E0B\u8F7D\u5BA2\u6237\u7AEF",onConfirm:p,cancelBtnProps:A,confirmBtnProps:v,renderFooterContent:c,children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:x}})}):(0,o.jsx)(Gt,{className:"color-pick-download-modal",portalClassName:"color-pick-download-modal-portal",title:"\u6D4F\u89C8\u5668\u4E2D\u4F7F\u7528\u53D6\u8272\u5668\u9700\u5B89\u88C5\u63D2\u4EF6",isOpen:t,canConfirm:!0,mask:!1,onClose:n,cancelText:"\u4E0B\u8F7D\u63D2\u4EF6",confirmText:"\u5B8C\u6210",cancelBtnProps:R,confirmBtnProps:k,renderFooterContent:i,children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:x}})})},ka=(0,l.memo)(ra);var pa=s(28681),Ma=s(21259);class Ya extends l.PureComponent{constructor(){super(...arguments),(0,B.A)(this,"$portalElem",document.createElement("div")),(0,B.A)(this,"handleNotips",()=>{const{onClose:t,dispatch:n}=this.props;(0,Pt.a0)(pa.MQ,!0,Pt.qW.Boolean),t(),n({type:"reducer:flag:update-state",payload:{isShowLess12Mark:!1}})})}componentDidMount(){document.body.appendChild(this.$portalElem)}componentWillUnmount(){document.body.removeChild(this.$portalElem)}render(){const{position:t,onClose:n}=this.props;return t?(0,Ki.createPortal)((0,o.jsxs)(Ma.v,{position:t,children:[(0,o.jsxs)("header",{children:[(0,o.jsx)("span",{children:I18N.dModals.less_font_size.title}),(0,o.jsx)("div",{className:"close-btn",onClick:n,children:(0,o.jsx)(xt.C,{name:"common/close"})})]}),(0,o.jsxs)("div",{className:"content",children:[(0,o.jsx)("span",{children:I18N.dModals.less_font_size.desc}),(0,o.jsxs)("div",{className:"bottomContainer",children:[(0,o.jsx)("a",{className:"tutorials",href:"/hc/articles/191",target:"_blank",rel:"noopener noreferrer",children:I18N.dModals.less_font_size.view_tutorial}),(0,o.jsx)("span",{className:"noTips",onClick:this.handleNotips,children:I18N.Common.no_tips})]})]})]}),this.$portalElem):null}}var di=s(52315),ja=s(63239);const ri=(0,M.Ay)(ci.H).withConfig({displayName:"styles__StyledCanvasConvertedToPixsoModal",componentId:"sc-7tggkc-0"})(["width:776px;height:448px;background-color:#fff;box-shadow:0 2px 10px rgba(39,54,78,0.08),0 12px 40px rgba(39,54,78,0.1);border-radius:8px;overflow:hidden;.content{width:100%;height:448px;padding:0;}"]),ti=(0,l.memo)(e=>{const{isOpen:t,currentUser:n,currentOrg:a,theme:i,rootProject:c,pageType:d=ja.g6.SINGLE_CANVAS,from:p,onClose:h}=e,m=(0,r.d4)(tt.p$),x=(0,r.d4)(rt.p$);if(d===ja.g6.SINGLE_CANVAS){var v;if(!m||m.length===0)return null;const A=m[0],k=sdkStore.getHotItem(A);if(!((k==null||(v=k.hotAttr)==null?void 0:v.type)===$.x.Canvas&&!(0,ei.OO)(A)))return null}else if(d===ja.g6.CURRENT_PAGE&&!(x!=null&&x.key))return null;return(0,o.jsx)(ri,{isOpen:t,className:"canvas-converted-to-pixso-modal",width:776,onClose:h,canCloseOnClickMask:!1,modalRender:()=>(0,o.jsx)(di.A,{currentOrg:a,currentUser:n,theme:i,pageType:d,canvasKey:d===ja.g6.SINGLE_CANVAS?m[0]:void 0,currentPageKey:d===ja.g6.CURRENT_PAGE?x==null?void 0:x.key:void 0,currentProject:c,from:p,onClose:h})})}),vi=M.Ay.div.withConfig({displayName:"style__StyledNoticeModal",componentId:"sc-1eqgf65-0"})(["&.mask{position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(31,41,46,0.6);z-index:9999;transition:all 1s;.banner-bg{width:712px;height:513px;background:url(",") no-repeat center center;background-size:cover;position:fixed;left:50%;bottom:50%;transform:translate(-50%,50%);transform-origin:bottom left;opacity:1;transition:all 1s;z-index:51;.banner-close{position:absolute;width:32px;height:32px;right:","px;top:","px;display:flex;justify-content:center;align-items:center;cursor:pointer;svg{rect{fill:rgba(53,68,93,0.3);}path{fill:#fff}}.close-btn{width:32px;height:32px;}&:hover{svg{rect{fill:rgba(53,68,93,0.47);}}}&.mask{width:32px;height:32px;border-radius:50%;background-color:rgba(53,68,93,0.30);top:0px;right:0px;&:hover{background-color:rgba(53,68,93,0.47);}}}.buy-btn{position:absolute;bottom:",";left:",";width:","px;height:","px;display:flex;align-items:center;justify-content:center;background:url(",") no-repeat center;background-size:contain;}}}&.hide{background:rgba(31,41,46,0);pointer-events:none;.banner-bg{left:80%;bottom:95%;transform:scale(0.07) translate(0,0);opacity:0;}}"],e=>e.guideImgUrl,e=>e.guideCloseBtnStyle.right,e=>e.guideCloseBtnStyle.top,e=>e.btnImgStyle.bottom,e=>e.btnImgStyle.left,e=>e.btnImgStyle.width,e=>e.btnImgStyle.height,e=>e.btnImgUrl),Hr={top:"0",right:"-14"},Yr={width:"150",height:"43",bottom:"11%",left:"40%"},br="https://cdn.modao.cc/Service%20suspension%20announcement%20konw.png",zi="https://cdn.modao.cc/Service%20suspension%20announcement.png";function mr(e){const{isOpen:t}=e,n=(0,l.useRef)(null),a=(0,r.wA)(),i=d=>{var p;d.preventDefault(),d.stopPropagation(),d.nativeEvent.stopImmediatePropagation(),(p=n.current)==null||p.classList.add("hide"),setTimeout(()=>{a({type:"modal:update:state",payload:{noticeModal:{isOpen:!1}}})},1e3)},c=d=>{i(d)};return t?(0,o.jsx)(vi,{className:"activity-banner mask",ref:n,guideImgUrl:zi,guideCloseBtnStyle:Hr,btnImgUrl:br,btnImgStyle:Yr,onClick:c,children:(0,o.jsxs)("a",{className:"banner-bg",children:[(0,o.jsx)("button",{className:"buy-btn"}),(0,o.jsx)("div",{className:"banner-close",onClick:i,children:(0,o.jsx)(xt.C,{className:"close-btn",name:"notice/modal/close"})})]})}):null}var pi=s(21770);const ui=(0,M.Ay)(ci.H).withConfig({displayName:"styles__StyledMktWMExportModal",componentId:"sc-1wcwir1-0"})(["&.workspace-modal.mkt-wm-export-modal{width:400px;height:290px;border:none;background:url('/mb-proto2/images/mktWM/mkt_wm_export_modal_bg.png') center center / 400px 290px no-repeat;.header{background-color:transparent;border-bottom:none;padding:0 8px 0 24px;color:",";height:72px;font-size:20px;font-weight:500;line-height:24px;}.content{height:134px;padding:0;background-color:transparent;.modal-content{height:134px;padding:28px 24px 24px 24px;display:flex;flex-direction:column;justify-content:space-between;font-size:13px;font-weight:500;line-height:18px;color:",";p{color:",";}.point{color:rgba(0,161,86,0.85)}}}footer{height:84px;padding:0 24px 4px 24px;background-color:transparent;display:flex;flex-direction:column;.button-root{width:352px;height:40px;max-height:40px;line-height:28px;font-size:14px;border-radius:8px;&.confirm-btn{display:none;}&.confirm-btn-custom{background-color:#415058;color:#FFDCA9;font-weight:600;.btn-text{display:flex;.icon{width:18px;height:18px;margin:5px 6px 5px 0;}}&:hover{background-color:#313C42;}&:active{background-color:#313C42;}}&.export-btn{color:",";font-weight:400;&:hover{color:",";}}}}.close-btn{right:8px;color:",";&:hover{color:",";}}}"],To.fm.color_text_btn.value_light,To.fm.color_text_L1.value_light,To.fm.color_text_L1.value_light,To.fm.color_text_L3.value_light,To.fm.color_text_L1.value_light,To.fm.color_text_L2.value_dark,To.fm.color_text_L1.value_dark);var tl=s(35428);const us=e=>{const{isOpen:t,onExport:n,onClose:a}=e,{isSoloMdMember:i}=(0,pi.s)(MB.user,MB.currentOrg),c=()=>{a(),n(),(0,tl._)({click_button:"\u5BFC\u51FA-\u7EE7\u7EED\u5BFC\u51FA\u542B\u6C34\u5370\u5185\u5BB9"})},d=()=>{const m=!!MB.currentOrg,x={mode:"mat",templatePaySource:"\u7F16\u8F91\u533A-\u79FB\u9664\u6C34\u5370",templatePayClickType:"\u79FB\u9664\u6C34\u5370",payEntrance:"\u7F16\u8F91\u533A-v8-"+(m?"\u56E2\u961F":"\u4E2A\u4EBA")+"-\u4ED8\u8D39\u7D20\u6750\u8BD5\u7528-\u5BFC\u51FA\u884C\u4E3A\u63D0\u793A-\u53BB\u6C34\u5370",checkoutPlace:"workspace_v8_"+(m?"org":"solo")+"_watermark_export_"+(i?"template":"vip-template"),checkoutArea:"proto"};MB.global.popupHelper.chargeAsync({...x}),(0,tl._)({click_button:"\u5BFC\u51FA-"+(i?"\u5347\u7EA7\u7D20\u6750\u4F1A\u5458":"\u5347\u7EA7\u53CC\u4F1A\u5458")})},p=()=>{a(),(0,tl._)({click_button:"\u5BFC\u51FA-\u5173\u95ED"})},h=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(ll.jn,{className:"confirm-btn-custom",onClick:d,children:[(0,o.jsx)(xt.C,{className:"upgrade-icon",name:"common/watermark/upgrade-"+(i?"mt":"md")}),i?I18N.WaterMark.mkt.upgrade_mkt:I18N.WaterMark.mkt.upgrade_two]}),(0,o.jsx)(ll.z9,{className:"export-btn",onClick:c,children:I18N.WaterMark.mkt.export_modal.export})]});return(0,o.jsxs)(ui,{isOpen:t,className:"mkt-wm-export-modal",title:i?"\u4ED8\u8D39\u5185\u5BB9\u4F7F\u7528\u987B\u77E5":"\u6C34\u5370\u63D0\u793A",onClose:p,canCloseOnClickMask:!1,canConfirm:!1,canCancel:!1,isUsePortal:!1,renderFooterContent:h,children:[(0,o.jsxs)("p",{children:[(0,o.jsx)("p",{children:I18N.WaterMark.mkt.export_modal.content_1}),(0,o.jsx)("p",{children:I18N.WaterMark.mkt.export_modal.content_2})]}),(0,o.jsxs)("p",{children:[I18N.WaterMark.mkt.export_modal.content_3,(0,o.jsx)("span",{className:"point",children:i?I18N.WaterMark.mkt.export_modal.content_4_1:I18N.WaterMark.mkt.export_modal.content_4_2}),I18N.WaterMark.mkt.export_modal.content_5]})]})},pl=(0,M.Ay)(ci.H).withConfig({displayName:"styles__StyledMktWMUngroupModal",componentId:"sc-z32pp4-0"})(["&.workspace-modal.mkt-wm-ungroup-modal{width:400px;.content{height:80px;}}"]);var Va=s(93413);const hs=e=>{const{isOpen:t,onClose:n,dispatch:a}=e,i=()=>{n(),MB.commonGuideHelper.markGuideAsRead(Va.c.UNGROUP_WITH_WM)},c=()=>{i()},d=()=>{i(),a({type:"entry:ungroup:items:v2"}),(0,tl._)({click_button:"\u89E3\u7EC4-\u7EE7\u7EED\u6253\u6563"})},p=()=>{i();const{isSoloMdMember:h}=(0,pi.s)(MB.user,MB.currentOrg),m=!!MB.currentOrg,x={mode:"mat",templatePaySource:"\u7F16\u8F91\u533A-\u79FB\u9664\u6C34\u5370",templatePayClickType:"\u79FB\u9664\u6C34\u5370",payEntrance:"\u7F16\u8F91\u533A-v8-"+(m?"\u56E2\u961F":"\u4E2A\u4EBA")+"-\u4ED8\u8D39\u7D20\u6750\u8BD5\u7528-\u6253\u6563\u64CD\u4F5C\u63D0\u793A-\u53BB\u6C34\u5370",checkoutPlace:"workspace_v8_"+(m?"org":"solo")+"_watermark_scatter_"+(h?"template":"vip-template"),checkoutArea:"proto"};MB.global.popupHelper.chargeAsync({...x}),(0,tl._)({click_button:"\u89E3\u7EC4-"+(h?"\u5347\u7EA7\u7D20\u6750\u4F1A\u5458":"\u5347\u7EA7\u53CC\u4F1A\u5458")})};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(pl,{isOpen:t,className:"mkt-wm-ungroup-modal",title:I18N.WaterMark.mkt.ungroup_modal.title,onClose:c,canCloseOnClickMask:!1,canConfirm:!0,onConfirm:p,confirmText:I18N.WaterMark.mkt.remove_wm,canCancel:!0,onCancel:d,isUsePortal:!1,cancelText:I18N.WaterMark.mkt.ungroup_modal.continue,children:(0,o.jsx)("p",{children:I18N.WaterMark.mkt.ungroup_modal.content})})})};var Xs=s(12566),Ti=s(83199),ms=s(2099),Fl=s(26842);const b1=M.Ay.div.withConfig({displayName:"styles__StyledLibModal",componentId:"sc-wem5zp-0"})(["position:fixed;z-index:200;box-sizing:content-box;position:absolute;width:240px;background:",";box-shadow:0 3px 10px 0 rgba(0,0,0,0.1);font-size:12px;text-align:left;border:1px solid ",";border-radius:8px;box-shadow:2px 8px 20px 0px rgba(0,0,0,0.10);"],e=>e.theme.color_bg_white,e=>e.theme.color_bg_border_01),lp=M.Ay.div.withConfig({displayName:"styles__StyledLibContent",componentId:"sc-wem5zp-1"})(['width:100%;header{display:flex;align-items:center;justify-content:space-between;width:100%;height:40px;padding:0px 10px 0 16px;&[type="draggable"]{cursor:move;}.title{color:',";font-size:12px;font-style:normal;font-weight:600;line-height:16px;cursor:pointer;}.right-content{display:flex;}.svg-icon{",";color:",";&.times-icon{margin-left:4px;}}}.divider{width:100%;height:1px;background:",";}"],e=>e.theme.color_text_L1,Fl.eK,e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01),w1=(e,t)=>{let{className:n="",type:a,isShowCreate:i=!0,onGetNewEditModalPostion:c,onClose:d,onDidMount:p}=e;const h=(0,r.d4)(tt.p$),m=(0,r.wA)(),x=()=>{const v=c();a==="appear"&&m({type:"modal:update:state",payload:{libEditAppearModal:{isOpen:!0,position:v,type:"create",...(0,ms.xe)(h)}}}),a==="text"&&m({type:"modal:update:state",payload:{libEditTextModal:{isOpen:!0,position:v,type:"create",...(0,ms.l$)(h)}}})};return(0,l.useEffect)(()=>{p&&p()},[t]),(0,o.jsxs)(lp,{className:C()(n,"lib-panel-modal-content"),ref:t,children:[(0,o.jsxs)("header",{type:"draggable",children:[(0,o.jsx)("span",{className:"title",children:""+I18N.libPanel.modal.header[a]}),(0,o.jsxs)("div",{className:"right-content",children:[a!=="muban"&&i&&(0,o.jsx)(Ti.A,{content:""+I18N.libPanel.manage.create_ref[a],direction:"down",distance:8,children:(0,o.jsx)(xt.C,{className:"add-icon",name:"common/add@24",size:24,onClick:x})}),d&&(0,o.jsx)(Ti.A,{content:I18N.Common.close,direction:"down",distance:8,children:(0,o.jsx)(xt.C,{className:"times-icon",name:"common/close@24",size:24,onClick:d})})]})]}),(0,o.jsx)("div",{className:"divider"}),(0,o.jsx)(Xs.k,{type:a,onClose:d,onGetNewEditModalPostion:c})]})},Zp=(0,l.memo)((0,l.forwardRef)(w1));var I0=s(46720);const nm=e=>{let{isOpen:t,type:n,position:a,dispatch:i,onClose:c}=e;const[d,p]=(0,l.useState)(a.left),[h,m]=(0,l.useState)(a.top),x=(0,r.d4)(me.an);if(!t)return null;const v=F=>{i({type:"modal:update:state",payload:{isDragOrResizeModal:F}})},A=(F,Z)=>{p(F),m(Z),i({type:"modal:update:libPanelModal:position",payload:{left:F,top:Z}})},k=()=>{n==="muban"&&i({type:"style-lib:set:currentMubanFolderData",payload:null}),c()},R=F=>{x||F.target.closest("#lib-panel-modal")||F.target.closest("#lib-panel-text-edit-modal")||F.target.closest("#lib-panel-color-edit-modal")||F.target.closest("#lib-panel-appear-edit-modal")||F.target.closest(".lib-panel-actions-menu")||F.target.closest(".border_style_select_menu")||F.target.closest(".border_width_select_menu")||F.target.closest(".border-width-menu")||F.target.closest(".font-options-menu")||F.target.closest("#font-list-panel")||F.target.closest(".font-size-input-menu")||F.target.closest(".--mb--color-picker")||F.target.closest(".lib-select-menu ul")||F.target.closest(".context-menu-mask")||F.target.closest(".WorkspaceSelectMenu")||k()};return(0,o.jsx)(o.Fragment,{children:(0,Ki.createPortal)((0,o.jsx)(Qa.A,{dragContainer:"lib-panel-modal",position:{left:d,top:h},onMove:A,onMoveStart:()=>v(!0),onMoveEnd:()=>v(!1),children:(0,o.jsxs)(b1,{id:"lib-panel-modal",children:[(0,o.jsx)(Zp,{type:n,onGetNewEditModalPostion:()=>({left:d-240,top:h}),onClose:k}),(0,o.jsx)(Ls.A,{target:document,onMouseDown:(0,Ls.t)(R,{capture:!0})})]})}),(0,I0.w)())})};var C1=s(21856),S1=s(8926);const A1=M.Ay.div.withConfig({displayName:"styles__StyledTitleDescInput",componentId:"sc-12oobps-0"})([".item{",";}"],Fl.WT),od=e=>{let{title:t,desc:n,onSetTitle:a,onSetDesc:i}=e;const c=(0,l.useRef)(null);(0,l.useEffect)(()=>{var m;c==null||(m=c.current)==null||m.focus()},[]);const d=m=>{a(m.target.value)},p=m=>i(m.target.value),h=m=>{m.key==="Enter"&&m.target.matches(":focus")&&(m.stopPropagation(),m.target.blur())};return(0,o.jsxs)(A1,{className:"title-desc-input-wrap",children:[(0,o.jsxs)("div",{className:"item",children:[(0,o.jsx)("span",{className:"item-title",children:"\u540D\u79F0"}),(0,o.jsx)("input",{type:"text",className:"item-input",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",value:t,maxLength:50,ref:c,onChange:d,onKeyDown:h})]}),(0,o.jsxs)("div",{className:"item",children:[(0,o.jsx)("span",{className:"item-title",children:"\u63CF\u8FF0"}),(0,o.jsx)("input",{type:"text",className:"item-input",placeholder:"\u8BF7\u63CF\u8FF0\u7528\u6CD5",value:n,maxLength:200,onChange:p,onKeyDown:h})]})]})},Km=M.Ay.div.withConfig({displayName:"styled__StyledCreateColorModal",componentId:"sc-yq4j42-0"})(["position:absolute;width:240px;height:220px;background-color:",";border:1px solid ",";border-radius:8px;box-shadow:2px 8px 20px 0px rgba(0,0,0,0.10);z-index:300;display:flex;flex-direction:column;header{height:40px;display:flex;justify-content:space-between;align-items:center;padding:0 16px;border-bottom:1px solid ",";color:",";font-weight:500;.right-content{width:24px;height:24px;border-radius:4px;cursor:pointer;.svg-icon{width:24px;height:24px;}&:hover{background:",";}&:active{background:",";}}}.content{padding:16px 16px 0;.item{",";.color-btn-has-hex-input{width:144px;.color-btn-wrap{flex:none;margin-left:auto;margin-right:0;width:144px;height:28px;max-width:none;.hex-a-input-wrap{width:110px;margin-left:4px;.hex-a-input{width:52px;input{margin-left:15px;}}}}}}}button.create-button{",";margin-right:16px;}"],e=>e.theme.color_bg_white,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_btn_secondary_active,Fl.WT,Fl.qf);var xl=s(70812);const Fd=e=>{let{position:t,type:n,color:a,attr:i="solidColor",supAttr:c="fill",title:d="",desc:p="",currentKey:h="",sup:m="B@style",onClose:x,onSetRefStyle:v,onColorChange:A,dispatch:k,onConfirm:R,onCancel:F}=e;const Z=(0,r.d4)(tt.p$),G=(0,r.d4)(me.eo),ee=(0,r.d4)(me.an),[ce,se]=(0,l.useState)(t.left),[he,ve]=(0,l.useState)(t.top),[Te,xe]=(0,l.useState)(d),[Fe,et]=(0,l.useState)(p),[Ke,Qe]=(0,l.useState)(a);(0,l.useEffect)(()=>{xe(d),et(p),Qe(a)},[a,p,d]);const nt=(Co,Pn)=>{se(Co),ve(Pn)},Xe=Co=>{k({type:"modal:update:state",payload:{isDragOrResizeModal:Co}})},lt=Co=>{Qe(Co)},Ct=()=>{var Co;if(n==="create"){const Io=Te||"#"+(0,Rc.L5)((0,Rc.NI)(Ke.solidColor)).toLocaleUpperCase().slice(0,-2),{hotItems:mo,name:So}=(0,ms.ws)(Io,"color",m),ho=(0,C1.Z_)(m||"B@style"),No=(0,ms.QH)({name:So,zIndex:ho+1,fill:Ke.solidColor,styleType:"color",desc:Fe,attrType:"fill",libKey:"",refStyles:[]},mo.length>0?mo[mo.length-1].key:m);v==null||v(No),A==null||A({value:Ke,needClearRef:!1}),k({type:"entry:libStyle:update:widget:refStyles",payload:{supAttr:c,selections:Z,type:"color",key:i,refKey:No==null?void 0:No.key}}),(0,ms.qP)(No.key)}if(n==="edit"){const Io=sdkStore.getHotItem(h);if(Io){var Pn,ro;let mo=Te||"#"+(0,Rc.L5)((0,Rc.NI)(Ke.solidColor)).toLocaleUpperCase().slice(0,-2),So=Io.sup;const{hotItems:ho,name:No}=(0,ms.ws)(mo,"color",So);ho.length>0&&(So=(Pn=ho[ho.length-1])==null?void 0:Pn.key),mo=No;const Xo={...Io,hotAttr:{...Io.hotAttr,name:mo,desc:Fe,fill:Ke.solidColor},sup:So},Ta=((ro=(0,ms.OP)({selections:Z,attr:i,supAttr:c,styleType:"color"}))==null?void 0:ro.key)===h;if(sdkStore.updateHotItem(Xo),Ta&&(v==null||v(Xo),A==null||A({value:Ke,needClearRef:!1})),Ke.solidColor!==a.solidColor){const{flatChgList:Da,otherPageFlatChgList:xr,isUpdateBasket:Wa}=(0,S1.sw)(G,Ke,h);k({type:"entry:widget:change",payload:{flatChgList:Da}}),Wa&&k({type:"entry:rebuild:screen-widget-tree"}),setTimeout(()=>{sdkStore.updateHotItemBatch(xr)},16)}}}k({type:"style-lib:set:attr",payload:{cacheLocalLibTag:Math.random()}}),R&&R(),hn(),x(),xl.U4.protoStyleTrack((Co=MB)==null||(Co=Co.user)==null?void 0:Co.id,n==="create"?"\u521B\u5EFA":"\u66F4\u65B0","color")},St=()=>{const Co=document.querySelector(".--mb--color-picker");if(Co){const{left:Pn,top:ro}=Co.getBoundingClientRect();k({type:"colorpanel:set:position",payload:{position:{left:Pn,top:ro}}})}},hn=()=>{k({type:"colorpanel:set:state",payload:{supAttr:c,attr:i}}),St()},Cn=()=>{hn(),F&&F(),x()},Mt=Co=>{ee||Co.target.closest("#lib-panel-color-edit-modal")||Co.target.closest(".--mb--color-picker")||Co.target.closest(".WorkspaceSelectMenu")||Cn()},Et=Co=>{Co.key==="Enter"&&Ct()};return(0,o.jsx)(Qa.A,{position:{left:ce,top:he},dragContainer:"lib-panel-color-edit-modal",onMove:nt,onMoveStart:()=>Xe(!0),onMoveEnd:()=>Xe(!1),children:(0,o.jsxs)(Km,{id:"lib-panel-color-edit-modal",children:[(0,o.jsxs)("header",{type:"draggable",children:[(0,o.jsx)("span",{className:"title",children:n==="create"?"\u521B\u5EFA\u989C\u8272":"\u7F16\u8F91\u989C\u8272"}),(0,o.jsx)("div",{className:"right-content",children:(0,o.jsx)(xt.C,{className:"times-icon",name:"common/close@24",size:24,onClick:Cn})})]}),(0,o.jsxs)("div",{className:"content",children:[(0,o.jsx)(od,{title:Te,desc:Fe,onSetTitle:xe,onSetDesc:et}),(0,o.jsxs)("div",{className:"item",children:[(0,o.jsx)("span",{className:"item-title",children:"\u5C5E\u6027"}),(0,o.jsx)(Ec.R_,{mode:"input",className:Ec.EY,canOpenLib:!1,supAttr:"fill",attr:"solidColor",color:Ke,pIsSolidColorOnly:!0,onChange:lt})]})]}),(0,o.jsx)("button",{className:C()("create-button"),onClick:Ct,children:n==="create"?"\u521B\u5EFA":"\u786E\u8BA4"}),(0,o.jsx)(Ls.A,{target:document,onMouseDown:(0,Ls.t)(Mt,{capture:!0}),onKeyDown:Et})]})})};var k1=s(44940),Z2=s(5680),K2=s(36620),om=s(44518),Y2=s(38571),z3=s(62448),am=s(36397),mh=s(16933);const Ym=M.Ay.div.withConfig({displayName:"styles__StyledEditAppearModal",componentId:"sc-hoydeu-0"})(["position:fixed;z-index:200;box-sizing:content-box;position:absolute;width:240px;min-height:461px;background:",";box-shadow:0 3px 10px 0 rgba(0,0,0,0.1);font-size:12px;text-align:left;border:1px solid ",";border-radius:8px;box-shadow:0px 4px 10px 0px rgba(0,18,38,0.10);.width-66{width:66px;}.height-32{height:32px;}.appearance-line{display:flex;align-items:center;margin-left:-6px;}header{height:40px;display:flex;justify-content:space-between;align-items:center;padding:0 16px;border-bottom:1px solid ",";color:",";font-weight:500;.right-content{width:24px;height:24px;border-radius:4px;cursor:pointer;.svg-icon{width:24px;height:24px;}&:hover{background:",";}&:active{background:",";}}}.content{.appear-preview{width:100%;height:100px;background:",";display:flex;align-items:center;justify-content:center;.preview-item{width:40px;height:40px;}img{max-width:240px;max-height:80px;}}.has-padding-content{padding:0 16px;.title-desc-input-wrap{margin-top:16px;padding-bottom:8px;}}.appear-setting{padding:16px 10px 0 16px;width:100%;border-top:1px solid ",";.common-check-label-box{width:68px;display:flex;align-items:center;.left-label{margin-left:4px;color:",";}}.shadows-panel{margin-bottom:16px;}}.footer{padding:11px 16px;border-top:1px solid ",";button.create-button{",";}}}"],e=>e.theme.color_bg_white,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_btn_secondary_active,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L2,e=>e.theme.color_bg_border_01,Fl.qf),cp={borderRadius:k1.A.border_radius,borderVisibility:k1.A.border_visibility,border:k1.A.border,fill:k1.A.background,shadow:k1.A.box_shadow},rm=e=>{var t;let{position:n,type:a="create",title:i="",desc:c="",currentKey:d="",sup:p,refStyles:h,attrs:m={},dispatch:x,onClose:v,onCancel:A,onConfirm:k}=e;const[R,F]=(0,l.useState)(n.left),[Z,G]=(0,l.useState)(n.top),[ee,ce]=(0,l.useState)(i),[se,he]=(0,l.useState)(c),[ve,Te]=(0,l.useState)((m==null?void 0:m.borderRadius)||cp.borderRadius),[xe,Fe]=(0,l.useState)((t=m==null?void 0:m.borderRadiusIsVisible)!=null?t:!0),[et,Ke]=(0,l.useState)((m==null?void 0:m.borderVisibility)||cp.borderVisibility),[Qe,nt]=(0,l.useState)((m==null?void 0:m.border)||cp.border),[Xe,lt]=(0,l.useState)((m==null?void 0:m.fill)||cp.fill),[Ct,St]=(0,l.useState)((m==null?void 0:m.shadow)||cp.shadow),[hn,Cn]=(0,l.useState)(""),Mt=(0,r.d4)(tt.p$),Et=(0,r.d4)(me.an),Co=(0,l.useMemo)(()=>{if(a==="create")return Mt;if(a==="edit")return[d]},[d,Mt,a]);(0,l.useEffect)(()=>{m&&(m.borderRadius&&Te(m.borderRadius),m.borderVisibility&&Ke(m.borderVisibility),m.border&&nt(m.border),m.fill&<(m.fill),m.shadow&&St(m.shadow),m.borderRadiusIsVisible&&Fe(m.borderRadiusIsVisible))},[m,m.border,m.borderRadius,m.borderVisibility,m.fill,m.shadow,m.borderRadiusIsVisible,a]);const Pn=async()=>{try{let Da=(0,mh.wN)("rect",5,20,20,40,40);Da={...Da,borderRadius:ve,borderVisibility:et,border:Qe,borderRadiusIsVisible:xe,fill:Xe,shadow:Ct};const xr=(0,$a.WQ)([Da]),Wa=xr.getRootSnapshot(),Dr=Wa.sub[0],Wr=xr.getHotItem(Dr),hi=(0,am.Pf)({item:Wr,hasWatermark:!1,scale:1,isWithDeviceFrame:!1,sdk:xr}),Sr=(0,am.Gq)(xr,Wa.sub[0],!1,"local"),oi=Math.round(Sr[2]-Sr[0]),js=Math.round(Sr[3]-Sr[1]),Ri=document.createElement("div");Ri.innerHTML=hi;const{imageSrc:li}=await(0,z3.Z)({element:Ri,width:oi,height:js,presetFontsSet:new Set});return li}catch(Da){return""}};(0,l.useEffect)(()=>{(async()=>{const xr=await Pn();Cn(xr)})()},[ve,et,Qe,xe,Xe,Ct]);const ro=Da=>{x({type:"modal:update:state",payload:{isDragOrResizeModal:Da}})},Io=(Da,xr)=>{F(Da),G(xr)},mo=()=>{var Da;const xr={border:Qe,borderRadius:ve,borderVisibility:et,fill:Xe,shadow:Ct,borderRadiusIsVisible:xe},Wa=ee.trim()?ee:"\u5916\u89C2\u6837\u5F0F";a==="create"&&x({type:"entry:libStyle:appear:create",payload:{title:Wa,desc:se,appearAttr:xr,sup:p,refStyles:h}}),a==="edit"&&x({type:"entry:libStyle:appear:edit",payload:{title:Wa,desc:se,appearAttr:xr,refStyles:h,currentKey:d,isNeedUpdateWidget:!0}}),x({type:"style-lib:set:attr",payload:{cacheLocalLibTag:Math.random()}}),k&&k(),v(),xl.U4.protoStyleTrack((Da=MB)==null||(Da=Da.user)==null?void 0:Da.id,a==="create"?"\u521B\u5EFA":"\u66F4\u65B0","appear")},So=Da=>{let{value:xr,attr:Wa}=Da;switch(Wa){case"borderRadius":Te(xr);break;case"fill":lt(xr);break;case"borderVisibility":Ke(xr);break;case"border":nt(xr);break;case"shadow":St(xr);break;case"borderRadiusIsVisible":Fe(xr);break;default:break}},ho=()=>{A&&A(),v()},No=Da=>{Et||Da.target.closest("#lib-panel-appear-edit-modal")||Da.target.closest(".--mb--color-picker")||Da.target.closest(".border_style_select_menu")||Da.target.closest(".border_width_select_menu")||Da.target.closest(".border-width-menu")||Da.target.closest(".context-menu-mask")||Da.target.closest(".WorkspaceSelectMenu")||ho()},Xo=Da=>{Da.key==="Enter"&&mo()},Ta=(0,l.useCallback)(()=>({left:R-242-2,top:Z}),[R,Z]);return(0,Ki.createPortal)((0,o.jsx)(Qa.A,{position:{left:R,top:Z},dragContainer:"lib-panel-appear-edit-modal",onMove:Io,onMoveStart:()=>ro(!0),onMoveEnd:()=>ro(!1),children:(0,o.jsxs)(Ym,{id:"lib-panel-appear-edit-modal",children:[(0,o.jsxs)("header",{type:"draggable",children:[(0,o.jsx)("span",{className:"title",children:a==="create"?I18N.libPanel.manage.create_ref.appear:I18N.libPanel.manage.edit_ref.appear}),(0,o.jsx)("div",{className:"right-content",children:(0,o.jsx)(Ti.A,{content:I18N.Common.close,direction:"down",distance:8,children:(0,o.jsx)(xt.C,{className:"times-icon",name:"common/close@24",size:24,onClick:ho})})})]}),(0,o.jsxs)("div",{className:"content",children:[(0,o.jsx)("div",{className:"appear-preview",children:(0,o.jsx)("img",{src:hn})}),(0,o.jsx)("div",{className:"has-padding-content",children:(0,o.jsx)(od,{title:ee,desc:se,onSetTitle:ce,onSetDesc:he})}),(0,o.jsxs)("div",{className:"appear-setting",children:[(0,o.jsx)(Z2.R2,{borderRadius:ve,borderRadiusIsVisible:xe,show:!0,canSetSingleRadius:!0,canAddVar:!1,onChange:So}),(0,o.jsx)(K2.s,{fill:Xe,onChange:So,selections:Co,canOpenLib:!0,canCreateColorRef:!1,refStyles:h,index:1,onPosition:Ta}),(0,o.jsx)(om.$,{border:Qe,borderVisibility:et,canBorderWidth:!0,canBorderStyle:!0,canSetBorderVisibility:!0,canOpenLib:!0,canAddVar:!1,canCreateColorRef:!1,onChange:So,onPosition:Ta}),(0,o.jsx)(Y2.y,{shadow:Ct,attr:"box_shadow",selections:Co,onChange:So,canOpenLib:!0,canCreateColorRef:!1,onPosition:Ta})]}),(0,o.jsx)("div",{className:"footer",children:(0,o.jsx)("button",{className:"create-button",onClick:mo,children:a==="create"?"\u521B\u5EFA":"\u786E\u8BA4"})})]}),(0,o.jsx)(Ls.A,{target:document,onMouseDown:(0,Ls.t)(No,{capture:!0}),onKeyDown:Xo})]})}),(0,I0.w)())};var Xm=s(54852),im=s(55203),X2=s(3507),sm=s(77643),ul=s(15186),_0=s(34748),Kp=s(33421),ns=s(73662),lm=s(9521),Qf=s(39182);const Q2=e=>{const{fontSize:t,textColor:n,lineHeight:a,paddingTuple:i,fontDirection:c,fontFamily:d,fontWeight:p,underline:h,strikethrough:m,italic:x,bold:v,verticalAlign:A,horizontalAlign:k,letterSpacing:R,isClipText:F}=e||{},Z=v?700:400;let G="";return h&&(G="underline"),m&&(G+=(G?" ":"")+"line-through"),G===""&&(G="none"),{fontFamily:d,fontWeight:Z,fontSize:t+"px",fontStyle:x?"italic":"normal",letterSpacing:R+"px",justifyContent:A,alignItems:(0,Qf.xC)(k),textAlign:k,color:n,lineHeight:a+"px",...(0,bt.N3)(i),textDecoration:G,writingMode:c,overflow:F||F===void 0?"hidden":"visible"}},cm=M.Ay.div.withConfig({displayName:"styles__StyledEditTextModal",componentId:"sc-1rwykl3-0"})(["position:fixed;z-index:200;box-sizing:content-box;position:absolute;width:240px;min-height:288px;background:",";box-shadow:0 3px 10px 0 rgba(0,0,0,0.1);font-size:12px;text-align:left;border:1px solid ",";border-radius:8px;box-shadow:0px 4px 10px 0px rgba(0,18,38,0.10);header{height:40px;display:flex;justify-content:space-between;align-items:center;padding:0 16px;border-bottom:1px solid ",";color:",";font-weight:500;.svg-icon{width:20px;height:20px;border-radius:4px;cursor:pointer;&:hover{background-color:",";}&:active{background-color:",";}}}.content{margin-bottom:16px;.text-preview{width:100%;height:100px;background:",";line-height:100px !important;text-align:center;display:flex;justify-content:center;align-items:center !important;color:",";.ordered-item-view,.unordered-item-view{margin-right:7px;color:#1684fc;font-family:'Arial','Helvetica','sans-serif';}}.has-padding-content{padding:0 16px;&.has-more{.title-desc-input-wrap{border-bottom:1px solid ",";}}.title-desc-input-wrap{margin-top:16px;padding-bottom:8px;}.font-setting{margin:16px 0;width:100%;padding:0;.font-size-type-wrap{justify-content:space-between;width:100%;}}}.footer{display:flex;justify-content:space-between;align-items:center;height:28px;padding:0 16px;&.has-more{border-top:1px solid ",";height:34px;padding:16px 16px 0;}.is-more{cursor:pointer;color:",";&:hover{color:",";}}button.create-button{",";}}}.step-input-width-72{flex:0 0 72px;display:flex;justify-content:space-between;align-items:center;.title{width:24px;height:24px;padding:0;margin-left:2px;flex-shrink:0;margin-left:1px;svg{width:24px;height:24px;color:inherit;}}input{margin-left:4px;}&:not(:last-child){margin-right:4px;}}"],e=>e.theme.color_bg_white,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_link_normal,e=>e.theme.color_text_link_hover,Fl.qf),Qm=(e,t)=>{let n=e,a=t;return e==="textColor"&&typeof t=="number"&&(a=(0,ul.t0)(t)),e==="line-through"&&(n="strikethrough"),e==="listType"&&(n="listValue",a=t==="ordered"?"ordered-list-item":t==="unordered"?"unordered-list-item":"unstyled"),{a:n,v:a}},Jm=e=>{let{position:t,type:n="create",title:a="",desc:i="",currentKey:c="",attrs:d={},refStyles:p,sup:h,dispatch:m,onClose:x,onConfirm:v,onCancel:A}=e;const k=(0,r.d4)(ns.y.query.getCloudFontLocalList),R=(0,r.d4)(me.an),F=(0,r.d4)(tt.p$),[Z,G]=(0,l.useState)(t.left),[ee,ce]=(0,l.useState)(t.top),[se,he]=(0,l.useState)(a),[ve,Te]=(0,l.useState)(i),[xe,Fe]=(0,l.useState)((0,un.H$)()),[et,Ke]=(0,l.useState)(!0),[Qe,nt]=(0,l.useState)("");(0,l.useEffect)(()=>{Fe(d)},[d]),(0,l.useEffect)(()=>{F.length>0&&n==="create"&&Ke(!1)},[]);const Xe=(0,l.useMemo)(()=>(0,Kp.QT)(Qe,xe.fontWeight),[Qe,xe.fontWeight]),lt=(0,l.useMemo)(()=>xe.italic?"italic":"normal",[xe]),Ct=(0,l.useMemo)(()=>xe.bold?1:0,[xe]),St=(0,l.useMemo)(()=>(0,_0.U6)({isUnderline:xe.underline,isStrikethrough:xe.strikethrough}),[xe.strikethrough,xe.underline]),hn=(0,l.useMemo)(()=>{const Xo=Math.min(Math.max(xe.fontSize,9),48);return{...Q2(xe),overflow:"hidden",fontSize:Xo}},[xe]),Cn=Xo=>{m({type:"modal:update:state",payload:{isDragOrResizeModal:Xo}})},Mt=(Xo,Ta)=>{G(Xo),ce(Ta)},Et=Xo=>{Xo.preventDefault(),Xo.stopPropagation(),Ke(!et),et||window.innerHeight-ee<447&&ce(ee-167)},Co=Xo=>{nt(Xo.cloudFontKey),Xo.cloudFontKey&&(Xo.fontFamily=Xo.cloudFontKey),delete Xo.cloudFontKey,Fe({...xe,...Xo})},Pn=()=>{},ro=Xo=>{const{attr:Ta,value:Da}=Xo,xr={...xe},{a:Wa,v:Dr}=Qm(Ta,Da);if(xr[Wa]=Dr,Wa==="listValue"&&(xe==null?void 0:xe.listValue)===Dr&&(xr.listValue="unstyled"),Wa==="fontSize"){const Wr=(0,lm.Zp)({richTextV1:xe},Dr);Wr&&(xr.lineHeight=Wr)}Fe(xr)},Io=()=>{var Xo;const Ta=se.trim()?se:"\u6587\u672C\u6837\u5F0F";n==="create"&&m({type:"entry:libStyle:text:create",payload:{title:Ta,desc:ve,textAttr:xe,sup:h,refStyles:p}}),n==="edit"&&m({type:"entry:libStyle:text:edit",payload:{title:Ta,desc:ve,textAttr:xe,refStyles:p,currentKey:c,isNeedUpdateWidget:!0}}),m({type:"style-lib:set:attr",payload:{cacheLocalLibTag:Math.random()}}),v&&v(),x(),xl.U4.protoStyleTrack((Xo=MB)==null||(Xo=Xo.user)==null?void 0:Xo.id,n==="create"?"\u521B\u5EFA":"\u66F4\u65B0","text")},mo=()=>{A&&A(),x()},So=Xo=>{R||Xo.target.closest("#lib-panel-text-edit-modal")||Xo.target.closest(".--mb--color-picker")||Xo.target.closest(".font-options-menu")||Xo.target.closest(".font-size-input-menu")||Xo.target.closest("#font-list-panel")||Xo.target.closest(".context-menu-mask")||Xo.target.closest(".WorkspaceSelectMenu")||mo()},ho=Xo=>{Xo.key==="Enter"&&Io()},No=(0,l.useCallback)(()=>({left:Z-242-2,top:ee}),[Z,ee]);return(0,Ki.createPortal)((0,o.jsx)(Qa.A,{position:{left:Z,top:ee},dragContainer:"lib-panel-text-edit-modal",onMove:Mt,onMoveStart:()=>Cn(!0),onMoveEnd:()=>Cn(!1),children:(0,o.jsxs)(cm,{id:"lib-panel-text-edit-modal",children:[(0,o.jsxs)("header",{type:"draggable",children:[(0,o.jsx)("span",{className:"title",children:n==="create"?"\u521B\u5EFA\u6587\u672C\u6837\u5F0F":"\u7F16\u8F91\u6587\u672C\u6837\u5F0F"}),(0,o.jsx)("div",{className:"right-content",children:(0,o.jsx)(xt.C,{className:"times-icon",name:"general/times",size:20,onClick:mo})})]}),(0,o.jsxs)("div",{className:"content",children:[(0,o.jsxs)("div",{className:"text-preview",style:hn,children:[(xe==null?void 0:xe.listValue)==="ordered-list-item"&&(0,o.jsx)("span",{className:"ordered-item-view",children:"1."}),(xe==null?void 0:xe.listValue)==="unordered-list-item"&&(0,o.jsx)("span",{className:"unordered-item-view",children:"\u25CF"}),"Font\xA0123"]}),(0,o.jsxs)("div",{className:C()("has-padding-content",{"has-more":et}),children:[(0,o.jsx)(od,{title:se,desc:ve,onSetTitle:he,onSetDesc:Te}),et&&(0,o.jsxs)(Xm.M,{className:"font-setting",children:[(0,o.jsx)(X2.X,{dispatch:m,wbiVersion:3,fontFamily:xe.fontFamily,fontWeight:xe.fontWeight,fontStyle:lt,onChangeBatch:Co,onFakeOverrideChange:Pn}),(0,o.jsx)(im.L,{textColor:xe.textColor,isTextEditing:!1,fontSize:xe.fontSize,fontStyle:lt,fontFamily:xe.fontFamily,textDecoration:St,fontWeight:xe.fontWeight,boldType:Ct,boldAttr:"boldType",newOverOld:!0,dispatch:m,isDisabledFontRadioLine:!1,colorAttr:"textColor",isRichText:!0,onChange:ro,hasMissFontHi:Xe,cloudFontLocalList:k,supAttr:"richTextV1",canOpenLib:!0,canAddVar:!1,canCreateColorRef:!1,refStyles:p,onPosition:No}),(0,o.jsx)(sm.O,{lineHeight:xe.lineHeight,letterSpacing:xe.letterSpacing,onChange:ro,fontFamily:xe.fontFamily,fontSize:xe.fontSize,paddingTuple:xe.paddingTuple,paraSpacing:xe.paraSpacing,isClipText:xe.isClipText,fontDirection:xe.fontDirection,listValue:xe.listValue,isWRichText:!0,hideLineHeight:!1,isMissFont:!1,name:"wRichText",isShowLink:!1,isShowSizeType:!1,canAddVar:!1})]})]}),(0,o.jsxs)("div",{className:C()("footer",{"has-more":et}),children:[(0,o.jsx)("span",{className:"is-more",onClick:Et,children:et?"\u6536\u8D77\u66F4\u591A":"\u66F4\u591A\u8BBE\u7F6E"}),(0,o.jsx)("button",{className:"create-button",onClick:Io,children:n==="create"?"\u521B\u5EFA":"\u786E\u8BA4"})]})]}),(0,o.jsx)(Ls.A,{target:document,onMouseDown:(0,Ls.t)(So,{capture:!0}),onKeyDown:ho})]})}),(0,I0.w)())};var Ns=s(8614);const qm=M.Ay.div.withConfig({displayName:"style__StyledManageStyleLibModal",componentId:"sc-1reruhx-0"})(["width:760px;height:600px;position:fixed;z-index:199;background:",";box-shadow:2px 8px 20px 0px rgba(0,0,0,0.10);border:1px solid ",";border-radius:8px;&.upload,&.var-detail{width:480px;margin-left:120px;}header{height:50px;display:flex;justify-content:space-between;align-items:center;padding:0 16px;border-bottom:1px solid ",";color:",";font-weight:500;font-size:14px;.right-content{.svg-icon{",";}}}.content{display:flex;height:550px;.right-panel{flex:1;width:100%;.scroll-content{height:500px;overflow-y:scroll;padding-top:20px;}footer{width:100%;height:48px;border-top:1px solid ",";display:flex;align-items:center;padding:0 20px;background-color:",";border-bottom-left-radius:8px;border-bottom-right-radius:8px;button:last-child{margin-left:auto;}.footer-button-wrap{display:flex;align-items:center;justify-content:center;margin-left:auto;button:last-child{margin-left:8px;}}.upload-tips-content{display:flex;color:",";align-items:center;.svg-icon{margin-right:6px;}}}}}ul{list-style:none;}button.solid{",";height:28px;font-weight:500;}button.blue{",";}.loading{width:80px;height:80px;position:absolute;top:50%;left:50%;margin-left:40px;margin-top:-40px;}"],e=>e.theme.color_bg_white,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,Fl.eK,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_white,e=>e.theme.color_text_L3,Fl.FC,Fl._j),$m=M.Ay.ul.withConfig({displayName:"style__StyledLibsList",componentId:"sc-1reruhx-1"})(["padding:10px 8px 20px 8px;display:flex;flex-direction:column;min-width:160px;height:100%;list-style:none;align-items:center;background:",";border-right:1px solid ",";.left-lib-item{height:32px;display:flex;align-items:center;padding-left:12px;color:",";margin-bottom:6px;border-radius:6px;width:100%;cursor:pointer;position:relative;svg.svg-icon{margin-right:4px;&.icon-local{path{stroke:currentColor;}}}&:not(.divider):hover,&:not(.divider).is-active{background:",";}&.is-active{font-weight:500;}&.divider{height:1px;background:",";}&.local{svg.svg-icon > *{fill:none;}}.update-red-tip{top:8px;right:42px;}}"],e=>e.theme.color_navigation_hover,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,e=>e.theme.color_navigation_active,e=>e.theme.color_bg_border_01),ef=[{label:"\u672C\u5730\u8D44\u6E90\u5E93",value:"local",icon:"lib/manage/local"},{label:"\u66F4\u65B0\u8D44\u6E90\u5E93",value:"update",icon:"lib/manage/update"},{label:"\u56E2\u961F\u8D44\u6E90\u5E93",value:"team",icon:"lib/manage/team"},...ENV.IS_ON_PREMISES?[]:[{label:"",value:"divider",icon:""},{label:"\u7CBE\u9009\u8D44\u6E90\u5E93",value:"recommend",icon:"lib/manage/recommand"}]],tf=e=>{let{currentTab:t,onSetCurrentTab:n}=e;const a=(0,r.d4)(Ns.eP),i=(0,r.d4)(me.wA),c=(0,r.wA)(),d=p=>{n(p),c({type:"style-lib:set:currentManagePanel",payload:"home"})};return(0,o.jsx)($m,{children:ef.map(p=>(0,o.jsxs)("li",{className:"left-lib-item "+p.value+" "+(t===p.value?"is-active":""),onClick:()=>d(p.value),children:[p.value==="update"&&a.length>0&&(0,o.jsx)(_t.Jz,{className:"update-red-tip"}),p.icon&&(0,o.jsx)(xt.C,{className:"icon-"+p.value,name:p.icon,size:20}),p.label&&(0,o.jsx)("span",{children:p.value!=="team"||i?p.label:"\u6211\u7684\u8D44\u6E90\u5E93"})]},p.value))})};var J2=s(26998);const nf=M.Ay.div.withConfig({displayName:"style__StyledLocalContentPanel",componentId:"sc-1ifn4yh-0"})(["li.lib-list-item{color:",";margin-bottom:8px;display:flex;flex-direction:column;&.local{.title{margin-top:10px;}}.title{height:32px;margin-bottom:8px;display:flex;align-items:center;padding:0 20px;}.lib-content{display:flex;padding:8px 20px;cursor:pointer;&:hover{background:",";}.cover{width:110px;height:82px;border-radius:8px;border:1px solid ",";}.right-content{display:flex;align-items:center;justify-content:space-between;flex:1;margin-left:16px;.name-wrap{flex-direction:column;display:flex;flex:1;.name{color:",";font-weight:500;font-size:13px;display:flex;align-items:center;span{max-width:280px;",";}}.space-name{color:",";}.updates-nums{border-radius:4px;background:",";color:",";font-weight:400;padding:3px 4px;margin-left:8px;font-size:11px;}.is-withdraw{border-radius:4px;background:",";padding:3px 4px;margin-left:8px;color:",";font-size:11px;font-weight:400;}}.button-wrap{display:flex;button:last-child{margin-left:12px;}button{height:28px;}}.blue.upload{height:28px;font-weight:500;}}}}footer{button{height:28px;}.footer-title{color:",";}}"],e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_02,e=>e.theme.color_text_L1,za.L9,e=>e.theme.color_text_L3,e=>e.theme.color_info_bg,e=>e.theme.color_text_link_normal,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L2,e=>e.theme.color_text_L1),of=M.Ay.div.withConfig({displayName:"style__StyledUploadComponent",componentId:"sc-1ifn4yh-1"})(["textarea.upload-reson-input{margin:0 20px;border:none;resize:none;outline:none;height:52px;padding:8px;border-radius:8px;background:",";color:",";width:-webkit-fill-available;&::placeholder{color:",";}}.upload-content{margin-top:20px;.upload-title-wrap{height:32px;display:flex;align-items:center;padding:0px 20px;.upload-title{font-weight:500;color:",";}.upload-nums{border-radius:4px;background:",";margin-left:5px;padding:0 3.5px;color:",";}}}ul{li.upload-style-ref-item{span.item-title{height:32px;display:flex;align-items:center;padding:0px 20px;color:",";}ul.item-list{display:flex;flex-direction:column;width:100%;li.upload-list-item{display:flex;padding:0px 20px;width:100%;height:56px;display:flex;align-items:center;.margin-right-20{margin-right:20px;}&:hover{background:",";cursor:pointer;}.thumbnail-wrapper:not(.appear-ref-view-item):not(.has-opacity){width:40px;height:40px;flex:0 0 40px;&:before{width:40px;height:40px;}}.appear-ref-view-item.list{width:40px;height:40px;flex:0 0 40px;border-radius:4px;}.view-item{width:40px;height:40px;border-radius:4px;background:",";border:1px solid ",";flex:0 0 40px;}.var-view-item{width:40px;height:40px;padding:10px;border-radius:4px;background:",";border:1px solid ",";display:flex;align-items:center;justify-content:center;.svg-icon{color:",";}}.muban-img-box{width:40px;height:40px;border-radius:4px;border:1px solid ",";background:",";overflow:hidden;padding:4px;flex:0 0 40px;}img{-webkit-user-drag:none;object-fit:contain;width:100%;height:100%;}.content-wrap{flex:1;display:flex;white-space:nowrap;overflow:hidden;.desc{color:",";margin-left:10px;}}.upload-item-right-content{display:flex;justify-content:space-between;flex:1;color:",";.upload-item-name{color:",";font-weight:500;}.upload-change{display:flex;align-items:center;justify-content:center;.arrow-left{margin-left:4px;.svg-icon{width:6px;height:10px;color:",";}}}&.color,&.style,&.muban{.upload-item-name{",";max-width:280px;}}}}}&.var{li.upload-list-item{&:hover{background:",";cursor:pointer;}}}&.no-update{.upload-title-wrap{.arrow-down{margin-right:4px;.svg-icon{width:6px;height:10px;color:",";}}&.is-expand{.arrow-down{transform:rotate(90deg);}}&:hover{background:",";cursor:pointer;}}ul.item-list{li.upload-list-item{&.var{.right-content{color:",";margin-left:auto;.triangle-down{transform:rotate(-90deg);margin-left:9px;}}}.upload-item-name.item-list-item-name{",";max-width:330px;}}}}}}"],e=>e.theme.color_bg_card,e=>e.theme.color_text_L1,e=>e.theme.color_text_L3,e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L2,e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_02,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_02,e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_text_L3,e=>e.theme.color_text_L3,e=>e.theme.color_text_L1,e=>e.theme.color_text_L1,za.L9,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_text_L3,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_text_L3,za.L9),af=M.Ay.ul.withConfig({displayName:"style__StyledHomeComponent",componentId:"sc-1ifn4yh-2"})(["height:550px;overflow-y:scroll;button.to-recommand-tab{margin:11px 20px;width:558px;height:28px;padding:0;}"]),q2=M.Ay.div.withConfig({displayName:"style__StyledUpgradeContent",componentId:"sc-1ifn4yh-3"})(["height:136px;position:relative;margin:0 20px;margin-top:10px;display:flex;flex-direction:column;border-radius:10px;background:",";overflow:hidden;padding:16px;.title{color:",";font-size:14px;font-weight:500;}.desc{color:",";font-size:12px;margin:12px 0;}img{position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none;}.button-wrapper{display:flex;margin-left:auto;.blue{margin-left:12px;}}"],e=>e.theme.color_navigation_hover,e=>e.theme.color_text_L1,e=>e.theme.color_text_L3),fh=e=>{let{type:t,title:n,canUploadLocal:a,onSetCanUploadLocal:i}=e;const[c,d]=(0,l.useState)(0),p=(0,r.d4)(Ns.oo),h=(0,r.d4)(Ns.xg),m=(0,r.d4)(me.PL),x=(0,r.d4)(me.wA),v=(0,r.d4)(me.HW),A=(0,r.d4)(me.m1),k=(0,r.d4)(Ns.ap),R=(0,r.d4)(Ns.nC),F=(0,r.wA)(),Z=(0,l.useMemo)(()=>{const Te=(0,J2.g)(v),xe=(0,tr.lP)(x),Fe=Te==="free",et=!(xe==="trial"||xe==="paid");return x&&m.is_org_project?et:Fe},[x,m.is_org_project,v]);(0,l.useEffect)(()=>{(async()=>{if(t==="local")if(k){const xe=MB.sclibKey,Fe=await(0,ms.G8)(R.get(xe)),et=Fe.add.length+Fe.del.length+Fe.chg.length;et>0&&F({type:"style-lib:set:attr",payload:{localStyleUpdateDiff:Fe}}),i==null||i(et>0),d(et)}else{const xe=[...(0,ms.xT)({type:"all"}),...(0,ms.Ny)(),...(0,ms.r)()];i==null||i(xe.length>0),d(xe.length)}})()},[k]);const G=(0,l.useMemo)(()=>{var Te;return t==="added"?p:t==="used"?h:[{hotAttr:{name:m.name,extData:m!=null&&m.is_custom_cover?m==null?void 0:m.custom_cover:(Te=m==null?void 0:m.cover)!=null?Te:"",extInfo:{flatKey:MB.sclibKey,projectCid:m.cid}},key:"local"}]},[t,p,h,m.name,m.cid,m==null?void 0:m.is_custom_cover,m==null?void 0:m.custom_cover,m==null?void 0:m.cover]),ee=Te=>{a&&(Te.stopPropagation(),F({type:"style-lib:set:currentManagePanel",payload:"upload"}))},ce=(Te,xe)=>{Te.stopPropagation(),sdkStore.updateHotAttrKV(xe.key,"extInfo",{...xe.hotAttr.extInfo,isRemove:!0}),F({type:"entry:libStyle:remove:addedLibList",payload:{key:xe.key}}),(0,S1.Cj)()},se=(Te,xe)=>{Te.stopPropagation(),sdkStore.deleteHotItem(xe),F({type:"style-lib:remove:usedLibList",payload:{key:xe}}),(0,S1.Cj)()},he=(Te,xe)=>{var Fe;Te.stopPropagation(),sdkStore.updateHotAttrKV(xe.key,"extInfo",{...xe.hotAttr.extInfo,isRemove:!1}),F({type:"entry:libStyle:add:usedLib:form:usedLibList",payload:{key:xe.key}}),F({type:"entry:libStyle:update:mubanPanel:libMubanTreeMap",payload:{libFlatKey:xe.hotAttr.extInfo.flatKey}}),xl.U4.protoMasterUseTrack((Fe=MB)==null||(Fe=Fe.user)==null?void 0:Fe.id,"\u672C\u5730\u8D44\u6E90","\u6DFB\u52A0")},ve=(Te,xe)=>{var Fe;t==="local"&&!a&&!k||t!=="local"&&(Fe=xe.hotAttr)!=null&&Fe.isCanNotUse||(Te.stopPropagation(),F({type:"style-lib:set:attr",payload:{currentManagePanel:"detail",detailLib:xe}}))};return Z&&t==="local"?(0,o.jsx)(sf,{currentOrg:x,currentProject:m}):G.length===0?null:(0,o.jsxs)("li",{className:C()("lib-list-item",{[t]:t}),children:[(0,o.jsx)("span",{className:"title",children:n}),G.map(Te=>(0,o.jsxs)("div",{className:"lib-content",onClick:xe=>ve(xe,Te),children:[(0,o.jsx)("img",{className:"cover",src:Te.hotAttr.extData||"/mb-proto2/images/lib/lib-emtry.png",onError:xe=>{xe.target.src="/mb-proto2/images/lib/lib-emtry.png",xe.target.onerror=null}}),(0,o.jsxs)("div",{className:"right-content",children:[(0,o.jsxs)("div",{className:"name-wrap",children:[(0,o.jsxs)("div",{className:"name",children:[(0,o.jsx)("span",{children:Te.hotAttr.name}),t==="local"&&c>0&&(0,o.jsx)("div",{className:"updates-nums",children:c+"\u5904\u66F4\u65B0"}),t==="used"&&Te.hotAttr.isCanNotUse&&(0,o.jsx)("span",{className:"is-withdraw",children:"\u5DF2\u88AB\u64A4\u56DE"})]}),x&&(0,o.jsx)("span",{className:"space-name",children:A.name})]}),t==="local"&&(0,o.jsx)("button",{className:C()("blue upload",{disabled:!a}),onClick:ee,children:k?"\u53D1\u5E03\u66F4\u65B0":"\u53D1\u5E03"}),t==="added"&&(0,o.jsx)("button",{className:"solid move",onClick:xe=>ce(xe,Te),children:"\u79FB\u9664"}),t==="used"&&(0,o.jsxs)("div",{className:"button-wrap",children:[(0,o.jsx)("button",{className:"solid delete",onClick:xe=>se(xe,Te.key),children:"\u5220\u9664"}),!Te.hotAttr.isCanNotUse&&(0,o.jsx)("button",{className:"blue add",onClick:xe=>he(xe,Te),children:"\u6DFB\u52A0"})]})]})]},Te.key))]})},rf=e=>{let{onSetCurrentTab:t,canUploadLocal:n,onSetCanUploadLocal:a}=e;const i=(0,r.wA)(),c=()=>{t("recommend"),i({type:"style-lib:set:currentManagePanel",payload:"home"})};return(0,o.jsxs)(af,{children:[(0,o.jsx)(fh,{type:"local",title:"\u5F53\u524D\u6587\u4EF6\u521B\u5EFA\u7684",canUploadLocal:n,onSetCanUploadLocal:a}),(0,o.jsx)(fh,{type:"added",title:"\u5DF2\u6DFB\u52A0\u7684\u8D44\u6E90\u5E93"}),(0,o.jsx)(fh,{type:"used",title:"\u4F7F\u7528\u8FC7\u7684\u8D44\u6E90\u5E93"}),!ENV.IS_ON_PREMISES&&(0,o.jsx)("button",{className:"solid to-recommand-tab",onClick:c,children:"\u53D1\u73B0\u7CBE\u9009\u8D44\u6E90\u5E93"})]})},sf=e=>{let{currentOrg:t,currentProject:n}=e;const a=()=>{const i=(0,Ra.l)(t,"\u7F16\u8F91\u533A_\u8D44\u6E90\u53D1\u5E03\u5F39\u7A97_\u5347\u7EA7","workspace-v8_libmodal_upgrade");MB.global.popupHelper.chargeAsync(i)};return(0,o.jsxs)(q2,{children:[(0,o.jsx)("img",{src:"/mb-proto2/images/lib/upgrade-background.png"}),(0,o.jsx)("span",{className:"title",children:"\u5C06\u672C\u5730\u6BCD\u7248\u3001\u6837\u5F0F\u548C\u53D8\u91CF\u53D1\u5E03\u4E3A\u8D44\u6E90\u5E93"}),(0,o.jsx)("span",{className:"desc",children:"\u5347\u7EA7\u58A8\u5200\u539F\u578B\u4F1A\u5458\u540E\uFF0C\u652F\u6301\u5C06\u5F53\u524D\u6587\u4EF6\u7684\u6BCD\u7248\u3001\u6837\u5F0F\u53CA\u53D8\u91CF\u7B49\u8BBE\u8BA1\u8D44\u6E90\u7EDF\u4E00\u53D1\u5E03\u81F3"+(n!=null&&n.is_org_project?"\u56E2\u961F":"\u6211\u7684")+"\u8D44\u6E90\u5E93\uFF0C\u4ECE\u800C\u5B9E\u73B0\u5728\u5176\u4ED6\u6587\u4EF6\u4E2D\u5FEB\u901F\u8C03\u7528\u6216\u590D\u7528\u76F8\u5173\u8D44\u6E90"}),(0,o.jsxs)("div",{className:"button-wrapper",children:[(0,o.jsx)("button",{className:"solid",onClick:a,children:"\u5347\u7EA7\u4F1A\u5458"}),(0,o.jsx)("button",{className:"blue",onClick:a,children:"\u53D1\u5E03\u8D44\u6E90"})]})]})};var Yp=s(47946),cl=s(79150),M1=s(19376),$l=s(62587),G0=s(33573),xd=s(88194),Xp=s(57514),T0=s(83672),Qp=s(82009);const gh=e=>{let{list:t,diffType:n}=e;const a=[],i=[],c=[],d=[];for(const x of t){var p,h,m;const v=sdkStore.getHotItem(x.key);((v==null||(p=v.hotAttr)==null?void 0:p.styleType)==="text"||(v==null||(h=v.hotAttr)==null?void 0:h.styleType)==="appear")&&i.push({...v,diffType:n}),(v==null||(m=v.hotAttr)==null?void 0:m.styleType)==="color"&&a.push({...v,diffType:n}),(v==null?void 0:v.hotAttr.type)==="rResBunch"&&c.push({...v,diffType:n}),(v==null?void 0:v.hotAttr.type)==="rResVar"&&d.push({...v,diffType:n})}return{uploadColorList:a,updateStyleList:i,uploadMubanList:c,uploadVarList:d}},Jf=e=>{let{onClose:t,onSetVarDetailData:n}=e;const[a,i]=(0,l.useState)(!1),[c,d]=(0,l.useState)(""),[p,h]=(0,l.useState)([]),[m,x]=(0,l.useState)([]),[v,A]=(0,l.useState)([]),[k,R]=(0,l.useState)([]),[F,Z]=(0,l.useState)([]),G=(0,r.d4)(me.YT),ee=(0,r.d4)(me.PL),ce=(0,r.d4)(me.H7),se=(0,r.d4)(me.HW),he=(0,r.d4)(Ns.ap),ve=(0,r.d4)(Ns.R0),Te=(0,l.useRef)(null),xe=(0,r.wA)();(0,l.useEffect)(()=>{if(he){const{uploadColorList:Xe,uploadMubanList:lt,uploadVarList:Ct,updateStyleList:St}=gh({list:ve.add,diffType:"add"}),{uploadColorList:hn,uploadMubanList:Cn,uploadVarList:Mt,updateStyleList:Et}=gh({list:ve.del,diffType:"del"}),{uploadColorList:Co,uploadMubanList:Pn,uploadVarList:ro,updateStyleList:Io}=gh({list:ve.chg,diffType:"chg"});h([...Xe,...hn,...Co]),x([...St,...Et,...Io]),A([...lt,...Cn,...Pn]),R([...Ct,...Mt,...ro]),Z([...ve.noChg])}else{const Xe=(0,ms.xT)({type:"all"});h(Xe.filter(lt=>lt.hotAttr.styleType==="color")),x(Xe.filter(lt=>lt.hotAttr.styleType!=="color")),A((0,ms.Ny)()),R((0,ms.r)()),Z([])}},[he,ve,ve.add,ve.chg,ve.del]);const Fe=()=>{i(!a)},et=async()=>{var Xe,lt,Ct;MB.notice({type:"loading",text:"\u53D1\u5E03\u4E2D..."});const St=(Xe=sdkStore.getHotItem("B@style"))==null?void 0:Xe.sub,hn=(lt=sdkStore.getHotItem("B@ref-muban"))==null?void 0:lt.sub,Cn=(Ct=sdkStore.getHotItem("B@var"))==null?void 0:Ct.sub;if((St==null?void 0:St.length)===0&&(hn==null?void 0:hn.length)===0&&(Cn==null?void 0:Cn.length)===0){const Ta=await(0,Qp.OO)(ee.cid);(Ta==null?void 0:Ta.result)==="SUCCESS"&&(xe({type:"style-lib:set:attr",payload:{isCurrentProjectSclib:!1,currentManagePanel:"home"}}),MB.notice({type:"success",text:"\u8D44\u6E90\u5E93\u53D1\u5E03\u6210\u529F"}),t());return}const Mt=sdkStore.__devFlatStore().getFlatTree().fork();for(const Ta of Mt.get(Za.$k).sub)n0(Mt,Ta);for(const Ta of[...((Et=Mt.get(Jd.Ri))==null?void 0:Et.sub)||[],...((Co=Mt.get(Za.Ex))==null?void 0:Co.sub)||[]]){var Et,Co;n0(Mt,Ta)}for(const Ta of[...((Pn=Mt.get(Za.nK))==null?void 0:Pn.sub)||[]]){var Pn,ro;(ro=Mt.get(Ta))!=null&&ro.attr.lK&&n0(Mt,Ta)}for(const Ta of[...((Io=Mt.get(Za.W4))==null?void 0:Io.sub)||[],...((mo=Mt.get(Za.YZ))==null?void 0:mo.sub)||[]]){var Io,mo;n0(Mt,Ta)}const So=await(0,tp.GT)(Mt,ce.cid,ee.cid);MB.sclibKey||(MB.sclibKey=So==null?void 0:So.flpakKey);const ho=JSON.stringify({desc:c,updateUser:se.name,updateTime:rootSdk.fssCmt.getClockStore().getMtime()});if((await(0,Qp.PP)({cid:ee.cid,info:ho})).result==="SUCCESS"){var Xo;xe({type:"style-lib:set:attr",payload:{isCurrentProjectSclib:!0,currentManagePanel:"home"}});const{sdkStore:Ta}=await(0,Yp.tr)({flpakKey:So==null?void 0:So.flpakKey});xe({type:"style-lib:set:libSdkStoreMap",payload:{key:So==null?void 0:So.flpakKey,value:Ta,type:"update"}}),MB.notice({type:"success",text:"\u8D44\u6E90\u5E93\u53D1\u5E03\u6210\u529F"}),t(),xl.U4.protoMasterPublishTrack((Xo=MB)==null||(Xo=Xo.user)==null?void 0:Xo.id,he?"\u53D1\u5E03\u66F4\u65B0":"\u53D1\u5E03")}},Ke=Xe=>{d(Xe.target.value)},Qe=(0,l.useMemo)(()=>F.filter(Xe=>Xe.hotAttr.type==="rResVar"),[F]),nt=(Xe,lt)=>{n(Xe,lt),xe({type:"style-lib:set:attr",payload:{currentManagePanel:"var-detail"}})};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(of,{className:"scroll-content",children:[(0,o.jsx)("textarea",{placeholder:"\u8BF4\u660E\u66F4\u65B0\u539F\u56E0",value:c,className:"upload-reson-input",maxLength:200,onChange:Ke}),(0,o.jsxs)("div",{className:"upload-content",children:[(0,o.jsxs)("div",{className:"upload-title-wrap",children:[(0,o.jsx)("span",{className:"upload-title",children:"\u66F4\u65B0\u5185\u5BB9"}),(0,o.jsx)("span",{className:"upload-nums",children:p.length+m.length+v.length+k.length})]}),(0,o.jsxs)("ul",{children:[k.length>0&&(0,o.jsxs)("li",{className:"upload-style-ref-item var",children:[(0,o.jsx)("span",{className:"item-title",children:"\u53D8\u91CF"}),(0,o.jsx)("ul",{className:"item-list",children:(0,o.jsxs)("li",{className:"upload-list-item",onClick:()=>nt(k,"has-change"),children:[(0,o.jsx)("div",{className:"var-view-item margin-right-20",children:(0,o.jsx)(xt.C,{name:"setting_panel/libPanel/var",size:20})}),(0,o.jsxs)("div",{className:"upload-item-right-content var",children:[(0,o.jsx)("span",{className:"upload-item-name",children:"\u53D8\u91CF"}),(0,o.jsxs)("div",{className:"upload-change",children:[(0,o.jsx)("span",{children:k.length+" \u4E2A\u66F4\u65B0"}),(0,o.jsx)(cl.A,{name:"design/arrow/right",className:"arrow-left",iconBoxSize:16})]})]})]})})]}),p.length>0&&(0,o.jsxs)("li",{className:"upload-style-ref-item color",children:[(0,o.jsx)("span",{className:"item-title",children:"\u989C\u8272"}),(0,o.jsx)("ul",{className:"item-list color-list",children:p.map((Xe,lt)=>{const Ct={fill:"solid",fillIsVisible:!0,solidColor:Xe.hotAttr.fill},St=Ct&&(0,$l.$8)(Ct,{w:200,h:100});return(0,o.jsxs)("li",{className:"upload-list-item",children:[(0,o.jsx)(M1.I,{className:"margin-right-20",ref:Te,color:St,index:lt,solidRenderType:"rect",size:40}),(0,o.jsxs)("div",{className:"upload-item-right-content color",children:[(0,o.jsx)("span",{className:"upload-item-name",children:Xe.hotAttr.name}),(0,o.jsx)("span",{children:I18N.libPanel.manage.diff[Xe.diffType||"add"]})]})]},Xe.key)})})]}),m.length>0&&(0,o.jsxs)("li",{className:"upload-style-ref-item style",children:[(0,o.jsx)("span",{className:"item-title",children:"\u6837\u5F0F"}),(0,o.jsx)("ul",{className:"item-list style-list",children:m.map((Xe,lt)=>(0,o.jsxs)("li",{className:"upload-list-item",children:[Xe.hotAttr.styleType==="appear"&&(0,o.jsx)(Xp.U,{className:"margin-right-20",appearStyle:Xe,index:lt,size:40}),Xe.hotAttr.styleType==="text"&&(0,o.jsx)(T0.c,{className:"margin-right-20",textStyle:Xe}),(0,o.jsxs)("div",{className:"upload-item-right-content style",children:[(0,o.jsxs)("div",{className:"content-wrap",children:[(0,o.jsx)("span",{className:"upload-item-name",children:Xe.hotAttr.name}),Xe.hotAttr.styleType==="text"&&(0,o.jsxs)("span",{className:"desc",children:[Xe.hotAttr.fontSize,"/",Xe.hotAttr.lineHeight]})]}),(0,o.jsx)("span",{children:I18N.libPanel.manage.diff[Xe.diffType||"add"]})]})]},Xe.key))})]}),v.length>0&&(0,o.jsxs)("li",{className:"upload-style-ref-item muban",children:[(0,o.jsx)("span",{className:"item-title",children:"\u6BCD\u7248"}),(0,o.jsx)("ul",{className:"item-list muban-list",children:v.map(Xe=>(0,o.jsxs)("li",{className:"upload-list-item",children:[(0,o.jsx)("div",{className:"muban-img-box margin-right-20",children:(0,o.jsx)(G0.Ay,{projectMetaCid:G.cid,snapshotKey:Xe.hotAttr.defaultCanvasKey,isVisible:!0,mode:xd.rY.PNG_CANVAS})}),(0,o.jsxs)("div",{className:"upload-item-right-content muban",children:[(0,o.jsx)("span",{className:"upload-item-name",children:Xe.hotAttr.name}),(0,o.jsx)("span",{children:I18N.libPanel.manage.diff[Xe.diffType||"add"]})]})]},Xe.key))})]}),F.length>0&&(0,o.jsxs)("li",{className:"upload-style-ref-item no-update",children:[(0,o.jsxs)("div",{className:C()("upload-title-wrap",{"is-expand":a}),onClick:Fe,children:[(0,o.jsx)(cl.A,{name:"design/arrow/right",className:"arrow-down",iconBoxSize:16}),(0,o.jsx)("span",{className:"upload-title",children:"\u65E0\u66F4\u65B0"}),(0,o.jsx)("span",{className:"upload-nums",children:F.length})]}),a&&(0,o.jsxs)("ul",{className:"item-list",children:[Qe.length>0&&(0,o.jsxs)("li",{className:"upload-list-item var",onClick:()=>nt(Qe,"no-change"),children:[(0,o.jsx)("div",{className:"var-view-item margin-right-20",children:(0,o.jsx)(xt.C,{name:"setting_panel/libPanel/var",size:20})}),(0,o.jsxs)("div",{className:"upload-item-right-content var",children:[(0,o.jsx)("span",{className:"upload-item-name",children:"\u53D8\u91CF"}),(0,o.jsxs)("div",{className:"upload-change",children:[(0,o.jsx)("span",{children:Qe.length+" \u4E2A\u66F4\u65B0"}),(0,o.jsx)(cl.A,{name:"design/arrow/right",className:"arrow-left",iconBoxSize:16})]})]})]},"var"),F.filter(Xe=>Xe.hotAttr.styleType==="color").map((Xe,lt)=>{const Ct={fill:"solid",fillIsVisible:!0,solidColor:Xe.hotAttr.fill},St=Ct&&(0,$l.$8)(Ct,{w:200,h:100});return(0,o.jsxs)("li",{className:"upload-list-item",children:[(0,o.jsx)(M1.I,{className:"margin-right-20",ref:Te,color:St,solidRenderType:"rect",index:lt,size:40}),(0,o.jsx)("span",{className:"upload-item-name item-list-item-name",children:Xe.hotAttr.name})]},Xe.key)}),F.filter(Xe=>Xe.hotAttr.styleType==="appear"||Xe.hotAttr.styleType==="text").map((Xe,lt)=>(0,o.jsxs)("li",{className:"upload-list-item",children:[Xe.hotAttr.styleType==="appear"&&(0,o.jsx)(Xp.U,{className:"margin-right-20",appearStyle:Xe,size:40,index:lt}),Xe.hotAttr.styleType==="text"&&(0,o.jsx)(T0.c,{className:"margin-right-20",textStyle:Xe}),(0,o.jsxs)("div",{className:"content-wrap",children:[(0,o.jsx)("span",{className:"upload-item-name item-list-item-name",children:Xe.hotAttr.name}),Xe.hotAttr.styleType==="text"&&(0,o.jsxs)("span",{className:"desc",children:[Xe.hotAttr.fontSize,"/",Xe.hotAttr.lineHeight]})]})]},Xe.key)),F.filter(Xe=>Xe.hotAttr.type==="rResBunch").map(Xe=>(0,o.jsxs)("li",{className:"upload-list-item",children:[(0,o.jsx)("div",{className:"muban-img-box margin-right-20",children:(0,o.jsx)(G0.Ay,{projectMetaCid:G.cid,snapshotKey:Xe.hotAttr.defaultCanvasKey,isVisible:!0,mode:xd.rY.PNG_CANVAS})}),(0,o.jsx)("span",{className:"upload-item-name",children:Xe.hotAttr.name})]},Xe.key))]})]})]})]})]}),(0,o.jsxs)("footer",{children:[(ee==null?void 0:ee.is_org_project)&&(0,o.jsxs)("div",{className:"upload-tips-content",children:[(0,o.jsx)(xt.C,{name:"common/invalid",size:16}),(0,o.jsx)("span",{children:"\u53D1\u5E03\u6210\u529F\u540E\uFF0C\u8BE5\u8D44\u6E90\u5E93\u5C06\u5BF9\u56E2\u961F\u5185\u6240\u6709\u6210\u5458\u53EF\u89C1"})]}),(0,o.jsx)("button",{className:"blue",onClick:et,children:"\u53D1\u5E03"})]})]})};var vd=s(46953);const lf=e=>{let{varDetailData:t,type:n}=e;const a=(0,r.wA)(),i=()=>{a({type:"style-lib:set:currentManagePanel",payload:"upload"})};return(0,o.jsxs)(cf,{children:[(0,o.jsxs)("div",{className:"header-nav",children:[(0,o.jsx)(cl.A,{name:"design/arrow/right",className:"back-icon",onClick:i}),(0,o.jsx)("span",{children:n==="no-change"?"\u65E0\u66F4\u65B0\u7684\u53D8\u91CF":"\u6709\u66F4\u65B0\u7684\u53D8\u91CF"}),(0,o.jsx)("span",{className:"nums",children:t.length})]}),(0,o.jsx)("ul",{children:t==null?void 0:t.map(c=>(0,o.jsxs)("li",{children:[(0,o.jsx)("div",{className:"var-view-item",children:(0,o.jsx)(xt.C,{name:""+vd.zY[c.hotAttr.varDataType],size:16})}),(0,o.jsx)("span",{children:c.hotAttr.name}),n==="has-change"&&(0,o.jsx)("span",{className:"diff-type",children:I18N.libPanel.manage.diff[c.diffType||"add"]})]},c.key))})]})},cf=M.Ay.div.withConfig({displayName:"VarDetail__StyledVarDetailComponent",componentId:"sc-1gp2lk1-0"})(["color:",";.header-nav{display:flex;align-items:center;padding:12px 16px;border-bottom:1px solid ",";font-weight:500;.back-icon{margin-right:4px;.svg-icon{width:6px;transform:rotate(180deg);}}.nums{border-radius:4px;padding:0 3px;background:",";color:",";margin-left:8px;}}ul{padding:12px 0;li{display:flex;align-items:center;padding:4px 16px;height:48px;&:hover{background:",";}.var-view-item{width:40px;height:40px;border-radius:4px;border:1px solid ",";background:",";display:flex;align-items:center;justify-content:center;margin-right:20px;.svg-icon{color:",";}}.diff-type{color:",";margin-left:auto;}}}"],e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L2,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_02,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_text_L1,e=>e.theme.color_text_L3);var E1=s(15207),gc=s(93257);const yh=()=>{let e;const[n,a]=(0,l.useState)(!0),i=()=>{a(!0)};return{handleScroll:p=>{p.stopPropagation(),clearTimeout(e),a(!1),e=setTimeout(i,2e3)},getContent:p=>n?p:null}},xh=M.Ay.div.withConfig({displayName:"styled__StyledDetailComponent",componentId:"sc-1x6eflh-0"})(["height:500px;display:flex;flex-direction:column;.header{display:flex;align-items:center;justify-content:space-between;height:68px;padding:0 20px;color:",";border-bottom:1px solid ",";.left-nav-back-wrap{display:flex;align-items:center;.back-icon-box{width:24px;height:24px;border-radius:4px;margin-right:8px;margin-left:-12px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:hover{background:",";}.svg-icon{width:10px;height:5px;transform:rotate(90deg);}}.back-name{display:flex;flex-direction:column;.name{font-weight:500;}.space-name{color:",";}}}.right-content{display:flex;align-items:center;button{margin-left:12px;height:28px;}}}.content-wrap{padding:0 16px;overflow-y:scroll;flex:1;.detail-item{.detail-title{display:flex;align-items:center;height:32px;margin-bottom:8px;color:",";}.detail-list{display:flex;flex-wrap:wrap;margin-bottom:8px;li{&.li-item.color-item{margin-bottom:0;height:18px;display:flex;align-items:center;justify-content:center;}.thumbnail-wrapper:not(.appear-ref-view-item):not(.has-opacity){width:16px;height:16px;border-radius:50%;&::before{border-radius:50%;}.thumbnail{border-radius:50%;}}.appear-ref-view-item,.view-item{width:40px;height:40px;&.view-item{border-radius:4px;background:",";border:1px solid ",";color:",";}}.thumbnail-wrapper.appear-ref-view-item.has-opacity.list{border-radius:4px;}}&.detail-color-list{display:grid;grid-template-columns:repeat(auto-fill,18px);grid-row-gap:8px;grid-column-gap:8px;}&.detail-style-list{display:grid;grid-template-columns:repeat(auto-fill,40px);grid-row-gap:8px;grid-column-gap:12px;}&.detail-muban-list{display:grid;grid-template-columns:repeat(auto-fill,70px);grid-row-gap:8px;grid-column-gap:12px;}}&.var{display:flex;align-items:center;margin-bottom:8px;margin-top:17px;.detail-title{margin-bottom:0;}.detail-nums{border-radius:4px;background:",";margin-left:5px;padding:0 3.5px;color:",";}}&.muban{ul.detail-list{li{width:70px;height:70px;border-radius:6px;border:1px solid ",";background:",";overflow:hidden;padding:8px;img{-webkit-user-drag:none;object-fit:contain;width:100%;height:100%;}}}}}}"],e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_text_L3,e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_02,e=>e.theme.color_text_L1,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L2,e=>e.theme.color_bg_border_01,e=>e.theme.color_btn_secondary_hover),vh=e=>{var t,n,a,i,c,d,p,h;let{canUploadLocal:m}=e;const[x,v]=(0,l.useState)(!1),[A,k]=(0,l.useState)(new Map),R=(0,l.useRef)(null),F=(0,r.d4)(me.PL),Z=(0,r.d4)(me.YT),G=(0,r.d4)(Ns.JY),ee=(0,r.d4)(Ns.oo),ce=(0,r.d4)(Ns.xg),se=(0,r.d4)(me.wA),he=(0,r.d4)(me.m1),ve=(0,r.d4)(me.HW),Te=(0,r.d4)(Ns.nC),xe=(0,r.d4)(Ns.ap),Fe=(0,r.wA)(),{handleScroll:et,getContent:Ke}=yh(),Qe=(0,l.useMemo)(()=>{var Et;return(G==null?void 0:G.cid)||(G==null||(Et=G.hotAttr)==null||(Et=Et.extInfo)==null?void 0:Et.projectCid)},[G==null?void 0:G.cid,G==null||(t=G.hotAttr)==null||(t=t.extInfo)==null?void 0:t.projectCid]),nt=(0,l.useMemo)(()=>{var Et;return(G==null?void 0:G.sclib_cid)||(G==null||(Et=G.hotAttr)==null||(Et=Et.extInfo)==null?void 0:Et.flatKey)},[G==null||(n=G.hotAttr)==null||(n=n.extInfo)==null?void 0:n.flatKey,G==null?void 0:G.sclib_cid]);(0,l.useEffect)(()=>{const Et=G.key==="local"?sdkStore:Te.get(nt);if(Et){const Co=new Map;Co.set("color",(0,ms.xT)({type:"color",sdk:Et})),Co.set("style",[...(0,ms.xT)({type:"appear",sdk:Et}),...(0,ms.xT)({type:"text",sdk:Et})]),Co.set("muban",(0,ms.Ny)(Et)),Co.set("var",(0,ms.r)(Et)),Co.size>0&&k(Co)}v(!0)},[G.key,nt,Te]);const Xe=(0,l.useMemo)(()=>ee.findIndex(Et=>Et.hotAttr.extInfo.projectCid===Qe)!==-1,[ee,Qe]),lt=()=>{Fe({type:"style-lib:set:currentManagePanel",payload:"home"})},Ct=()=>{Fe({type:"style-lib:set:currentManagePanel",payload:"upload"})},St=()=>{sdkStore.updateHotAttrKV(G.key,"extInfo",{...G.hotAttr.extInfo,isRemove:!0}),Fe({type:"entry:libStyle:remove:addedLibList",payload:{key:G.key}})},hn=()=>{if(Xe)Fe({type:"entry:libStyle:add:usedLib:form:usedLibList",payload:{key:G.key}});else{const Et=(0,S1.$t)(G,ve);Fe({type:"style-lib:add:addedLibList",payload:Et}),Fe({type:"style-lib:set:attr",payload:{detailLib:Et}}),ce.findIndex(Co=>Co.key===Et.key)!==-1&&Fe({type:"style-lib:remove:usedLibList",payload:{key:Et.key}})}},Cn=()=>{MB.global.popupHelper.confirmAsync({className:"withdraw-sclib-modal",title:"\u64A4\u56DE\u8D44\u6E90",confirmText:"\u64A4\u56DE\u8D44\u6E90",desc:"\u64A4\u56DE\u8D44\u6E90\u4F1A\u5C06\u672C\u6587\u4EF6\u4E2D\u6240\u6709\u8D44\u6E90\u4ECE\u56E2\u961F\u8D44\u6E90\u5E93\u4E2D\u6D88\u5931\uFF0C\u5E76\u4E0E\u5DF2\u5F15\u7528\u8BE5\u8D44\u6E90\u7684\u7EC4\u4EF6\u5168\u90E8\u89E3\u7ED1\u3002",confirmBtnProps:{type:"danger-blue"}}).then(async Et=>{if(Et){const Co=await(0,Qp.OO)(Qe);(Co==null?void 0:Co.result)==="SUCCESS"&&Fe({type:"style-lib:set:attr",payload:{isCurrentProjectSclib:!1}})}})},Mt=()=>{if(Qe.startsWith("mt")){(0,rl.JW)("/com24/details/"+Qe);return}(0,rl.JW)(Qe)};return(0,o.jsx)(o.Fragment,{children:x?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(xh,{children:[(0,o.jsxs)("div",{className:"header",children:[(0,o.jsxs)("div",{className:"left-nav-back-wrap",onClick:lt,children:[(0,o.jsx)("div",{className:"back-icon-box",children:(0,o.jsx)(xt.C,{name:"toolbar/triangle-down"})}),(0,o.jsxs)("div",{className:"back-name",children:[(0,o.jsx)("span",{className:"name",children:(G==null||(a=G.hotAttr)==null?void 0:a.name)||(G==null?void 0:G.name)||F.name}),se&&(0,o.jsx)("span",{className:"space-name",children:he.name})]})]}),(0,o.jsx)("div",{className:"right-content",children:G.key==="local"?(0,o.jsx)("span",{children:"\u5F53\u524D\u6587\u4EF6"}):Xe?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{children:(G==null||(i=G.hotAttr)==null||(i=i.extInfo)==null?void 0:i.addUser)+" \u6DFB\u52A0"}),(0,o.jsx)("button",{className:"solid",onClick:St,children:"\u79FB\u9664"})]}):(0,o.jsx)("button",{className:"blue",onClick:hn,children:"\u6DFB\u52A0"})})]}),(0,o.jsxs)("ul",{className:"content-wrap",onScroll:et,children:[((c=A.get("var"))==null?void 0:c.length)>0&&(0,o.jsxs)("li",{className:"detail-item var",children:[(0,o.jsx)("span",{className:"detail-title",children:"\u53D8\u91CF"}),(0,o.jsx)("span",{className:"detail-nums",children:A.get("var").length})]}),((d=A.get("color"))==null?void 0:d.length)>0&&(0,o.jsxs)("li",{className:"detail-item",children:[(0,o.jsx)("span",{className:"detail-title",children:"\u989C\u8272"}),(0,o.jsx)("ul",{className:"detail-list detail-color-list",children:A.get("color").map((Et,Co)=>{const Pn={fill:"solid",fillIsVisible:!0,solidColor:Et.hotAttr.fill},ro=Pn&&(0,$l.$8)(Pn,{w:200,h:100}),Io=ro&&(0,$l.TQ)(ro);return(0,o.jsx)(gc.A,{content:Ke((0,I0.M)(Et.hotAttr,Io)),direction:"down",delay:500,children:(0,o.jsx)("li",{className:"li-item color-item",children:(0,o.jsx)(M1.I,{ref:R,color:ro,index:Co,solidRenderType:"circle",size:16})})},Et.key)})})]}),((p=A.get("style"))==null?void 0:p.length)>0&&(0,o.jsxs)("li",{className:"detail-item",children:[(0,o.jsx)("span",{className:"detail-title",children:"\u6837\u5F0F"}),(0,o.jsx)("ul",{className:"detail-list detail-style-list",children:A.get("style").map((Et,Co)=>(0,o.jsx)(gc.A,{content:Ke((0,I0.M)(Et.hotAttr,{})),direction:"down",delay:500,children:(0,o.jsxs)("li",{className:"li-item style-item",children:[Et.hotAttr.styleType==="appear"&&(0,o.jsx)(Xp.U,{appearStyle:Et,index:Co,size:40}),Et.hotAttr.styleType==="text"&&(0,o.jsx)(T0.c,{textStyle:Et})]})},Et.key))})]}),((h=A.get("muban"))==null?void 0:h.length)>0&&(0,o.jsxs)("li",{className:"detail-item muban",children:[(0,o.jsx)("span",{className:"detail-title",children:"\u6BCD\u7248"}),(0,o.jsx)("ul",{className:"detail-list detail-muban-list",children:A.get("muban").map(Et=>(0,o.jsx)(gc.A,{content:Ke((0,I0.M)(Et.hotAttr,{})),direction:"down",delay:500,children:(0,o.jsx)("li",{className:"li-item muban-item",children:(0,o.jsx)(G0.Ay,{projectMetaCid:(G==null?void 0:G.key)==="local"?Z.cid:nt,snapshotKey:Et.hotAttr.defaultCanvasKey,isVisible:!0,mode:xd.rY.PNG_CANVAS})})},Et.key))})]})]})]}),(0,o.jsx)("footer",{children:G.key==="local"?xe?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"footer-title",children:"\u5F53\u524D\u8D44\u6E90\u5DF2\u53D1\u5E03"}),(0,o.jsxs)("div",{className:"footer-button-wrap",children:[(0,o.jsx)("button",{className:"solid",onClick:Cn,children:"\u64A4\u56DE\u8D44\u6E90"}),m&&(0,o.jsx)("button",{className:"blue",onClick:Ct,children:"\u53D1\u5E03\u66F4\u65B0"})]})]}):(0,o.jsx)("button",{className:"blue",onClick:Ct,children:"\u53D1\u5E03"}):(0,o.jsx)("button",{className:"solid",onClick:Mt,children:"\u6253\u5F00\u6E90\u6587\u4EF6"})})]}):(0,o.jsx)(E1.f,{className:"loading"})})},P0=e=>{let{onSetCurrentTab:t,onClose:n}=e;const[a,i]=(0,l.useState)("no-change"),[c,d]=(0,l.useState)(),[p,h]=(0,l.useState)(!1),m=(0,r.d4)(Ns.V5),x=(v,A)=>{d(v),i(A)};return(0,o.jsxs)(nf,{children:[m==="home"&&(0,o.jsx)(rf,{onSetCurrentTab:t,canUploadLocal:p,onSetCanUploadLocal:h}),m==="upload"&&(0,o.jsx)(Jf,{onClose:n,onSetVarDetailData:x}),m==="detail"&&(0,o.jsx)(vh,{canUploadLocal:p}),m==="var-detail"&&(0,o.jsx)(lf,{varDetailData:c,type:a})]})};var bh=s(55244);const dp=e=>{var t;let{lib:n,collapseKeySet:a,onSetCollapseKeySet:i,onClose:c}=e;const d=(0,r.d4)(me.eo),p=(0,r.d4)(Ns.nC),[h,m]=(0,l.useState)([]),[x,v]=(0,l.useState)([]),[A,k]=(0,l.useState)([]),[R,F]=(0,l.useState)([]),Z=(0,l.useRef)(null),G=(0,r.wA)();(0,l.useEffect)(()=>{m(n.updateMap.style.filter(ce=>ce.hotAttr.styleType==="color")),v(n.updateMap.style.filter(ce=>ce.hotAttr.styleType!=="color")),k(n.updateMap.var),F(n.updateMap.muban)},[n.updateMap]);const ee=()=>{var ce;MB.notice({text:"\u66F4\u65B0\u4E2D",type:"loading"});const se=p.get(n==null||(ce=n.hotAttr)==null||(ce=ce.extInfo)==null?void 0:ce.flatKey);(0,S1.dB)(se,R);const{flatChgList:he,otherPageFlatChgList:ve,isUpdateBasket:Te}=(0,S1.iJ)({currentPageKey:d,updateList:[...h,...x,...A]});G({type:"entry:widget:change",payload:{flatChgList:he}}),G({type:"style-lib:del:needUpdateLibs",payload:{key:n==null?void 0:n.key}}),sdkStore.updateHotAttrKV(n.key,"extInfo",{...n.hotAttr.extInfo,updateTime:rootSdk.fssCmt.getClockStore().getMtime()}),setTimeout(()=>{sdkStore.updateHotItemBatch(ve)},16),Te&&G({type:"entry:rebuild:screen-widget-tree"}),MB.notice({text:"\u66F4\u65B0\u6210\u529F",type:"success"}),c()};return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("li",{className:"update-content-lib-item",children:[(0,o.jsxs)("div",{className:C()("update-header",{"is-expand":!a.has("local")}),children:[(0,o.jsx)(xt.C,{name:"toolbar/triangle-down",onClick:()=>i("local")}),(0,o.jsxs)("div",{className:"right-content-wrap",children:[(0,o.jsxs)("div",{className:"update-content",children:[(0,o.jsx)("span",{className:"update-title",children:(n==null||(t=n.hotAttr)==null?void 0:t.name)+" \u8D44\u6E90\u5E93\u6709\u4EE5\u4E0B\u66F4\u65B0"}),(0,o.jsx)("span",{className:"update-time-desc",children:n.updateUser+" \u5728"+(0,bh.zW)(n.updateTime)+"\u66F4\u65B0"})]}),(0,o.jsx)("button",{className:"blue solid",onClick:ee,children:"\u66F4\u65B0"})]})]}),!a.has("local")&&(0,o.jsxs)(o.Fragment,{children:[(n==null?void 0:n.desc)&&(0,o.jsx)("span",{className:"update-desc",children:n==null?void 0:n.desc}),(0,o.jsxs)("ul",{className:"update-content-lib-list",children:[A.length>0&&(0,o.jsxs)("li",{className:"var",children:[(0,o.jsxs)("div",{className:"update-left-content",children:[(0,o.jsx)("div",{className:"var-view-item margin-right-16",children:(0,o.jsx)(xt.C,{name:"setting_panel/libPanel/var",size:20})}),(0,o.jsx)("span",{className:"update-ref-title",children:"\u53D8\u91CF"})]}),(0,o.jsxs)("div",{className:"update-right-content",children:[(0,o.jsx)("span",{className:"nums",children:A.length+"\u4E2A"}),(0,o.jsx)(xt.C,{name:"toolbar/triangle-down",className:"triangle-down"})]})]}),h.map((ce,se)=>{const he={fill:"solid",fillIsVisible:!0,solidColor:ce.hotAttr.fill},ve=he&&(0,$l.$8)(he,{w:200,h:100});return(0,o.jsxs)("li",{children:[(0,o.jsx)("div",{className:"color-view-item margin-right-16",children:(0,o.jsx)(M1.I,{ref:Z,color:ve,solidRenderType:"circle",size:28,index:se})}),(0,o.jsx)("span",{className:"update-ref-title",children:ce.hotAttr.name})]},ce.key)}),x.map((ce,se)=>(0,o.jsxs)("li",{children:[ce.hotAttr.styleType==="appear"&&(0,o.jsx)("div",{className:"appear-view-item-box margin-right-16",children:(0,o.jsx)(Xp.U,{appearStyle:ce,size:28,index:se})}),ce.hotAttr.styleType==="text"&&(0,o.jsx)(T0.c,{className:"margin-right-16",textStyle:ce}),(0,o.jsx)("span",{className:"update-ref-title",children:ce.hotAttr.name})]},ce.key)),R.map(ce=>{var se;return(0,o.jsxs)("li",{className:"muban",children:[(0,o.jsx)("div",{className:"muban-img-box margin-right-16",children:(0,o.jsx)(G0.Ay,{projectMetaCid:n==null||(se=n.hotAttr)==null||(se=se.extInfo)==null?void 0:se.flatKey,snapshotKey:ce.hotAttr.defaultCanvasKey,isVisible:!0,mode:xd.rY.PNG_CANVAS})}),(0,o.jsx)("span",{className:"update-ref-title",children:ce.hotAttr.name})]},ce.key)})]})]})]},n.key)})},bd=M.Ay.ul.withConfig({displayName:"style__StyledUpdateContentPanel",componentId:"sc-ja794s-0"})(["height:550px;overflow-y:scroll;.empty-content{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;padding-top:160px;.empty-name{margin:16px 0;color:",";}.loading-button{width:20px;height:20px;}}li.update-content-lib-item{padding-bottom:8px;border-bottom:1px solid ",";.update-header{height:68px;display:flex;align-items:center;padding:0 20px;&.is-expand{.svg-icon{transform:rotate(0);}}.svg-icon{cursor:pointer;transform:rotate(-90deg);}.right-content-wrap{flex:1;display:flex;justify-content:space-between;margin-left:14px;.update-content{display:flex;flex-direction:column;.update-title{color:",";font-weight:500;max-width:450px;",";}.update-time-desc{color:",";}}}}.update-desc{color:",";display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;margin:8px 20px 16px 20px;}.update-content-lib-list{li{height:80px;padding:0 20px;display:flex;align-items:center;.margin-right-16{margin-right:16px;}&.var{justify-content:space-between;}&.muban{.muban-img-box{width:64px;height:64px;border-radius:6px;background:",";border:1px solid ",";overflow:hidden;padding:4px;}img{object-fit:contain;width:100%;height:100%;}}.var-view-item,.color-view-item,.appear-view-item-box{width:64px;height:64px;border-radius:6px;background:",";border:1px solid ",";display:flex;align-items:center;justify-content:center;}.thumbnail-wrapper:not(.appear-ref-view-item):not(.has-opacity){width:28px;height:28px;border-radius:28px;&::before,.thumbnail{width:28px;height:28px;border-radius:28px;}}.appear-view-item-box{.appear-ref-view-item.list{width:28px;height:28px;border-radius:4px;&.has-opacity.rect{margin-right:0;}}}.view-item{width:64px;height:64px;border-radius:6px;background:",";border:1px solid ",";flex:0 0 64px;}.update-ref-title{color:",";font-weight:500;",";max-width:450px;}.update-right-content,.update-left-content{display:flex;align-items:center;svg.triangle-down{transform:rotate(-90deg);}.nums{color:",";margin-right:10px;}}}}}.loading{width:50px;height:50px;}"],e=>e.theme.color_text_L2,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,za.L9,e=>e.theme.color_text_L3,e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_01,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_01,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_01,e=>e.theme.color_text_L1,za.L9,e=>e.theme.color_text_L3),wh=e=>{let{onClose:t}=e;const[n,a]=(0,l.useState)(new Set),i=(0,r.d4)(Ns.$Y),c=(0,r.d4)(Ns.eP),d=(0,r.d4)(te.O4),p=(0,r.wA)();(0,l.useEffect)(()=>{p({type:"entry:libStyle:manage:set:needUpdateLibs"})},[p]);const h=x=>{const v=new Set(n);n.has(x)?v.delete(x):v.add(x),a(v)},m=async()=>{await p({type:"style-lib:set:attr",payload:{isLoadedNeedUpdateLibs:!1}});const x=Date.now();p({type:"entry:libStyle:manage:set:needUpdateLibs",payload:{startTime:x}})};return(0,o.jsx)(bd,{children:i?c.length===0?(0,o.jsxs)("div",{className:"empty-content",children:[(0,o.jsx)("img",{src:"/mb-proto2/images/lib/color-empty-"+d+".svg"}),(0,o.jsx)("span",{className:"empty-name",children:"\u6682\u65E0\u53EF\u66F4\u65B0\u7684\u6837\u5F0F"}),(0,o.jsx)("button",{className:"solid",onClick:m,children:"\u5237\u65B0"})]}):c.map(x=>(0,o.jsx)(dp,{lib:x,collapseKeySet:n,onSetCollapseKeySet:h,onClose:t},x.key)):(0,o.jsx)(E1.f,{className:"loading"})})},dm=M.Ay.ul.withConfig({displayName:"styled__StyledLibCard",componentId:"sc-1jyoeyf-0"})(["flex:1;display:flex;flex-wrap:wrap;.lib-card{display:flex;flex-direction:column;color:",";padding:6px 6px 8px 6px;position:relative;border-radius:10px;height:171px;width:190px;cursor:pointer;&:hover{background:",";.img-box{&::before{display:block;}}button,.name-wrap .arrow-left{visibility:visible;}}.img-box{width:177px;height:133px;border-radius:8px;border:1px solid ",";background:",";position:relative;overflow:hidden;img{width:100%;height:100%;}&::before{content:'';display:none;position:absolute;top:0;left:0;width:100%;height:100%;background:",";backdrop-filter:blur(4px);}}.name-wrap{margin-top:8px;line-height:16px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;}.arrow-left{visibility:hidden;flex:0 0 16px;margin-left:8px;.svg-icon{width:6px;height:10px;color:",";}}}button{position:absolute;left:52px;top:55px;width:80px;visibility:hidden;}.added-flag{padding:3px 6px;border-radius:4px;background:",";position:absolute;top:16px;left:16px;}}"],e=>e.theme.color_text_L1,e=>e.theme.color_btn_secondary_hover,e=>e.theme.color_bg_border_02,e=>e.theme.color_bg_canvas,e=>e.theme.color_slider_normal,e=>e.theme.color_text_L3,e=>e.theme.color_bg_white),Jp=M.Ay.div.withConfig({displayName:"styled__StyledEmpty",componentId:"sc-1jyoeyf-1"})(["display:flex;flex-direction:column;align-items:center;padding-top:120px;flex:1;img{width:88px;}span{color:",";margin-top:16px;margin-bottom:4px;}a{color:",";&:hover{color:",";}}button{padding:6px 16px;font-weight:500;margin-top:16px;}"],e=>e.theme.color_text_L2,e=>e.theme.color_text_link_normal,e=>e.theme.color_text_link_hover),qp=e=>{let{libList:t,onHandleToDetail:n,onAddLib:a,onSetCurrentTab:i}=e;const c=(0,r.d4)(Ns.oo),d=(0,r.d4)(Ns.xg),p=(0,r.d4)(me.HW),h=(0,r.wA)();if(t.length===0)return(0,o.jsx)(pm,{onSetCurrentTab:i});const m=async(v,A)=>{v.stopPropagation(),await(a==null?void 0:a(A==null?void 0:A.sclib_cid));const k=(0,S1.$t)(A,p);h({type:"style-lib:add:addedLibList",payload:k}),d.findIndex(R=>R.key===k.key)!==-1&&h({type:"style-lib:remove:usedLibList",payload:{key:k.key}})},x=async v=>{const A=c.find(k=>k.hotAttr.extInfo.projectCid===v.cid)||v;await(n==null?void 0:n(A==null?void 0:A.sclib_cid)),h({type:"style-lib:set:attr",payload:{currentManagePanel:"detail",detailLib:A}})};return(0,o.jsx)(dm,{children:t.map(v=>{var A;const k=c.findIndex(R=>R.hotAttr.extInfo.projectCid===v.cid&&!R.hotAttr.extInfo.isRemove)!==-1;return(0,o.jsxs)("li",{className:"lib-card",onClick:()=>x(v),children:[(0,o.jsx)("div",{className:"img-box",children:(0,o.jsx)("img",{src:v!=null&&v.is_custom_cover?v==null?void 0:v.custom_cover:(A=v==null?void 0:v.cover)!=null?A:"/mb-proto2/images/lib/lib-emtry.png",onError:R=>{R.target.src="/mb-proto2/images/lib/lib-emtry.png",R.target.onerror=null}})}),(0,o.jsxs)("div",{className:"name-wrap",children:[(0,o.jsx)("span",{children:v.name}),(0,o.jsx)(cl.A,{name:"design/arrow/right",className:"arrow-left",iconBoxSize:16})]}),k&&(0,o.jsx)("span",{className:"added-flag",children:"\u5DF2\u6DFB\u52A0"}),!k&&(0,o.jsx)("button",{className:"blue",onClick:R=>m(R,v),children:"\u6DFB\u52A0"})]},v.key)})})},pm=e=>{let{onSetCurrentTab:t}=e;const n=(0,r.d4)(te.O4),a=(0,r.wA)(),i=()=>{t==null||t("recommend"),a({type:"style-lib:set:currentManagePanel",payload:"home"})},c=()=>(0,rl.JW)("/hc/articles/466","_blank","noreferrer");return(0,o.jsxs)(Jp,{children:[(0,o.jsx)("img",{src:"/mb-proto2/images/lib/team-libs-empty-"+n+".png"}),(0,o.jsx)("span",{children:"\u5F53\u524D\u7A7A\u95F4\u6682\u65E0\u53EF\u7528\u7684\u8D44\u6E90\u5E93"}),!ENV.IS_ON_PREMISES&&(0,o.jsx)("a",{onClick:c,children:"\u5982\u4F55\u521B\u5EFA\u8D44\u6E90\u5E93\uFF1F"}),!ENV.IS_ON_PREMISES&&(0,o.jsx)("button",{className:"solid",onClick:i,children:"\u53D1\u73B0\u7CBE\u9009\u8D44\u6E90\u5E93"})]})},df=M.Ay.div.withConfig({displayName:"style__StyledRecommendContentPanel",componentId:"sc-1bdhyss-0"})(["padding:10px 12px;height:550px;width:100%;display:flex;flex-direction:column;.header{height:32px;display:flex;align-items:center;justify-content:space-between;color:",";padding-left:6px;flex:0 0 32px;.right-content{color:",";display:flex;align-items:center;a{margin-right:10px;color:",";}svg.triangle-down{transform:rotate(-90deg);}}}"],e=>e.theme.color_text_L1,e=>e.theme.color_text_link_normal,e=>e.theme.color_text_link_normal),um=()=>{const e=(0,r.d4)(Ns.V5),t=(0,r.d4)(Ns.Qe),n=(0,r.d4)(Ns.nC),a=(0,r.wA)(),i=async p=>{const h=n.get(p);if(h)return h;const{sdkStore:m}=await(0,Yp.O3)({flpakKey:p});return a({type:"style-lib:set:libSdkStoreMap",payload:{key:p,value:m}}),m},c=async p=>{p&&(await i(p),a({type:"entry:libStyle:update:mubanPanel:libMubanTreeMap",payload:{libFlatKey:p}}))},d=async p=>{var h;p&&(await i(p),a({type:"entry:libStyle:update:mubanPanel:libMubanTreeMap",payload:{libFlatKey:p}}),xl.U4.protoMasterUseTrack((h=MB)==null||(h=h.user)==null?void 0:h.id,"\u7CBE\u9009\u8D44\u6E90\u5E93","\u6DFB\u52A0"))};return(0,o.jsxs)(o.Fragment,{children:[e==="home"&&(0,o.jsxs)(df,{children:[(0,o.jsx)("div",{className:"header",children:(0,o.jsx)("span",{className:"title",children:"\u7CBE\u9009\u8D44\u6E90\u5E93"})}),(0,o.jsx)(qp,{libList:t,onHandleToDetail:c,onAddLib:d})]}),e==="detail"&&(0,o.jsx)(vh,{})]})},pf=M.Ay.div.withConfig({displayName:"style__StyledTeamContentPanel",componentId:"sc-1rpnysk-0"})(["padding:10px 12px;height:550px;width:100%;display:flex;flex-direction:column;.space-title{height:32px;display:flex;align-items:center;color:",";padding-left:6px;}ul{overflow:scroll;flex:none;}"],e=>e.theme.color_text_L1),uf=e=>{let{onSetCurrentTab:t}=e;const n=(0,r.d4)(Ns.V5),a=(0,r.d4)(Ns.TP),i=(0,r.d4)(Ns.nC),c=(0,r.d4)(me.wA),d=(0,r.d4)(me.m1),p=(0,r.wA)(),h=async v=>{const A=i.get(v);if(A)return A;const{sdkStore:k}=await(0,Yp.tr)({flpakKey:v});return p({type:"style-lib:set:libSdkStoreMap",payload:{key:v,value:k}}),k},m=async v=>{v&&(await h(v),p({type:"entry:libStyle:update:mubanPanel:libMubanTreeMap",payload:{libFlatKey:v}}))},x=async v=>{var A;v&&(await h(v),p({type:"entry:libStyle:update:mubanPanel:libMubanTreeMap",payload:{libFlatKey:v}}),xl.U4.protoMasterUseTrack((A=MB)==null||(A=A.user)==null?void 0:A.id,"\u56E2\u961F\u8D44\u6E90","\u6DFB\u52A0"))};return(0,o.jsxs)(o.Fragment,{children:[n==="home"&&(0,o.jsxs)(pf,{children:[(0,o.jsx)("div",{className:"space-title",children:c?d.name:"\u4E2A\u4EBA\u7A7A\u95F4"}),(0,o.jsx)(qp,{libList:a,onHandleToDetail:m,onAddLib:x,onSetCurrentTab:t})]}),n==="detail"&&(0,o.jsx)(vh,{})]})},hm=window.innerWidth/2-760/2,hf=74,qf=e=>{let{onClose:t,activeTab:n="local"}=e;const[a,i]=(0,l.useState)(hm),[c,d]=(0,l.useState)(hf),[p,h]=(0,l.useState)(n),m=(0,r.d4)(Ns.V5),x=(0,r.wA)(),v=(R,F)=>{i(R),d(F)},A=R=>{x({type:"modal:update:state",payload:{isDragOrResizeModal:R}})},k=()=>{(m==="upload"||m==="var-detail")&&p==="local"?x({type:"style-lib:set:currentManagePanel",payload:m==="var-detail"?"upload":"home"}):(x({type:"style-lib:reset:manage:attr"}),t())};return(0,Ki.createPortal)((0,o.jsx)(Qa.A,{position:{left:a,top:c},dragContainer:"style-lib-manage-modal",onMove:v,onMoveStart:()=>A(!0),onMoveEnd:()=>A(!1),children:(0,o.jsxs)(qm,{id:"style-lib-manage-modal",className:m,children:[(0,o.jsxs)("header",{type:"draggable",children:[(0,o.jsx)("span",{className:"title",children:m==="upload"?"\u53D1\u5E03\u8D44\u6E90\u5E93":"\u8D44\u6E90\u5E93\u7BA1\u7406"}),(0,o.jsx)("div",{className:"right-content",children:(0,o.jsx)(xt.C,{className:"times-icon",name:"general/times",size:24,onClick:k})})]}),(0,o.jsxs)("div",{className:"content",children:[!((m==="upload"||m==="var-detail")&&p==="local")&&(0,o.jsx)(tf,{currentTab:p,onSetCurrentTab:h}),(0,o.jsx)("div",{className:"right-panel",children:(0,o.jsxs)(o.Fragment,{children:[p==="local"&&(0,o.jsx)(P0,{onSetCurrentTab:h,onClose:t}),p==="update"&&(0,o.jsx)(wh,{onClose:t}),p==="team"&&(0,o.jsx)(uf,{onSetCurrentTab:h}),p==="recommend"&&(0,o.jsx)(um,{})]})})]})]})}),(0,I0.w)())};var mf=s(80771),I1=s(47424),$p=s(29321),Ch=s(82924),wd=s(94586),$f={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const ff=$f;var Sh=s(40080),gf=function(t,n){return l.createElement(Sh.A,(0,wd.A)({},t,{ref:n,icon:ff}))},K=l.forwardRef(gf);const D=K;var z=s(76241),X=s(53034),ie=s(91834),ue=s(59895),oe=s(94815),be=s(64816);const Ae=(0,l.createContext)(null);var Ne=s(63296),Be=s(59063),Ge=s(75586),it=s(21425),At=s(23653),zt=function(t){var n=t.activeTabOffset,a=t.horizontal,i=t.rtl,c=t.indicator,d=c===void 0?{}:c,p=d.size,h=d.align,m=h===void 0?"center":h,x=(0,l.useState)(),v=(0,X.A)(x,2),A=v[0],k=v[1],R=(0,l.useRef)(),F=l.useCallback(function(G){return typeof p=="function"?p(G):typeof p=="number"?p:G},[p]);function Z(){At.A.cancel(R.current)}return(0,l.useEffect)(function(){var G={};if(n)if(a){G.width=F(n.width);var ee=i?"right":"left";m==="start"&&(G[ee]=n[ee]),m==="center"&&(G[ee]=n[ee]+n.width/2,G.transform=i?"translateX(50%)":"translateX(-50%)"),m==="end"&&(G[ee]=n[ee]+n.width,G.transform="translateX(-100%)")}else G.height=F(n.height),m==="start"&&(G.top=n.top),m==="center"&&(G.top=n.top+n.height/2,G.transform="translateY(-50%)"),m==="end"&&(G.top=n.top+n.height,G.transform="translateY(-100%)");return Z(),R.current=(0,At.A)(function(){var ce=A&&G&&Object.keys(G).every(function(se){var he=G[se],ve=A[se];return typeof he=="number"&&typeof ve=="number"?Math.round(he)===Math.round(ve):he===ve});ce||k(G)}),Z},[JSON.stringify(n),a,i,m,F]),{style:A}};const qt=zt;var _n={width:0,height:0,left:0,top:0};function $n(e,t,n){return(0,l.useMemo)(function(){for(var a,i=new Map,c=t.get((a=e[0])===null||a===void 0?void 0:a.key)||_n,d=c.left+c.width,p=0;p0&&(ee(Ke),A(nt),(0,Zs.a0)(V5,Ke,Zs.qW.Number),(0,Zs.a0)(Yv,nt,Zs.qW.Number)),Xe>d&&Xe x&&(i=x),i /g,"").replace(/<\/p>/g,"\n"),R=k&&k.replace(/<[^>]+>/ig,"");h=zae(e,R),m=R}e.table_cell_text&&(i=e.table_cell_text,h={fontStyle:e.fontStyle,letterSpacing:e.padding,lineHeight:e.lineHeight,paraSpacing:0,fontSize:e.fontSize,color:e.color,length:i.length,horizontalAlign:e.ha,verticalAlign:e.va},m=i);let x;if(e.fill){const k=e==null?void 0:e.fill,R=(0,$l.$8)(k,{w:e.w,h:e.h});switch(k==null?void 0:k.fill){case"linearGradient":x=[{type:"linear",opacity:"1",value:(0,bk.l$)(R),gradient:{color_stops:k.knobList.map(F=>({color:(0,ul.t0)(F.color)}))}}];break;case"radialGradient":x=[{type:"radial",opacity:"1",value:(0,bk.rp)(R),gradient:{color_stops:k.knobList.map(F=>({color:(0,ul.t0)(F.color)}))}}];break;case"solid":x=[{value:(0,ul.t0)(e==null||(n=e.fill)==null?void 0:n.solidColor)}];break;default:x=[{value:"transparent"}]}}if(e.table_cell_background&&(x=[{value:(0,ul.t0)(e.table_cell_background)}]),e.type===$.x.WTriangleB||e.type===$.x.WTriangleTL){var v,A;x=e!=null&&(v=e.fill)!=null&&v.fillIsVisible?[{value:(0,ul.t0)(e==null||(A=e.fill)==null?void 0:A.solidColor)}]:[]}return{displayName:a,textStyles:h,inspectText:m,widgetText:i,bgColors:x}},Hae=(e,t)=>{const{refVars:n}=e;if(!n)return;let a,i;if(e.table&&t){var c;const{table:R}=e,{x:F,y:Z}=t,G=R[Z][F],ee=n==null||(c=n.cells)==null?void 0:c[G];a=ee==null?void 0:ee.data,i=ee==null?void 0:ee.style}else a=(0,_l.m5)(e),i=(0,_l.xu)([{hotAttr:e}]);const{borderRadius:d,opacity:p,shadow:h,border:m,w:x,h:v,r:A}=n,k=(0,_l.RL)({opacity:p,text:a,textStyles:i,w:x,h:v,r:A});if(typeof d=="object"){const{radiusTL:R,radiusTR:F,radiusBR:Z,radiusBL:G}=(0,_l.RL)(d);k.radius=[R,F,Z,G]}else d&&(k.radius=(0,_l.sU)(d));if(h&&(k.shadows=[(0,_l.RL)(h)]),m){const{bdrWidth:R}=(0,_l.RL)(m);k.borders=[{bdrWidth:R}]}return k},S8={default:{unit:"px",ratio:1},iphone:{unit:"pt",ratio:1},android:{unit:"dp",ratio:1}},Gae=e=>{if(!e)return S8.default;const{device:t}=e;let n="default";return Object.entries(Jc.Am).forEach(a=>{let[i,c]=a;c.includes(t)&&(n=i)}),S8[n]||S8.default},Zae=(0,I.Mz)([q._b,q.IL,tt.p$,De.zg,me.Ur,te.O4,me.X_,te.AM],(e,t,n,a,i,c,d,p)=>{const h=n[0]?a.selectCellInfo&&a.selectCellInfo.key===n[0]?{key:a.selectCellInfo.key,extra:{x:a.selectCellInfo.x,y:a.selectCellInfo.y}}:{key:n[0]}:null,m=t?a.hoverCellInfo&&a.hoverCellInfo.key===t?{key:a.hoverCellInfo.key,extra:{x:a.hoverCellInfo.x,y:a.hoverCellInfo.y}}:{key:t}:h&&sdkStore.locUpHotCanvasKey(h.key)?{key:sdkStore.locUpHotCanvasKey(h.key)}:null;return{enabled:e,hoveredWidgetInfo:m,selectedWidgetInfo:h,viewportScale:d/100,theme:c,currentScreen:i,currPageKey:(i==null?void 0:i.cid)||"",useNativeEyedropper:p}}),Kae=(0,r.Ng)(Zae)(e=>{let{enabled:t,hoveredWidgetInfo:n,selectedWidgetInfo:a,viewportScale:i,theme:c,currentScreen:d,currPageKey:p,useNativeEyedropper:h,dispatch:m}=e;const x=(0,l.useCallback)(()=>{const A=Gae(d);return{enabled:t,hoveredWidgetInfo:n,selectedWidgetInfo:a,viewportScale:i,theme:c,currPageKey:p,useNativeEyedropper:h,initialUnitRatio:A,onPickColor:()=>m({type:"entry:clear:selection"}),openDownloadPluginModal:()=>m({type:"modal:update:state",payload:{colorPickerDownloadModal:{isOpen:!0}}}),sdk:sdkStore,measurementToolContainerSelector:"#ro-fe-canvas",toolbarContainerSelector:"#fixed-area",panelContainerSelector:"#inspect-panel",getWidgetInspectStyles:Wae,getWidgetInspectRefVars:Hae}},[t,n,a,i,c,p,h,d,m]),v=Vae(x);return(0,o.jsx)(o.Fragment,{children:v})});var A8=s(58053),Yae=s(33236),Xae=s(78778),Qae=s(1404),Jae=s(12583),qae=s(45796),$ae=s(68818);const ere=(e,t,n)=>{const a=e?new URL(e):new URL("https://embed.diagrams.net"),i=a.searchParams;return i.append("embed","1"),i.append("proto","json"),n&&i.append("configure","1"),t&&Object.keys(t).forEach(c=>{const d=t[c];d!==void 0&&(typeof d=="boolean"?i.append(c,d?"1":"0"):i.append(c,d.toString()))}),a.toString()};function tre(e,t,n){if(e.origin.includes("embed.diagrams.net")||n&&n.includes(e.origin))try{const a=JSON.parse(e.data);if(a.event in t){const i=t[a.event];i&&i(a)}}catch(a){}}const nre=e=>{const t=(k,R)=>{var F;(F=e.current)==null||(F=F.contentWindow)==null||F.postMessage(JSON.stringify({action:k,...R}),"*")};return{load:k=>{t("load",k)},configure:k=>{t("configure",k)},merge:k=>{t("merge",k)},dialog:k=>{t("dialog",k)},prompt:k=>{t("prompt",k)},template:k=>{t("template",k)},layout:k=>{t("layout",k)},draft:k=>{t("draft",k)},status:k=>{t("status",k)},spinner:k=>{t("spinner",k)},exportDiagram:k=>{t("export",k)}}},ore=(0,l.memo)((0,l.forwardRef)((e,t)=>{const{autosave:n=!1,baseUrl:a,urlParameters:i,configuration:c,xml:d,csv:p,exportFormat:h,onAutoSave:m,onSave:x,onClose:v,onLoad:A,onConfigure:k,onDraft:R,onExport:F,onMerge:Z,onPrompt:G,onTemplate:ee}=e,ce=(0,l.useRef)(null),se=nre(ce),he=ere(a,i,!!c),[ve,Te]=(0,l.useState)(!1),[xe,Fe]=(0,l.useState)(!1);return(0,l.useImperativeHandle)(t,()=>({...se}),[se]),(0,l.useEffect)(()=>{let et={};ve&&(d?h==="xmlpng"?et={xmlpng:d}:et={xml:d}:p?et={descriptor:{format:"csv",data:p}}:et={xml:""},et={...et,autosave:n},se.load(et))},[ve,d,p,n,se,h]),(0,l.useEffect)(()=>{const et=Ke=>{tre(Ke,{init:()=>{Te(!0)},load:Qe=>{Fe(!0),A&&A(Qe)},configure:Qe=>{c&&se.configure({config:c}),k&&k(Qe)},autosave:Qe=>{se.exportDiagram({format:"xmlsvg"}),m&&m(Qe)},save:Qe=>{se.exportDiagram({format:h||"xmlsvg",exit:Qe.exit,parentEvent:"save"})},exit:Qe=>{v&&v(Qe)},draft:Qe=>{R&&R(Qe)},export:Qe=>{x&&x({event:"save",xml:Qe.data,parentEvent:Qe.message.parentEvent||"export"}),F&&F(Qe),Qe.message.exit&&v&&v({event:"exit",modified:!0,parentEvent:Qe.message.parentEvent||"export"})},merge:Qe=>{Z&&Z(Qe)},prompt:Qe=>{G&&G(Qe)},template:Qe=>{ee&&ee(Qe)}},a)};return window.addEventListener("message",et),()=>{window.removeEventListener("message",et)}},[]),(0,o.jsxs)("div",{className:"diagrams-iframe-container",children:[(0,o.jsx)("iframe",{className:"diagrams-iframe",src:he,ref:ce,title:"\u58A8\u5200\u7ED8\u56FE",frameBorder:"0",style:{opacity:xe?1:0}}),!xe&&(0,o.jsx)("div",{className:"loading-wrapper",children:(0,o.jsx)(E1.T,{className:"iframe-loading"})})]})}));var k8=s(71217);const are=(0,M.Ay)(ci.H).withConfig({displayName:"styles__CheckSizeModalModal",componentId:"sc-1b2486b-0"})(["width:400px !important;.content{color:",";}.cancel-btn{color:"," !important;&:hover,&:active{background:none !important;color:"," !important;}}"],e=>e.theme.color_text_L1,e=>e.theme.color_text_L3,e=>e.theme.color_text_L1),rre=(0,M.DU)(["#IBOT_MODAL_ROOT{.new-model-portal.check-size-modal-portal{z-index:2001;}}"]),ire=e=>{let{isOpen:t,onCancel:n,onConfirm:a}=e;return(0,o.jsxs)(are,{title:"\u8D85\u9650\u63D0\u9192",isOpen:t,cancelText:"\u4E0D\u4FDD\u5B58\u9000\u51FA",confirmText:"\u786E\u5B9A",onCancel:n,cancelBtnProps:{type:"text"},onConfirm:a,portalClassName:"check-size-modal-portal",children:[(0,o.jsx)("p",{className:"content",children:"\u6587\u4EF6\u5927\u5C0F\u8D85\u9650\u65E0\u6CD5\u4FDD\u5B58\uFF0C\u8BF7\u51CF\u5C11\u7EC4\u4EF6\u540E\u91CD\u65B0\u4FDD\u5B58"}),(0,o.jsx)(rre,{})]})},sre=M.Ay.div.withConfig({displayName:"styles__StyledMbDrawioContainer",componentId:"sc-1cq5nu-0"})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:2000;background:",";.header{height:30px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:12px;z-index:1;width:100%;position:absolute;.left{color:",";font-size:16px;font-weight:600;}.save-close-btn{display:flex;align-items:center;height:28px;padding:0 15px;background:",";border-radius:6px;font-size:13px;font-weight:500;color:",";cursor:pointer;white-space:nowrap;margin-right:12px;position:absolute;top:53px;right:54px;&:hover{background:",";}&:active{background:",";}}}.diagrams-iframe-container{width:100%;height:100%;overflow:hidden;position:relative;margin-top:18px;}.diagrams-iframe{width:100%;height:100%;border:none;.geMenubarContainer{margin-left:20px;}}.loading-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;.iframe-loading{width:100px;}}"],e=>e.theme.color_bg_canvas,e=>e.theme.color_text_L1,e=>e.theme.color_btn_primary_normal,e=>e.theme.color_text_btn,e=>e.theme.color_btn_primary_hover,e=>e.theme.color_btn_primary_clicked),Zf={width:200,height:200},V3=e=>!(e!=null&&e.length&&e.length/1024>600),lre=()=>{var e;const t=(0,r.wA)(),n=(0,r.d4)(te.O4),a=(0,r.d4)(me.Ur),i=(0,l.useRef)(null),c=(0,r.d4)(me.q6),d=(c==null?void 0:c.editType)==="newWidget",p=(0,l.useRef)(null),[h,m]=(0,l.useState)(!1),[x,v]=(0,l.useState)(!1),A=ENV.IS_ON_PREMISES?window.location.origin+"/mb-drawio/v26.2.8/index.html":void 0,k=(0,l.useMemo)(()=>({lang:"zh",ui:n==="dark"?"dark":void 0,saveAndExit:!1,noSaveBtn:!0,noExitBtn:!0}),[n]);(0,l.useEffect)(()=>{const he=window.onbeforeunload;return window.onbeforeunload=()=>{if(p.current||rootSdk.hasSave())return I18N.dPages.data_lost_warning},()=>{window.onbeforeunload=he,v(!1)}},[]);const R=(0,Bg.qK)(he=>{p.current=he,V3(he.data)||MB.notice({text:"\u6587\u4EF6\u5927\u5C0F\u5DF2\u8D85\u9650\uFF0C\u65B0\u589E\u5185\u5BB9\u65E0\u6CD5\u4FDD\u5B58\uFF0C\u8BF7\u51CF\u5C11\u591A\u4F59\u7EC4\u4EF6",type:"warning"})}),F=()=>{var he;if(!V3((he=p.current)==null?void 0:he.data)){v(!0);return}Z()},Z=()=>{if(t({type:"set:current:drawio:editor:item",payload:{hotItem:null}}),m(!1),v(!1),xl.U4.addDrawIOToCanvasTrack(d?"\u65B0\u5EFA":"\u66F4\u65B0"),!d&&!p.current){t(Le.GO.select([c.key]));return}if(!d){var he;const{height:xe,width:Fe}=p.current.bounds;if(xe===0&&Fe===0){t({type:"entry:widget:change",payload:{flatChgList:[{key:c.key,hotAttr:{xmlData:""}}]}}),p.current=null,t(Le.GO.select([c.key])),G();return}const et=(0,k8.S$)({height:xe,width:Fe},{height:c.hotAttr.h,width:c.hotAttr.w}),Ke=V3(p.current.data)?p.current.data:(c==null||(he=c.hotAttr)==null?void 0:he.xmlData)||"",Qe=[{key:c.key,hotAttr:{xmlData:Ke,h:et.height,w:et.width}}];p.current=null,t({type:"entry:widget:change",payload:{flatChgList:Qe}}),t(Le.GO.select([c.key])),G();return}const ve=(0,fp.gu)({type:"wGraph",screen:a});if(!p.current||p.current.bounds.height===0&&p.current.bounds.width===0||!V3(p.current.data)){(0,$a.Q7)([{...ve,xmlData:"",h:Zf.height,w:Zf.height}],Zf.width,Zf.height),G();return}const Te=(0,k8.S$)({height:p.current.bounds.height,width:p.current.bounds.width},Zf);(0,$a.Q7)([{...ve,xmlData:p.current.data,h:Te.height,w:Te.width}],Te.width,Te.height),G(),p.current=null},G=()=>{MB.global.experienceLoginModalHelper("isSave")||MB.action("entry:start:saving")},ee=(0,Bg.qK)(()=>{m(!0)}),ce=()=>{Z()},se=()=>{v(!1)};return c?(0,Ki.createPortal)((0,o.jsxs)(sre,{children:[(0,o.jsx)("div",{className:"header",children:(0,o.jsx)("div",{className:"right",children:h&&(0,o.jsx)("div",{className:"save-close-btn",onClick:F,children:"\u4FDD\u5B58\u5E76\u9000\u51FA"})})}),(0,o.jsx)(ore,{ref:i,autosave:!0,xml:(0,k8.Bf)((e=c.hotAttr)==null?void 0:e.xmlData)||"",baseUrl:A,onExport:R,urlParameters:k,exportFormat:"xmlsvg",onLoad:ee}),(0,o.jsx)(ire,{isOpen:x,onCancel:ce,onConfirm:se})]}),document.body):null};class cre extends l.PureComponent{constructor(t){super(t),(0,B.A)(this,"setElementRef",n=>this.$element=n),(0,B.A)(this,"handleFullScreenChange",()=>{if(A8.A.isFullscreen){(0,Bf.gh)()&&setTimeout(()=>MB.commonGuideHelper.tryToShowGuide(Va.c.INTER_SWITCHABLE_VIEW_MODE_OV_TOGGLE_PANE_BTN),1e3);return}const{dispatch:n}=this.props;n(Le.GO.toggleFullScreenMode(!1)),n({type:"entry:toolbar:restore:leftrightpane"}),n({type:"entry:update:mode:viewType"}),n(Le.GO.toggleHandMode(!1)),MB.commonGuideHelper.closeGuide(Va.c.INTER_SWITCHABLE_VIEW_MODE_OV_TOGGLE_PANE_BTN),MB.commonGuideHelper.markGuideAsRead(Va.c.INTER_SWITCHABLE_VIEW_MODE_OV_TOGGLE_PANE_BTN)}),(0,B.A)(this,"handleBeforeUnload",()=>{this.props.dispatch({type:"entry:reset:dragging:state"})}),(0,B.A)(this,"handleResize",()=>{const{dispatch:n}=this.props;n({type:"entry:update:viewport:rect"}),n({type:"entry:observe:dom:left-panel-width"}),n({type:"entry:observe:dom:right-panel-width"})}),t.dispatch({type:"entry:update:toolbar"}),t.dispatch({type:"entry:update:ui:by:preference"}),t.dispatch({type:"entry:update:ui:by:iconinfo"}),MB.clientX=0,MB.clientY=0}componentDidMount(){var t;const{onlyView:n}=this.props,a=(0,Bf.OB)();(!n||n&&a)&&(t=np.A.getFlpakSizeInfo())!=null&&t.isFlpakSizeWarn&&this.props.dispatch({type:"modal:update:state",payload:{flpakSizeWarnModal:{isOpen:!0}}}),window.addEventListener("dragover",this.preventDefault),window.addEventListener("drop",this.preventDefault),window.addEventListener("contextmenu",this.preventDefault),window.addEventListener("beforeunload",this.handleBeforeUnload),this.$element.addEventListener("wheel",this.handleWheel,{passive:!1}),A8.A.on("change",this.handleFullScreenChange),new URLSearchParams(location.hash.replace(/^#/,"")).get("version")==="reset"&&(MB.notice({text:I18N.__App__.version_toast_reset_success}),window.history.replaceState(void 0,void 0,"#")),!n&&document.addEventListener("paste",i=>{const{isShallowEditText:c}=this.props;if(i.target.className.includes("batch-set-content-area")||MB.f.editingRichText&&!c)return;const{isEditingComment:d}=this.props;d||zn.X.query.getIsShallowEditing((0,kl.dP)())||MB.action("entry:prepare:paste:by:shortcut",{e:i})}),(0,j1.KA)(),(0,j1.BG)()&&(0,j1.sg)("currentTheme",{theme:this.props.theme}),window.addEventListener("popstate",i=>{location.pathname.startsWith(Rf.o$+"/")&&location.reload()}),pre(),xl.U4.protoEditorLoadSuccessTrack(MB.user.id),n||ure(this.props.dispatch)}componentWillUnmount(){window.removeEventListener("dragover",this.preventDefault),window.removeEventListener("drop",this.preventDefault),window.removeEventListener("contextmenu",this.preventDefault),window.removeEventListener("beforeunload",this.handleBeforeUnload),A8.A.off("change",this.handleFullScreenChange),this.$element.removeEventListener("wheel",this.handleWheel,{passive:!1})}preventDefault(t){t.preventDefault()}handleWheel(t){(t.ctrlKey||t.metaKey)&&t.preventDefault()}render(){const{theme:t,isShowSharingManager:n,isDeleteRulerLine:a,onlyView:i,isCommunityPreview:c,isEmbedV2Preview:d,fullScreenMode:p}=this.props,h=i?!(d&&!p):!p,m=!(c&&!p),x=i?c||d?_f.xO:_f.tt:_f.xz;return(0,o.jsx)(M.NP,{theme:bg.A[t],children:(0,o.jsxs)(w.D.Provider,{value:t,children:[(0,o.jsxs)(Qae.n,{ref:this.setElementRef,className:C()({isDeleteRulerLine:a,isEmbedV2Preview:d}),children:[i?(0,o.jsx)(Jae.VW,{sheet:x,viewMode:["read_only","inspect"]}):(0,o.jsx)(j.NH,{sheet:x}),m&&(0,o.jsx)(O$,{}),(0,o.jsxs)("div",{className:"main-content",children:[(0,o.jsx)(Cne.A,{}),h&&(0,o.jsx)(F$.D,{}),(0,o.jsxs)("main",{className:"mb-viewport",children:[(0,o.jsx)(wne.A,{}),(0,o.jsx)(y.A,{onResize:this.handleResize})]}),(0,o.jsx)(vne,{})]}),(0,o.jsx)(ZQ,{}),(0,o.jsx)(lre,{}),n&&(0,o.jsx)(_ne,{}),(0,o.jsx)(Kae,{})]}),!(0,$ae.FM)()&&(0,o.jsx)(qae.w9,{}),(0,o.jsx)(dre,{})]})})}}const dre=(0,l.memo)(()=>(0,o.jsxs)(l.Fragment,{children:[(0,o.jsx)(Yae.r,{}),(0,o.jsx)(dA.l,{}),(0,o.jsx)(Xae.K,{})]}));function pre(){const e=new Date;e.setHours(4,0,0,0),e.setDate(e.getDate()+1);const t=e.getTime(),n=setInterval(()=>{Date.now()<=t||(clearInterval(n),setInterval(()=>{MB.global.popupHelper.alertAsync({title:I18N.Popups.inactive_for_too_long_title,desc:I18N.Popups.inactive_for_too_long_content,confirmText:I18N.Popups.inactive_for_too_long_confirm}).then(()=>{rootSdk.hasSave()||window.location.reload()})},20*1e3))},10*60*1e3)}function ure(e){setTimeout(()=>{e&&e({type:"copy:as:png:thumbnail"})},1*60*1e3),setInterval(()=>{e&&e({type:"copy:as:png:thumbnail"})},5*60*1e3)}const hre=(0,I.Mz)([te.O4,N.ud,T.H5,J.Q,q.jx,q.pH,q.rg,q.T7,ne.aJ],(e,t,n,a,i,c,d,p,h)=>({onlyView:i===Le.qi.OnlyView,isEditingComment:t,isCommunityPreview:c,isEmbedV2Preview:d,theme:e,isShowSharingManager:n,isDeleteRulerLine:a,fullScreenMode:p,isShallowEditText:h})),mre=(0,r.Ng)(e=>hre(e))(cre)},58664:(Qn,qe,s)=>{"use strict";s.d(qe,{P:()=>T});var r=s(20089),I=s(4410);const J=[{keyCode:78,name:r.x.WSticky,shortcut:"N",default:{width:280,height:120}},{keyCode:72,name:r.x.WLR,shortcut:"H",default:{width:45,height:45}},{keyCode:76,name:r.x.WLine,shortcut:"L"},{keyCode:79,name:r.x.WOval,shortcut:"O",default:{width:100,height:100}},{keyCode:84,name:r.x.WRichText,shortcut:"T"},{keyCode:80,name:r.x.WVector,shortcut:"P"},{keyCode:80,shiftKey:!0,name:r.x.WVector,shortcut:"Shift + P",attrs:{toolType:I.pv.PENCIL}},{keyCode:82,name:r.x.WRect,shortcut:"R",default:{width:200,height:100}},{keyCode:87,name:r.x.WTear,shortcut:"W",default:{width:20,height:20}}],N={keyCode:65,name:r.x.Canvas,shortcut:"A",default:{width:400,height:800}},T=te=>te?[...J,N]:J},60129:(Qn,qe,s)=>{"use strict";s.d(qe,{Pr:()=>N,_D:()=>J,vY:()=>I});var r=s(93413);const I=[r.c.TASK_GUIDE_NEW_CREATE_PAGE,r.c.TASK_GUIDE_NEW_SHOW_WIDGET_LIBRARY,r.c.TASK_GUIDE_NEW_CREATE_LINK,r.c.TASK_GUIDE_NEW_USE_PREVIEW,r.c.TASK_GUIDE_NEW_USE_SHARE,r.c.TASK_GUIDE_NEW_USE_COMMENT,r.c.TASK_GUIDE_NEW_CREATE_ANNOTATE,r.c.TASK_GUIDE_NEW_CREATE_FLOW,r.c.TASK_GUIDE_NEW_CREATE_MIND],J=[r.c.GUIDE_NOVICE_2309_TASK_1,r.c.GUIDE_NOVICE_2309_TASK_2,r.c.GUIDE_NOVICE_2309_TASK_3,r.c.GUIDE_NOVICE_2309_TASK_4,r.c.GUIDE_NOVICE_2309_TASK_5],N=[{label:"add_artboard",guideKey:r.c.GUIDE_NOVICE_2309_TASK_1,imgUrl:ENV.IS_MO?"https://cdn-release.modao.cc/mb_proto/guide/GUIDE_NOVICE_2309_TASK_1_ws.gif":"/mb-proto2/images/guide/noviceGuides2309/"+r.c.GUIDE_NOVICE_2309_TASK_1+".gif",icon:{name:"art_board/guide/task/CREATE_PAGE",width:12,height:14},track:"\u65B0\u5EFA\u9875\u9762"},{label:"add_widget",guideKey:r.c.GUIDE_NOVICE_2309_TASK_2,imgUrl:ENV.IS_MO?"https://cdn-release.modao.cc/mb_proto/guide/GUIDE_NOVICE_2309_TASK_2_ws.gif":"/mb-proto2/images/guide/noviceGuides2309/"+r.c.GUIDE_NOVICE_2309_TASK_2+".gif",icon:{name:"art_board/guide/task/CREATE_WIDGET",width:14,height:16},track:"\u521B\u5EFA\u7EC4\u4EF6"},{label:"add_interaction",guideKey:r.c.GUIDE_NOVICE_2309_TASK_3,imgUrl:ENV.IS_MO?"https://cdn-release.modao.cc/mb_proto/guide/GUIDE_NOVICE_2309_TASK_3_ws.gif":"/mb-proto2/images/guide/noviceGuides2309/"+r.c.GUIDE_NOVICE_2309_TASK_3+".gif",icon:{name:"art_board/guide/task/CREATE_LINK",width:16,height:16},track:"\u6DFB\u52A0\u4EA4\u4E92"},{label:"preview",guideKey:r.c.GUIDE_NOVICE_2309_TASK_4,imgUrl:ENV.IS_MO?"https://cdn-release.modao.cc/mb_proto/guide/GUIDE_NOVICE_2309_TASK_4_ws.gif":"/mb-proto2/images/guide/noviceGuides2309/"+r.c.GUIDE_NOVICE_2309_TASK_4+".gif",icon:{name:"art_board/guide/task/USE_PREVIEW",width:12,height:14},track:"\u771F\u673A\u6F14\u793A"},{label:"share",guideKey:r.c.GUIDE_NOVICE_2309_TASK_5,imgUrl:ENV.IS_MO?"https://cdn-release.modao.cc/mb_proto/guide/GUIDE_NOVICE_2309_TASK_5_ws.gif":"/mb-proto2/images/guide/noviceGuides2309/"+r.c.GUIDE_NOVICE_2309_TASK_5+".gif",icon:{name:"art_board/guide/task/USE_SHARE",width:12,height:12},track:"\u6587\u4EF6\u5206\u4EAB"}]},60399:(Qn,qe,s)=>{"use strict";s.d(qe,{n:()=>I});var r=s(32424);const I=J=>{const N=J.access_token||(0,r.kt)(),T=/iphone|android|apple_watch/.test(J.device)?200:100,te=J.png_scale||T,q=J.pngs_scale||T,ne=!1,B=!1,l=J.device;let U;return l==="web"?U="web":l==="customize"?U="customize":U="device",{...J,access_token:N,png_scale:te,pngs_scale:q,template:ne,combo:B,shell_type:U}}},60440:(Qn,qe,s)=>{"use strict";s.d(qe,{m:()=>ne});var r=s(38502),I=s(18381),J=s(11032),N=s(70933),T=s(67052),te=s(74923),q=s(3862);const ne=B=>{let{templateList:l=[],resourcesMap:U=new Map,currentResource:C=null,isFromSameResource:M=!1,isOrg:w=!1,onUpdateCurrentResources:y}=B;const j=(0,I.d4)(N.HW),Q=(0,I.d4)(N.wA),ze=(0,I.d4)(N.F2),me=(0,I.d4)(N._x),Se=(0,I.wA)(),[Me,De]=(0,r.useState)(new Set),[tt,at]=(0,r.useState)(C||null),ht=(0,I.d4)(T.fm),Je=(0,I.d4)(te.AC),$=nn=>{var Oe;return(nn==null?void 0:nn.flpakKey)||(nn==null?void 0:nn.marketTemplateCid)||(nn==null||(Oe=nn.marketTemplateSource)==null?void 0:Oe.cid)},mt=nn=>(ze==null?void 0:ze.project_meta_cid)===nn?userSdkStore:(me==null?void 0:me.project_meta_cid)===nn?orgSdkStore:ht.get(nn),yt=nn=>{at(nn),y&&y(nn)},Le=nn=>{if(!M){const Oe=[...nn];Oe.filter(It=>{const Pt=U==null?void 0:U.get(It),{show:dt}=(0,J.o3)(Pt,j);return dt}).length==0&&Oe.length>0?yt((U==null?void 0:U.get(Oe[0]))||null):yt(null)}},He=nn=>{const Oe=new Set(Me);Oe.has(nn)?Oe.delete(nn):Oe.add(nn),De(Oe);const sn=new Set;l.forEach(It=>{Oe.has(It.key)&&!(It!=null&&It.flpakKey)&&sn.add($(It))}),Le(sn)},ye=(0,r.useCallback)(()=>{const nn=l==null?void 0:l.map(sn=>sn.key),Oe=new Set;l.forEach(sn=>{sn!=null&&sn.flpakKey||Oe.add($(sn))}),De(new Set(nn)),Le(Oe)},[De,Le]),je=(0,r.useCallback)(()=>{De(new Set)},[De]),ot=(0,r.useCallback)(()=>{C&&(yt({...C,is_purchased:!0,is_star:!0}),Se({type:"entry:resources:update:find:data",payload:{cid:C==null?void 0:C.cid,category:q.t_}}))},[yt,Se]),we=()=>{MB.global.experienceLoginModalHelper("isSave")||C&&Se({type:"modal:update:state",payload:{resourcePurchaseModal:{isOpen:!0,resources:C,currentOrg:Q,paidCallback:ot,isFooter:!0}}})},$e=(0,r.useCallback)(()=>{if(MB.global.experienceLoginModalHelper("isSave"))return;const{category:nn}=C||{};let Oe="",sn="";nn==="combo_group"?(Oe="\u7F16\u8F91\u533A-v8_\u539F\u578B\u7D20\u6750\u9762\u677F-\u7EC4\u4EF6_\u8D2D\u4E70VIP",sn="workspace-v8_components_buy_vip"):nn==="screen_list"?(Oe="\u7F16\u8F91\u533A-v8_\u539F\u578B\u7D20\u6750\u9762\u677F-\u9875\u9762_\u8D2D\u4E70VIP",sn="workspace-v8_pages_buy_vip"):(Oe="\u7F16\u8F91\u533A-v8_\u539F\u578B\u7D20\u6750\u9762\u677F-\u4F1A\u5458\u7D20\u6750_\u8D2D\u4E70VIP",sn="workspace-v8_template_buy_vip");const It={mode:"mat",payEntrance:Oe,checkoutArea:"proto",checkoutPlace:sn,templatePaySource:"\u7F16\u8F91\u533A\u7EC4\u4EF6\u5F39\u7A97"};MB.global.popupHelper.chargeAsync(It)},[C]),ge=nn=>{const Oe=new Map;return nn.forEach(sn=>{const It=l.find(Vn=>Vn.key===sn);if(It){var Pt,dt;const Vn=$(It),o=(Pt=Oe.get(Vn))!=null?Pt:[],Gn=It.key,xt=It!=null&&It.flpakKey?"user_combo":It.type,Ot=It!=null&&It.flpakKey?ze==null?void 0:ze.cid:(dt=It.marketTemplateSource)==null?void 0:dt.cid;let wt={...It,recent:{isRequestRecent:!w,itemCid:Gn,projectUpperType:xt,projectUpperCid:Ot,isTrack:!0,from:"widget-modal"}};Oe.set(Vn,[...o,wt])}}),[...Oe.keys()].map(sn=>{const It=mt(sn);return It?[Oe.get(sn),It]:null}).filter(sn=>!!sn)},Ze=nn=>{if(!(nn!=null&&nn.length))return;const Oe=ge([nn]);Se({type:"entry:resources:quick:create:template",payload:{data:Oe}}),Se({type:"modal:update:state",payload:{widgetModal:{isOpen:!1}}}),Se({type:"widget-modal:reset:state"})},W=()=>{const nn=Array.from(Me),Oe=ge(nn);Se({type:"entry:resources:quick:create:template",payload:{data:Oe}}),Se({type:"modal:update:state",payload:{widgetModal:{isOpen:!1}}}),Se({type:"widget-modal:reset:state"})},an=()=>{const nn=l==null?void 0:l.map(sn=>sn.key),Oe=ge(nn);Se({type:"entry:resources:quick:create:template",payload:{data:Oe}}),Se({type:"modal:update:state",payload:{widgetModal:{isOpen:!1}}}),Se({type:"widget-modal:reset:state"})},_t=(0,r.useCallback)(nn=>{const Oe=[...l],sn=Oe==null?void 0:Oe.find(It=>It.key===nn);Se({type:"modal:update:state",payload:{resourcesSnapshotPreviewModal:{isOpen:!0,type:"widget",list:Oe,currentTemplate:sn}}})},[Se,l]);return{checkedSet:Me,curRes:tt,handleChangeChecked:He,handleSelectAll:ye,handleClearAll:je,handleBySeparately:we,handleMemberClick:$e,handleAddItem:Ze,handleAddItems:W,handleAddItemsAll:an,handleOpenPreviewModal:_t,handlePaidResources:ot}}},60441:(Qn,qe,s)=>{"use strict";s.d(qe,{GL:()=>N,ri:()=>r,um:()=>I,ur:()=>T,vE:()=>J});const r=te=>te.ui.leftLayout.widgetModal.keyword,I=te=>te.ui.leftLayout.widgetModal.currentResource,J=te=>te.ui.leftLayout.widgetModal.largeFactory,N=te=>te.ui.leftLayout.widgetModal.componentLibrary,T=te=>te.ui.leftLayout.widgetModal.me},60921:(Qn,qe,s)=>{"use strict";s.d(qe,{N:()=>J,Z:()=>I});var r=s(42459);const I=(N,T)=>{if(N!=null&&N.is_star&&!(N!=null&&N.is_purchased))return(0,r.Op)(T,q=>q.cid===N.cid);if(N!=null&&N.is_purchased)return(0,r.$G)(T,q=>q.cid===N.cid,{...N,is_star:!(N!=null&&N.is_star)})},J=function(N,T){return T===void 0&&(T="all"),T==="all"?N:T==="page"?N.filter(te=>te.category==="screen_list"):T==="file"?N.filter(te=>te.category==="project_basic"):N}},61232:(Qn,qe,s)=>{"use strict";s.d(qe,{_:()=>os});var r=s(95549),I=s(38502),J=s(18381),N=s(16738),T=s(12211),te=s(86769),q=s(94319),ne=s.n(q),B=s(39695),l=s(56202),U=s(16454),C=s(96986),M=s(99566),w=s(82846),y=s(34428),j=s(88981),Q=s(30728),ze=s(32267),me=s(29329),Se=s(72064),Me=s(74222),De=s(9680),tt=s(89853),at=s(1984),ht=s(98267);const Je=pt=>pt.replace(/.*scale\((.+)\).*/,"$1"),$=pt=>{let{clientX:Ee,clientY:Ue}=pt;const ke=MB.webpackInterface.store.getState(),Ve=(0,U.mf)(ke),{activePageKey:st,activeCanvasKey:ut,screenScrollLeftMap:Rt,screenScrollTopMap:en}=Ve,Xt=Q.Z.xy(Ee,Ue),Zn=Rt[ut]||0,bo=en[ut]||0;let Po=(0,U.X_)(ke)/100;const ha=(0,U.bF)(ke);let xa;try{xa=document.querySelector('#preview-content-container div[data-cid="'+ut+'"]').getBoundingClientRect()}catch(Fa){xa=document.querySelector("#app").getBoundingClientRect();try{Po=Je((0,ze.T)({activePageKey:st,activeCanvasKey:ut,previewOptions:ha}).transform)}catch(Pa){}}const da={x:(Xt.x-xa.x)/Po,y:(Xt.y-xa.y)/Po},Ko={x:da.x-Zn,y:da.y-bo};MB.previewMouseX=Math.round(da.x),MB.previewMouseY=Math.round(da.y),MB.previewMousePageX=Math.round(Ko.x),MB.previewMousePageY=Math.round(Ko.y)},mt=()=>{MB.previewMouseX=0,MB.previewMouseY=0,MB.previewMousePageX=0,MB.previewMousePageY=0},yt=()=>{if(MB.runnerController)return{variables:MB.runnerController.variableStore.getSnapshot(),p2sdkStore:(0,Se.yV)()};var pt;return{variables:((pt=sdkStore.getHotItem(Me.fu))==null?void 0:pt.sub.map(De.hZ))||[],p2sdkStore:sdkStore}},Le=(pt,Ee)=>{const ke=pt.interactionTrigger==="timer"?"timerDuration":"transitionDelay";return ye(pt,ke,Ee)},He=pt=>{switch(pt.interactionType){case B.O2.SetVisibility:{if(!document.querySelector("#app"))return;const Ue=(0,ht.$8)(pt,MB.webpackInterface),ke=(0,Se.yV)(),Ve=ke==null?void 0:ke.getSnapshotItem(Ue);if(!Ve)return;const st=Ve.hotAttr.isVisible,ut=pt.actionType;if((ut==="setVisible"||ut==="toggleVisibility")&&!st)return pt.setVisibleTransition==="auto"?ye(pt,"setVisibleTransitionDuration"):0;if((ut==="setHidden"||ut==="toggleVisibility")&&st)return pt.setHiddenTransition==="auto"?ye(pt,"setHiddenTransitionDuration"):0;break}default:return!pt.transition||pt.transition==="none"?0:ye(pt,"transitionDuration")}},ye=function(pt,Ee,Ue){var ke;Ue===void 0&&(Ue=yt());const Ve=pt[Ee]||"0";let st=parseFloat(Ve)*1e3;const ut=(ke=pt.expression)==null?void 0:ke[Ee];if(ut){var Rt;st=(Rt=(0,me.LB)(ut,"number",Ue))!=null?Rt:0}return(0,tt.d8)(st,[0,at.sw])},je=function(pt,Ee,Ue){return Ue===void 0&&(Ue="number"),(0,M.g3)(pt,Ee,Ue,yt())},ot=function(){for(var pt=arguments.length,Ee=new Array(pt),Ue=0;Ue "+H+"
/g,"\n"),onClick:n,children:_jsx(AiMainIconEdit2,{size:24})})},qse=e=>{const{dispatch:t}=e,n=()=>{};return _jsx(MenuOption,{title:I18N.TextToolbar.code.code_editor,onClick:n,children:_jsx(AiMainIconCode,{size:24})})};var eK=Object.defineProperty,tK=Object.defineProperties,nK=Object.getOwnPropertyDescriptors,a3=Object.getOwnPropertySymbols,LC=Object.prototype.hasOwnProperty,NC=Object.prototype.propertyIsEnumerable,jC=(e,t,n)=>t in e?eK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iy=(e,t)=>{for(var n in t||(t={}))LC.call(t,n)&&jC(e,n,t[n]);if(a3)for(var n of a3(t))NC.call(t,n)&&jC(e,n,t[n]);return e},oK=(e,t)=>tK(e,nK(t)),aK=(e,t)=>{var n={};for(var a in e)LC.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&a3)for(var a of a3(e))t.indexOf(a)<0&&NC.call(e,a)&&(n[a]=e[a]);return n},DC=(0,l.forwardRef)((e,t)=>{var n=e,{size:a,spin:i,style:c}=n,d=aK(n,["size","spin","style"]);const p=Iy(Iy({width:a||"var(--x-icon-size, 1em)",height:a||"var(--x-icon-size, 1em)",animation:i?"spin 1s infinite linear":void 0,display:"inline-flex",flexShrink:0},{}),c);return l.createElement("svg",oK(Iy({ref:t,style:p},d),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),l.createElement("path",{opacity:"0.8",d:"M9.99993 3C10.4666 3 10.6999 3.23333 10.6999 3.7V5.8C10.6999 6.26667 10.4666 6.5 9.99993 6.5C9.53326 6.5 9.29993 6.26667 9.29993 5.8V3.7C9.29993 3.23333 9.53326 3 9.99993 3Z",fill:"black"}),l.createElement("path",{opacity:"0.4",d:"M9.99993 13.5C10.4666 13.5 10.6999 13.7333 10.6999 14.2V16.3C10.6999 16.7667 10.4666 17 9.99993 17C9.53326 17 9.29993 16.7667 9.29993 16.3V14.2C9.29993 13.7333 9.53326 13.5 9.99993 13.5Z",fill:"black"}),l.createElement("path",{opacity:"0.2",d:"M16.9999 9.9998C16.9999 10.4665 16.7666 10.6998 16.2999 10.6998H14.1999C13.7333 10.6998 13.4999 10.4665 13.4999 9.9998C13.4999 9.53314 13.7333 9.2998 14.1999 9.2998H16.2999C16.7666 9.2998 16.9999 9.53314 16.9999 9.9998Z",fill:"black"}),l.createElement("path",{opacity:"0.6",d:"M6.49994 9.9998C6.49994 10.4665 6.26661 10.6998 5.79994 10.6998H3.69994C3.23327 10.6998 2.99994 10.4665 2.99994 9.9998C2.99994 9.53314 3.23327 9.2998 3.69994 9.2998H5.79994C6.26661 9.2998 6.49994 9.53314 6.49994 9.9998Z",fill:"black"}),l.createElement("path",{opacity:"0.1",d:"M14.9467 5.05022C15.2766 5.3802 15.2766 5.71019 14.9467 6.04017L13.4617 7.52509C13.1318 7.85508 12.8018 7.85508 12.4718 7.52509C12.1418 7.19511 12.1418 6.86513 12.4718 6.53515L13.9567 5.05022C14.2867 4.72024 14.6167 4.72024 14.9467 5.05022Z",fill:"black"}),l.createElement("path",{opacity:"0.5",d:"M7.52284 12.4745C7.85282 12.8045 7.85282 13.1345 7.52284 13.4645L6.03791 14.9494C5.70793 15.2794 5.37795 15.2794 5.04796 14.9494C4.71798 14.6194 4.71798 14.2894 5.04796 13.9595L6.53289 12.4745C6.86287 12.1446 7.19285 12.1446 7.52284 12.4745Z",fill:"black"}),l.createElement("path",{opacity:"0.3",d:"M14.9467 14.9499C14.6167 15.2799 14.2867 15.2799 13.9567 14.9499L12.4718 13.465C12.1418 13.135 12.1418 12.805 12.4718 12.475C12.8018 12.145 13.1318 12.145 13.4617 12.475L14.9467 13.96C15.2766 14.2899 15.2766 14.6199 14.9467 14.9499Z",fill:"black"}),l.createElement("path",{opacity:"0.7",d:"M7.52284 7.5251C7.19285 7.85508 6.86287 7.85508 6.53289 7.5251L5.04796 6.04017C4.71798 5.71019 4.71798 5.3802 5.04796 5.05022C5.37795 4.72024 5.70793 4.72024 6.03791 5.05022L7.52284 6.53515C7.85282 6.86513 7.85282 7.19511 7.52284 7.5251Z",fill:"black"}))}),rK=Object.defineProperty,iK=Object.defineProperties,sK=Object.getOwnPropertyDescriptors,r3=Object.getOwnPropertySymbols,RC=Object.prototype.hasOwnProperty,BC=Object.prototype.propertyIsEnumerable,UC=(e,t,n)=>t in e?rK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_y=(e,t)=>{for(var n in t||(t={}))RC.call(t,n)&&UC(e,n,t[n]);if(r3)for(var n of r3(t))BC.call(t,n)&&UC(e,n,t[n]);return e},lK=(e,t)=>iK(e,sK(t)),cK=(e,t)=>{var n={};for(var a in e)RC.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&r3)for(var a of r3(e))t.indexOf(a)<0&&BC.call(e,a)&&(n[a]=e[a]);return n},dK=(0,l.forwardRef)((e,t)=>{var n=e,{size:a,spin:i,style:c}=n,d=cK(n,["size","spin","style"]);const p=_y(_y({width:a||"var(--x-icon-size, 1em)",height:a||"var(--x-icon-size, 1em)",animation:i?"spin 1s infinite linear":void 0,display:"inline-flex",flexShrink:0},{}),c);return l.createElement("svg",lK(_y({ref:t,style:p},d),{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),l.createElement("path",{d:"M4.18481 6.72519C6.72035 6.59191 8.49773 7.22952 9.85083 8.29062C11.1668 9.32273 12.0287 10.7224 12.7971 11.9518C13.5942 13.2269 14.2872 14.3091 15.2786 15.0201C15.9664 15.5134 16.8401 15.8518 18.0774 15.8629L17.72 15.5045C17.4271 15.2116 17.4271 14.7368 17.72 14.4439C18.0129 14.1512 18.4877 14.1511 18.7805 14.4439L20.3069 15.9703C20.5993 16.2632 20.5995 16.7381 20.3069 17.0309L18.7805 18.5562C18.4876 18.8491 18.0129 18.8491 17.72 18.5562C17.4273 18.2633 17.4271 17.7885 17.72 17.4957L17.8567 17.358C16.4458 17.31 15.33 16.9032 14.4036 16.2389C13.13 15.3252 12.2908 13.9708 11.5256 12.7467C10.7317 11.4766 9.9994 10.3129 8.92505 9.47031C7.88766 8.65687 6.47678 8.10682 4.26294 8.22324C3.84944 8.2448 3.4966 7.92681 3.47485 7.51328C3.45352 7.09996 3.77142 6.74693 4.18481 6.72519ZM9.51294 14.2623C9.85779 13.8858 10.4754 13.9036 10.7522 14.3326C10.9226 14.597 10.9134 14.9452 10.7043 15.1803C10.3583 15.5693 9.97621 15.93 9.54419 16.2398C8.21976 17.1897 6.50833 17.6156 4.10083 17.2144C3.69225 17.1464 3.41653 16.7597 3.48462 16.3512C3.5527 15.9427 3.93846 15.6671 4.34692 15.735C6.43935 16.0836 7.729 15.6961 8.67017 15.0211C8.97574 14.8019 9.25239 14.5468 9.51294 14.2623ZM17.72 5.44394C18.0129 5.15116 18.4877 5.15108 18.7805 5.44394L20.3069 6.97031C20.5993 7.26319 20.5995 7.73808 20.3069 8.03085L18.7805 9.55624C18.4876 9.84914 18.0129 9.84914 17.72 9.55624C17.4273 9.26334 17.4271 8.78853 17.72 8.4957L17.9299 8.28476C16.6739 8.45465 15.7552 8.89681 15.0227 9.47128C14.8246 9.62664 14.6385 9.79354 14.4612 9.96933C14.1134 10.314 13.5369 10.3029 13.2629 9.89706C13.0789 9.62412 13.0779 9.23809 13.3079 9.00253C13.5523 8.75215 13.8141 8.51341 14.0969 8.2916C15.1083 7.49839 16.3568 6.94192 17.9817 6.76718L17.72 6.50449C17.4271 6.21159 17.4271 5.73683 17.72 5.44394Z",fill:"#19191A"}))});const pK=e=>{const{widget:t,dispatch:n}=e,i=(0,r.d4)(D0.G1)[t.key]||{},c=!t.hotAttr.injection,{convertToEditableType:d="idle"}=i,p=d==="converting",h=async()=>{p||c||n({type:"entry:aiComponent:float-bar:convert-to-editable",payload:{widget:t}})},m=(0,l.useMemo)(()=>c?I18N.TextToolbar.code.convert_error:"",[c]);return(0,o.jsx)(Ti.A,{content:m,direction:"down",distance:12,className:"floating-tooltip",children:(0,o.jsx)(TZ,{onClick:h,className:C()({disabled:c}),children:p?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(DC,{size:20,className:"loading-icon"}),(0,o.jsx)("span",{className:"text",children:I18N.TextToolbar.code.converting})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dK,{size:20}),(0,o.jsx)("span",{className:"text",children:I18N.TextToolbar.code.convert})]})})})};var Df=s(90852),Ty=s(81764);const uK=e=>{const{getPrefixCls:t,direction:n}=(0,l.useContext)(Cr.QO),{prefixCls:a,className:i}=e,c=t("input-group",a),d=t("input"),[p,h,m]=(0,Ty.Ay)(d),x=C()(c,m,{[c+"-lg"]:e.size==="large",[c+"-sm"]:e.size==="small",[c+"-compact"]:e.compact,[c+"-rtl"]:n==="rtl"},h,i),v=(0,l.useContext)(Df.$W),A=(0,l.useMemo)(()=>Object.assign(Object.assign({},v),{isFormItemInput:!1}),[v]);return p(l.createElement("span",{className:x,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},l.createElement(Df.$W.Provider,{value:A},e.children)))};var hK=s(51885),OC=s(27479),mK=s(74901),i3=s(49212),FC=s(16981),fK=s(73650),VC=s(31161);function zC(e,t){const n=(0,l.useRef)([]),a=()=>{n.current.push(setTimeout(()=>{var i,c,d,p;!((i=e.current)===null||i===void 0)&&i.input&&((c=e.current)===null||c===void 0?void 0:c.input.getAttribute("type"))==="password"&&(!((d=e.current)===null||d===void 0)&&d.input.hasAttribute("value"))&&((p=e.current)===null||p===void 0||p.input.removeAttribute("value"))}))};return(0,l.useEffect)(()=>(t&&a(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),a}function gK(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var yK=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i(.*?)<\/strike>/g,"$1");var Q=s(15186),ze=s(9521),me=s(78401),Se=s(56202),Me=s(20089),De=s(45709),tt=s(69815),at=s(98915),ht=s(40610),Je=s(49021),$=s(62587),mt=s(37342),yt=s(46199),Le=s(63763),He=s(68049),ye=s(55584),je=s(39679),ot=s(34748),we=s(83744),$e=s(8580),ge=s(28068),Ze=s(86493),W=s(66360),an=s(25997),_t=s(73662),nn=s(9680);const Oe={"entry:batch:edit:text:content":(Gn,xt)=>{let{getState:Ot,dispatch:wt}=Gn,{payload:{contentArray:Kt,refVar:fe}}=xt;const bt=Ot(),un=(0,te.nE)(bt),gt=[];un.forEach(Wt=>{const Un=o(Wt,Kt,fe);Un&>.push({key:Wt.key,hotAttr:Un.hotAttr})}),gt.length>0&&wt({type:"entry:widget:change",payload:{flatChgList:gt}})},"entry:set:specify:text:attr":(Gn,xt)=>{let{getState:Ot,dispatch:wt}=Gn,{payload:{attr:Kt,value:fe,widgets:bt}}=xt;const un=Ot();sn({widgets:bt,dispatch:wt,attr:Kt,value:fe,state:un}),(0,we.Xq)(bt.map(gt=>(0,$e.Op)(gt.key)))},"entry:set:text:align":(Gn,xt)=>{let{getState:Ot,dispatch:wt}=Gn,{payload:{attr:Kt,value:fe}}=xt;const bt=Ot(),un=(0,te.nE)(bt),gt=un.filter(Jn=>ht.VV.includes(Jn.hotAttr.type)),Wt=un.filter(Jn=>!ht.VV.includes(Jn.hotAttr.type));if(gt.length>0){const Jn=gt.map(Yt=>({key:Yt.key,hotAttr:{richTextV1:{...Yt.hotAttr.richTextV1,[Kt]:fe}}}));wt({type:"entry:widget:change",payload:{flatChgList:Jn}})}const Un=gt.filter(Jn=>Me.Q.USE_CLIP_TEXT.includes(Jn.hotAttr.type));if(Un.length>0){const Jn=Un.map(Yt=>{const rt=sdkStore.getHotItem(Yt.key);return rt?{key:Yt.key,hotAttr:{...!rt.hotAttr.richTextV1.isClipText&&{richTextMetric:(0,at.Ro)(rt.hotAttr)}}}:null});wt({type:"entry:widget:change",payload:{flatChgList:Jn}})}if(Wt.length>0){const Jn=Wt.map(Yt=>({key:Yt.key,hotAttr:{textV0:{...Yt.hotAttr.textV0,[Kt]:fe}}}));wt({type:"entry:widget:change",payload:{flatChgList:Jn}})}(0,we.Xq)(un.map(Jn=>(0,$e.Op)(Jn.key)))},"entry:set:text:attr":(Gn,xt)=>{let{getState:Ot,dispatch:wt}=Gn,{payload:{attr:Kt,value:fe,refVar:bt,compressible:un=!0,fromUI:gt}}=xt;const Wt=Ot(),Un=(0,te.nE)(Wt),Jn=(0,T.nx)(Wt),Yt=(0,I.c)(Wt),rt=(0,N.WH)(Wt),An=(0,N.GP)(Wt),Nt=(0,N.OX)(Wt),jt=(0,N.aJ)(Wt),vn=_t.y.query.getMissFontHiKeySet(Wt),Dt=(Un==null?void 0:Un.length)===1&&Un[0].key===rt&&Nt.length,$t=Dt?Nt:Un,kn=Dt?An:Yt,Kn=$t.filter(Yn=>Je.cX.includes(Yn.hotAttr.type));if(Kn.length===0)return;const dn=Kn.filter(Yn=>ht.VV.includes(Yn.hotAttr.type)),ft=Kn.filter(Yn=>!ht.VV.includes(Yn.hotAttr.type)),Lt=Kn.filter(Yn=>(0,yt.kY)(Yn.hotAttr));if(sdkStore.combineMergeMark("update-text-attr"),sn({widgets:Kn,dispatch:wt,attr:Kt,value:fe,refVar:bt,state:Wt,compressible:un,fromUI:gt,recordAvailableInheritTextAttrs:we.Xq,missFontHiKeySet:vn}),kn&&!jt&&((0,ht.e_)(kn.hotAttr.type)||(0,ht.gM)(kn.hotAttr.type)))return;const bn=dn.filter(Yn=>Me.Q.USE_CLIP_TEXT.includes(Yn.hotAttr.type));if(bn.length>0){const Yn=[];bn.forEach(on=>{const yn=sdkStore.getHotItem(on.key);if(!yn)return null;yn.hotAttr.richTextV1.isClipText||Yn.push({key:on.key,hotAttr:{richTextMetric:(0,at.Ro)(yn.hotAttr)}})}),wt({type:"entry:widget:change",payload:{flatChgList:Yn}})}if(!(Kt==="sizeType"&&Kn.find(Yn=>Yn.hotAttr.type===Me.x.WRichText))){if(Object.keys(Jn).length===0){const Yn=yn=>{let{a:lo,v:qn,supAttr:Wn,list:Nn}=yn;const xn=Nn.map(Ye=>{const wn=sdkStore.getHotItem(Ye.key);return{key:Ye.key,hotAttr:{[Wn]:{...wn.hotAttr[Wn],[lo]:qn}}}});wt({type:"entry:widget:change",payload:{flatChgList:xn}})},on=dn.filter(yn=>yn.hotAttr.type===Me.x.WMindNode);if(on.length>0){const{a:yn,v:lo}=Vn(Kt,fe,"wMind");Yn({a:yn,v:lo,supAttr:"richTextV1",list:on})}if(ft.length>0){const{a:yn,v:lo}=Vn(Kt,fe,"commonText");Yn({a:yn,v:lo,supAttr:"textV0",list:ft})}if(Lt.length>0)if(Kt==="prefillTextColorV0")Yn({a:"prefillTextColorV0",v:fe,supAttr:"textInput",list:Lt});else{const{a:yn,v:lo}=Vn(Kt,fe,"commonText");Yn({a:yn,v:lo,supAttr:"textV0",list:Lt})}}Dt&&Kt!=="textColor"&&wt({type:"entry:mind:update:mind-size"}),wt({type:"settings:update:currentTextRefStyle",payload:null}),sdkStore.combineMerge("update-text-attr")}},"entry:set:text:attr:fakeOverride":(Gn,xt)=>{var Ot;let{getState:wt,dispatch:Kt}=Gn,{payload:{attrValueList:fe,supAttr:bt,isTreeSelectNode:un}}=xt;const gt=wt(),Wt=(0,te.nE)(gt),Un=(0,I.c)(gt),Jn=(0,N.WH)(gt),Yt=(0,an.UV)(gt),rt=(0,N.OX)(gt),An=(0,r.Mj)(gt),jt=(Wt==null?void 0:Wt.length)===1&&Wt[0].key===Jn&&rt.length?rt:Wt;if(Un&&Un.key===((Ot=jt[0])==null?void 0:Ot.key)&&An&&(0,ht.AG)(Un)){(0,tt.nk)(An,fe);return}Pt({widgets:jt,attrValueList:fe,widgetStore:Yt,supAttr:bt,isTreeSelectNode:un})},"entry:set:text:attr:fakeOverride:restore":Gn=>{let{getState:xt,dispatch:Ot}=Gn;const wt=xt(),Kt=(0,an.UV)(wt),fe=dt(Kt);fe&&Ot({type:"selection:update:state",payload:{widgetTreeData:fe}})},"entry:set:text:attr:by:key":async(Gn,xt)=>{var Ot;let{getState:wt,dispatch:Kt}=Gn,{payload:{attr:fe,action:bt,isInEditing:un=!1}}=xt;const gt=wt(),Wt=(0,te.nE)(gt),Un=(0,N.OX)(gt),Jn=Wt.some(Lt=>{let{hotAttr:{type:bn}}=Lt;return bn===Me.x.WMind})&&!Un.length;if(Wt.length===0||((Ot=Wt[0])==null?void 0:Ot.hotAttr.bunch)===Me.x.RbPage||Jn)return;const Yt=Un[0]||Wt[0],rt=(0,J.zX)(gt),An=(Yt==null?void 0:Yt.hotAttr.type)===Me.x.WTable&&rt,Nt=(0,ht.AG)(Yt);if(!Nt&&Yt&&!Yt.hotAttr.textV0)return;const jt={underline:"textDecoration",lineThrough:"textDecoration",boldType:"bold"},vn={lineThrough:"strikethrough",boldType:"fontWeight"};let Dt;Nt?Dt=vn[fe]||fe:Dt=jt[fe]||fe;const $t=Nt?(0,ot.xH)({baseItem:Yt.hotAttr})[Dt]:Yt.hotAttr.textV0[Dt],kn={bold:!$t,boldType:!$t,italic:!$t,fontSize:bt==="increase"?$t+1:$t-1<1?1:$t-1,textDecoration:$t==="line-through"||$t==="underline"?"noraml":Dt==="underline"?"underline":"line-through",underline:$t==="normal"||$t==="line-through"?"underline":"normal",lineThrough:$t==="normal"||$t==="underline"?"line-through":"normal"},Kn={...kn,underline:!$t,lineThrough:!$t,fontWeight:$t==="bold"?"regular":"bold"},dn=Nt?Kn[Dt]:kn[Dt];if(An){Kt({type:"entry:table:set:cell:attr:new",payload:{attr:Dt,value:dn}});return}let ft=Dt;Nt&&(ft=Dt==="bold"?"boldType":Dt==="strikethrough"?"line-through":Dt),await Kt({type:"entry:set:text:attr",payload:{attr:ft,value:dn}})},"entry:set:richText:attr:fontWeight":async(Gn,xt)=>{let{getState:Ot,dispatch:wt}=Gn,{payload:{fontFamily:Kt,fontWeight:fe,boldType:bt}}=xt;if(Kt){const gt=(0,De.dA)(Kt).map(Un=>{let{value:Jn}=Un;return Jn});bt===1?!(0,De.GZ)(fe)&>.includes("bold")&&await wt({type:"entry:set:text:attr",payload:{attr:"fontWeight",value:"bold"}}):await wt({type:"entry:set:text:attr",payload:{attr:"fontWeight",value:"regular"}})}},"entry:paste:text:from:clipboard":(Gn,xt)=>{let{getState:Ot,dispatch:wt}=Gn,{payload:{html:Kt,pasteAtData:fe}}=xt;if(MB.f.isPastingRichText=!0,Kt===void 0)return;const un=new DOMParser().parseFromString(Kt,"text/html"),gt=un.querySelectorAll("[data-mb-type]");let Wt,Un,Jn,Yt=null;if(gt.length>0)Wt=(0,je.lN)("COPIED__MB__WIDGET");else{var rt,An;Yt=un.querySelector("[data-mb-text-flag]"),Un=(rt=un.querySelector("[data-mb-richData]"))==null?void 0:rt.getAttribute("data-mb-richdata"),Jn=(An=un.querySelector("[data-ref-style-text]"))==null?void 0:An.getAttribute("data-ref-style-text"),Wt=(0,ye.Ld)({html:Kt,isClearStyle:Yt===null})}const Nt=(0,Le.gu)({type:Me.x.WRichText,attrs:{textV1:Wt,isRawText:Yt===null}});if(Un)try{const jt=JSON.parse(Un).richData;Nt.w=jt.w,Nt.h=jt.h,Nt.richTextV1=jt.richTextV1,Nt.refStyles={text:Jn}}catch(jt){console.warn("clipboard-richData-error",jt,{html:Kt,richDataAttr:Un})}fe?(Nt.x=fe.worldPos.x,Nt.y=fe.worldPos.y,wt({type:"entry:batch:create:items",payload:{data:[{items:[Nt],width:Nt.w,height:Nt.h}],sup:fe.keyRndSup,offset:{top:0,left:0}}})):wt({type:"entry:batch:create:items",payload:{data:[{items:[Nt],width:Nt.w,height:Nt.h}]}})},"entry:min:fontsize:issue":Gn=>{let{getState:xt,dispatch:Ot}=Gn;if(MB.f.inSharing||(0,Se.Fr)())return;const wt=xt(),Kt=wt==null?void 0:wt.ui.fixedLayout.preference;if(!Kt||!Kt.showFsWarning)return;const fe=Kt.theme;return MB.global.popupHelper.confirmAsync({title:I18N.railsLib.warning,desc:I18N.railsLib.font_size_issue,confirmText:I18N.railsLib.know_how,cancelText:I18N.railsLib.remind_not,isClose:!1,theme:fe}).then(bt=>{if(bt)return(0,mt.JW)("/hc/articles/127","_blank","noreferrer");Ot({type:"entry:update:preference-data",payload:{show_fs_warning:!1}})})}};function sn(Gn){let{widgets:xt,dispatch:Ot,attr:wt,value:Kt,refVar:fe,state:bt,compressible:un=!0,fromUI:gt,recordAvailableInheritTextAttrs:Wt,missFontHiKeySet:Un}=Gn;sdkStore.combineMergeMark("text-attr");const Jn=(0,I.c)(bt),Yt=(0,r.Mj)(bt),rt=Jn&&Jn.key===xt[0].key;wt==="fontFamily"&&(xt=xt.map(vn=>({...vn,hotAttr:{...vn.hotAttr,"!ffVersion":1}})));const An=xt.filter(vn=>vn.hotAttr.type===Me.x.WRichText);if(An.length>0&&wt==="sizeType"){const vn=(0,ze.GP)(Kt,An);Ot({type:"entry:widget:change",payload:{flatChgList:vn}}),sdkStore.combineMerge("text-attr");return}const Nt=xt.filter(vn=>Me.Q.USE_TEXT_FONT_DIRECTION.includes(vn.hotAttr.type));if(wt==="fontDirection"){const vn=(0,ze.rA)(Kt,Nt);Ot({type:"entry:widget:change",payload:{flatChgList:vn}}),sdkStore.combineMerge("text-attr"),Wt==null||Wt(vn.map(Dt=>(0,$e.Op)(Dt.key)));return}if(wt==="isClipText"){const vn=xt.filter(Dt=>Me.Q.USE_CLIP_TEXT.includes(Dt.hotAttr.type)).map(Dt=>({key:Dt.key,hotAttr:{richTextV1:{...Dt.hotAttr.richTextV1,isClipText:Kt}}}));Ot({type:"entry:widget:change",payload:{flatChgList:vn}}),sdkStore.combineMerge("text-attr");return}if(rt){if((0,ht.AG)(Jn)&&Yt){const vn=$t=>{if((0,W.$B)($t)&&!["sizeType","listType","isClipText","paddingTuple"].includes(wt)){const kn=(0,ge.dM)($t.getCurrentContent()),Kn=(0,Ze.qn)(kn);Wt==null||Wt([Jn].map(dn=>(0,$e.Op)(dn.key,{textV1:Kn})))}};(0,tt.l2)(Yt,wt,Kt,un,vn);const Dt=Jn.hotAttr.richTextV1;if(wt==="fontSize"&&(0,tt.ul)(Yt)&&(Dt==null?void 0:Dt.fontSize)!==Kt){var jt;const $t=(jt=(0,ze.zs)([Jn],wt,Kt,gt)[0])==null||(jt=jt.hotAttr.richTextV1)==null?void 0:jt.lineHeight;Ot({type:"entry:widget:change",payload:{flatChgList:[{key:Jn.key,hotAttr:{richTextV1:{...Dt,fontSize:Kt,...$t&&{lineHeight:$t}}}}]}})}else if(wt==="lineHeight"){const $t=xt.filter(kn=>{var Kn;return((Kn=kn.hotAttr.richTextV1)==null?void 0:Kn["!lhVersion"])===1}).map(kn=>{const Kn=sdkStore.getHotItem(kn.key);return{key:kn.key,hotAttr:{richTextV1:{...Kn.hotAttr.richTextV1,"!lhVersion":3}}}});$t.length>0&&Ot({type:"entry:widget:change",payload:{flatChgList:$t}})}else if(wt==="paraSpacing"){const $t=xt.filter(kn=>kn.hotAttr["!psVersion"]===1).map(kn=>({key:kn.key,hotAttr:{"!psVersion":3}}));$t.length>0&&Ot({type:"entry:widget:change",payload:{flatChgList:$t}})}}}else{const vn=xt.filter(lo=>(0,ht.AG)(lo)),Dt=xt.filter(lo=>!(0,ht.AG)(lo)),{a:$t,v:kn}=Vn(wt,Kt,"richText"),Kn=(0,ze.zs)(vn,$t,kn,gt),{a:dn,v:ft}=Vn(wt,Kt,"commonText"),Lt=B(dn,ft,Dt),bn=Lt.filter(lo=>(0,yt.kY)(lo.hotAttr));if(bn.length>0&&wt==="prefillTextColorV0"){const lo=U({attr:"prefillTextColorV0",value:Kt,supAttr:"textInput",items:bn});Lt.forEach((qn,Wn)=>{const Nn=lo.find(xn=>xn.key===qn.key);Nn&&(Lt[Wn]=Nn)})}const Yn=Kn.concat(Lt),on=(0,nn.b4)(Yn,wt,fe),yn=Yn.map(lo=>{var qn,Wn,Nn,xn,Ye,wn,Hn;let{key:zn,hotAttr:ko}=lo;const On=on.find(jo=>jo.key===zn),Mo=On?On.refVars:ko.refVars,jn=(ko==null||(qn=ko.refStyles)==null?void 0:qn.text)&&sdkStore.getHotItem(ko==null||(Wn=ko.refStyles)==null?void 0:Wn.text),xo=jn?{color:{...(Nn=ko==null||(xn=ko.refStyles)==null?void 0:xn.color)!=null?Nn:{},...(Ye=(wn=jn.hotAttr)==null||(wn=wn.refStyles)==null?void 0:wn.color)!=null?Ye:{}},appear:ko==null||(Hn=ko.refStyles)==null?void 0:Hn.appear,text:""}:{...ko.refStyles};return{key:zn,hotAttr:{...ko,refVars:Mo,refStyles:xo}}});Ot({type:"entry:widget:change",payload:{flatChgList:yn}}),["sizeType","listType","isClipText","paddingTuple"].includes(wt)||Wt&&Wt(Yn.map(lo=>(0,$e.Op)(lo.key)))}sdkStore.combineMerge("text-attr")}const It=new Set,Pt=Gn=>{let{widgets:xt,attrValueList:Ot,supAttr:wt,widgetStore:Kt,isTreeSelectNode:fe}=Gn,bt=xt.filter(Un=>(0,ht.AG)(Un)),un=xt.filter(Un=>!(0,ht.AG)(Un));for(const[Un,Jn]of Ot){const{a:Yt,v:rt}=Vn(Un,Jn,"richText"),{a:An,v:Nt}=Vn(Un,Jn,"commonText");if(bt=(0,ze.zs)(bt,Yt,rt),un=l(An,Nt,un,fe),wt){const jt=wt.split("-"),vn=jt.length;for(const Dt of un){let $t=Dt.hotAttr;if($t.type===Me.x.WTree)fe&&($t.selectNode[An]=Nt);else{var gt;for(let kn=0;kn{"use strict";s.d(qe,{T:()=>G2});var r=s(70933),I=s(25997),J=s(53940),N=s(20089),T=s(79770),te=s(13217);const q=J.I,ne={"entry:move:canvas":(L,P)=>{let{getState:b,dispatch:u}=L,{payload:f}=P;const{dx:g=0,dy:S=0}=f,_=b(),O=(0,r.ER)(_),V={x:O.x+g,y:O.y+S};u({type:"design:set:canvas:offset",payload:{offset:V}}),u({type:"entry:update:ruler"})},"entry:design:zoom:in":L=>{let{getState:P,dispatch:b}=L;const u=P(),f=(0,r.X_)(u),g=q.findIndex(_=>_>f),S=q[g]||q[q.length-1];b({type:"entry:set:scale",payload:{scale:S}})},"entry:design:zoom:out":L=>{let{getState:P,dispatch:b}=L;const u=P(),f=(0,r.X_)(u),g=q.findIndex(_=>_>=f),S=q[g-1]||q[0];b({type:"entry:set:scale",payload:{scale:S}})},"entry:design:zoom:widget":(L,P)=>{let{getState:b,dispatch:u}=L,{payload:{hotItem:f,mindKey:g}}=P;const S=b(),_=(0,I.UV)(S);if(!f)return;const O=document.querySelector('#canvas .group-list [data-cid="'+f.key+'"]')||document.querySelector('#mb-panel-edit-list [data-cid="'+f.key+'"]'),V=document.querySelector(".main-content");if(!O||!V)return;const H=O.getBoundingClientRect(),Y=V.getBoundingClientRect(),{leftSidePanelWidth:re}=(0,te._)(!1),pe=J.xM,Ce=Y.left+re,Pe=Y.top,Ie=Y.width-re-pe,Re=Y.height,We=H.left>=Ce&&H.right<=Ce+Ie,ct=H.top>=Pe&&H.bottom<=Pe+Re;if(!We||!ct){let vt=0,Ut=0,pn=0,fn=0;if(f.hotAttr.type===N.x.WMindNode&&g){const[Ro,ra]=(0,T.C0)(sdkStore,g,f.hotAttr),ka=_.mindTrees.get(g),pa=(ka==null?void 0:ka.getMindPosition())||{x:0,y:0},{w:Ma,h:Ya}=(ka==null?void 0:ka.getNodeSize(f.key))||{w:0,h:0};vt=Ma,Ut=Ya;const{x:di,y:ja}=(ka==null?void 0:ka.getNodePosition(f.key))||{x:0,y:0};pn=Ro+pa.x+di,fn=ra+pa.y+ja}else{const[Ro,ra,ka,pa]=(0,T.C0)(sdkStore,f.key,f.hotAttr);vt=ka-Ro,Ut=pa-ra,pn=Ro,fn=ra}const Mn=(0,r.X_)(S)/100,Gt=-vt/2-pn,yo=-Ut/2-fn,Do=Gt*Mn,Wo=yo*Mn;u({type:"current:update:state",payload:{currentScreenOriginOffset:{x:Do,y:Wo}}}),u({type:"design:set:canvas:offset",payload:{offset:{x:Do,y:Wo}}}),u({type:"entry:update:ruler"})}}};var B=s(79287),l=s.n(B),U=s(15515),C=s(93413),M=s(40625),w=s(29187),y=s(67052),j=s(4410),Q=s(22835),ze=s(30728),me=s(63902),Se=s(47695),Me=s(63763),De=s(4235),tt=s(24229),at=s(21385);const ht={name:"wImage",zIndex:20,r:0,w:500,h:176,opacity:1,isLock:!1,isVisible:!0,isLockAspect:!0,fixPosTo:"none",stickyOffset:null,interactions:[],animation:{aniName:"none",aniDelay:0,aniDuration:"1s",aniCount:1},fill:{fillIsVisible:!1,fill:"solid",solidColor:3857049087},border:{bdrIsVisible:!1,bdrColor:3149642751,bdrWidth:1,bdrStyle:"solid"},borderRadius:0,shadow:{type:"box_shadow",shadowIsVisible:!1,shadowColor:102,offsetX:0,offsetY:2,blurRadius:6,spreadRadius:0},flip:{flipH:!1,flipV:!1}},Je={name:"wImage",zIndex:20,r:0,w:380,h:134,opacity:1,isLock:!1,isVisible:!0,isLockAspect:!0,fixPosTo:"none",stickyOffset:null,interactions:[],animation:{aniName:"none",aniDelay:0,aniDuration:"1s",aniCount:1},fill:{fillIsVisible:!1,fill:"solid",solidColor:3857049087},border:{bdrIsVisible:!1,bdrColor:3149642751,bdrWidth:1,bdrStyle:"solid"},borderRadius:0,shadow:{type:"box_shadow",shadowIsVisible:!1,shadowColor:102,offsetX:0,offsetY:2,blurRadius:6,spreadRadius:0},flip:{flipH:!1,flipV:!1}};var $=s(92272),mt=s(67588),yt=s(75908);const Le=L=>setTimeout(()=>MB.commonGuideHelper.tryToShowGuide(C.c.GUIDE_NOVICE_V9_2408_STEP_1),L),He=()=>{if(MB.commonGuideHelper.checkGuideHasShown(C.c.GUIDE_NOVICE_V9_2408_STEP_1))return null;const L=document.querySelector("."+C.c.GUIDE_NOVICE_V9_2408_STEP_1),P=document.querySelector(".widget-panel-container");if(!L||!P)return null;L.getAttribute("data-cid")==="\u6D41\u7A0B"?setTimeout(()=>(0,yt._)(L,P,()=>Le(200)),50):Le(200)};var ye=s(32060);const je={"entry:initial:guide:type":async L=>{let{getState:P,dispatch:b}=L;const u=P(),{isExperience:f,isLoggedExperience:g}=(0,r.W4)(u);if(f||g)return;const S=(0,r.HW)(u),_=(0,r.wA)(u);if((0,mt.MZ)(u)==="recommend"){var H;!(0,Se.XM)()&&(H=(0,Se.yX)())!=null&&H.isCompleted&&setTimeout(()=>He(),200)}if(l()(S.created_at).isAfter("2023-08-17")&&!MB.commonGuideHelper.checkGuideHasShown(C.c.ENTER_DESIGN_PROTO_IN_SPACE_CREATED_DAY)){const pe=_?_.created_at:S.solo_active_date;l()().isSame(pe,"day")&&MB.commonGuideHelper.markGuideAsRead(C.c.ENTER_DESIGN_PROTO_IN_SPACE_CREATED_DAY)}const Y=(0,w.jN)(),re=(0,U.Yt)(M.d,!0,U.qW.Boolean);if(Y!=null&&Y.isCompleted){re||b({type:"update:taskList:isHide",payload:{isHide:!1}}),Y!=null&&Y.isShowTaskList&&b({type:"entry:show:taskList"});return}else Y!=null&&Y.isToShow&&(b({type:"update:taskList:isHide",payload:{isHide:!1}}),b({type:"update:taskList:isCollapse",payload:{isCollapse:!0}}));(0,ye.iX)(),(0,Se.rB)(u)},"entry:prepare:novice:guide:screen:data":async(L,P)=>{let{getState:b,dispatch:u}=L,{payload:{mtResourceCid:f,marketTemplateKey:g,sceneTag:S}}=P;const _=b(),O=(0,r.X_)(_),V=(0,r.Ur)(_),Y=(0,y.fm)(_).get(f);if(!Y||!g)return;let re=0,pe=!0;const Ce=(0,at.VC)(S)==="PC";g.forEach(Pe=>{const Ie=[Pe],{w:Re,h:We}=(0,j.lY)({sub:Ie},Y);let{left:ct,top:vt}=(0,Q.u5)({width:Re,height:We,scale:O});Ce?(vt+=re,re+=We+80):(ct+=re,re+=Re+80);const Ut=ze.Z.xy(ct,vt),pn=V==null?void 0:V.cid,fn=Y.saveSubtree(Ie),uo=(0,me.BB)({data:fn,worldPos:Ut,keyRndSup:pn,currentPageKey:pn});pe&&(u({type:"entry:select:items",payload:{cids:uo}}),pe=!1),u({type:"entry:refresh:link-list"})}),u({type:"entry:zoom:fit:scale:offset"}),u({type:"entry:show:guide:popup:panel",payload:{isGuidePC:Ce}})},"entry:show:guide:popup:panel":async(L,P)=>{let{getState:b,dispatch:u}=L,{payload:{isGuidePC:f}}=P;const g=(0,De.nE)(b());if(!g||g.length===0)return;const{key:S,hotAttr:{x:_,y:O,w:V,h:H}}=g[0],Y={left:_+V/2-10,top:O+H/2},re={left:_+V/2-650,top:O+H/2+100},pe=(0,tt.cF)("imgtip"),Ce={key:pe,hotAttr:{type:N.x.WImage,x:f?re.left:Y.left,y:f?re.top:Y.top,...f?ht:Je,image:{imageFilter:"",imageClipType:"none",imageRectAspectRatio:3.15,imageRectR:0,imageRectCenterX:f?222.2:168.87,imageRectCenterY:f?80.83:61.43,imageRectWidth:f?506.46:384.91,imageRectHeight:f?161.62:122.83,imageRectOriginalWidth:780,imageRectOriginalHeight:248,imageFillType:"stretch",imageRef:(0,$.q4)("\u5F15\u5BFC\u56FE\u7247","https://cdn.modao.cc/app_guide.png").key}},sub:[],sup:S};sdkStore.updateHotItem(Ce);const Pe=[{key:pe,hotAttr:{...Ce.hotAttr}}];u({type:"entry:widget:change",payload:{flatChgList:Pe,isCreateWidget:!0,shouldReBuildTree:!0}})},"entry:skip:novice:guide":async L=>{let{getState:P,dispatch:b}=L;const u=P(),f=(0,r.Ur)(u),g=sdkStore.findAllTypeUnder(f==null?void 0:f.cid,"rResCanvas");if((g==null?void 0:g.length)!==0)return;const S=(0,Me.gu)({type:N.x.Canvas,screen:f,attrs:{width:0,height:0}});b({type:"entry:batch:create:items",payload:{data:[{items:[S],width:S.w,height:S.h}],isSkipUpdateGuides:!0}}),b({type:"entry:zoom:fit:scale:offset"})},"entry:update:novice:guide:and:task":async(L,P)=>{let{getState:b,dispatch:u}=L,{payload:{guideType:f,taskType:g}}=P;f&&(0,w.EG)(f),g&&u({type:"entry:update:guide:task",payload:{taskType:g}})},"entry:move:screen:right":L=>{var P,b;let{getState:u,dispatch:f}=L;const g=u(),S=(0,r.X_)(g),_=(0,r.ER)(g),O=(0,r.eo)(g),H=(P=(b=sdkStore.findAllTypeUnder(O,N.x.Canvas).pop())==null?void 0:b.key)!=null?P:null;if(H===null)return;const Y=sdkStore.getHotAABB(H),[re,pe]=Y,Pe=(pe-re)*(S/100),Ie={x:_.x+Pe,y:_.y};f({type:"design:set:canvas:offset",payload:{offset:Ie}})}};var ot=s(19249),we=s(18833);const $e=async()=>{let L=null;try{const P=await(0,ot.DE)("/api/library/v4/workspace_labels");P!=null&&P.keywords&&(L=P==null?void 0:P.keywords)}catch(P){(0,we.$r)()}return L},ge=async()=>{let L=[];try{const P=await(0,ot.DE)("/api/web/v3/configuration/square_search_keywords");P!=null&&P.keywords&&(L=P==null?void 0:P.keywords.split(/[,,]/))}catch(P){(0,we.$r)()}return L};var Ze=s(93093),W=s(54190),an=s(8293),_t=s(37860);const nn={"entry:init:hotKeyWords":async L=>{let{dispatch:P,getState:b}=L;const u=b();if(!(0,y.t$)(u))try{const g=await ge(),S=g.length>0?g.slice(0,5):[];P({type:"update:popups:state",payload:{hotKeyWords:S}}),P({type:"resources:update:popupLoaded",payload:{isHotKeyWordsLoaded:!0}})}catch(g){(0,Ze.wd)("\u53D1\u751F\u4E25\u91CD\u62A5\u9519"),(0,Ze.Cp)(g)}},"entry:init:design:configurations":async L=>{let{dispatch:P,getState:b}=L;const u=b();if(!(0,y.RD)(u))try{const g=await(0,W.dC)(),S=(0,_t.nh)(),_={...g,...S};(0,an.IP)(g),P({type:"widget-panel:update:state",payload:{sceToPLabelMap:_}});const O=await $e();let V=[];O!=null&&O.screen_list&&(V=Object.keys(O==null?void 0:O.screen_list)),P({type:"page-panel:update:state",payload:{libraryFilterWords:V}}),P({type:"resources:update:popupLoaded",payload:{isFilterWordsLoaded:!0}})}catch(g){(0,Ze.wd)("\u53D1\u751F\u4E25\u91CD\u62A5\u9519"),(0,Ze.Cp)(g)}}};var Oe=s(70248),sn=s(14084),It=s(60651),Pt=s(24496),dt=s(50353),Vn=s(99917),o=s(78915),Gn=s(12410),xt=s(60312),Ot=s(30294),wt=s(19396),Kt=s.n(wt),fe=s(73662),bt=s(65057);const un={"entry:screenContainer:selecting":(L,P)=>{let{getState:b,dispatch:u}=L,{payload:{event:f}}=P;const{target:g}=f;if(g.closest(".selection-handler")||g.closest(".gap-adjuster")||g.closest(".imageWrapperResizeBox")||g.closest(".line"))return;const S=b(),_=(0,It.jx)(S),O=(0,Pt.WH)(S);!f.shiftKey&&!O&&setTimeout(()=>u({type:"entry:clear:selection"}),0),_!==o.qi.OnlyView&&u({type:"start:range:select",payload:{startX:f.clientX,startY:f.clientY}})},"entry:screenContainer:enter:editing:widget":(L,P)=>{let{getState:b,dispatch:u}=L,{payload:f}=P;const g=f==null?void 0:f.event,S=b(),O=(0,It.jx)(S)===o.qi.OnlyView,V=(0,De.p$)(S),H=(0,I.UV)(S),Y=(0,sn.j)(S),re=(0,De.U2)(S);if(V.length!==1)return;const pe=H.getHotItem(V[0]);if(!pe)return;const{key:Ce,hotAttr:Pe}=pe,Ie=Pe.type;if(Ie===N.x.Canvas||Ie===N.x.WWrap||Ie===N.x.WIcon||Pe.isLock||Ie===N.x.WElbow&&g.target.classList.contains("line-rect-anchor"))return;if(O){Ie===N.x.WBasket&&Pe&&u({type:"entry:edit:bDanli",payload:{bDanliKey:Ce}});return}if(O)return;const Re=(0,xt.ji)(Pe);if(Ie===N.x.WElbow){const{elbow:{textPositionProportion:vt,dPathList:Ut,elbowType:pn}}=Pe;if(vt===void 0||vt===-1){const fn=(0,Ot.ce)(Ut,pn);u({type:"entry:elbow:update:textPositionProportion",payload:{key:Ce,textPositionProportion:fn}})}}if(Ie===N.x.WBasket){if(Y&&!O)return;Pe.basket==="bDanli"&&u({type:"entry:edit:bDanli",payload:{bDanliKey:re}})}else if((0,dt.a$)(Ie)&&!Re){if(Ie===N.x.WSwimlane)u({type:Gn.X.entryKey["entry:flow:text-edit:prepare"],payload:{event:g}});else{const vt=fe.y.query.getMissFontHiKeySet(S);if(vt&&vt.has(Ce)){u({type:fe.y.entryKey["font:miss:modal:open"]});return}u({type:"entry:set:editing:cid",payload:{item:pe}})}u({type:"entry:select:items",payload:{cids:[Ce]}})}else if(Ie===N.x.WImage){var We,ct;if(!Pe.image||!((We=Pe.image)!=null&&We.imageRef)||(0,Oe.OO)(Ce))return;((ct=Pe.image)==null?void 0:ct.imageClipType)==="none"&&sdkStore.updateHotAttrMerge(Ce,{image:{...Pe.image,imageClipType:Vn.Mg.square}}),u({type:"image:update:state",payload:{isEditingImageWrapperCid:Ce,currentImageOperateType:Vn.bl.cutting}}),u({type:"entry:select:items",payload:{cids:[Ce]}})}else if(Ie===N.x.WChart)u({type:"entry:chart:in:edit",payload:{widget:pe,trackType:"\u53CC\u51FB"}});else if(Re||(0,dt.X3)(Ie))u({type:"entry:select:items",payload:{cids:[Ce]}}),u({type:"mode:update:state",payload:{isEditingEditableWidgetCid:Ce}});else if([N.x.WMind,N.x.WTable].includes(Ie))u({type:"entry:select:items",payload:{cids:[Ce]}});else if(Ie===N.x.WCode)u({type:"entry:aiComponent:in:edit",payload:{cid:Ce}});else if(Ie===N.x.WGraph){if(Y)return;u({type:"entry:widget:graph:edit",payload:{action:"update-widget"}})}},"entry:screenContainer:create:widget:mousemove":(L,P)=>{let{getState:b,dispatch:u}=L,{payload:{event:f,isTear:g=!1}}=P;const S=b(),_=(0,r.X_)(S),O=(0,r.ER)(S),V=(0,r.$S)(S),H=(0,r.Ur)(S),Y=(0,De.p$)(S),re=(0,bt.mG)(f,{scale:_,offset:O,viewportRect:V}),pe=f.ctrlKey||f.metaKey,Ce=(0,bt.nS)({isTear:g,world:re,scale:_,newSelection:Y,currentPageKey:H.cid,isCtrlDown:pe});u(o.GO.hoverItem(Ce))},"entry:screenContainer:dragCanvas":(L,P)=>{var b,u;let{getState:f,dispatch:g}=L,{payload:{e:S}}=P;const _=S.clientX,O=S.clientY,V=f(),{x:H,y:Y}=(0,r.ER)(V);g({type:"close:contextmenu"}),g({type:"reducer:flag:set:is-dragging-canvas",payload:{isDraggingCanvas:!0}}),g({type:"comment:update:activeCommentCid",payload:{activeCommentCid:""}});const re=(b=(u=MB).getWidgetStore)==null?void 0:b.call(u).getTreeSize(),pe=Ie=>{const Re={x:H+(Ie.clientX-_),y:Y+(Ie.clientY-O)};g({type:"entry:set:canvas:offset",payload:{offset:Re}}),g(o.GO.toggleIsShowFloatingToolbar(!1))},Ce=re>800?Kt()(pe,16):pe,Pe=Ie=>{var Re;(Re=Ce.flush)==null||Re.call(Ce),document.removeEventListener("mousemove",Ce),document.removeEventListener("mouseup",Pe),g({type:"reducer:flag:set:is-dragging-canvas",payload:{isDraggingCanvas:!1}}),g(o.GO.toggleIsShowFloatingToolbar(!0))};document.addEventListener("mousemove",Ce),document.addEventListener("mouseup",Pe)}};var gt=s(10472),Wt=s(96986),Un=s(77709),Jn=s(7457),Yt=s(99587),rt=s(87765),An=s(63986),Nt=s.n(An),jt=s(59025),vn=s(74945),Dt=s(45815),$t=s(20315),kn=s(14166),Kn=s(40610),dn=s(81717),ft=s(5209),Lt=function(L){return L[L.Toolbar=1]="Toolbar",L[L.ShortCut=2]="ShortCut",L[L.TransformDoubleClick=3]="TransformDoubleClick",L[L.TransformSettingPanel=4]="TransformSettingPanel",L}(Lt||{});const bn={[Lt.Toolbar]:"\u9876\u90E8\u680F\u5355\u51FB",[Lt.ShortCut]:"\u5FEB\u6377\u952E",[Lt.TransformDoubleClick]:"\u7EC4\u4EF6\u8F6C\u6362-\u53CC\u51FB\u8DEF\u5F84",[Lt.TransformSettingPanel]:"\u7EC4\u4EF6\u8F6C\u6362-\u53F3\u4FA7\u9762\u677F\u6309\u94AE"};var Yn=function(L){return L[L.Enter=1]="Enter",L[L.Esc=2]="Esc",L[L.ClickBlank=3]="ClickBlank",L[L.Exit=4]="Exit",L[L.Other=5]="Other",L}(Yn||{});const on={[Yn.Enter]:"Enter",[Yn.Esc]:"Esc",[Yn.ClickBlank]:"\u70B9\u51FB\u7A7A\u767D",[Yn.Exit]:"\u70B9\u51FB\u5B8C\u6210\u7F16\u8F91",[Yn.Other]:"\u5176\u4ED6"},yn=(L,P,b)=>{(0,ft.kH)("add_vector_V8",{source:bn[L],vector_type:P?"\u95ED\u5408":"\u975E\u95ED\u5408",vector_finish:on[b]}),dn.Y4.editProjectNew("\u65B0\u5EFA\u77E2\u91CF")};var lo=s(62532),qn=s(93e3),Wn=s(27480),Nn=s(16402),xn=s(18637),Ye=s(8452);const wn=L=>({x:L.clientX,y:L.clientY}),Hn=(L,P)=>ze.Z.subtract(P,{x:L,y:J.E0}),zn=L=>{const P=MB.__store__.getState(),b=(0,It.lY)(P),{key:u}=b;if(!u)return;const f=(0,It.Je)(P),g=(0,Nn.n)(P),S=(0,Nn.H)(P),_=wn(L),O=Hn(g,_),V=qn.L.applyInverse(S,O),{hotAttr:{vector:H}}=sdkStore.getHotItem(u),Y=(H==null?void 0:H.points)||[],re=(0,xn.YW)(u),pe=Y.map(Re=>{let{x:We,y:ct}=Re;return re.apply({x:We,y:ct})});f!==0&&MB.action("start:range:select",{startX:L.clientX,startY:L.clientY});let Ce=!1;const Pe=Re=>{if(f!==0){const We=wn(Re),ct=Hn(g,We);if(ze.Z.distance(_,We)>2&&(Ce=!0),Ce){const vt=qn.L.applyInverse(S,ct),Ut=V.x