ai-ppt-edit-component 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -12,7 +12,7 @@
12
12
  background-color: rgba(255, 255, 255, 0);
13
13
  transition: all 1s ease-in-out;
14
14
  align-items: center;
15
- `,document.body.appendChild(Dn));const o=r.createVNode(eT,n,null),a=document.createElement("div");o.appContext=e.ctx||Ae._context||null,o.props.onClose=e.onClose,o.props.onDestroy=()=>{Dn&&Dn.childNodes.length<=1&&(Dn.remove(),Dn=null),r.render(null,a)},r.render(o,a),Dn.appendChild(a.firstElementChild);const i={id:t,close:()=>{var l,s;return(s=(l=o?.component)===null||l===void 0?void 0:l.exposed)===null||s===void 0?void 0:s.close()}};return Rd.push(i),i};Ae.success=(e,t)=>Ae({...t,type:"success",message:e});Ae.info=(e,t)=>Ae({...t,type:"info",message:e});Ae.warning=(e,t)=>Ae({...t,type:"warning",message:e});Ae.error=(e,t)=>Ae({...t,type:"error",message:e});Ae.closeAll=function(){for(let e=Rd.length-1;e>=0;e--)Rd[e].close()};const rT=(e,t)=>Xe.padStart(""+e,t,"0"),oT=e=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(e),aT=e=>e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()),kd=e=>typeof e!="object"||e===null?e:Array.isArray(e)?e.map(kd):Object.keys(e).reduce((t,n)=>{const o=aT(n);return t[o]=kd(e[n]),t},{}),iT=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),Dd=e=>typeof e!="object"||e===null?e:Array.isArray(e)?e.map(Dd):Object.keys(e).reduce((t,n)=>{const o=iT(n);return t[o]=Dd(e[n]),t},{}),lT={COMMON:{CONFIRM:"确认",CANCEL:"取消",DELETE:"删除",REMOVE:"移除",INSERT:"插入",COPY:"复制",CUT:"剪切",PASTE:"粘贴",SELECT_ALL:"全选",EDIT:"编辑",CLOSE:"关闭",APPLY:"应用",SAVE:"保存",SEARCH:"查找",SEARCH_FONT:"搜索字体",SEARCH_FONT_SIZE:"搜索字号",REPLACE:"替换",REPLACE_ALL:"全部替换",NEXT:"下一个",PREV:"上一个",BACK:"返回",MORE:"更多",PREVIEW:"预览",CLEAR:"清空",SET:"设置",FORMAT_PAINTER_TIP:"格式刷(双击连续使用)"},EXPORT:{RANGE:"导出范围:",ALL:"全部",CURRENT:"当前页",CUSTOM:"自定义",CUSTOM_RANGE:"自定义范围:",FORMAT:"导出格式:",IMAGE_QUALITY:"图片质量:",IGNORE_WEBFONT:"忽略在线字体:",IGNORE_MEDIA:"忽略音频/视频:",OVERWRITE_MASTER:"覆盖默认母版:",PER_PAGE_COUNT:"每页数量:",EDGE_PADDING:"边缘留白:",BTN_PPTX:"导出 PPTX",BTN_IMAGE:"导出图片",BTN_JSON:"导出 JSON",BTN_PDF:"打印 / 导出 PDF",BTN_PPTIST:"导出 PPTIST 文件",IMAGE_FAIL:"导出图片失败",FAIL:"导出失败",CLOSE:"关闭",EXPORTING:"正在导出...",TIP_MEDIA:"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。",TIP_MEDIA_FORMAT:"提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。",TIP_WEBFONT:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。",TIP_PPTIST:"提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。",TIP_PDF:"提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。"},EXPORT_TABS:{PPTX:"导出 PPTX",IMAGE:"导出图片",JSON:"导出 JSON",PDF:"打印 / 导出 PDF",PPTIST:"导出 PPTIST 文件"},SLIDE_THUMBS:{ADD_SLIDE:"添加幻灯片",PAGE_NUMBER:"幻灯片 {current} / {total}",SECTION_PLACEHOLDER:"输入节名称",SECTION_UNTITLED:"无标题节",SECTION_DEFAULT:"默认节",SECTION_DELETE:"删除节",SECTION_DELETE_WITH_SLIDES:"删除节和幻灯片",SECTION_DELETE_ALL:"删除所有节",SECTION_RENAME:"重命名节",SECTION_ADD:"增加节",PASTE:"粘贴",SELECT_ALL:"全选",NEW_SLIDE:"新建页面",SLIDE_SHOW:"幻灯片放映",CUT:"剪切",COPY:"复制",DUPLICATE_SLIDE:"复制页面",DELETE_SLIDE:"删除页面",SLIDE_SHOW_FROM_CURRENT:"从当前放映"},SLIDE_TEMPLATES:{INSERT_ALL:"插入全部",INSERT_TEMPLATE:"插入模板",TYPE_ALL:"全部",TYPE_COVER:"封面",TYPE_CONTENTS:"目录",TYPE_TRANSITION:"过渡",TYPE_CONTENT:"内容",TYPE_REFERENCE:"引用",TYPE_END:"结束"},TEMPLATE_LIST:{CMI1:"CMI1",CMI2:"CMI2",CMI3:"CMI3",RED_GENERAL:"红色通用",BLUE_GENERAL:"蓝色通用",PURPLE_GENERAL:"紫色通用",MORANDI:"莫兰迪配色"},COLOR_PICKER:{RECENT_USED:"最近使用",EYEDROPPER_HINT:"请在画布上点击取色",EYEDROPPER_INIT_FAIL:"取色失败,请重试"},IMPORT:{FILE_PARSE_FAIL:"无法正确读取/解析该文件"},REQUEST:{UNKNOWN_ERROR:"未知错误",SERVER_UNKNOWN_ERROR:"服务器异常",CONNECTION_FAIL:"连接失败"},EDITOR:{GENERATING:"AI 生成中,请耐心等待…",AIPPT_NO_PPTID:"aippt生成失败,缺少pptId参数",AIPPT_FETCH_FAIL:"获取AIPPT数据失败",TEMPLATE_FETCH_FAIL:"获取模板数据失败"},HEADER_BAR:{EXPORT_FILE:"导出文件",RESET_SLIDES:"重置幻灯片",MARKUP:"幻灯片类型标注",HOTKEY:"快捷操作",SLIDE_SHOW_TOOLTIP:"幻灯片放映(F5)",SLIDE_SHOW_FROM_START:"从头开始",SLIDE_SHOW_FROM_CURRENT:"从当前页开始",EXPORT_TOOLTIP:"导出",HOTKEY_TITLE:"快捷操作",AIPPT_DRAWER_TITLE:"渲染 AIPPT",TEMPLATE_SELECTED:"已选择模板",TEMPLATE_NOT_SELECTED:"尚未选择",AIPPT_JSON_LABEL:"AIPPT JSON",AIPPT_JSON_PLACEHOLDER:'在此粘贴 AIPPT.json 内容(如 {"cover": {...}, "contents":[...], "content":[...], "end":[...]})',RENDER_AND_LOAD:"渲染并载入",IMPORTING:"正在导入...",RENDERING_AIPPT:"正在渲染 AIPPT...",TEMPLATE_LOADED:"模板已载入,请粘贴 AIPPT JSON",TEMPLATE_LOAD_FAIL:"模板读取失败:请确认是有效的 JSON",NEED_TEMPLATE_FILE:"请先选择模板文件",AIPPT_PARSE_FAIL:"AIPPT JSON 解析失败,请检查格式",TEMPLATE_SLIDES_MISSING:"模板缺少 slides 字段或为空",AIPPT_UNKNOWN_TYPES:"以下类型未在当前模板中找到:{unknown};模板支持:{supported}",AIPPT_UNKNOWN_TYPES_EMPTY:"未探测到",RENDER_SUCCESS:"渲染完成,已载入到画布",RENDER_FAIL:"渲染失败:{reason}",RENDER_FAIL_FALLBACK:"请检查模板类型标注与 AIPPT 结构是否匹配"},QUICK_SEARCH:{SEARCH_PLACEHOLDER:"输入查找内容",REPLACE_PLACEHOLDER:"输入替换内容",IGNORE_CASE:"忽略大小写",PREV:"上一个",NEXT:"下一个",NO_MATCH:"未找到匹配结果",EMPTY_SEARCH:"请输入查找内容"},COMMENT_PANEL:{PLACEHOLDER:"点击输入演讲者备注"},TABLE_GENERATOR:{TITLE:"表格",CUSTOM:"自定义",ROW_COUNT:"行数:",COL_COUNT:"列数:",COUNT_LIMIT:"行数/列数必须在0~20之间!"},MEDIA_INPUT:{VIDEO:"视频",AUDIO:"音频",VIDEO_PLACEHOLDER:"请输入视频地址,e.g. https://xxx.mp4",AUDIO_PLACEHOLDER:"请输入音频地址,e.g. https://xxx.mp3",VIDEO_ERROR:"请先输入正确的视频地址",AUDIO_ERROR:"请先输入正确的音频地址"},CANVAS_TOOL:{UNDO:"撤销(Ctrl + Z)",REDO:"重做(Ctrl + Y)",NOTES_PANEL:"批注面板",SELECTION_PANEL:"选择窗格",SEARCH_REPLACE:"查找替换",SEARCH_REPLACE_TOOLTIP:"查找/替换(Ctrl + F)",INSERT_TEXT:"插入文字",TEXT_HORIZONTAL:"横向文本框",TEXT_VERTICAL:"竖向文本框",INSERT_SHAPE:"插入形状",FREE_DRAW:"自由绘制",INSERT_IMAGE:"插入图片",INSERT_LINE:"插入线条",INSERT_CHART:"插入图表",INSERT_TABLE:"插入表格",INSERT_FORMULA:"插入公式",INSERT_MEDIA:"插入音视频",INSERT_SYMBOL:"插入符号",SCALE_DOWN:"画布缩小(Ctrl + -)",SCALE_UP:"画布放大(Ctrl + =)",FIT_SCREEN:"适应屏幕",FIT_SCREEN_TOOLTIP:"适应屏幕(Ctrl + 0)"},CANVAS_MENU:{RULER:"标尺",GRID_LINES:"网格线",GRID_NONE:"无",GRID_SMALL:"小",GRID_MEDIUM:"中",GRID_LARGE:"大",RESET_SLIDE:"重置当前页",SLIDE_SHOW:"幻灯片放映"},LINK_DIALOG:{WEB:"网页链接",SLIDE:"幻灯片页面",WEB_PLACEHOLDER:"请输入网页链接地址",PREVIEW:"预览:",SLIDE_LABEL:"幻灯片 {index}",SELECT_TARGET:"请选择目标幻灯片"},LINK_HANDLER:{SLIDE_PAGE:"幻灯片页面",CHANGE:"更换"},EDITABLE_ELEMENT:{UNLOCK:"解锁",LOCK:"锁定",ALIGN_HORIZONTAL:"水平居中",ALIGN_VERTICAL:"垂直居中",ALIGN_CENTER_BOTH:"水平垂直居中",ALIGN_LEFT:"左对齐",ALIGN_RIGHT:"右对齐",ALIGN_TOP:"顶部对齐",ALIGN_BOTTOM:"底部对齐",BRING_TO_FRONT:"置于顶层",SEND_TO_BACK:"置于底层",MOVE_UP:"上移一层",MOVE_DOWN:"下移一层",SET_LINK:"设置链接",GROUP:"组合",UNGROUP:"取消组合"},SELECTION_PANEL:{TITLE:"选择({current}/{total})",SHOW_ALL:"全部显示",HIDE_ALL:"全部隐藏",GROUP:"组合"},SPEAKER_NOTES:{TITLE:"幻灯片{index}的批注",REPLY:"回复",REPLY_PLACEHOLDER:"输入回复内容",EMPTY:"本页暂无批注",INPUT_PLACEHOLDER:"输入批注(为{target})",TARGET_ELEMENT:"选中元素",TARGET_SLIDE:"当前页幻灯片",CLEAR_TOOLTIP:"清空本页批注",ADD:"添加批注",DEFAULT_USER:"测试用户"},MARKUP_PANEL:{TITLE:"幻灯片类型标注",CURRENT_SLIDE_TYPE:"当前页面类型:",CURRENT_TEXT_TYPE:"当前文本类型:",CURRENT_CHART_MARK:"当前图表标记:",CURRENT_IMAGE_TYPE:"当前图片类型:",PLACEHOLDER:"选中文本、图表、图片或带文字的形状,进行类型标记",TYPE_UNMARKED:"未标记类型",SLIDE_COVER:"封面页",SLIDE_CONTENTS:"目录页",SLIDE_TRANSITION:"过渡页",SLIDE_CONTENT:"内容页",SLIDE_REFERENCE:"引用页",SLIDE_END:"结束页",TEXT_TITLE:"标题",TEXT_SUBTITLE:"副标题",TEXT_CONTENT:"正文",TEXT_ITEM:"列表项目",TEXT_ITEM_TITLE:"列表项标题",TEXT_NOTES:"注释",TEXT_HEADER:"页眉",TEXT_FOOTER:"页脚",TEXT_PART_NUMBER:"节编号",TEXT_ITEM_NUMBER:"项目编号",TEXT_REFERENCE_NUMBER:"引用编号",TEXT_REFERENCE_TITLE:"引用标题",IMAGE_PAGE:"页面插图",IMAGE_ITEM:"项目插图",IMAGE_BACKGROUND:"背景图",CHART_ITEM:"图表(内容项)"},SYMBOL_LIBRARY:{TAB_LETTER:"字母",TAB_NUMBER:"序号",TAB_MATH:"数学",TAB_ARROW:"箭头",TAB_GRAPH:"图形",TAB_EMOJI:"Emoji",EMOJI_FACE:"表情",EMOJI_ACTION:"动作",EMOJI_NATURE:"动植物",EMOJI_FOOD:"食物",EMOJI_TRAVEL:"旅行",EMOJI_ACTIVITY:"活动",EMOJI_OBJECTS:"物品",EMOJI_SYMBOLS:"符号"},TOOLBAR:{TAB_STYLE:"样式",TAB_POSITION:"位置",TAB_ANIMATION:"动画",TAB_DESIGN:"设计",TAB_TRANSITION:"切换",TAB_STYLE_MULTI:"样式(多选)",TAB_POSITION_MULTI:"位置(多选)"},POSITION_PANEL:{LAYER:"层级:",BRING_TO_FRONT:"置顶",SEND_TO_BACK:"置底",MOVE_UP:"上移",MOVE_DOWN:"下移",ALIGN:"对齐:",ALIGN_LEFT:"左对齐",ALIGN_RIGHT:"右对齐",ALIGN_TOP:"上对齐",ALIGN_BOTTOM:"下对齐",ALIGN_CENTER_HORIZONTAL:"水平居中",ALIGN_CENTER_VERTICAL:"垂直居中",HORIZONTAL:"水平:",VERTICAL:"垂直:",WIDTH:"宽度:",HEIGHT:"高度:",ROTATE:"旋转:",LOCK_RATIO:"宽高比锁定",UNLOCK_RATIO:"解除宽高比锁定"},MULTI_POSITION:{HORIZONTAL_DISTRIBUTE:"水平均匀分布",VERTICAL_DISTRIBUTE:"垂直均匀分布"},STYLE_PARTS:{OPACITY:"不透明度:",SHADOW_ENABLE:"启用阴影:",SHADOW_X:"水平阴影:",SHADOW_Y:"垂直阴影:",SHADOW_BLUR:"模糊距离:",SHADOW_COLOR:"阴影颜色:",OUTLINE_ENABLE:"启用边框:",OUTLINE_STYLE:"边框样式:",OUTLINE_COLOR:"边框颜色:",OUTLINE_WIDTH:"边框粗细:",COLOR_MASK:"着色(蒙版):",MASK_COLOR:"蒙版颜色:",FILTER_ENABLE:"启用滤镜:",FLIP_VERTICAL:"垂直翻转",FLIP_HORIZONTAL:"水平翻转"},FILTERS:{BLUR:"模糊",BRIGHTNESS:"亮度",CONTRAST:"对比度",GRAYSCALE:"灰度",SATURATION:"饱和度",HUE:"色相",SEPIA:"褐色",INVERT:"反转",OPACITY:"不透明度",PRESET_BW:"黑白",PRESET_RETRO:"复古",PRESET_SHARPEN:"锐化",PRESET_SOFT:"柔和",PRESET_WARM:"暖色",PRESET_BRIGHT:"明亮",PRESET_VIVID:"鲜艳",PRESET_BLUR:"模糊",PRESET_INVERT:"反转"},TEXT_STYLE:{LINE_HEIGHT:"行高:",LINE_HEIGHT_OPTION:"{value} 倍",PARAGRAPH_SPACING:"段间距:",PX_OPTION:"{value}px",LETTER_SPACING:"字间距:",BOX_FILL:"文本框填充:",PRESET_TITLE_LG:"标题(大)",PRESET_TITLE_SM:"标题(小)",PRESET_BODY:"正文",PRESET_BODY_SM:"正文(小)",PRESET_NOTE_1:"注释(斜体)",PRESET_NOTE_2:"注释(下划线)"},MULTI_STYLE:{FILL_COLOR:"填充颜色:",OUTLINE_STYLE:"边框样式:",OUTLINE_COLOR:"边框颜色:",OUTLINE_WIDTH:"边框粗细:"},RICH_TEXT:{TEXT_COLOR:"文字颜色",TEXT_HIGHLIGHT:"文字高亮",FONT_SIZE_INCREASE:"增大字号",FONT_SIZE_DECREASE:"减小字号",BOLD:"加粗",ITALIC:"斜体",UNDERLINE:"下划线",STRIKETHROUGH:"删除线",SUPERSCRIPT:"上标",SUBSCRIPT:"下标",INLINE_CODE:"行内代码",BLOCKQUOTE:"引用",AI_POLISH:"美化",AI_EXPAND:"扩写",AI_CONDENSE:"精简",AI_ASSIST:"AI辅助",CLEAR_FORMAT:"清除格式",LINK:"超链接",LINK_PLACEHOLDER:"请输入超链接",ALIGN_LEFT:"左对齐",ALIGN_CENTER:"居中",ALIGN_RIGHT:"右对齐",ALIGN_JUSTIFY:"两端对齐",BULLET_LIST:"项目符号",ORDERED_LIST:"编号",INDENT_DECREASE:"减小段落缩进",INDENT_INCREASE:"增大段落缩进",TEXT_INDENT_DECREASE:"减小首行缩进",TEXT_INDENT_INCREASE:"增大首行缩进",INVALID_LINK:"不是正确的网页链接地址",NO_TEXT_CONTENT:"没有可以执行的文本内容",IN_DEVELOPMENT:"功能开发中,敬请期待"},SLIDE_DESIGN:{BACKGROUND_FILL:"背景填充",FILL_SOLID:"纯色填充",FILL_IMAGE:"图片填充",FILL_GRADIENT:"渐变填充",IMAGE_CONTAIN:"缩放",IMAGE_REPEAT:"拼贴",IMAGE_COVER:"缩放铺满",GRADIENT_LINEAR:"线性渐变",GRADIENT_RADIAL:"径向渐变",CURRENT_COLOR:"当前色块:",GRADIENT_ANGLE:"渐变角度:",APPLY_BACKGROUND_ALL:"应用背景到全部",RATIO_WIDE_16_9:"宽屏 16 : 9",RATIO_WIDE_16_10:"宽屏 16 : 10",RATIO_STANDARD_4_3:"标准 4 : 3",RATIO_PAPER_A3_A4:"纸张 A3 / A4",RATIO_PORTRAIT_A3_A4:"竖向 A3 / A4",CANVAS_SIZE:"画布尺寸:{width} × {height}",GLOBAL_THEME:"全局主题",FONT:"字体:",FONT_COLOR:"字体颜色:",BACKGROUND_COLOR:"背景颜色:",THEME_COLORS:"主题色:",APPLY_THEME_ALL:"应用主题到全部",EXTRACT_THEME:"从幻灯片提取主题",PRESET_THEMES:"预置主题",TEXT_SAMPLE:"文字 Aa",SET_AND_APPLY:"设置并应用"},SLIDE_THEME_COLORS:{TITLE:"编辑主题色",ITEM:"幻灯片主题色{index}:"},THEME_EXTRACT:{FONT:"字体:",FONT_COLOR:"文字颜色:",BACKGROUND_COLOR:"背景颜色:",THEME_COLORS:"主题色:",TIP:"(点击色块排除不要的颜色)",SELECT:"选择",APPLY_TO_THEME:"应用到主题",SAVE_SELECTED:"将选中配置保存为主题",FROM_CURRENT:"从当前页中提取",FROM_ALL:"从全部幻灯片提取",THEME_COLOR_LIMIT:"主题色超出数量限制,已自动选取前6个"},IMAGE_STYLE:{CROP_IMAGE:"裁剪图片",CLIP_BY_SHAPE:"按形状:",CLIP_BY:"按{label}:",RADIUS:"圆角半径:",REPLACE_IMAGE:"替换图片",RESET_STYLE:"重置样式",SET_BACKGROUND:"设为背景",RATIO_SQUARE:"纵横比(正方形)",RATIO_PORTRAIT:"纵横比(纵向)",RATIO_LANDSCAPE:"纵横比(横向)"},SHAPE_STYLE:{REPLACE_SHAPE:"点击替换形状",FILL_SOLID:"纯色填充",FILL_GRADIENT:"渐变填充",FILL_IMAGE:"图片填充",GRADIENT_LINEAR:"线性渐变",GRADIENT_RADIAL:"径向渐变",CURRENT_COLOR:"当前色块:",GRADIENT_ANGLE:"渐变角度:",ALIGN_TOP:"顶对齐",ALIGN_MIDDLE:"居中",ALIGN_BOTTOM:"底对齐",FORMAT_PAINTER:"形状格式刷"},TABLE_STYLE:{CELL_FILL:"单元格填充",ROW_COUNT:"行数:",COL_COUNT:"列数:",ENABLE_THEME:"启用主题表格:",HEADER_ROW:"标题行",FOOTER_ROW:"汇总行",FIRST_COL:"第一列",LAST_COL:"最后一列",THEME_COLOR:"主题颜色:"},CHART_STYLE:{EDIT_CHART:"编辑图表",STACKED:"堆叠样式",SMOOTH_LINE:"使用平滑曲线",BACKGROUND_FILL:"背景填充:",AXIS_TEXT:"坐标与文字:",GRID_COLOR:"网格颜色:",THEME_COLORS:"主题配色:",PRESET_THEMES:"预置图表主题:",SLIDE_THEME:"幻灯片主题:",CUSTOM_THEME:"自定义配色"},CHART_THEME_COLORS:{TITLE:"图表主题配色",ITEM:"主题配色{index}:",ADD:"添加主题色"},CHART_DATA_EDITOR:{TYPE_LABEL:"图表类型:",CHANGE_TYPE:"点击更换",CLEAR_DATA:"清空数据",DEFAULT_CATEGORY:"类别{index}",DEFAULT_SERIES:"系列{index}"},AUDIO_STYLE:{ICON_COLOR:"图标颜色:",AUTOPLAY:"自动播放:",LOOP:"循环播放:"},VIDEO_STYLE:{PREVIEW_COVER:"视频预览封面",RESET_COVER:"重置封面",AUTOPLAY:"自动播放:"},LATEX_STYLE:{EDIT:"编辑 LaTeX",COLOR:"颜色:",STROKE_WIDTH:"粗细:"},CANVAS:{CREATE_SHAPE_TIP:"点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成"},FORMULA_EDITOR:{TAB_SYMBOLS:"常用符号",TAB_PRESETS:"预置公式",INPUT_PLACEHOLDER:"输入 LaTeX 公式",PREVIEW_PLACEHOLDER:"公式预览",EMPTY_ERROR:"公式不能为空"},FORMULA:{SYMBOLS:{MATH:"数学",GROUP:"组合",FUNCTION:"函数",GREEK:"希腊字母"},PRESET:{GAUSS:"高斯公式",FOURIER:"傅里叶级数",TAYLOR:"泰勒展开式",DEFINITE_INTEGRAL:"定积分",TRIG_IDENTITY_1:"三角恒等式1",TRIG_IDENTITY_2:"三角恒等式2",BINOMIAL:"和的展开式",EULER:"欧拉公式",BERNOULLI:"贝努利方程",TOTAL_DIFFERENTIAL:"全微分方程",NONHOMOGENEOUS:"非齐次方程",CAUCHY:"柯西中值定理",LAGRANGE:"拉格朗日中值定理",DERIVATIVE:"导数公式",TRIG_INTEGRAL:"三角函数积分",QUADRIC:"二次曲面",SECOND_ORDER:"二阶微分",DIRECTIONAL:"方向导数"}},HOTKEY:{GENERAL:{TITLE:"通用",CUT:"剪切",COPY:"复制",PASTE:"粘贴",PASTE_PLAIN:"粘贴为纯文本",DUPLICATE:"快速复制粘贴",SELECT_ALL:"全选",UNDO:"撤销",REDO:"恢复",DELETE:"删除",MULTI_SELECT:"多选",SEARCH_REPLACE:"打开搜索替换",PRINT:"打印",CLOSE_DIALOG:"关闭弹窗"},SLIDESHOW:{TITLE:"幻灯片放映",START:"从头开始放映幻灯片",START_CURRENT:"从当前开始放映幻灯片",PREV:"切换上一页",NEXT:"切换下一页",NEXT_ENTER:"切换下一页",EXIT:"退出放映"},EDITOR:{TITLE:"幻灯片编辑",NEW_SLIDE:"新建幻灯片",PAN:"移动画布",ZOOM:"缩放画布",ZOOM_IN:"放大画布",ZOOM_OUT:"缩小画布",FIT_SCREEN:"使画布适应当前屏幕",PREV_NO_SELECTION:"上一页(未选中元素)",NEXT_NO_SELECTION:"下一页(未选中元素)",PREV:"上一页",NEXT:"下一页",QUICK_TEXT:"快速创建文本",QUICK_RECT:"快速创建矩形",QUICK_ELLIPSE:"快速创建圆形",QUICK_LINE:"快速创建线条",EXIT_DRAW:"退出绘制状态"},ELEMENT:{TITLE:"元素操作",MOVE:"移动",LOCK:"锁定",GROUP:"组合",UNGROUP:"取消组合",BRING_TO_FRONT:"置顶层",SEND_TO_BACK:"置底层",LOCK_RATIO:"锁定宽高比例",CREATE_LINE:"创建水平 / 垂直线条",SWITCH_FOCUS:"切换焦点元素",CONFIRM_CROP:"确认图片裁剪",FINISH_CUSTOM_SHAPE:"完成自定义形状绘制"},TABLE:{TITLE:"表格编辑",NEXT_CELL:"聚焦到下一个单元格",MOVE_CELL:"移动焦点单元格",INSERT_ROW_ABOVE:"在上方插入一行",INSERT_ROW_BELOW:"在下方插入一行",INSERT_COL_LEFT:"在左侧插入一列",INSERT_COL_RIGHT:"在右侧插入一列"},CHART:{TITLE:"图表数据编辑",NEXT_ROW:"聚焦到下一行"},TEXT:{TITLE:"文本编辑",BOLD:"加粗",ITALIC:"斜体",UNDERLINE:"下划线",INLINE_CODE:"行内代码",SUPERSCRIPT:"上角标",SUBSCRIPT:"下角标",SELECT_PARAGRAPH:"选中段落"},OTHER:{TITLE:"其他快捷操作",ADD_IMAGE_PASTE:"添加图片 - 粘贴来自系统剪贴板的图片",ADD_IMAGE_DRAG:"添加图片 - 将本地图片拖拽到画布中",ADD_IMAGE_PASTE_SVG:"添加图片 - 在画布中粘贴SVG代码",ADD_IMAGE_PEXELS:"添加图片 - 粘贴来自 pexels 的图片链接",ADD_TEXT_PASTE:"添加文本 - 粘贴来自系统剪贴板的文字",ADD_TEXT_DRAG:"添加文本 - 将外部选中文字拖拽到画布中",TEXT_MARKDOWN:"文本编辑 - 支持 markdown 语法创建列表和引用"},VALUE:{HOLD_CTRL_SHIFT:"按住 Ctrl 或 Shift",SPACE_DRAG:"Space + 鼠标拖拽",CTRL_SCROLL:"Ctrl + 鼠标滚轮",MOUSE_SCROLL_UP:"鼠标上滚 / PgUp",MOUSE_SCROLL_DOWN:"鼠标下滚 / PgDown",DOUBLE_CLICK_BLANK_T:"双击空白处 / T",RIGHT_CLICK:"鼠标右键"}},LINES:{STRAIGHT:"直线",POLY_CURVE:"折线、曲线"},CHART:{TYPE:{BAR:"柱状图",COLUMN:"条形图",LINE:"折线图",AREA:"面积图",SCATTER:"散点图",PIE:"饼图",RING:"环形图",RADAR:"雷达图"},DEFAULT:{CATEGORY:"类别{index}",SERIES:"系列{index}",VALUE:"值",COORD:"坐标{index}",X:"X",Y:"Y"}},FONT:{NAME:{DEFAULT:"默认字体",SOURCE_HAN_SANS:"思源黑体",SOURCE_HAN_SERIF:"思源宋体",FZ_HEITI:"方正黑体",FZ_KAITI:"方正楷体",FZ_SONG:"方正宋体",FZ_FANGSONG:"方正仿宋",ALIBABA_PUHUI:"阿里巴巴普惠体",ZHUQUE_FANGSONG:"朱雀仿宋",LXGW_WENKAI:"霞鹜文楷",WENDING_PL_KAITI:"文鼎PL楷体",DEYI_HEI:"得意黑",MISANS:"MiSans",CANGER_XIAOWANZI:"仓耳小丸子",YOUSHE_TITLE_BLACK:"优设标题黑",FENGGUANG_MINGRUI:"峰广明锐体",SHETU_MODERN_SQUARE:"摄图摩登小方体",ZCOOL_HAPPY:"站酷快乐体",ZIZHI_QU_XIMAI:"字制区喜脉体",SUCAI_JISHI_KANGKANG:"素材集市康康体",SUCAI_JISHI_COOL_SQUARE:"素材集市酷方体",TUNIU_ROUNDED:"途牛类圆体",RUIZI_ZHENYAN:"锐字真言体"}},ELEMENT:{TYPE:{TEXT:"文本",IMAGE:"图片",SHAPE:"形状",LINE:"线条",CHART:"图表",TABLE:"表格",VIDEO:"视频",AUDIO:"音频",LATEX:"公式"}},SHAPE:{CATEGORY:{RECT:"矩形",COMMON:"常用形状",ARROW:"箭头",OTHER:"其他形状",LINEAR:"线性"}},CLIP:{SHAPE:{RECT:"矩形",RECT_2:"矩形2",RECT_3:"矩形3",ROUND_RECT:"圆角矩形",ELLIPSE:"圆形",TRIANGLE:"三角形",TRIANGLE_2:"三角形2",TRIANGLE_3:"三角形3",RHOMBUS:"菱形",PENTAGON:"五边形",HEXAGON:"六边形",HEPTAGON:"七边形",OCTAGON:"八边形",CHEVRON:"V形",POINT:"点",ARROW:"箭头",PARALLELOGRAM:"平行四边形",PARALLELOGRAM_2:"平行四边形2",TRAPEZOID:"梯形",TRAPEZOID_2:"梯形2"}},ANIMATION:{ENTER:{BOUNCE:"弹跳",BOUNCE_IN:"弹入",BOUNCE_IN_LEFT:"向右弹入",BOUNCE_IN_RIGHT:"向左弹入",BOUNCE_IN_UP:"向上弹入",BOUNCE_IN_DOWN:"向下弹入",FADE:"浮现",FADE_IN:"浮入",FADE_IN_DOWN:"向下浮入",FADE_IN_DOWN_BIG:"向下长距浮入",FADE_IN_LEFT:"向右浮入",FADE_IN_LEFT_BIG:"向右长距浮入",FADE_IN_RIGHT:"向左浮入",FADE_IN_RIGHT_BIG:"向左长距浮入",FADE_IN_UP:"向上浮入",FADE_IN_UP_BIG:"向上长距浮入",FADE_IN_TOP_LEFT:"从左上浮入",FADE_IN_TOP_RIGHT:"从右上浮入",FADE_IN_BOTTOM_LEFT:"从左下浮入",FADE_IN_BOTTOM_RIGHT:"从右下浮入",ROTATE:"旋转",ROTATE_IN:"旋转进入",ROTATE_IN_DOWN_LEFT:"绕左下进入",ROTATE_IN_DOWN_RIGHT:"绕右下进入",ROTATE_IN_UP_LEFT:"绕左上进入",ROTATE_IN_UP_RIGHT:"绕右上进入",ZOOM:"缩放",ZOOM_IN:"放大进入",ZOOM_IN_DOWN:"向下放大进入",ZOOM_IN_LEFT:"从左放大进入",ZOOM_IN_RIGHT:"从右放大进入",ZOOM_IN_UP:"向上放大进入",SLIDE:"滑入",SLIDE_IN_DOWN:"向下滑入",SLIDE_IN_LEFT:"从右滑入",SLIDE_IN_RIGHT:"从左滑入",SLIDE_IN_UP:"向上滑入",FLIP:"翻转",FLIP_IN_X:"X轴翻转进入",FLIP_IN_Y:"Y轴翻转进入",BACK:"放大滑入",BACK_IN_DOWN:"向下放大滑入",BACK_IN_LEFT:"从左放大滑入",BACK_IN_RIGHT:"从右放大滑入",BACK_IN_UP:"向上放大滑入",LIGHT_SPEED:"飞入",LIGHT_SPEED_IN_RIGHT:"从右飞入",LIGHT_SPEED_IN_LEFT:"从左飞入"},EXIT:{BOUNCE:"弹跳",BOUNCE_OUT:"弹出",BOUNCE_OUT_LEFT:"向左弹出",BOUNCE_OUT_RIGHT:"向右弹出",BOUNCE_OUT_UP:"向上弹出",BOUNCE_OUT_DOWN:"向下弹出",FADE:"浮现",FADE_OUT:"浮出",FADE_OUT_DOWN:"向下浮出",FADE_OUT_DOWN_BIG:"向下长距浮出",FADE_OUT_LEFT:"向左浮出",FADE_OUT_LEFT_BIG:"向左长距浮出",FADE_OUT_RIGHT:"向右浮出",FADE_OUT_RIGHT_BIG:"向右长距浮出",FADE_OUT_UP:"向上浮出",FADE_OUT_UP_BIG:"向上长距浮出",FADE_OUT_TOP_LEFT:"从左上浮出",FADE_OUT_TOP_RIGHT:"从右上浮出",FADE_OUT_BOTTOM_LEFT:"从左下浮出",FADE_OUT_BOTTOM_RIGHT:"从右下浮出",ROTATE:"旋转",ROTATE_OUT:"旋转退出",ROTATE_OUT_DOWN_LEFT:"绕左下退出",ROTATE_OUT_DOWN_RIGHT:"绕右下退出",ROTATE_OUT_UP_LEFT:"绕左上退出",ROTATE_OUT_UP_RIGHT:"绕右上退出",ZOOM:"缩放",ZOOM_OUT:"缩小退出",ZOOM_OUT_DOWN:"向下缩小退出",ZOOM_OUT_LEFT:"从左缩小退出",ZOOM_OUT_RIGHT:"从右缩小退出",ZOOM_OUT_UP:"向上缩小退出",SLIDE:"滑出",SLIDE_OUT_DOWN:"向下滑出",SLIDE_OUT_LEFT:"从左滑出",SLIDE_OUT_RIGHT:"从右滑出",SLIDE_OUT_UP:"向上滑出",FLIP:"翻转",FLIP_OUT_X:"X轴翻转退出",FLIP_OUT_Y:"Y轴翻转退出",BACK:"缩小滑出",BACK_OUT_DOWN:"向下缩小滑出",BACK_OUT_LEFT:"从左缩小滑出",BACK_OUT_RIGHT:"从右缩小滑出",BACK_OUT_UP:"向上缩小滑出",LIGHT_SPEED:"飞出",LIGHT_SPEED_OUT_RIGHT:"从右飞出",LIGHT_SPEED_OUT_LEFT:"从左飞出"},ATTENTION:{SHAKE:"晃动",SHAKE_X:"左右摇晃",SHAKE_Y:"上下摇晃",HEAD_SHAKE:"摇头",SWING:"摆动",WOBBLE:"晃动",TADA:"惊恐",JELLO:"果冻",OTHER:"其他",BOUNCE:"弹跳",FLASH:"闪烁",PULSE:"脉搏",RUBBER_BAND:"橡皮筋",HEART_BEAT:"心跳(快)"},SLIDE:{NO:"无",RANDOM:"随机",SLIDE_X:"左右推移",SLIDE_Y:"上下推移",SLIDE_X_3D:"左右推移(3D)",SLIDE_Y_3D:"上下推移(3D)",FADE:"淡入淡出",ROTATE:"旋转",SCALE_Y:"上下展开",SCALE_X:"左右展开",SCALE:"放大",SCALE_REVERSE:"缩小"}},SLIDE_ANIMATION:{APPLY_ALL:"应用到全部",APPLIED_ALL:"已应用到全部"},ELEMENT_ANIMATION:{ADD:"添加动画",TIP_SELECT:"选中画布中的元素添加动画",DURATION:"持续时长:",TRIGGER:"触发方式:",TRIGGER_CLICK:"主动触发",TRIGGER_WITH_PREVIOUS:"与上一动画同时",TRIGGER_AFTER_PREVIOUS:"上一动画之后",CHANGE:"更换动画",STOP_PREVIEW:"停止预览",PREVIEW_ALL:"预览全部",TAB_IN:"入场",TAB_OUT:"退场",TAB_ATTENTION:"强调"},LINE_STYLE:{STYLE:"线条样式:",COLOR:"线条颜色:",WIDTH:"线条宽度:",START:"起点样式:",END:"终点样式:",SWAP:"交换方向"},PPT_COMPONENTS:{THUMBNAIL_LOADING:"加载中 ...",TABLE_DBLCLICK_EDIT:"双击编辑",VIDEO_LOAD_ERROR:"视频加载失败",VIDEO_SPEED:"倍速",VIDEO_LOOP:"循环",VIDEO_LOOP_ON:"开",VIDEO_LOOP_OFF:"关",FONT_LOAD_TIP:"字体需要等待加载下载后生效,请稍等",TABLE_CONTEXT:{INSERT_COL:"插入列",INSERT_COL_LEFT:"到左侧",INSERT_COL_RIGHT:"到右侧",INSERT_ROW:"插入行",INSERT_ROW_TOP:"到上方",INSERT_ROW_BOTTOM:"到下方",DELETE_COL:"删除列",DELETE_ROW:"删除行",MERGE_CELLS:"合并单元格",SPLIT_CELLS:"取消合并单元格",SELECT_COL:"选中当前列",SELECT_ROW:"选中当前行",SELECT_ALL:"选中全部单元格"}}},sT={COMMON:{CONFIRM:"Confirm",CANCEL:"Cancel",DELETE:"Delete",REMOVE:"Remove",INSERT:"Insert",COPY:"Copy",CUT:"Cut",PASTE:"Paste",SELECT_ALL:"Select all",EDIT:"Edit",CLOSE:"Close",APPLY:"Apply",SAVE:"Save",SEARCH:"Search",SEARCH_FONT:"Search font",SEARCH_FONT_SIZE:"Search size",REPLACE:"Replace",REPLACE_ALL:"Replace all",NEXT:"Next",PREV:"Previous",BACK:"Back",MORE:"More",PREVIEW:"Preview",CLEAR:"Clear",SET:"Set",FORMAT_PAINTER_TIP:"Format painter (double-click to keep)"},EXPORT:{RANGE:"Export range:",ALL:"All",CURRENT:"Current slide",CUSTOM:"Custom",CUSTOM_RANGE:"Custom range:",FORMAT:"Export format:",IMAGE_QUALITY:"Image quality:",IGNORE_WEBFONT:"Ignore web fonts:",IGNORE_MEDIA:"Ignore audio/video:",OVERWRITE_MASTER:"Overwrite master:",PER_PAGE_COUNT:"Slides per page:",EDGE_PADDING:"Page padding:",BTN_PPTX:"Export PPTX",BTN_IMAGE:"Export images",BTN_JSON:"Export JSON",BTN_PDF:"Print / Export PDF",BTN_PPTIST:"Export PPTIST file",IMAGE_FAIL:"Failed to export image",FAIL:"Export failed",CLOSE:"Close",EXPORTING:"Exporting...",TIP_MEDIA:'Audio and video are ignored by default. If your slides contain audio/video and you want them included in the PPTX, turn off "Ignore audio/video". This will significantly increase export time.',TIP_MEDIA_FORMAT:"Note: 1) Supported export formats: avi, mp4, mov, wmv, mp3, wav. 2) Cross-origin resources cannot be exported.",TIP_WEBFONT:'Web fonts are ignored by default. If you used web fonts and want them preserved, turn off "Ignore web fonts". This will increase export time.',TIP_PPTIST:"Note: .pptist is the native file format of this app and can be imported back.",TIP_PDF:'Note: If the print preview differs from the output, enable "Background graphics" in the print dialog.'},EXPORT_TABS:{PPTX:"Export PPTX",IMAGE:"Export images",JSON:"Export JSON",PDF:"Print / Export PDF",PPTIST:"Export PPTIST file"},SLIDE_THUMBS:{ADD_SLIDE:"Add slide",PAGE_NUMBER:"Slide {current} / {total}",SECTION_PLACEHOLDER:"Enter section name",SECTION_UNTITLED:"Untitled section",SECTION_DEFAULT:"Default section",SECTION_DELETE:"Delete section",SECTION_DELETE_WITH_SLIDES:"Delete section and slides",SECTION_DELETE_ALL:"Delete all sections",SECTION_RENAME:"Rename section",SECTION_ADD:"Add section",PASTE:"Paste",SELECT_ALL:"Select all",NEW_SLIDE:"New slide",SLIDE_SHOW:"Slide show",CUT:"Cut",COPY:"Copy",DUPLICATE_SLIDE:"Duplicate slide",DELETE_SLIDE:"Delete slide",SLIDE_SHOW_FROM_CURRENT:"Start from current"},SLIDE_TEMPLATES:{INSERT_ALL:"Insert all",INSERT_TEMPLATE:"Insert template",TYPE_ALL:"All",TYPE_COVER:"Cover",TYPE_CONTENTS:"Contents",TYPE_TRANSITION:"Transition",TYPE_CONTENT:"Content",TYPE_REFERENCE:"Reference",TYPE_END:"End"},TEMPLATE_LIST:{CMI1:"CMI1",CMI2:"CMI2",CMI3:"CMI3",RED_GENERAL:"Red general",BLUE_GENERAL:"Blue general",PURPLE_GENERAL:"Purple general",MORANDI:"Morandi palette"},COLOR_PICKER:{RECENT_USED:"Recently used",EYEDROPPER_HINT:"Click on the canvas to pick a color",EYEDROPPER_INIT_FAIL:"Failed to activate eyedropper"},IMPORT:{FILE_PARSE_FAIL:"Failed to read or parse the file"},REQUEST:{UNKNOWN_ERROR:"Unknown error",SERVER_UNKNOWN_ERROR:"Server error",CONNECTION_FAIL:"Connection failed"},EDITOR:{GENERATING:"Generating with AI, please wait...",AIPPT_NO_PPTID:"AIPPT generation failed: missing pptId parameter",AIPPT_FETCH_FAIL:"Failed to fetch AIPPT data",TEMPLATE_FETCH_FAIL:"Failed to fetch template data"},HEADER_BAR:{EXPORT_FILE:"Export file",RESET_SLIDES:"Reset slides",MARKUP:"Slide type markup",HOTKEY:"Hotkeys",SLIDE_SHOW_TOOLTIP:"Slide show (F5)",SLIDE_SHOW_FROM_START:"Start from beginning",SLIDE_SHOW_FROM_CURRENT:"Start from current slide",EXPORT_TOOLTIP:"Export",HOTKEY_TITLE:"Hotkeys",AIPPT_DRAWER_TITLE:"Render AIPPT",TEMPLATE_SELECTED:"Template selected",TEMPLATE_NOT_SELECTED:"Not selected",AIPPT_JSON_LABEL:"AIPPT JSON",AIPPT_JSON_PLACEHOLDER:'Paste AIPPT.json content here (e.g. {"cover": {...}, "contents":[...], "content":[...], "end":[...]})',RENDER_AND_LOAD:"Render and load",IMPORTING:"Importing...",RENDERING_AIPPT:"Rendering AIPPT...",TEMPLATE_LOADED:"Template loaded. Please paste AIPPT JSON.",TEMPLATE_LOAD_FAIL:"Template load failed: please ensure valid JSON.",NEED_TEMPLATE_FILE:"Please select a template file first",AIPPT_PARSE_FAIL:"AIPPT JSON parse failed. Please check the format.",TEMPLATE_SLIDES_MISSING:"Template slides field is missing or empty",AIPPT_UNKNOWN_TYPES:"The following types were not found in the template: {unknown}; supported: {supported}",AIPPT_UNKNOWN_TYPES_EMPTY:"none detected",RENDER_SUCCESS:"Rendered and loaded to the canvas",RENDER_FAIL:"Render failed: {reason}",RENDER_FAIL_FALLBACK:"Please check template type markup and AIPPT structure"},QUICK_SEARCH:{SEARCH_PLACEHOLDER:"Enter search text",REPLACE_PLACEHOLDER:"Enter replacement text",IGNORE_CASE:"Ignore case",PREV:"Previous",NEXT:"Next",NO_MATCH:"No matches found",EMPTY_SEARCH:"Please enter search text"},COMMENT_PANEL:{PLACEHOLDER:"Click to enter speaker notes"},TABLE_GENERATOR:{TITLE:"Table",CUSTOM:"Custom",ROW_COUNT:"Rows:",COL_COUNT:"Columns:",COUNT_LIMIT:"Row/column count must be between 0 and 20."},MEDIA_INPUT:{VIDEO:"Video",AUDIO:"Audio",VIDEO_PLACEHOLDER:"Enter video URL, e.g. https://xxx.mp4",AUDIO_PLACEHOLDER:"Enter audio URL, e.g. https://xxx.mp3",VIDEO_ERROR:"Please enter a valid video URL first",AUDIO_ERROR:"Please enter a valid audio URL first"},CANVAS_TOOL:{UNDO:"Undo (Ctrl + Z)",REDO:"Redo (Ctrl + Y)",NOTES_PANEL:"Notes panel",SELECTION_PANEL:"Selection pane",SEARCH_REPLACE:"Find & replace",SEARCH_REPLACE_TOOLTIP:"Find/Replace (Ctrl + F)",INSERT_TEXT:"Insert text",TEXT_HORIZONTAL:"Horizontal text box",TEXT_VERTICAL:"Vertical text box",INSERT_SHAPE:"Insert shape",FREE_DRAW:"Free draw",INSERT_IMAGE:"Insert image",INSERT_LINE:"Insert line",INSERT_CHART:"Insert chart",INSERT_TABLE:"Insert table",INSERT_FORMULA:"Insert formula",INSERT_MEDIA:"Insert audio/video",INSERT_SYMBOL:"Insert symbol",SCALE_DOWN:"Zoom out (Ctrl + -)",SCALE_UP:"Zoom in (Ctrl + =)",FIT_SCREEN:"Fit to screen",FIT_SCREEN_TOOLTIP:"Fit to screen (Ctrl + 0)"},CANVAS_MENU:{RULER:"Ruler",GRID_LINES:"Grid lines",GRID_NONE:"None",GRID_SMALL:"Small",GRID_MEDIUM:"Medium",GRID_LARGE:"Large",RESET_SLIDE:"Reset current slide",SLIDE_SHOW:"Slide show"},LINK_DIALOG:{WEB:"Web link",SLIDE:"Slide",WEB_PLACEHOLDER:"Enter a web URL",PREVIEW:"Preview:",SLIDE_LABEL:"Slide {index}",SELECT_TARGET:"Please select a target slide"},LINK_HANDLER:{SLIDE_PAGE:"Slide page",CHANGE:"Change"},EDITABLE_ELEMENT:{UNLOCK:"Unlock",LOCK:"Lock",ALIGN_HORIZONTAL:"Center horizontally",ALIGN_VERTICAL:"Center vertically",ALIGN_CENTER_BOTH:"Center both",ALIGN_LEFT:"Align left",ALIGN_RIGHT:"Align right",ALIGN_TOP:"Align top",ALIGN_BOTTOM:"Align bottom",BRING_TO_FRONT:"Bring to front",SEND_TO_BACK:"Send to back",MOVE_UP:"Bring forward",MOVE_DOWN:"Send backward",SET_LINK:"Set link",GROUP:"Group",UNGROUP:"Ungroup"},SELECTION_PANEL:{TITLE:"Selection ({current}/{total})",SHOW_ALL:"Show all",HIDE_ALL:"Hide all",GROUP:"Group"},SPEAKER_NOTES:{TITLE:"Notes for slide {index}",REPLY:"Reply",REPLY_PLACEHOLDER:"Enter reply content",EMPTY:"No notes on this slide",INPUT_PLACEHOLDER:"Enter notes (for {target})",TARGET_ELEMENT:"selected element",TARGET_SLIDE:"current slide",CLEAR_TOOLTIP:"Clear notes on this slide",ADD:"Add note",DEFAULT_USER:"Test user"},MARKUP_PANEL:{TITLE:"Slide type markup",CURRENT_SLIDE_TYPE:"Current slide type:",CURRENT_TEXT_TYPE:"Current text type:",CURRENT_CHART_MARK:"Current chart mark:",CURRENT_IMAGE_TYPE:"Current image type:",PLACEHOLDER:"Select text, chart, image, or a shape with text to mark type",TYPE_UNMARKED:"Unmarked",SLIDE_COVER:"Cover",SLIDE_CONTENTS:"Contents",SLIDE_TRANSITION:"Transition",SLIDE_CONTENT:"Content",SLIDE_REFERENCE:"Reference",SLIDE_END:"End",TEXT_TITLE:"Title",TEXT_SUBTITLE:"Subtitle",TEXT_CONTENT:"Body",TEXT_ITEM:"List item",TEXT_ITEM_TITLE:"Item title",TEXT_NOTES:"Notes",TEXT_HEADER:"Header",TEXT_FOOTER:"Footer",TEXT_PART_NUMBER:"Section number",TEXT_ITEM_NUMBER:"Item number",TEXT_REFERENCE_NUMBER:"Reference number",TEXT_REFERENCE_TITLE:"Reference title",IMAGE_PAGE:"Page figure",IMAGE_ITEM:"Item figure",IMAGE_BACKGROUND:"Background",CHART_ITEM:"Chart (content item)"},SYMBOL_LIBRARY:{TAB_LETTER:"Letters",TAB_NUMBER:"Numbers",TAB_MATH:"Math",TAB_ARROW:"Arrows",TAB_GRAPH:"Shapes",TAB_EMOJI:"Emoji",EMOJI_FACE:"Faces",EMOJI_ACTION:"Actions",EMOJI_NATURE:"Nature",EMOJI_FOOD:"Food",EMOJI_TRAVEL:"Travel",EMOJI_ACTIVITY:"Activities",EMOJI_OBJECTS:"Objects",EMOJI_SYMBOLS:"Symbols"},TOOLBAR:{TAB_STYLE:"Style",TAB_POSITION:"Position",TAB_ANIMATION:"Animation",TAB_DESIGN:"Design",TAB_TRANSITION:"Transition",TAB_STYLE_MULTI:"Style (multi)",TAB_POSITION_MULTI:"Position (multi)"},POSITION_PANEL:{LAYER:"Layer:",BRING_TO_FRONT:"Bring to front",SEND_TO_BACK:"Send to back",MOVE_UP:"Move up",MOVE_DOWN:"Move down",ALIGN:"Align:",ALIGN_LEFT:"Align left",ALIGN_RIGHT:"Align right",ALIGN_TOP:"Align top",ALIGN_BOTTOM:"Align bottom",ALIGN_CENTER_HORIZONTAL:"Center horizontally",ALIGN_CENTER_VERTICAL:"Center vertically",HORIZONTAL:"X:",VERTICAL:"Y:",WIDTH:"Width:",HEIGHT:"Height:",ROTATE:"Rotate:",LOCK_RATIO:"Lock aspect ratio",UNLOCK_RATIO:"Unlock aspect ratio"},MULTI_POSITION:{HORIZONTAL_DISTRIBUTE:"Distribute horizontally",VERTICAL_DISTRIBUTE:"Distribute vertically"},STYLE_PARTS:{OPACITY:"Opacity:",SHADOW_ENABLE:"Enable shadow:",SHADOW_X:"Horizontal shadow:",SHADOW_Y:"Vertical shadow:",SHADOW_BLUR:"Blur:",SHADOW_COLOR:"Shadow color:",OUTLINE_ENABLE:"Enable outline:",OUTLINE_STYLE:"Outline style:",OUTLINE_COLOR:"Outline color:",OUTLINE_WIDTH:"Outline width:",COLOR_MASK:"Tint (mask):",MASK_COLOR:"Mask color:",FILTER_ENABLE:"Enable filters:",FLIP_VERTICAL:"Flip vertically",FLIP_HORIZONTAL:"Flip horizontally"},FILTERS:{BLUR:"Blur",BRIGHTNESS:"Brightness",CONTRAST:"Contrast",GRAYSCALE:"Grayscale",SATURATION:"Saturation",HUE:"Hue",SEPIA:"Sepia",INVERT:"Invert",OPACITY:"Opacity",PRESET_BW:"B&W",PRESET_RETRO:"Retro",PRESET_SHARPEN:"Sharpen",PRESET_SOFT:"Soft",PRESET_WARM:"Warm",PRESET_BRIGHT:"Bright",PRESET_VIVID:"Vivid",PRESET_BLUR:"Blur",PRESET_INVERT:"Invert"},TEXT_STYLE:{LINE_HEIGHT:"Line height:",LINE_HEIGHT_OPTION:"{value}x",PARAGRAPH_SPACING:"Paragraph spacing:",PX_OPTION:"{value}px",LETTER_SPACING:"Letter spacing:",BOX_FILL:"Text box fill:",PRESET_TITLE_LG:"Title (large)",PRESET_TITLE_SM:"Title (small)",PRESET_BODY:"Body",PRESET_BODY_SM:"Body (small)",PRESET_NOTE_1:"Note (italic)",PRESET_NOTE_2:"Note (underline)"},MULTI_STYLE:{FILL_COLOR:"Fill color:",OUTLINE_STYLE:"Outline style:",OUTLINE_COLOR:"Outline color:",OUTLINE_WIDTH:"Outline width:"},RICH_TEXT:{TEXT_COLOR:"Text color",TEXT_HIGHLIGHT:"Text highlight",FONT_SIZE_INCREASE:"Increase font size",FONT_SIZE_DECREASE:"Decrease font size",BOLD:"Bold",ITALIC:"Italic",UNDERLINE:"Underline",STRIKETHROUGH:"Strikethrough",SUPERSCRIPT:"Superscript",SUBSCRIPT:"Subscript",INLINE_CODE:"Inline code",BLOCKQUOTE:"Quote",AI_POLISH:"Polish",AI_EXPAND:"Expand",AI_CONDENSE:"Condense",AI_ASSIST:"AI assist",CLEAR_FORMAT:"Clear formatting",LINK:"Link",LINK_PLACEHOLDER:"Enter link",ALIGN_LEFT:"Align left",ALIGN_CENTER:"Center",ALIGN_RIGHT:"Align right",ALIGN_JUSTIFY:"Justify",BULLET_LIST:"Bulleted list",ORDERED_LIST:"Numbered list",INDENT_DECREASE:"Decrease paragraph indent",INDENT_INCREASE:"Increase paragraph indent",TEXT_INDENT_DECREASE:"Decrease first-line indent",TEXT_INDENT_INCREASE:"Increase first-line indent",INVALID_LINK:"Invalid link address",NO_TEXT_CONTENT:"No text content to process",IN_DEVELOPMENT:"In development"},SLIDE_DESIGN:{BACKGROUND_FILL:"Background fill",FILL_SOLID:"Solid fill",FILL_IMAGE:"Image fill",FILL_GRADIENT:"Gradient fill",IMAGE_CONTAIN:"Contain",IMAGE_REPEAT:"Tile",IMAGE_COVER:"Cover",GRADIENT_LINEAR:"Linear gradient",GRADIENT_RADIAL:"Radial gradient",CURRENT_COLOR:"Current color:",GRADIENT_ANGLE:"Gradient angle:",APPLY_BACKGROUND_ALL:"Apply background to all",RATIO_WIDE_16_9:"Widescreen 16:9",RATIO_WIDE_16_10:"Widescreen 16:10",RATIO_STANDARD_4_3:"Standard 4:3",RATIO_PAPER_A3_A4:"Paper A3 / A4",RATIO_PORTRAIT_A3_A4:"Portrait A3 / A4",CANVAS_SIZE:"Canvas size: {width} × {height}",GLOBAL_THEME:"Global theme",FONT:"Font:",FONT_COLOR:"Font color:",BACKGROUND_COLOR:"Background color:",THEME_COLORS:"Theme colors:",APPLY_THEME_ALL:"Apply theme to all",EXTRACT_THEME:"Extract theme from slides",PRESET_THEMES:"Preset themes",TEXT_SAMPLE:"Text Aa",SET_AND_APPLY:"Set and apply"},SLIDE_THEME_COLORS:{TITLE:"Edit theme colors",ITEM:"Slide theme color {index}:"},THEME_EXTRACT:{FONT:"Font:",FONT_COLOR:"Text color:",BACKGROUND_COLOR:"Background color:",THEME_COLORS:"Theme colors:",TIP:" (Click a swatch to exclude colors)",SELECT:"Select",APPLY_TO_THEME:"Apply to theme",SAVE_SELECTED:"Save selected settings as theme",FROM_CURRENT:"Extract from current slide",FROM_ALL:"Extract from all slides",THEME_COLOR_LIMIT:"Theme colors exceed the limit. The first 6 were selected automatically."},IMAGE_STYLE:{CROP_IMAGE:"Crop image",CLIP_BY_SHAPE:"By shape:",CLIP_BY:"By {label}:",RADIUS:"Corner radius:",REPLACE_IMAGE:"Replace image",RESET_STYLE:"Reset style",SET_BACKGROUND:"Set as background",RATIO_SQUARE:"Aspect ratio (square)",RATIO_PORTRAIT:"Aspect ratio (portrait)",RATIO_LANDSCAPE:"Aspect ratio (landscape)"},SHAPE_STYLE:{REPLACE_SHAPE:"Click to replace shape",FILL_SOLID:"Solid fill",FILL_GRADIENT:"Gradient fill",FILL_IMAGE:"Image fill",GRADIENT_LINEAR:"Linear gradient",GRADIENT_RADIAL:"Radial gradient",CURRENT_COLOR:"Current color:",GRADIENT_ANGLE:"Gradient angle:",ALIGN_TOP:"Align top",ALIGN_MIDDLE:"Center",ALIGN_BOTTOM:"Align bottom",FORMAT_PAINTER:"Shape format painter"},TABLE_STYLE:{CELL_FILL:"Cell fill",ROW_COUNT:"Rows:",COL_COUNT:"Columns:",ENABLE_THEME:"Enable themed table:",HEADER_ROW:"Header row",FOOTER_ROW:"Footer row",FIRST_COL:"First column",LAST_COL:"Last column",THEME_COLOR:"Theme color:"},CHART_STYLE:{EDIT_CHART:"Edit chart",STACKED:"Stacked",SMOOTH_LINE:"Smooth line",BACKGROUND_FILL:"Background fill:",AXIS_TEXT:"Axes & text:",GRID_COLOR:"Grid color:",THEME_COLORS:"Theme colors:",PRESET_THEMES:"Preset chart themes:",SLIDE_THEME:"Slide theme:",CUSTOM_THEME:"Custom colors"},CHART_THEME_COLORS:{TITLE:"Chart theme colors",ITEM:"Theme color {index}:",ADD:"Add theme color"},CHART_DATA_EDITOR:{TYPE_LABEL:"Chart type: ",CHANGE_TYPE:"Change",CLEAR_DATA:"Clear data",DEFAULT_CATEGORY:"Category {index}",DEFAULT_SERIES:"Series {index}"},AUDIO_STYLE:{ICON_COLOR:"Icon color:",AUTOPLAY:"Autoplay:",LOOP:"Loop:"},VIDEO_STYLE:{PREVIEW_COVER:"Video preview cover",RESET_COVER:"Reset cover",AUTOPLAY:"Autoplay:"},LATEX_STYLE:{EDIT:"Edit LaTeX",COLOR:"Color:",STROKE_WIDTH:"Stroke width:"},CANVAS:{CREATE_SHAPE_TIP:"Click to draw a custom shape. Close the path to finish. Press ESC or right-click to cancel, or press ENTER to finish early."},FORMULA_EDITOR:{TAB_SYMBOLS:"Common symbols",TAB_PRESETS:"Preset formulas",INPUT_PLACEHOLDER:"Enter LaTeX formula",PREVIEW_PLACEHOLDER:"Formula preview",EMPTY_ERROR:"Formula cannot be empty"},FORMULA:{SYMBOLS:{MATH:"Math",GROUP:"Group",FUNCTION:"Function",GREEK:"Greek letters"},PRESET:{GAUSS:"Gauss theorem",FOURIER:"Fourier series",TAYLOR:"Taylor expansion",DEFINITE_INTEGRAL:"Definite integral",TRIG_IDENTITY_1:"Trig identity 1",TRIG_IDENTITY_2:"Trig identity 2",BINOMIAL:"Binomial expansion",EULER:"Euler's formula",BERNOULLI:"Bernoulli equation",TOTAL_DIFFERENTIAL:"Total differential equation",NONHOMOGENEOUS:"Nonhomogeneous equation",CAUCHY:"Cauchy mean value theorem",LAGRANGE:"Lagrange mean value theorem",DERIVATIVE:"Derivative formula",TRIG_INTEGRAL:"Trig integral",QUADRIC:"Quadric surface",SECOND_ORDER:"Second-order differential equation",DIRECTIONAL:"Directional derivative"}},HOTKEY:{GENERAL:{TITLE:"General",CUT:"Cut",COPY:"Copy",PASTE:"Paste",PASTE_PLAIN:"Paste as plain text",DUPLICATE:"Quick duplicate",SELECT_ALL:"Select all",UNDO:"Undo",REDO:"Redo",DELETE:"Delete",MULTI_SELECT:"Multi-select",SEARCH_REPLACE:"Open search & replace",PRINT:"Print",CLOSE_DIALOG:"Close dialog"},SLIDESHOW:{TITLE:"Slide show",START:"Start from beginning",START_CURRENT:"Start from current slide",PREV:"Previous slide",NEXT:"Next slide",NEXT_ENTER:"Next slide",EXIT:"Exit show"},EDITOR:{TITLE:"Slide editing",NEW_SLIDE:"New slide",PAN:"Pan canvas",ZOOM:"Zoom canvas",ZOOM_IN:"Zoom in canvas",ZOOM_OUT:"Zoom out canvas",FIT_SCREEN:"Fit canvas to screen",PREV_NO_SELECTION:"Previous slide (no selection)",NEXT_NO_SELECTION:"Next slide (no selection)",PREV:"Previous slide",NEXT:"Next slide",QUICK_TEXT:"Quick text",QUICK_RECT:"Quick rectangle",QUICK_ELLIPSE:"Quick ellipse",QUICK_LINE:"Quick line",EXIT_DRAW:"Exit drawing mode"},ELEMENT:{TITLE:"Element actions",MOVE:"Move",LOCK:"Lock",GROUP:"Group",UNGROUP:"Ungroup",BRING_TO_FRONT:"Bring to front",SEND_TO_BACK:"Send to back",LOCK_RATIO:"Lock aspect ratio",CREATE_LINE:"Create horizontal / vertical lines",SWITCH_FOCUS:"Switch focus element",CONFIRM_CROP:"Confirm image crop",FINISH_CUSTOM_SHAPE:"Finish custom shape drawing"},TABLE:{TITLE:"Table editing",NEXT_CELL:"Focus next cell",MOVE_CELL:"Move focused cell",INSERT_ROW_ABOVE:"Insert row above",INSERT_ROW_BELOW:"Insert row below",INSERT_COL_LEFT:"Insert column left",INSERT_COL_RIGHT:"Insert column right"},CHART:{TITLE:"Chart data editing",NEXT_ROW:"Focus next row"},TEXT:{TITLE:"Text editing",BOLD:"Bold",ITALIC:"Italic",UNDERLINE:"Underline",INLINE_CODE:"Inline code",SUPERSCRIPT:"Superscript",SUBSCRIPT:"Subscript",SELECT_PARAGRAPH:"Select paragraph"},OTHER:{TITLE:"Other shortcuts",ADD_IMAGE_PASTE:"Add image - paste from clipboard",ADD_IMAGE_DRAG:"Add image - drag local image to canvas",ADD_IMAGE_PASTE_SVG:"Add image - paste SVG code on canvas",ADD_IMAGE_PEXELS:"Add image - paste Pexels image link",ADD_TEXT_PASTE:"Add text - paste from clipboard",ADD_TEXT_DRAG:"Add text - drag selected text into canvas",TEXT_MARKDOWN:"Text editing - markdown lists and quotes"},VALUE:{HOLD_CTRL_SHIFT:"Hold Ctrl or Shift",SPACE_DRAG:"Space + drag mouse",CTRL_SCROLL:"Ctrl + mouse wheel",MOUSE_SCROLL_UP:"Mouse wheel up / PgUp",MOUSE_SCROLL_DOWN:"Mouse wheel down / PgDown",DOUBLE_CLICK_BLANK_T:"Double-click blank area / T",RIGHT_CLICK:"Right click"}},LINES:{STRAIGHT:"Straight lines",POLY_CURVE:"Polylines / curves"},CHART:{TYPE:{BAR:"Column chart",COLUMN:"Bar chart",LINE:"Line chart",AREA:"Area chart",SCATTER:"Scatter chart",PIE:"Pie chart",RING:"Doughnut chart",RADAR:"Radar chart"},DEFAULT:{CATEGORY:"Category {index}",SERIES:"Series {index}",VALUE:"Value",COORD:"Coordinate {index}",X:"X",Y:"Y"}},FONT:{NAME:{DEFAULT:"Default font",SOURCE_HAN_SANS:"Source Han Sans",SOURCE_HAN_SERIF:"Source Han Serif",FZ_HEITI:"FZ Heiti",FZ_KAITI:"FZ Kaiti",FZ_SONG:"FZ Song",FZ_FANGSONG:"FZ Fangsong",ALIBABA_PUHUI:"Alibaba PuHuiTi",ZHUQUE_FANGSONG:"Zhuque Fangsong",LXGW_WENKAI:"LXGW WenKai",WENDING_PL_KAITI:"WenDing PL Kaiti",DEYI_HEI:"Deyi Hei",MISANS:"MiSans",CANGER_XIAOWANZI:"Canger Xiaowanzi",YOUSHE_TITLE_BLACK:"Youshe Title Black",FENGGUANG_MINGRUI:"Fengguang Mingrui",SHETU_MODERN_SQUARE:"Shetu Modern Square",ZCOOL_HAPPY:"ZCOOL Happy",ZIZHI_QU_XIMAI:"Zizhi Qu Ximai",SUCAI_JISHI_KANGKANG:"Sucai Jishi Kangkang",SUCAI_JISHI_COOL_SQUARE:"Sucai Jishi Cool Square",TUNIU_ROUNDED:"Tuniu Rounded",RUIZI_ZHENYAN:"Ruizi Zhenyan"}},ELEMENT:{TYPE:{TEXT:"Text",IMAGE:"Image",SHAPE:"Shape",LINE:"Line",CHART:"Chart",TABLE:"Table",VIDEO:"Video",AUDIO:"Audio",LATEX:"Formula"}},SHAPE:{CATEGORY:{RECT:"Rectangles",COMMON:"Common shapes",ARROW:"Arrows",OTHER:"Other shapes",LINEAR:"Linear"}},CLIP:{SHAPE:{RECT:"Rectangle",RECT_2:"Rectangle 2",RECT_3:"Rectangle 3",ROUND_RECT:"Rounded rectangle",ELLIPSE:"Ellipse",TRIANGLE:"Triangle",TRIANGLE_2:"Triangle 2",TRIANGLE_3:"Triangle 3",RHOMBUS:"Rhombus",PENTAGON:"Pentagon",HEXAGON:"Hexagon",HEPTAGON:"Heptagon",OCTAGON:"Octagon",CHEVRON:"Chevron",POINT:"Point",ARROW:"Arrow",PARALLELOGRAM:"Parallelogram",PARALLELOGRAM_2:"Parallelogram 2",TRAPEZOID:"Trapezoid",TRAPEZOID_2:"Trapezoid 2"}},ANIMATION:{ENTER:{BOUNCE:"Bounce",BOUNCE_IN:"Bounce in",BOUNCE_IN_LEFT:"Bounce in left",BOUNCE_IN_RIGHT:"Bounce in right",BOUNCE_IN_UP:"Bounce in up",BOUNCE_IN_DOWN:"Bounce in down",FADE:"Fade",FADE_IN:"Fade in",FADE_IN_DOWN:"Fade in down",FADE_IN_DOWN_BIG:"Fade in down big",FADE_IN_LEFT:"Fade in left",FADE_IN_LEFT_BIG:"Fade in left big",FADE_IN_RIGHT:"Fade in right",FADE_IN_RIGHT_BIG:"Fade in right big",FADE_IN_UP:"Fade in up",FADE_IN_UP_BIG:"Fade in up big",FADE_IN_TOP_LEFT:"Fade in from top-left",FADE_IN_TOP_RIGHT:"Fade in from top-right",FADE_IN_BOTTOM_LEFT:"Fade in from bottom-left",FADE_IN_BOTTOM_RIGHT:"Fade in from bottom-right",ROTATE:"Rotate",ROTATE_IN:"Rotate in",ROTATE_IN_DOWN_LEFT:"Rotate in down left",ROTATE_IN_DOWN_RIGHT:"Rotate in down right",ROTATE_IN_UP_LEFT:"Rotate in up left",ROTATE_IN_UP_RIGHT:"Rotate in up right",ZOOM:"Zoom",ZOOM_IN:"Zoom in",ZOOM_IN_DOWN:"Zoom in down",ZOOM_IN_LEFT:"Zoom in left",ZOOM_IN_RIGHT:"Zoom in right",ZOOM_IN_UP:"Zoom in up",SLIDE:"Slide",SLIDE_IN_DOWN:"Slide in down",SLIDE_IN_LEFT:"Slide in left",SLIDE_IN_RIGHT:"Slide in right",SLIDE_IN_UP:"Slide in up",FLIP:"Flip",FLIP_IN_X:"Flip in X",FLIP_IN_Y:"Flip in Y",BACK:"Back",BACK_IN_DOWN:"Back in down",BACK_IN_LEFT:"Back in left",BACK_IN_RIGHT:"Back in right",BACK_IN_UP:"Back in up",LIGHT_SPEED:"Light speed",LIGHT_SPEED_IN_RIGHT:"Light speed in right",LIGHT_SPEED_IN_LEFT:"Light speed in left"},EXIT:{BOUNCE:"Bounce",BOUNCE_OUT:"Bounce out",BOUNCE_OUT_LEFT:"Bounce out left",BOUNCE_OUT_RIGHT:"Bounce out right",BOUNCE_OUT_UP:"Bounce out up",BOUNCE_OUT_DOWN:"Bounce out down",FADE:"Fade",FADE_OUT:"Fade out",FADE_OUT_DOWN:"Fade out down",FADE_OUT_DOWN_BIG:"Fade out down big",FADE_OUT_LEFT:"Fade out left",FADE_OUT_LEFT_BIG:"Fade out left big",FADE_OUT_RIGHT:"Fade out right",FADE_OUT_RIGHT_BIG:"Fade out right big",FADE_OUT_UP:"Fade out up",FADE_OUT_UP_BIG:"Fade out up big",FADE_OUT_TOP_LEFT:"Fade out top-left",FADE_OUT_TOP_RIGHT:"Fade out top-right",FADE_OUT_BOTTOM_LEFT:"Fade out bottom-left",FADE_OUT_BOTTOM_RIGHT:"Fade out bottom-right",ROTATE:"Rotate",ROTATE_OUT:"Rotate out",ROTATE_OUT_DOWN_LEFT:"Rotate out down left",ROTATE_OUT_DOWN_RIGHT:"Rotate out down right",ROTATE_OUT_UP_LEFT:"Rotate out up left",ROTATE_OUT_UP_RIGHT:"Rotate out up right",ZOOM:"Zoom",ZOOM_OUT:"Zoom out",ZOOM_OUT_DOWN:"Zoom out down",ZOOM_OUT_LEFT:"Zoom out left",ZOOM_OUT_RIGHT:"Zoom out right",ZOOM_OUT_UP:"Zoom out up",SLIDE:"Slide",SLIDE_OUT_DOWN:"Slide out down",SLIDE_OUT_LEFT:"Slide out left",SLIDE_OUT_RIGHT:"Slide out right",SLIDE_OUT_UP:"Slide out up",FLIP:"Flip",FLIP_OUT_X:"Flip out X",FLIP_OUT_Y:"Flip out Y",BACK:"Back",BACK_OUT_DOWN:"Back out down",BACK_OUT_LEFT:"Back out left",BACK_OUT_RIGHT:"Back out right",BACK_OUT_UP:"Back out up",LIGHT_SPEED:"Light speed",LIGHT_SPEED_OUT_RIGHT:"Light speed out right",LIGHT_SPEED_OUT_LEFT:"Light speed out left"},ATTENTION:{SHAKE:"Shake",SHAKE_X:"Shake X",SHAKE_Y:"Shake Y",HEAD_SHAKE:"Head shake",SWING:"Swing",WOBBLE:"Wobble",TADA:"Tada",JELLO:"Jello",OTHER:"Other",BOUNCE:"Bounce",FLASH:"Flash",PULSE:"Pulse",RUBBER_BAND:"Rubber band",HEART_BEAT:"Heart beat (fast)"},SLIDE:{NO:"None",RANDOM:"Random",SLIDE_X:"Slide X",SLIDE_Y:"Slide Y",SLIDE_X_3D:"Slide X (3D)",SLIDE_Y_3D:"Slide Y (3D)",FADE:"Fade",ROTATE:"Rotate",SCALE_Y:"Expand Y",SCALE_X:"Expand X",SCALE:"Scale up",SCALE_REVERSE:"Scale down"}},SLIDE_ANIMATION:{APPLY_ALL:"Apply to all",APPLIED_ALL:"Applied to all"},ELEMENT_ANIMATION:{ADD:"Add animation",TIP_SELECT:"Select an element on the canvas to add animation",DURATION:"Duration:",TRIGGER:"Trigger:",TRIGGER_CLICK:"On click",TRIGGER_WITH_PREVIOUS:"With previous",TRIGGER_AFTER_PREVIOUS:"After previous",CHANGE:"Change animation",STOP_PREVIEW:"Stop preview",PREVIEW_ALL:"Preview all",TAB_IN:"Entrance",TAB_OUT:"Exit",TAB_ATTENTION:"Emphasis"},LINE_STYLE:{STYLE:"Line style:",COLOR:"Line color:",WIDTH:"Line width:",START:"Start marker:",END:"End marker:",SWAP:"Swap direction"},PPT_COMPONENTS:{THUMBNAIL_LOADING:"Loading...",TABLE_DBLCLICK_EDIT:"Double-click to edit",VIDEO_LOAD_ERROR:"Video failed to load",VIDEO_SPEED:"Speed",VIDEO_LOOP:"Loop",VIDEO_LOOP_ON:"On",VIDEO_LOOP_OFF:"Off",FONT_LOAD_TIP:"Fonts take time to load. Please wait.",TABLE_CONTEXT:{INSERT_COL:"Insert column",INSERT_COL_LEFT:"To left",INSERT_COL_RIGHT:"To right",INSERT_ROW:"Insert row",INSERT_ROW_TOP:"Above",INSERT_ROW_BOTTOM:"Below",DELETE_COL:"Delete column",DELETE_ROW:"Delete row",MERGE_CELLS:"Merge cells",SPLIT_CELLS:"Unmerge cells",SELECT_COL:"Select column",SELECT_ROW:"Select row",SELECT_ALL:"Select all cells"}}},wo={zhCn:"zh-cn",en:"en"},P1=Symbol("ai-ppt-edit-i18n");let Ai=null,ks={[wo.zhCn]:lT,[wo.en]:sT},Pd=null;const Qf=e=>!e||String(e).toLowerCase().startsWith("zh")?wo.zhCn:wo.en,cT=()=>{if(Ai)return Ai;const e=typeof navigator>"u"?"":navigator.language||navigator.userLanguage;return Ai=Qf(e),Ai},Tv=(e,t)=>{if(!e||!t)return;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const n=String(t).split(".");let o=e;for(const a of n)if(o&&Object.prototype.hasOwnProperty.call(o,a))o=o[a];else return;return o},uT=(e,t)=>!t||typeof e!="string"?e:e.replace(/\{(\w+)\}/g,(n,o)=>Object.prototype.hasOwnProperty.call(t,o)?String(t[o]):`{${o}}`),dT=e=>{const t=cT(),n=ks[t],o=ks[wo.zhCn];return Tv(n,e)??Tv(o,e)},Oo=(e,t={})=>{if(typeof Pd=="function")return Pd(e,t);const n=dT(e);return n?uT(n,t):e},fT=e=>{Ai=Qf(e)},pT=(e={})=>{Object.keys(e).forEach(t=>{const n=Qf(t);ks[n]={...ks[n]||{},...e[t]}})},M1=(e={})=>{const{t,locale:n,messages:o}=e;typeof t=="function"&&(Pd=t),n&&fT(n),o&&typeof o=="object"&&pT(o)},_e=()=>{const e=r.inject(P1,null);if(e&&typeof e.t=="function")return e;const n=r.getCurrentInstance()?.appContext?.config?.globalProperties?.t;return typeof n=="function"?{t:n}:{t:Oo}},fa=O_.create({timeout:1e3*300});fa.interceptors.request.use(e=>(e.kebabToCamel&&e.data&&(e.data=Dd(e.data)),e),e=>Promise.reject(e));fa.interceptors.response.use(e=>{const t=e.config;return e.data=t.kebabToCamel?kd(e.data):e.data,e.status>=200&&e.status<400?Promise.resolve(e.data):(Ae.error(Oo("REQUEST.UNKNOWN_ERROR")),Promise.reject(e))},e=>e&&e.response?(e.response.status>=400&&e.response.status<500||e.response.status>=500||Ae.error(Oo("REQUEST.SERVER_UNKNOWN_ERROR")),Promise.reject(e.message)):(Ae.error(Oo("REQUEST.CONNECTION_FAIL")),Promise.reject(e)));const ep={serverBaseUrl:"",assetsUrl:""},vT=e=>{Object.assign(ep,e)},Sv=()=>ep.serverBaseUrl,Md=()=>ep.assetsUrl,hT={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ru=hT&&"/"||"/",mT=ru.endsWith("/")?ru:`${ru}/`,B1=e=>{if(!e)return"";const t=e.replace(/^\/+/,"");return`${mT}${t}`},gT=e=>typeof e=="string"&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")),ET=e=>{if(typeof e!="string")return e;const t=Md();if(!t)return e;const n=t.endsWith("/")?t.slice(0,-1):t,a=[n,"/ai/ppt/ai-ppt-assets","/ai-ppt-assets"].find(i=>e.startsWith(i));return a?`${n}${e.slice(a.length)}`:e},Mi=e=>{if(typeof e!="string"||gT(e))return e;let t=e.trim();const n=ET(t);return n!==t?n:(t.startsWith("../")&&(t=t.slice(3)),t.startsWith("./")&&(t=t.slice(2)),t.startsWith("/")&&(t=t.slice(1)),t.startsWith("template/images/")?B1(t):e)},yT={template_6:"jpeg"},jr=e=>{if(!e)return"";const t=yT[e]||"jpg";return B1(`template/${e}.${t}`)},_T=e=>{if(!e||!Array.isArray(e.slides))return e;const t=e.slides.map(n=>{const o={...n};if(o.background&&typeof o.background=="object"&&o.background.src){const a=Mi(o.background.src);a!==o.background.src&&(o.background={...o.background,src:a})}if(o.background&&typeof o.background=="object"&&o.background.image&&typeof o.background.image=="object"&&o.background.image.src){const a=Mi(o.background.image.src);a!==o.background.image.src&&(o.background={...o.background,image:{...o.background.image,src:a}})}return Array.isArray(o.elements)&&(o.elements=o.elements.map(a=>{if(a&&a.type==="image"&&a.src){const i=Mi(a.src);if(i!==a.src)return{...a,src:i}}return a})),o});return{...e,slides:t}},TT=e=>{if(Array.isArray(e))return e.map(t=>{if(!t||!t.src)return t;const n=Mi(t.src);return n===t.src?t:{...t,src:n}});if(e&&typeof e=="object"){const t={};for(const[n,o]of Object.entries(e))t[n]=Mi(o);return t}return e},Ni={getTemplates(e){const t=`${Md()}/template/${e}.json`;return fa.get(t).then(_T)},getImageList(e){const t=`${Md()}/template/images/${e}`;return fa.get(t).then(TT)},getAIPPTData(e){return fa.get(`${Sv()}/api/v1/ppt/data/${e}`,{kebabToCamel:!0})},saveAIPPTData(e){return fa.put(`${Sv()}/api/v1/ppt/save`,e,{kebabToCamel:!0})}},ST=[{name:"CMI1",nameKey:"TEMPLATE_LIST.CMI1",id:"template_7",imageList:"template_7_images/images_info.json",cover:jr("template_7")},{name:"CMI2",nameKey:"TEMPLATE_LIST.CMI2",id:"template_5",imageList:"template_5_images/images_info.json",cover:jr("template_5")},{name:"CMI3",nameKey:"TEMPLATE_LIST.CMI3",id:"template_6",imageList:"template_6_images/images_info.json",cover:jr("template_6")},{name:"红色通用",nameKey:"TEMPLATE_LIST.RED_GENERAL",id:"template_1",imageList:"template_1_images/images_info.json",cover:jr("template_1")},{name:"蓝色通用",nameKey:"TEMPLATE_LIST.BLUE_GENERAL",id:"template_2",imageList:"template_2_images/images_info.json",cover:jr("template_2")},{name:"紫色通用",nameKey:"TEMPLATE_LIST.PURPLE_GENERAL",id:"template_3",imageList:"template_3_images/images_info.json",cover:jr("template_3")},{name:"莫兰迪配色",nameKey:"TEMPLATE_LIST.MORANDI",id:"template_4",imageList:"template_4_images/images_info.json",cover:jr("template_4")}],Iv=Ne.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",10),Co=ne.defineStore("slides",{state:()=>({title:"未命名演示文稿",theme:{themeColors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"],fontColor:"#333",fontName:"",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},slides:[{id:Iv(),elements:[]}],slideIndex:0,viewportSize:1e3,viewportRatio:.5625,templates:ST}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const o=t.elements.map(a=>a.id);return t.animations.filter(a=>o.includes(a.elId))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const o=t.elements.map(l=>l.id),a=t.animations.filter(l=>o.includes(l.elId)),i=[];for(const l of a)if(l.trigger==="click"||!i.length)i.push({animations:[l],autoNext:!1});else if(l.trigger==="meantime"){const s=i[i.length-1];s.animations=s.animations.filter(c=>c.elId!==l.elId),s.animations.push(l),i[i.length-1]=s}else if(l.trigger==="auto"){const s=i[i.length-1];s.autoNext=!0,i[i.length-1]=s,i.push({animations:[l],autoNext:!1})}return i}},actions:{setTitle(e){e?(this.title=e,document.title=e):this.title="未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportSize(e){this.viewportSize=e},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},setTemplates(e){this.templates=e},resetSlides(){this.slides=[{id:Iv(),elements:[]}],this.slideIndex=0},addSlide(e){const t=Array.isArray(e)?e:[e];for(const o of t)o.sectionTag&&delete o.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}const n=this.slideIndex+1;this.slides.splice(n,0,...t),this.slideIndex=n},addSlideToEnd(e){const t=Array.isArray(e)?e:[e];for(const n of t)n.sectionTag&&delete n.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}this.slides.push(...t),this.slideIndex=this.slides.length-1},updateSlide(e,t){const n=t?this.slides.findIndex(o=>o.id===t):this.slideIndex;this.slides[n]={...this.slides[n],...e}},removeSlideProps(e){const{id:t,propName:n}=e,o=this.slides.map(a=>a.id===t?Xe.omit(a,n):a);this.slides=o},deleteSlide(e){const t=Array.isArray(e)?e:[e],n=JSON.parse(JSON.stringify(this.slides)),o=[];for(const l of t){const s=n.findIndex(u=>u.id===l);o.push(s);const c=n[s].sectionTag;if(c){const u=n[s+1];u&&!u.sectionTag&&(delete n[s].sectionTag,n[s+1].sectionTag=c)}n.splice(s,1)}let a=Math.min(...o);const i=n.length-1;a>i&&(a=i),this.slideIndex=a,this.slides=n},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],o=[...this.slides[this.slideIndex].elements,...t];this.slides[this.slideIndex].elements=o},deleteElement(e){const t=Array.isArray(e)?e:[e],o=this.slides[this.slideIndex].elements.filter(a=>!t.includes(a.id));this.slides[this.slideIndex].elements=o},updateElement(e){const{id:t,props:n,slideId:o}=e,a=typeof t=="string"?[t]:t,i=o?this.slides.findIndex(c=>c.id===o):this.slideIndex,s=this.slides[i].elements.map(c=>a.includes(c.id)?{...c,...n}:c);this.slides[i].elements=s},removeElementProps(e){const{id:t,propName:n}=e,o=typeof n=="string"?[n]:n,a=this.slideIndex,l=this.slides[a].elements.map(s=>s.id===t?Xe.omit(s,o):s);this.slides[a].elements=l}}}),V1=Ne.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),$1=V1(10),Bd=ne.defineStore("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,toolbarState:Tt.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:X_,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:$1,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1,showNotesPanel:!1,showSymbolPanel:!1,showMarkupPanel:!1,showAIPPTDialog:!1,isGenerating:!1,sessionId:V1(),isOutlineFromFile:!1,generateFromUploadedFile:!1,generateFromWebSearch:!1,disabled:!1}),getters:{activeElementList(e){const n=Co(Qt).currentSlide;return!n||!n.elements?[]:n.elements.filter(o=>e.activeElementIdList.includes(o.id))},handleElement(e){const n=Co(Qt).currentSlide;return!n||!n.elements?null:n.elements.find(o=>e.handleElementId===o.id)||null}},actions:{setActiveElementIdList(e){e.length===1?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e},setNotesPanelState(e){this.showNotesPanel=e},setSymbolPanelState(e){this.showSymbolPanel=e},setMarkupPanelState(e){this.showMarkupPanel=e},setAIPPTDialogState(e){this.showAIPPTDialog=e},setGenerating(e){this.isGenerating=e},setOutlineFromFile(e){this.isOutlineFromFile=e},setGenerateFromUploadedFile(e){this.generateFromUploadedFile=e},setGenerateFromWebSearch(e){this.generateFromWebSearch=e},setDisabled(e){this.disabled=e}}}),IT="PPTist",Ar=new w_(`${IT}_${$1}_${new Date().getTime()}`);Ar.version(1).stores({snapshots:"++id",writingBoardImgs:"id"});const AT=ne.defineStore("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor<e.snapshotLength-1}},actions:{setSnapshotCursor(e){this.snapshotCursor=e},setSnapshotLength(e){this.snapshotLength=e},async initSnapshotDatabase(){const e=Co(Qt),t={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await Ar.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=Co(Qt),t=await Ar.snapshots.orderBy("id").keys();let n=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(n=t.slice(this.snapshotCursor+1));const o={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await Ar.snapshots.add(o);let a=t.length-n.length+1;a>20&&(n.push(t[0]),a--),a>=2&&Ar.snapshots.update(t[a-2],{index:e.slideIndex}),await Ar.snapshots.bulkDelete(n),this.setSnapshotCursor(a-1),this.setSnapshotLength(a)},async unDo(){if(this.snapshotCursor<=0)return;const e=Co(Qt),t=Bd(Qt),n=this.snapshotCursor-1,a=(await Ar.snapshots.orderBy("id").toArray())[n],{index:i,slides:l}=a,s=i>l.length-1?l.length-1:i;e.setSlides(l),e.updateSlideIndex(s),this.setSnapshotCursor(n),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=Co(Qt),t=Bd(Qt),n=this.snapshotCursor+1,a=(await Ar.snapshots.orderBy("id").toArray())[n],{index:i,slides:l}=a,s=i>l.length-1?l.length-1:i;e.setSlides(l),e.updateSlideIndex(s),this.setSnapshotCursor(n),t.setActiveElementIdList([])}}}),NT=ne.defineStore("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),LT=ne.defineStore("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),fe=()=>Bd(Qt),pe=()=>Co(Qt),F1=()=>AT(Qt),ln=()=>NT(Qt),CT=()=>LT(Qt),Ta=e=>{const{left:t,top:n,width:o,height:a,rotate:i=0}=e,l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2))/2,s=Math.atan(a/o)*180/Math.PI,c=(180-i-s)*Math.PI/180,u=(s-i)*Math.PI/180,d=t+o/2,f=n+a/2,v=[d+l*Math.cos(c),d+l*Math.cos(u),d-l*Math.cos(c),d-l*Math.cos(u)],p=[f-l*Math.sin(c),f-l*Math.sin(u),f+l*Math.sin(c),f+l*Math.sin(u)];return{xRange:[Math.min(...v),Math.max(...v)],yRange:[Math.min(...p),Math.max(...p)]}},pa=e=>{const{xRange:t,yRange:n}=Ta({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:o,yRange:a}=Ta({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:o[0]-t[0],offsetY:a[0]-n[0]}},vn=e=>{let t,n,o,a;if(e.type==="line")t=e.left,n=e.left+Math.max(e.start[0],e.end[0]),o=e.top,a=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:i,top:l,width:s,height:c,rotate:u}=e,{xRange:d,yRange:f}=Ta({left:i,top:l,width:s,height:c,rotate:u});t=d[0],n=d[1],o=f[0],a=f[1]}else t=e.left,n=e.left+e.width,o=e.top,a=e.top+e.height;return{minX:t,maxX:n,minY:o,maxY:a}},tr=e=>{const t=[],n=[],o=[],a=[];e.forEach(u=>{const{minX:d,maxX:f,minY:v,maxY:p}=vn(u);t.push(d),n.push(v),o.push(f),a.push(p)});const i=Math.min(...t),l=Math.max(...o),s=Math.min(...n),c=Math.max(...a);return{minX:i,maxX:l,minY:s,maxY:c}},xT=e=>{const t=e.end[0]-e.start[0],n=e.end[1]-e.start[1];return Math.sqrt(t*t+n*n)},Ds=e=>{const t=[];return e.forEach(n=>{const o=t.findIndex(a=>a.value===n.value);if(o===-1)t.push(n);else{const a=t[o],i=Math.min(a.range[0],n.range[0]),l=Math.max(a.range[1],n.range[1]),s=[i,l],c={value:n.value,range:s};t[o]=c}}),t},Vd=e=>{const t={};for(const n of e)t[n.id]=Ne.nanoid(10);return t},Bi=e=>{const t={},n={};for(const o of e){const a=o.groupId;a&&!t[a]&&(t[a]=Ne.nanoid(10)),n[o.id]=Ne.nanoid(10)}return{groupIdMap:t,elIdMap:n}},H1=e=>{const t=we(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},tp=e=>{const t=e.start.join(","),n=e.end.join(",");if(e.broken){const o=e.broken.join(",");return`M${t} L${o} L${n}`}else if(e.broken2){const{minX:o,maxX:a,minY:i,maxY:l}=vn(e);return a-o>=l-i?`M${t} L${e.broken2[0]},${e.start[1]} L${e.broken2[0]},${e.end[1]} ${n}`:`M${t} L${e.start[0]},${e.broken2[1]} L${e.end[0]},${e.broken2[1]} ${n}`}else if(e.curve){const o=e.curve.join(",");return`M${t} Q${o} ${n}`}else if(e.cubic){const[o,a]=e.cubic,i=o.join(","),l=a.join(",");return`M${t} C${i} ${l} ${n}`}return`M${t} L${n}`},bT=(e,t)=>{const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return n.top>=o.top&&n.bottom<=o.bottom},be=()=>{const e=F1(),t=Xe.debounce(function(){e.addSnapshot()},300,{trailing:!0}),n=Xe.throttle(function(){e.reDo()},100,{leading:!0,trailing:!1}),o=Xe.throttle(function(){e.unDo()},100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:n,undo:o}},gl=()=>{const e=fe(),t=pe(),{currentSlide:n}=ne.storeToRefs(t),{addHistorySnapshot:o}=be();return{addElementsFromData:s=>{const{groupIdMap:c,elIdMap:u}=Bi(s),d=s[0];let f=0,v;do v=n.value.elements.find(p=>{if(p.type!==d.type)return!1;const{minX:h,maxX:m,minY:g,maxY:E}=vn(p),{minX:y,maxX:_,minY:S,maxY:I}=vn({...d,left:d.left+f,top:d.top+f});return h===y&&m===_&&g===S&&E===I}),v&&(f+=10);while(v);for(const p of s)p.id=u[p.id],p.left=p.left+f,p.top=p.top+f,p.groupId&&(p.groupId=c[p.groupId]);t.addElement(s),e.setActiveElementIdList(Object.values(u)),o()},addSlidesFromData:s=>{const c=Vd(s),u=s.map(d=>{const{groupIdMap:f,elIdMap:v}=Bi(d.elements);for(const p of d.elements)p.id=v[p.id],p.groupId&&(p.groupId=f[p.groupId]),p.link&&p.link.type==="slide"&&(c[p.link.target]?p.link.target=c[p.link.target]:delete p.link);if(d.animations)for(const p of d.animations)p.id=Ne.nanoid(10),p.elId=v[p.elId];return{...d,id:c[d.id]}});t.addSlide(u),o()},addSlidesFromDataToEnd:s=>{const c=Vd(s),u=s.map(d=>{const{groupIdMap:f,elIdMap:v}=Bi(d.elements);for(const p of d.elements)p.id=v[p.id],p.groupId&&(p.groupId=f[p.groupId]),p.link&&p.link.type==="slide"&&(c[p.link.target]?p.link.target=c[p.link.target]:delete p.link);if(d.animations)for(const p of d.animations)p.id=Ne.nanoid(10),p.elId=v[p.elId];return{...d,id:c[d.id]}});t.addSlideToEnd(u),o()}}},U1="pptist",np=e=>Cd.AES.encrypt(e,U1).toString(),G1=e=>Cd.AES.decrypt(e,U1).toString(Cd.enc.Utf8),z1=e=>new Promise((t,n)=>{const o=document.createElement("button"),a=new R_(o,{text:()=>e,action:()=>"copy",container:document.body});a.on("success",i=>{a.destroy(),t(i)}),a.on("error",i=>{a.destroy(),n(i)}),document.body.appendChild(o),o.click(),document.body.removeChild(o)}),Y1=()=>new Promise((e,t)=>{var n;!((n=navigator.clipboard)===null||n===void 0)&&n.readText?navigator.clipboard.readText().then(o=>(o||t("剪贴板为空或者不包含文本"),e(o))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),rp=e=>{let t;try{t=JSON.parse(G1(e))}catch{t=e}return t},X1=e=>{const t=e.split(`\r
15
+ `,document.body.appendChild(Dn));const o=r.createVNode(eT,n,null),a=document.createElement("div");o.appContext=e.ctx||Ae._context||null,o.props.onClose=e.onClose,o.props.onDestroy=()=>{Dn&&Dn.childNodes.length<=1&&(Dn.remove(),Dn=null),r.render(null,a)},r.render(o,a),Dn.appendChild(a.firstElementChild);const i={id:t,close:()=>{var l,s;return(s=(l=o?.component)===null||l===void 0?void 0:l.exposed)===null||s===void 0?void 0:s.close()}};return Rd.push(i),i};Ae.success=(e,t)=>Ae({...t,type:"success",message:e});Ae.info=(e,t)=>Ae({...t,type:"info",message:e});Ae.warning=(e,t)=>Ae({...t,type:"warning",message:e});Ae.error=(e,t)=>Ae({...t,type:"error",message:e});Ae.closeAll=function(){for(let e=Rd.length-1;e>=0;e--)Rd[e].close()};const rT=(e,t)=>Xe.padStart(""+e,t,"0"),oT=e=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(e),aT=e=>e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()),kd=e=>typeof e!="object"||e===null?e:Array.isArray(e)?e.map(kd):Object.keys(e).reduce((t,n)=>{const o=aT(n);return t[o]=kd(e[n]),t},{}),iT=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),Dd=e=>typeof e!="object"||e===null?e:Array.isArray(e)?e.map(Dd):Object.keys(e).reduce((t,n)=>{const o=iT(n);return t[o]=Dd(e[n]),t},{}),lT={COMMON:{CONFIRM:"确认",CANCEL:"取消",DELETE:"删除",REMOVE:"移除",INSERT:"插入",COPY:"复制",CUT:"剪切",PASTE:"粘贴",SELECT_ALL:"全选",EDIT:"编辑",CLOSE:"关闭",APPLY:"应用",SAVE:"保存",SEARCH:"查找",SEARCH_FONT:"搜索字体",SEARCH_FONT_SIZE:"搜索字号",REPLACE:"替换",REPLACE_ALL:"全部替换",NEXT:"下一个",PREV:"上一个",BACK:"返回",MORE:"更多",PREVIEW:"预览",CLEAR:"清空",SET:"设置",FORMAT_PAINTER_TIP:"格式刷(双击连续使用)"},EXPORT:{RANGE:"导出范围:",ALL:"全部",CURRENT:"当前页",CUSTOM:"自定义",CUSTOM_RANGE:"自定义范围:",FORMAT:"导出格式:",IMAGE_QUALITY:"图片质量:",IGNORE_WEBFONT:"忽略在线字体:",IGNORE_MEDIA:"忽略音频/视频:",OVERWRITE_MASTER:"覆盖默认母版:",PER_PAGE_COUNT:"每页数量:",EDGE_PADDING:"边缘留白:",BTN_PPTX:"导出 PPTX",BTN_IMAGE:"导出图片",BTN_JSON:"导出 JSON",BTN_PDF:"打印 / 导出 PDF",BTN_PPTIST:"导出 PPTIST 文件",IMAGE_FAIL:"导出图片失败",FAIL:"导出失败",CLOSE:"关闭",EXPORTING:"正在导出...",TIP_MEDIA:"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。",TIP_MEDIA_FORMAT:"提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。",TIP_WEBFONT:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。",TIP_PPTIST:"提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。",TIP_PDF:"提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。"},EXPORT_TABS:{PPTX:"导出 PPTX",IMAGE:"导出图片",JSON:"导出 JSON",PDF:"打印 / 导出 PDF",PPTIST:"导出 PPTIST 文件"},SLIDE_THUMBS:{ADD_SLIDE:"添加幻灯片",PAGE_NUMBER:"幻灯片 {current} / {total}",SECTION_PLACEHOLDER:"输入节名称",SECTION_UNTITLED:"无标题节",SECTION_DEFAULT:"默认节",SECTION_DELETE:"删除节",SECTION_DELETE_WITH_SLIDES:"删除节和幻灯片",SECTION_DELETE_ALL:"删除所有节",SECTION_RENAME:"重命名节",SECTION_ADD:"增加节",PASTE:"粘贴",SELECT_ALL:"全选",NEW_SLIDE:"新建页面",SLIDE_SHOW:"幻灯片放映",CUT:"剪切",COPY:"复制",DUPLICATE_SLIDE:"复制页面",DELETE_SLIDE:"删除页面",SLIDE_SHOW_FROM_CURRENT:"从当前放映"},SLIDE_TEMPLATES:{INSERT_ALL:"插入全部",INSERT_TEMPLATE:"插入模板",TYPE_ALL:"全部",TYPE_COVER:"封面",TYPE_CONTENTS:"目录",TYPE_TRANSITION:"过渡",TYPE_CONTENT:"内容",TYPE_REFERENCE:"引用",TYPE_END:"结束"},TEMPLATE_LIST:{CMI1:"CMI1",CMI2:"CMI2",CMI3:"CMI3",RED_GENERAL:"红色通用",BLUE_GENERAL:"蓝色通用",PURPLE_GENERAL:"紫色通用",MORANDI:"莫兰迪配色"},COLOR_PICKER:{RECENT_USED:"最近使用",EYEDROPPER_HINT:"请在画布上点击取色",EYEDROPPER_INIT_FAIL:"取色失败,请重试"},IMPORT:{FILE_PARSE_FAIL:"无法正确读取/解析该文件"},REQUEST:{UNKNOWN_ERROR:"未知错误",SERVER_UNKNOWN_ERROR:"服务器异常",CONNECTION_FAIL:"连接失败"},EDITOR:{GENERATING:"AI 生成中,请耐心等待…",AIPPT_NO_PPTID:"aippt生成失败,缺少pptId参数",AIPPT_FETCH_FAIL:"获取AIPPT数据失败",TEMPLATE_FETCH_FAIL:"获取模板数据失败"},HEADER_BAR:{EXPORT_FILE:"导出文件",RESET_SLIDES:"重置幻灯片",MARKUP:"幻灯片类型标注",HOTKEY:"快捷操作",SLIDE_SHOW_TOOLTIP:"幻灯片放映(F5)",SLIDE_SHOW_FROM_START:"从头开始",SLIDE_SHOW_FROM_CURRENT:"从当前页开始",EXPORT_TOOLTIP:"导出",HOTKEY_TITLE:"快捷操作",AIPPT_DRAWER_TITLE:"渲染 AIPPT",TEMPLATE_SELECTED:"已选择模板",TEMPLATE_NOT_SELECTED:"尚未选择",AIPPT_JSON_LABEL:"AIPPT JSON",AIPPT_JSON_PLACEHOLDER:'在此粘贴 AIPPT.json 内容(如 {"cover": {...}, "contents":[...], "content":[...], "end":[...]})',RENDER_AND_LOAD:"渲染并载入",IMPORTING:"正在导入...",RENDERING_AIPPT:"正在渲染 AIPPT...",TEMPLATE_LOADED:"模板已载入,请粘贴 AIPPT JSON",TEMPLATE_LOAD_FAIL:"模板读取失败:请确认是有效的 JSON",NEED_TEMPLATE_FILE:"请先选择模板文件",AIPPT_PARSE_FAIL:"AIPPT JSON 解析失败,请检查格式",TEMPLATE_SLIDES_MISSING:"模板缺少 slides 字段或为空",AIPPT_UNKNOWN_TYPES:"以下类型未在当前模板中找到:{unknown};模板支持:{supported}",AIPPT_UNKNOWN_TYPES_EMPTY:"未探测到",RENDER_SUCCESS:"渲染完成,已载入到画布",RENDER_FAIL:"渲染失败:{reason}",RENDER_FAIL_FALLBACK:"请检查模板类型标注与 AIPPT 结构是否匹配"},QUICK_SEARCH:{SEARCH_PLACEHOLDER:"输入查找内容",REPLACE_PLACEHOLDER:"输入替换内容",IGNORE_CASE:"忽略大小写",PREV:"上一个",NEXT:"下一个",NO_MATCH:"未找到匹配结果",EMPTY_SEARCH:"请输入查找内容"},COMMENT_PANEL:{PLACEHOLDER:"点击输入演讲者备注"},TABLE_GENERATOR:{TITLE:"表格",CUSTOM:"自定义",ROW_COUNT:"行数:",COL_COUNT:"列数:",COUNT_LIMIT:"行数/列数必须在0~20之间!"},MEDIA_INPUT:{VIDEO:"视频",AUDIO:"音频",VIDEO_PLACEHOLDER:"请输入视频地址,e.g. https://xxx.mp4",AUDIO_PLACEHOLDER:"请输入音频地址,e.g. https://xxx.mp3",VIDEO_ERROR:"请先输入正确的视频地址",AUDIO_ERROR:"请先输入正确的音频地址"},CANVAS_TOOL:{UNDO:"撤销(Ctrl + Z)",REDO:"重做(Ctrl + Y)",NOTES_PANEL:"批注面板",SELECTION_PANEL:"选择窗格",SEARCH_REPLACE:"查找替换",SEARCH_REPLACE_TOOLTIP:"查找/替换(Ctrl + F)",INSERT_TEXT:"插入文字",TEXT_HORIZONTAL:"横向文本框",TEXT_VERTICAL:"竖向文本框",INSERT_SHAPE:"插入形状",FREE_DRAW:"自由绘制",INSERT_IMAGE:"插入图片",INSERT_LINE:"插入线条",INSERT_CHART:"插入图表",INSERT_TABLE:"插入表格",INSERT_FORMULA:"插入公式",INSERT_MEDIA:"插入音视频",INSERT_SYMBOL:"插入符号",SCALE_DOWN:"画布缩小(Ctrl + -)",SCALE_UP:"画布放大(Ctrl + =)",FIT_SCREEN:"适应屏幕",FIT_SCREEN_TOOLTIP:"适应屏幕(Ctrl + 0)"},CANVAS_MENU:{RULER:"标尺",GRID_LINES:"网格线",GRID_NONE:"无",GRID_SMALL:"小",GRID_MEDIUM:"中",GRID_LARGE:"大",RESET_SLIDE:"重置当前页",SLIDE_SHOW:"幻灯片放映"},LINK_DIALOG:{WEB:"网页链接",SLIDE:"幻灯片页面",WEB_PLACEHOLDER:"请输入网页链接地址",PREVIEW:"预览:",SLIDE_LABEL:"幻灯片 {index}",SELECT_TARGET:"请选择目标幻灯片"},LINK_HANDLER:{SLIDE_PAGE:"幻灯片页面",CHANGE:"更换"},EDITABLE_ELEMENT:{UNLOCK:"解锁",LOCK:"锁定",ALIGN_HORIZONTAL:"水平居中",ALIGN_VERTICAL:"垂直居中",ALIGN_CENTER_BOTH:"水平垂直居中",ALIGN_LEFT:"左对齐",ALIGN_RIGHT:"右对齐",ALIGN_TOP:"顶部对齐",ALIGN_BOTTOM:"底部对齐",BRING_TO_FRONT:"置于顶层",SEND_TO_BACK:"置于底层",MOVE_UP:"上移一层",MOVE_DOWN:"下移一层",SET_LINK:"设置链接",GROUP:"组合",UNGROUP:"取消组合"},SELECTION_PANEL:{TITLE:"选择({current}/{total})",SHOW_ALL:"全部显示",HIDE_ALL:"全部隐藏",GROUP:"组合"},SPEAKER_NOTES:{TITLE:"幻灯片{index}的批注",REPLY:"回复",REPLY_PLACEHOLDER:"输入回复内容",EMPTY:"本页暂无批注",INPUT_PLACEHOLDER:"输入批注(为{target})",TARGET_ELEMENT:"选中元素",TARGET_SLIDE:"当前页幻灯片",CLEAR_TOOLTIP:"清空本页批注",ADD:"添加批注",DEFAULT_USER:"测试用户"},MARKUP_PANEL:{TITLE:"幻灯片类型标注",CURRENT_SLIDE_TYPE:"当前页面类型:",CURRENT_TEXT_TYPE:"当前文本类型:",CURRENT_CHART_MARK:"当前图表标记:",CURRENT_IMAGE_TYPE:"当前图片类型:",PLACEHOLDER:"选中文本、图表、图片或带文字的形状,进行类型标记",TYPE_UNMARKED:"未标记类型",SLIDE_COVER:"封面页",SLIDE_CONTENTS:"目录页",SLIDE_TRANSITION:"过渡页",SLIDE_CONTENT:"内容页",SLIDE_REFERENCE:"引用页",SLIDE_END:"结束页",TEXT_TITLE:"标题",TEXT_SUBTITLE:"副标题",TEXT_CONTENT:"正文",TEXT_ITEM:"列表项目",TEXT_ITEM_TITLE:"列表项标题",TEXT_NOTES:"注释",TEXT_HEADER:"页眉",TEXT_FOOTER:"页脚",TEXT_PART_NUMBER:"节编号",TEXT_ITEM_NUMBER:"项目编号",TEXT_REFERENCE_NUMBER:"引用编号",TEXT_REFERENCE_TITLE:"引用标题",IMAGE_PAGE:"页面插图",IMAGE_ITEM:"项目插图",IMAGE_BACKGROUND:"背景图",CHART_ITEM:"图表(内容项)"},SYMBOL_LIBRARY:{TAB_LETTER:"字母",TAB_NUMBER:"序号",TAB_MATH:"数学",TAB_ARROW:"箭头",TAB_GRAPH:"图形",TAB_EMOJI:"Emoji",EMOJI_FACE:"表情",EMOJI_ACTION:"动作",EMOJI_NATURE:"动植物",EMOJI_FOOD:"食物",EMOJI_TRAVEL:"旅行",EMOJI_ACTIVITY:"活动",EMOJI_OBJECTS:"物品",EMOJI_SYMBOLS:"符号"},TOOLBAR:{TAB_STYLE:"样式",TAB_POSITION:"位置",TAB_ANIMATION:"动画",TAB_DESIGN:"设计",TAB_TRANSITION:"切换",TAB_STYLE_MULTI:"样式(多选)",TAB_POSITION_MULTI:"位置(多选)"},POSITION_PANEL:{LAYER:"层级:",BRING_TO_FRONT:"置顶",SEND_TO_BACK:"置底",MOVE_UP:"上移",MOVE_DOWN:"下移",ALIGN:"对齐:",ALIGN_LEFT:"左对齐",ALIGN_RIGHT:"右对齐",ALIGN_TOP:"上对齐",ALIGN_BOTTOM:"下对齐",ALIGN_CENTER_HORIZONTAL:"水平居中",ALIGN_CENTER_VERTICAL:"垂直居中",HORIZONTAL:"水平:",VERTICAL:"垂直:",WIDTH:"宽度:",HEIGHT:"高度:",ROTATE:"旋转:",LOCK_RATIO:"宽高比锁定",UNLOCK_RATIO:"解除宽高比锁定"},MULTI_POSITION:{HORIZONTAL_DISTRIBUTE:"水平均匀分布",VERTICAL_DISTRIBUTE:"垂直均匀分布"},STYLE_PARTS:{OPACITY:"不透明度:",SHADOW_ENABLE:"启用阴影:",SHADOW_X:"水平阴影:",SHADOW_Y:"垂直阴影:",SHADOW_BLUR:"模糊距离:",SHADOW_COLOR:"阴影颜色:",OUTLINE_ENABLE:"启用边框:",OUTLINE_STYLE:"边框样式:",OUTLINE_COLOR:"边框颜色:",OUTLINE_WIDTH:"边框粗细:",COLOR_MASK:"着色(蒙版):",MASK_COLOR:"蒙版颜色:",FILTER_ENABLE:"启用滤镜:",FLIP_VERTICAL:"垂直翻转",FLIP_HORIZONTAL:"水平翻转"},FILTERS:{BLUR:"模糊",BRIGHTNESS:"亮度",CONTRAST:"对比度",GRAYSCALE:"灰度",SATURATION:"饱和度",HUE:"色相",SEPIA:"褐色",INVERT:"反转",OPACITY:"不透明度",PRESET_BW:"黑白",PRESET_RETRO:"复古",PRESET_SHARPEN:"锐化",PRESET_SOFT:"柔和",PRESET_WARM:"暖色",PRESET_BRIGHT:"明亮",PRESET_VIVID:"鲜艳",PRESET_BLUR:"模糊",PRESET_INVERT:"反转"},TEXT_STYLE:{LINE_HEIGHT:"行高:",LINE_HEIGHT_OPTION:"{value} 倍",PARAGRAPH_SPACING:"段间距:",PX_OPTION:"{value}px",LETTER_SPACING:"字间距:",BOX_FILL:"文本框填充:",PRESET_TITLE_LG:"标题(大)",PRESET_TITLE_SM:"标题(小)",PRESET_BODY:"正文",PRESET_BODY_SM:"正文(小)",PRESET_NOTE_1:"注释(斜体)",PRESET_NOTE_2:"注释(下划线)"},MULTI_STYLE:{FILL_COLOR:"填充颜色:",OUTLINE_STYLE:"边框样式:",OUTLINE_COLOR:"边框颜色:",OUTLINE_WIDTH:"边框粗细:"},RICH_TEXT:{TEXT_COLOR:"文字颜色",TEXT_HIGHLIGHT:"文字高亮",FONT_SIZE_INCREASE:"增大字号",FONT_SIZE_DECREASE:"减小字号",BOLD:"加粗",ITALIC:"斜体",UNDERLINE:"下划线",STRIKETHROUGH:"删除线",SUPERSCRIPT:"上标",SUBSCRIPT:"下标",INLINE_CODE:"行内代码",BLOCKQUOTE:"引用",AI_POLISH:"美化",AI_EXPAND:"扩写",AI_CONDENSE:"精简",AI_ASSIST:"AI辅助",CLEAR_FORMAT:"清除格式",LINK:"超链接",LINK_PLACEHOLDER:"请输入超链接",ALIGN_LEFT:"左对齐",ALIGN_CENTER:"居中",ALIGN_RIGHT:"右对齐",ALIGN_JUSTIFY:"两端对齐",BULLET_LIST:"项目符号",ORDERED_LIST:"编号",INDENT_DECREASE:"减小段落缩进",INDENT_INCREASE:"增大段落缩进",TEXT_INDENT_DECREASE:"减小首行缩进",TEXT_INDENT_INCREASE:"增大首行缩进",INVALID_LINK:"不是正确的网页链接地址",NO_TEXT_CONTENT:"没有可以执行的文本内容",IN_DEVELOPMENT:"功能开发中,敬请期待"},SLIDE_DESIGN:{BACKGROUND_FILL:"背景填充",FILL_SOLID:"纯色填充",FILL_IMAGE:"图片填充",FILL_GRADIENT:"渐变填充",IMAGE_CONTAIN:"缩放",IMAGE_REPEAT:"拼贴",IMAGE_COVER:"缩放铺满",GRADIENT_LINEAR:"线性渐变",GRADIENT_RADIAL:"径向渐变",CURRENT_COLOR:"当前色块:",GRADIENT_ANGLE:"渐变角度:",APPLY_BACKGROUND_ALL:"应用背景到全部",RATIO_WIDE_16_9:"宽屏 16 : 9",RATIO_WIDE_16_10:"宽屏 16 : 10",RATIO_STANDARD_4_3:"标准 4 : 3",RATIO_PAPER_A3_A4:"纸张 A3 / A4",RATIO_PORTRAIT_A3_A4:"竖向 A3 / A4",CANVAS_SIZE:"画布尺寸:{width} × {height}",GLOBAL_THEME:"全局主题",FONT:"字体:",FONT_COLOR:"字体颜色:",BACKGROUND_COLOR:"背景颜色:",THEME_COLORS:"主题色:",APPLY_THEME_ALL:"应用主题到全部",EXTRACT_THEME:"从幻灯片提取主题",PRESET_THEMES:"预置主题",TEXT_SAMPLE:"文字 Aa",SET_AND_APPLY:"设置并应用"},SLIDE_THEME_COLORS:{TITLE:"编辑主题色",ITEM:"幻灯片主题色{index}:"},THEME_EXTRACT:{FONT:"字体:",FONT_COLOR:"文字颜色:",BACKGROUND_COLOR:"背景颜色:",THEME_COLORS:"主题色:",TIP:"(点击色块排除不要的颜色)",SELECT:"选择",APPLY_TO_THEME:"应用到主题",SAVE_SELECTED:"将选中配置保存为主题",FROM_CURRENT:"从当前页中提取",FROM_ALL:"从全部幻灯片提取",THEME_COLOR_LIMIT:"主题色超出数量限制,已自动选取前6个"},IMAGE_STYLE:{CROP_IMAGE:"裁剪图片",CLIP_BY_SHAPE:"按形状:",CLIP_BY:"按{label}:",RADIUS:"圆角半径:",REPLACE_IMAGE:"替换图片",RESET_STYLE:"重置样式",SET_BACKGROUND:"设为背景",RATIO_SQUARE:"纵横比(正方形)",RATIO_PORTRAIT:"纵横比(纵向)",RATIO_LANDSCAPE:"纵横比(横向)"},SHAPE_STYLE:{REPLACE_SHAPE:"点击替换形状",FILL_SOLID:"纯色填充",FILL_GRADIENT:"渐变填充",FILL_IMAGE:"图片填充",GRADIENT_LINEAR:"线性渐变",GRADIENT_RADIAL:"径向渐变",CURRENT_COLOR:"当前色块:",GRADIENT_ANGLE:"渐变角度:",ALIGN_TOP:"顶对齐",ALIGN_MIDDLE:"居中",ALIGN_BOTTOM:"底对齐",FORMAT_PAINTER:"形状格式刷"},TABLE_STYLE:{CELL_FILL:"单元格填充",ROW_COUNT:"行数:",COL_COUNT:"列数:",ENABLE_THEME:"启用主题表格:",HEADER_ROW:"标题行",FOOTER_ROW:"汇总行",FIRST_COL:"第一列",LAST_COL:"最后一列",THEME_COLOR:"主题颜色:"},CHART_STYLE:{EDIT_CHART:"编辑图表",STACKED:"堆叠样式",SMOOTH_LINE:"使用平滑曲线",BACKGROUND_FILL:"背景填充:",AXIS_TEXT:"坐标与文字:",GRID_COLOR:"网格颜色:",THEME_COLORS:"主题配色:",PRESET_THEMES:"预置图表主题:",SLIDE_THEME:"幻灯片主题:",CUSTOM_THEME:"自定义配色"},CHART_THEME_COLORS:{TITLE:"图表主题配色",ITEM:"主题配色{index}:",ADD:"添加主题色"},CHART_DATA_EDITOR:{TYPE_LABEL:"图表类型:",CHANGE_TYPE:"点击更换",CLEAR_DATA:"清空数据",DEFAULT_CATEGORY:"类别{index}",DEFAULT_SERIES:"系列{index}"},AUDIO_STYLE:{ICON_COLOR:"图标颜色:",AUTOPLAY:"自动播放:",LOOP:"循环播放:"},VIDEO_STYLE:{PREVIEW_COVER:"视频预览封面",RESET_COVER:"重置封面",AUTOPLAY:"自动播放:"},LATEX_STYLE:{EDIT:"编辑 LaTeX",COLOR:"颜色:",STROKE_WIDTH:"粗细:"},CANVAS:{CREATE_SHAPE_TIP:"点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成"},FORMULA_EDITOR:{TAB_SYMBOLS:"常用符号",TAB_PRESETS:"预置公式",INPUT_PLACEHOLDER:"输入 LaTeX 公式",PREVIEW_PLACEHOLDER:"公式预览",EMPTY_ERROR:"公式不能为空"},FORMULA:{SYMBOLS:{MATH:"数学",GROUP:"组合",FUNCTION:"函数",GREEK:"希腊字母"},PRESET:{GAUSS:"高斯公式",FOURIER:"傅里叶级数",TAYLOR:"泰勒展开式",DEFINITE_INTEGRAL:"定积分",TRIG_IDENTITY_1:"三角恒等式1",TRIG_IDENTITY_2:"三角恒等式2",BINOMIAL:"和的展开式",EULER:"欧拉公式",BERNOULLI:"贝努利方程",TOTAL_DIFFERENTIAL:"全微分方程",NONHOMOGENEOUS:"非齐次方程",CAUCHY:"柯西中值定理",LAGRANGE:"拉格朗日中值定理",DERIVATIVE:"导数公式",TRIG_INTEGRAL:"三角函数积分",QUADRIC:"二次曲面",SECOND_ORDER:"二阶微分",DIRECTIONAL:"方向导数"}},HOTKEY:{GENERAL:{TITLE:"通用",CUT:"剪切",COPY:"复制",PASTE:"粘贴",PASTE_PLAIN:"粘贴为纯文本",DUPLICATE:"快速复制粘贴",SELECT_ALL:"全选",UNDO:"撤销",REDO:"恢复",DELETE:"删除",MULTI_SELECT:"多选",SEARCH_REPLACE:"打开搜索替换",PRINT:"打印",CLOSE_DIALOG:"关闭弹窗"},SLIDESHOW:{TITLE:"幻灯片放映",START:"从头开始放映幻灯片",START_CURRENT:"从当前开始放映幻灯片",PREV:"切换上一页",NEXT:"切换下一页",NEXT_ENTER:"切换下一页",EXIT:"退出放映"},EDITOR:{TITLE:"幻灯片编辑",NEW_SLIDE:"新建幻灯片",PAN:"移动画布",ZOOM:"缩放画布",ZOOM_IN:"放大画布",ZOOM_OUT:"缩小画布",FIT_SCREEN:"使画布适应当前屏幕",PREV_NO_SELECTION:"上一页(未选中元素)",NEXT_NO_SELECTION:"下一页(未选中元素)",PREV:"上一页",NEXT:"下一页",QUICK_TEXT:"快速创建文本",QUICK_RECT:"快速创建矩形",QUICK_ELLIPSE:"快速创建圆形",QUICK_LINE:"快速创建线条",EXIT_DRAW:"退出绘制状态"},ELEMENT:{TITLE:"元素操作",MOVE:"移动",LOCK:"锁定",GROUP:"组合",UNGROUP:"取消组合",BRING_TO_FRONT:"置顶层",SEND_TO_BACK:"置底层",LOCK_RATIO:"锁定宽高比例",CREATE_LINE:"创建水平 / 垂直线条",SWITCH_FOCUS:"切换焦点元素",CONFIRM_CROP:"确认图片裁剪",FINISH_CUSTOM_SHAPE:"完成自定义形状绘制"},TABLE:{TITLE:"表格编辑",NEXT_CELL:"聚焦到下一个单元格",MOVE_CELL:"移动焦点单元格",INSERT_ROW_ABOVE:"在上方插入一行",INSERT_ROW_BELOW:"在下方插入一行",INSERT_COL_LEFT:"在左侧插入一列",INSERT_COL_RIGHT:"在右侧插入一列"},CHART:{TITLE:"图表数据编辑",NEXT_ROW:"聚焦到下一行"},TEXT:{TITLE:"文本编辑",BOLD:"加粗",ITALIC:"斜体",UNDERLINE:"下划线",INLINE_CODE:"行内代码",SUPERSCRIPT:"上角标",SUBSCRIPT:"下角标",SELECT_PARAGRAPH:"选中段落"},OTHER:{TITLE:"其他快捷操作",ADD_IMAGE_PASTE:"添加图片 - 粘贴来自系统剪贴板的图片",ADD_IMAGE_DRAG:"添加图片 - 将本地图片拖拽到画布中",ADD_IMAGE_PASTE_SVG:"添加图片 - 在画布中粘贴SVG代码",ADD_IMAGE_PEXELS:"添加图片 - 粘贴来自 pexels 的图片链接",ADD_TEXT_PASTE:"添加文本 - 粘贴来自系统剪贴板的文字",ADD_TEXT_DRAG:"添加文本 - 将外部选中文字拖拽到画布中",TEXT_MARKDOWN:"文本编辑 - 支持 markdown 语法创建列表和引用"},VALUE:{HOLD_CTRL_SHIFT:"按住 Ctrl 或 Shift",SPACE_DRAG:"Space + 鼠标拖拽",CTRL_SCROLL:"Ctrl + 鼠标滚轮",MOUSE_SCROLL_UP:"鼠标上滚 / PgUp",MOUSE_SCROLL_DOWN:"鼠标下滚 / PgDown",DOUBLE_CLICK_BLANK_T:"双击空白处 / T",RIGHT_CLICK:"鼠标右键"}},LINES:{STRAIGHT:"直线",POLY_CURVE:"折线、曲线"},CHART:{TYPE:{BAR:"柱状图",COLUMN:"条形图",LINE:"折线图",AREA:"面积图",SCATTER:"散点图",PIE:"饼图",RING:"环形图",RADAR:"雷达图"},DEFAULT:{CATEGORY:"类别{index}",SERIES:"系列{index}",VALUE:"值",COORD:"坐标{index}",X:"X",Y:"Y"}},FONT:{NAME:{DEFAULT:"默认字体",SOURCE_HAN_SANS:"思源黑体",SOURCE_HAN_SERIF:"思源宋体",FZ_HEITI:"方正黑体",FZ_KAITI:"方正楷体",FZ_SONG:"方正宋体",FZ_FANGSONG:"方正仿宋",ALIBABA_PUHUI:"阿里巴巴普惠体",ZHUQUE_FANGSONG:"朱雀仿宋",LXGW_WENKAI:"霞鹜文楷",WENDING_PL_KAITI:"文鼎PL楷体",DEYI_HEI:"得意黑",MISANS:"MiSans",MICROSOFT_YAHEI:"微软雅黑",DM_SANS:"DM Sans",CANGER_XIAOWANZI:"仓耳小丸子",YOUSHE_TITLE_BLACK:"优设标题黑",FENGGUANG_MINGRUI:"峰广明锐体",SHETU_MODERN_SQUARE:"摄图摩登小方体",ZCOOL_HAPPY:"站酷快乐体",ZIZHI_QU_XIMAI:"字制区喜脉体",SUCAI_JISHI_KANGKANG:"素材集市康康体",SUCAI_JISHI_COOL_SQUARE:"素材集市酷方体",TUNIU_ROUNDED:"途牛类圆体",RUIZI_ZHENYAN:"锐字真言体"}},ELEMENT:{TYPE:{TEXT:"文本",IMAGE:"图片",SHAPE:"形状",LINE:"线条",CHART:"图表",TABLE:"表格",VIDEO:"视频",AUDIO:"音频",LATEX:"公式"}},SHAPE:{CATEGORY:{RECT:"矩形",COMMON:"常用形状",ARROW:"箭头",OTHER:"其他形状",LINEAR:"线性"}},CLIP:{SHAPE:{RECT:"矩形",RECT_2:"矩形2",RECT_3:"矩形3",ROUND_RECT:"圆角矩形",ELLIPSE:"圆形",TRIANGLE:"三角形",TRIANGLE_2:"三角形2",TRIANGLE_3:"三角形3",RHOMBUS:"菱形",PENTAGON:"五边形",HEXAGON:"六边形",HEPTAGON:"七边形",OCTAGON:"八边形",CHEVRON:"V形",POINT:"点",ARROW:"箭头",PARALLELOGRAM:"平行四边形",PARALLELOGRAM_2:"平行四边形2",TRAPEZOID:"梯形",TRAPEZOID_2:"梯形2"}},ANIMATION:{ENTER:{BOUNCE:"弹跳",BOUNCE_IN:"弹入",BOUNCE_IN_LEFT:"向右弹入",BOUNCE_IN_RIGHT:"向左弹入",BOUNCE_IN_UP:"向上弹入",BOUNCE_IN_DOWN:"向下弹入",FADE:"浮现",FADE_IN:"浮入",FADE_IN_DOWN:"向下浮入",FADE_IN_DOWN_BIG:"向下长距浮入",FADE_IN_LEFT:"向右浮入",FADE_IN_LEFT_BIG:"向右长距浮入",FADE_IN_RIGHT:"向左浮入",FADE_IN_RIGHT_BIG:"向左长距浮入",FADE_IN_UP:"向上浮入",FADE_IN_UP_BIG:"向上长距浮入",FADE_IN_TOP_LEFT:"从左上浮入",FADE_IN_TOP_RIGHT:"从右上浮入",FADE_IN_BOTTOM_LEFT:"从左下浮入",FADE_IN_BOTTOM_RIGHT:"从右下浮入",ROTATE:"旋转",ROTATE_IN:"旋转进入",ROTATE_IN_DOWN_LEFT:"绕左下进入",ROTATE_IN_DOWN_RIGHT:"绕右下进入",ROTATE_IN_UP_LEFT:"绕左上进入",ROTATE_IN_UP_RIGHT:"绕右上进入",ZOOM:"缩放",ZOOM_IN:"放大进入",ZOOM_IN_DOWN:"向下放大进入",ZOOM_IN_LEFT:"从左放大进入",ZOOM_IN_RIGHT:"从右放大进入",ZOOM_IN_UP:"向上放大进入",SLIDE:"滑入",SLIDE_IN_DOWN:"向下滑入",SLIDE_IN_LEFT:"从右滑入",SLIDE_IN_RIGHT:"从左滑入",SLIDE_IN_UP:"向上滑入",FLIP:"翻转",FLIP_IN_X:"X轴翻转进入",FLIP_IN_Y:"Y轴翻转进入",BACK:"放大滑入",BACK_IN_DOWN:"向下放大滑入",BACK_IN_LEFT:"从左放大滑入",BACK_IN_RIGHT:"从右放大滑入",BACK_IN_UP:"向上放大滑入",LIGHT_SPEED:"飞入",LIGHT_SPEED_IN_RIGHT:"从右飞入",LIGHT_SPEED_IN_LEFT:"从左飞入"},EXIT:{BOUNCE:"弹跳",BOUNCE_OUT:"弹出",BOUNCE_OUT_LEFT:"向左弹出",BOUNCE_OUT_RIGHT:"向右弹出",BOUNCE_OUT_UP:"向上弹出",BOUNCE_OUT_DOWN:"向下弹出",FADE:"浮现",FADE_OUT:"浮出",FADE_OUT_DOWN:"向下浮出",FADE_OUT_DOWN_BIG:"向下长距浮出",FADE_OUT_LEFT:"向左浮出",FADE_OUT_LEFT_BIG:"向左长距浮出",FADE_OUT_RIGHT:"向右浮出",FADE_OUT_RIGHT_BIG:"向右长距浮出",FADE_OUT_UP:"向上浮出",FADE_OUT_UP_BIG:"向上长距浮出",FADE_OUT_TOP_LEFT:"从左上浮出",FADE_OUT_TOP_RIGHT:"从右上浮出",FADE_OUT_BOTTOM_LEFT:"从左下浮出",FADE_OUT_BOTTOM_RIGHT:"从右下浮出",ROTATE:"旋转",ROTATE_OUT:"旋转退出",ROTATE_OUT_DOWN_LEFT:"绕左下退出",ROTATE_OUT_DOWN_RIGHT:"绕右下退出",ROTATE_OUT_UP_LEFT:"绕左上退出",ROTATE_OUT_UP_RIGHT:"绕右上退出",ZOOM:"缩放",ZOOM_OUT:"缩小退出",ZOOM_OUT_DOWN:"向下缩小退出",ZOOM_OUT_LEFT:"从左缩小退出",ZOOM_OUT_RIGHT:"从右缩小退出",ZOOM_OUT_UP:"向上缩小退出",SLIDE:"滑出",SLIDE_OUT_DOWN:"向下滑出",SLIDE_OUT_LEFT:"从左滑出",SLIDE_OUT_RIGHT:"从右滑出",SLIDE_OUT_UP:"向上滑出",FLIP:"翻转",FLIP_OUT_X:"X轴翻转退出",FLIP_OUT_Y:"Y轴翻转退出",BACK:"缩小滑出",BACK_OUT_DOWN:"向下缩小滑出",BACK_OUT_LEFT:"从左缩小滑出",BACK_OUT_RIGHT:"从右缩小滑出",BACK_OUT_UP:"向上缩小滑出",LIGHT_SPEED:"飞出",LIGHT_SPEED_OUT_RIGHT:"从右飞出",LIGHT_SPEED_OUT_LEFT:"从左飞出"},ATTENTION:{SHAKE:"晃动",SHAKE_X:"左右摇晃",SHAKE_Y:"上下摇晃",HEAD_SHAKE:"摇头",SWING:"摆动",WOBBLE:"晃动",TADA:"惊恐",JELLO:"果冻",OTHER:"其他",BOUNCE:"弹跳",FLASH:"闪烁",PULSE:"脉搏",RUBBER_BAND:"橡皮筋",HEART_BEAT:"心跳(快)"},SLIDE:{NO:"无",RANDOM:"随机",SLIDE_X:"左右推移",SLIDE_Y:"上下推移",SLIDE_X_3D:"左右推移(3D)",SLIDE_Y_3D:"上下推移(3D)",FADE:"淡入淡出",ROTATE:"旋转",SCALE_Y:"上下展开",SCALE_X:"左右展开",SCALE:"放大",SCALE_REVERSE:"缩小"}},SLIDE_ANIMATION:{APPLY_ALL:"应用到全部",APPLIED_ALL:"已应用到全部"},ELEMENT_ANIMATION:{ADD:"添加动画",TIP_SELECT:"选中画布中的元素添加动画",DURATION:"持续时长:",TRIGGER:"触发方式:",TRIGGER_CLICK:"主动触发",TRIGGER_WITH_PREVIOUS:"与上一动画同时",TRIGGER_AFTER_PREVIOUS:"上一动画之后",CHANGE:"更换动画",STOP_PREVIEW:"停止预览",PREVIEW_ALL:"预览全部",TAB_IN:"入场",TAB_OUT:"退场",TAB_ATTENTION:"强调"},LINE_STYLE:{STYLE:"线条样式:",COLOR:"线条颜色:",WIDTH:"线条宽度:",START:"起点样式:",END:"终点样式:",SWAP:"交换方向"},PPT_COMPONENTS:{THUMBNAIL_LOADING:"加载中 ...",TABLE_DBLCLICK_EDIT:"双击编辑",VIDEO_LOAD_ERROR:"视频加载失败",VIDEO_SPEED:"倍速",VIDEO_LOOP:"循环",VIDEO_LOOP_ON:"开",VIDEO_LOOP_OFF:"关",FONT_LOAD_TIP:"字体需要等待加载下载后生效,请稍等",TABLE_CONTEXT:{INSERT_COL:"插入列",INSERT_COL_LEFT:"到左侧",INSERT_COL_RIGHT:"到右侧",INSERT_ROW:"插入行",INSERT_ROW_TOP:"到上方",INSERT_ROW_BOTTOM:"到下方",DELETE_COL:"删除列",DELETE_ROW:"删除行",MERGE_CELLS:"合并单元格",SPLIT_CELLS:"取消合并单元格",SELECT_COL:"选中当前列",SELECT_ROW:"选中当前行",SELECT_ALL:"选中全部单元格"}}},sT={COMMON:{CONFIRM:"Confirm",CANCEL:"Cancel",DELETE:"Delete",REMOVE:"Remove",INSERT:"Insert",COPY:"Copy",CUT:"Cut",PASTE:"Paste",SELECT_ALL:"Select all",EDIT:"Edit",CLOSE:"Close",APPLY:"Apply",SAVE:"Save",SEARCH:"Search",SEARCH_FONT:"Search font",SEARCH_FONT_SIZE:"Search size",REPLACE:"Replace",REPLACE_ALL:"Replace all",NEXT:"Next",PREV:"Previous",BACK:"Back",MORE:"More",PREVIEW:"Preview",CLEAR:"Clear",SET:"Set",FORMAT_PAINTER_TIP:"Format painter (double-click to keep)"},EXPORT:{RANGE:"Export range:",ALL:"All",CURRENT:"Current slide",CUSTOM:"Custom",CUSTOM_RANGE:"Custom range:",FORMAT:"Export format:",IMAGE_QUALITY:"Image quality:",IGNORE_WEBFONT:"Ignore web fonts:",IGNORE_MEDIA:"Ignore audio/video:",OVERWRITE_MASTER:"Overwrite master:",PER_PAGE_COUNT:"Slides per page:",EDGE_PADDING:"Page padding:",BTN_PPTX:"Export PPTX",BTN_IMAGE:"Export images",BTN_JSON:"Export JSON",BTN_PDF:"Print / Export PDF",BTN_PPTIST:"Export PPTIST file",IMAGE_FAIL:"Failed to export image",FAIL:"Export failed",CLOSE:"Close",EXPORTING:"Exporting...",TIP_MEDIA:'Audio and video are ignored by default. If your slides contain audio/video and you want them included in the PPTX, turn off "Ignore audio/video". This will significantly increase export time.',TIP_MEDIA_FORMAT:"Note: 1) Supported export formats: avi, mp4, mov, wmv, mp3, wav. 2) Cross-origin resources cannot be exported.",TIP_WEBFONT:'Web fonts are ignored by default. If you used web fonts and want them preserved, turn off "Ignore web fonts". This will increase export time.',TIP_PPTIST:"Note: .pptist is the native file format of this app and can be imported back.",TIP_PDF:'Note: If the print preview differs from the output, enable "Background graphics" in the print dialog.'},EXPORT_TABS:{PPTX:"Export PPTX",IMAGE:"Export images",JSON:"Export JSON",PDF:"Print / Export PDF",PPTIST:"Export PPTIST file"},SLIDE_THUMBS:{ADD_SLIDE:"Add slide",PAGE_NUMBER:"Slide {current} / {total}",SECTION_PLACEHOLDER:"Enter section name",SECTION_UNTITLED:"Untitled section",SECTION_DEFAULT:"Default section",SECTION_DELETE:"Delete section",SECTION_DELETE_WITH_SLIDES:"Delete section and slides",SECTION_DELETE_ALL:"Delete all sections",SECTION_RENAME:"Rename section",SECTION_ADD:"Add section",PASTE:"Paste",SELECT_ALL:"Select all",NEW_SLIDE:"New slide",SLIDE_SHOW:"Slide show",CUT:"Cut",COPY:"Copy",DUPLICATE_SLIDE:"Duplicate slide",DELETE_SLIDE:"Delete slide",SLIDE_SHOW_FROM_CURRENT:"Start from current"},SLIDE_TEMPLATES:{INSERT_ALL:"Insert all",INSERT_TEMPLATE:"Insert template",TYPE_ALL:"All",TYPE_COVER:"Cover",TYPE_CONTENTS:"Contents",TYPE_TRANSITION:"Transition",TYPE_CONTENT:"Content",TYPE_REFERENCE:"Reference",TYPE_END:"End"},TEMPLATE_LIST:{CMI1:"CMI1",CMI2:"CMI2",CMI3:"CMI3",RED_GENERAL:"Red general",BLUE_GENERAL:"Blue general",PURPLE_GENERAL:"Purple general",MORANDI:"Morandi palette"},COLOR_PICKER:{RECENT_USED:"Recently used",EYEDROPPER_HINT:"Click on the canvas to pick a color",EYEDROPPER_INIT_FAIL:"Failed to activate eyedropper"},IMPORT:{FILE_PARSE_FAIL:"Failed to read or parse the file"},REQUEST:{UNKNOWN_ERROR:"Unknown error",SERVER_UNKNOWN_ERROR:"Server error",CONNECTION_FAIL:"Connection failed"},EDITOR:{GENERATING:"Generating with AI, please wait...",AIPPT_NO_PPTID:"AIPPT generation failed: missing pptId parameter",AIPPT_FETCH_FAIL:"Failed to fetch AIPPT data",TEMPLATE_FETCH_FAIL:"Failed to fetch template data"},HEADER_BAR:{EXPORT_FILE:"Export file",RESET_SLIDES:"Reset slides",MARKUP:"Slide type markup",HOTKEY:"Hotkeys",SLIDE_SHOW_TOOLTIP:"Slide show (F5)",SLIDE_SHOW_FROM_START:"Start from beginning",SLIDE_SHOW_FROM_CURRENT:"Start from current slide",EXPORT_TOOLTIP:"Export",HOTKEY_TITLE:"Hotkeys",AIPPT_DRAWER_TITLE:"Render AIPPT",TEMPLATE_SELECTED:"Template selected",TEMPLATE_NOT_SELECTED:"Not selected",AIPPT_JSON_LABEL:"AIPPT JSON",AIPPT_JSON_PLACEHOLDER:'Paste AIPPT.json content here (e.g. {"cover": {...}, "contents":[...], "content":[...], "end":[...]})',RENDER_AND_LOAD:"Render and load",IMPORTING:"Importing...",RENDERING_AIPPT:"Rendering AIPPT...",TEMPLATE_LOADED:"Template loaded. Please paste AIPPT JSON.",TEMPLATE_LOAD_FAIL:"Template load failed: please ensure valid JSON.",NEED_TEMPLATE_FILE:"Please select a template file first",AIPPT_PARSE_FAIL:"AIPPT JSON parse failed. Please check the format.",TEMPLATE_SLIDES_MISSING:"Template slides field is missing or empty",AIPPT_UNKNOWN_TYPES:"The following types were not found in the template: {unknown}; supported: {supported}",AIPPT_UNKNOWN_TYPES_EMPTY:"none detected",RENDER_SUCCESS:"Rendered and loaded to the canvas",RENDER_FAIL:"Render failed: {reason}",RENDER_FAIL_FALLBACK:"Please check template type markup and AIPPT structure"},QUICK_SEARCH:{SEARCH_PLACEHOLDER:"Enter search text",REPLACE_PLACEHOLDER:"Enter replacement text",IGNORE_CASE:"Ignore case",PREV:"Previous",NEXT:"Next",NO_MATCH:"No matches found",EMPTY_SEARCH:"Please enter search text"},COMMENT_PANEL:{PLACEHOLDER:"Click to enter speaker notes"},TABLE_GENERATOR:{TITLE:"Table",CUSTOM:"Custom",ROW_COUNT:"Rows:",COL_COUNT:"Columns:",COUNT_LIMIT:"Row/column count must be between 0 and 20."},MEDIA_INPUT:{VIDEO:"Video",AUDIO:"Audio",VIDEO_PLACEHOLDER:"Enter video URL, e.g. https://xxx.mp4",AUDIO_PLACEHOLDER:"Enter audio URL, e.g. https://xxx.mp3",VIDEO_ERROR:"Please enter a valid video URL first",AUDIO_ERROR:"Please enter a valid audio URL first"},CANVAS_TOOL:{UNDO:"Undo (Ctrl + Z)",REDO:"Redo (Ctrl + Y)",NOTES_PANEL:"Notes panel",SELECTION_PANEL:"Selection pane",SEARCH_REPLACE:"Find & replace",SEARCH_REPLACE_TOOLTIP:"Find/Replace (Ctrl + F)",INSERT_TEXT:"Insert text",TEXT_HORIZONTAL:"Horizontal text box",TEXT_VERTICAL:"Vertical text box",INSERT_SHAPE:"Insert shape",FREE_DRAW:"Free draw",INSERT_IMAGE:"Insert image",INSERT_LINE:"Insert line",INSERT_CHART:"Insert chart",INSERT_TABLE:"Insert table",INSERT_FORMULA:"Insert formula",INSERT_MEDIA:"Insert audio/video",INSERT_SYMBOL:"Insert symbol",SCALE_DOWN:"Zoom out (Ctrl + -)",SCALE_UP:"Zoom in (Ctrl + =)",FIT_SCREEN:"Fit to screen",FIT_SCREEN_TOOLTIP:"Fit to screen (Ctrl + 0)"},CANVAS_MENU:{RULER:"Ruler",GRID_LINES:"Grid lines",GRID_NONE:"None",GRID_SMALL:"Small",GRID_MEDIUM:"Medium",GRID_LARGE:"Large",RESET_SLIDE:"Reset current slide",SLIDE_SHOW:"Slide show"},LINK_DIALOG:{WEB:"Web link",SLIDE:"Slide",WEB_PLACEHOLDER:"Enter a web URL",PREVIEW:"Preview:",SLIDE_LABEL:"Slide {index}",SELECT_TARGET:"Please select a target slide"},LINK_HANDLER:{SLIDE_PAGE:"Slide page",CHANGE:"Change"},EDITABLE_ELEMENT:{UNLOCK:"Unlock",LOCK:"Lock",ALIGN_HORIZONTAL:"Center horizontally",ALIGN_VERTICAL:"Center vertically",ALIGN_CENTER_BOTH:"Center both",ALIGN_LEFT:"Align left",ALIGN_RIGHT:"Align right",ALIGN_TOP:"Align top",ALIGN_BOTTOM:"Align bottom",BRING_TO_FRONT:"Bring to front",SEND_TO_BACK:"Send to back",MOVE_UP:"Bring forward",MOVE_DOWN:"Send backward",SET_LINK:"Set link",GROUP:"Group",UNGROUP:"Ungroup"},SELECTION_PANEL:{TITLE:"Selection ({current}/{total})",SHOW_ALL:"Show all",HIDE_ALL:"Hide all",GROUP:"Group"},SPEAKER_NOTES:{TITLE:"Notes for slide {index}",REPLY:"Reply",REPLY_PLACEHOLDER:"Enter reply content",EMPTY:"No notes on this slide",INPUT_PLACEHOLDER:"Enter notes (for {target})",TARGET_ELEMENT:"selected element",TARGET_SLIDE:"current slide",CLEAR_TOOLTIP:"Clear notes on this slide",ADD:"Add note",DEFAULT_USER:"Test user"},MARKUP_PANEL:{TITLE:"Slide type markup",CURRENT_SLIDE_TYPE:"Current slide type:",CURRENT_TEXT_TYPE:"Current text type:",CURRENT_CHART_MARK:"Current chart mark:",CURRENT_IMAGE_TYPE:"Current image type:",PLACEHOLDER:"Select text, chart, image, or a shape with text to mark type",TYPE_UNMARKED:"Unmarked",SLIDE_COVER:"Cover",SLIDE_CONTENTS:"Contents",SLIDE_TRANSITION:"Transition",SLIDE_CONTENT:"Content",SLIDE_REFERENCE:"Reference",SLIDE_END:"End",TEXT_TITLE:"Title",TEXT_SUBTITLE:"Subtitle",TEXT_CONTENT:"Body",TEXT_ITEM:"List item",TEXT_ITEM_TITLE:"Item title",TEXT_NOTES:"Notes",TEXT_HEADER:"Header",TEXT_FOOTER:"Footer",TEXT_PART_NUMBER:"Section number",TEXT_ITEM_NUMBER:"Item number",TEXT_REFERENCE_NUMBER:"Reference number",TEXT_REFERENCE_TITLE:"Reference title",IMAGE_PAGE:"Page figure",IMAGE_ITEM:"Item figure",IMAGE_BACKGROUND:"Background",CHART_ITEM:"Chart (content item)"},SYMBOL_LIBRARY:{TAB_LETTER:"Letters",TAB_NUMBER:"Numbers",TAB_MATH:"Math",TAB_ARROW:"Arrows",TAB_GRAPH:"Shapes",TAB_EMOJI:"Emoji",EMOJI_FACE:"Faces",EMOJI_ACTION:"Actions",EMOJI_NATURE:"Nature",EMOJI_FOOD:"Food",EMOJI_TRAVEL:"Travel",EMOJI_ACTIVITY:"Activities",EMOJI_OBJECTS:"Objects",EMOJI_SYMBOLS:"Symbols"},TOOLBAR:{TAB_STYLE:"Style",TAB_POSITION:"Position",TAB_ANIMATION:"Animation",TAB_DESIGN:"Design",TAB_TRANSITION:"Transition",TAB_STYLE_MULTI:"Style (multi)",TAB_POSITION_MULTI:"Position (multi)"},POSITION_PANEL:{LAYER:"Layer:",BRING_TO_FRONT:"Bring to front",SEND_TO_BACK:"Send to back",MOVE_UP:"Move up",MOVE_DOWN:"Move down",ALIGN:"Align:",ALIGN_LEFT:"Align left",ALIGN_RIGHT:"Align right",ALIGN_TOP:"Align top",ALIGN_BOTTOM:"Align bottom",ALIGN_CENTER_HORIZONTAL:"Center horizontally",ALIGN_CENTER_VERTICAL:"Center vertically",HORIZONTAL:"X:",VERTICAL:"Y:",WIDTH:"Width:",HEIGHT:"Height:",ROTATE:"Rotate:",LOCK_RATIO:"Lock aspect ratio",UNLOCK_RATIO:"Unlock aspect ratio"},MULTI_POSITION:{HORIZONTAL_DISTRIBUTE:"Distribute horizontally",VERTICAL_DISTRIBUTE:"Distribute vertically"},STYLE_PARTS:{OPACITY:"Opacity:",SHADOW_ENABLE:"Enable shadow:",SHADOW_X:"Horizontal shadow:",SHADOW_Y:"Vertical shadow:",SHADOW_BLUR:"Blur:",SHADOW_COLOR:"Shadow color:",OUTLINE_ENABLE:"Enable outline:",OUTLINE_STYLE:"Outline style:",OUTLINE_COLOR:"Outline color:",OUTLINE_WIDTH:"Outline width:",COLOR_MASK:"Tint (mask):",MASK_COLOR:"Mask color:",FILTER_ENABLE:"Enable filters:",FLIP_VERTICAL:"Flip vertically",FLIP_HORIZONTAL:"Flip horizontally"},FILTERS:{BLUR:"Blur",BRIGHTNESS:"Brightness",CONTRAST:"Contrast",GRAYSCALE:"Grayscale",SATURATION:"Saturation",HUE:"Hue",SEPIA:"Sepia",INVERT:"Invert",OPACITY:"Opacity",PRESET_BW:"B&W",PRESET_RETRO:"Retro",PRESET_SHARPEN:"Sharpen",PRESET_SOFT:"Soft",PRESET_WARM:"Warm",PRESET_BRIGHT:"Bright",PRESET_VIVID:"Vivid",PRESET_BLUR:"Blur",PRESET_INVERT:"Invert"},TEXT_STYLE:{LINE_HEIGHT:"Line height:",LINE_HEIGHT_OPTION:"{value}x",PARAGRAPH_SPACING:"Paragraph spacing:",PX_OPTION:"{value}px",LETTER_SPACING:"Letter spacing:",BOX_FILL:"Text box fill:",PRESET_TITLE_LG:"Title (large)",PRESET_TITLE_SM:"Title (small)",PRESET_BODY:"Body",PRESET_BODY_SM:"Body (small)",PRESET_NOTE_1:"Note (italic)",PRESET_NOTE_2:"Note (underline)"},MULTI_STYLE:{FILL_COLOR:"Fill color:",OUTLINE_STYLE:"Outline style:",OUTLINE_COLOR:"Outline color:",OUTLINE_WIDTH:"Outline width:"},RICH_TEXT:{TEXT_COLOR:"Text color",TEXT_HIGHLIGHT:"Text highlight",FONT_SIZE_INCREASE:"Increase font size",FONT_SIZE_DECREASE:"Decrease font size",BOLD:"Bold",ITALIC:"Italic",UNDERLINE:"Underline",STRIKETHROUGH:"Strikethrough",SUPERSCRIPT:"Superscript",SUBSCRIPT:"Subscript",INLINE_CODE:"Inline code",BLOCKQUOTE:"Quote",AI_POLISH:"Polish",AI_EXPAND:"Expand",AI_CONDENSE:"Condense",AI_ASSIST:"AI assist",CLEAR_FORMAT:"Clear formatting",LINK:"Link",LINK_PLACEHOLDER:"Enter link",ALIGN_LEFT:"Align left",ALIGN_CENTER:"Center",ALIGN_RIGHT:"Align right",ALIGN_JUSTIFY:"Justify",BULLET_LIST:"Bulleted list",ORDERED_LIST:"Numbered list",INDENT_DECREASE:"Decrease paragraph indent",INDENT_INCREASE:"Increase paragraph indent",TEXT_INDENT_DECREASE:"Decrease first-line indent",TEXT_INDENT_INCREASE:"Increase first-line indent",INVALID_LINK:"Invalid link address",NO_TEXT_CONTENT:"No text content to process",IN_DEVELOPMENT:"In development"},SLIDE_DESIGN:{BACKGROUND_FILL:"Background fill",FILL_SOLID:"Solid fill",FILL_IMAGE:"Image fill",FILL_GRADIENT:"Gradient fill",IMAGE_CONTAIN:"Contain",IMAGE_REPEAT:"Tile",IMAGE_COVER:"Cover",GRADIENT_LINEAR:"Linear gradient",GRADIENT_RADIAL:"Radial gradient",CURRENT_COLOR:"Current color:",GRADIENT_ANGLE:"Gradient angle:",APPLY_BACKGROUND_ALL:"Apply background to all",RATIO_WIDE_16_9:"Widescreen 16:9",RATIO_WIDE_16_10:"Widescreen 16:10",RATIO_STANDARD_4_3:"Standard 4:3",RATIO_PAPER_A3_A4:"Paper A3 / A4",RATIO_PORTRAIT_A3_A4:"Portrait A3 / A4",CANVAS_SIZE:"Canvas size: {width} × {height}",GLOBAL_THEME:"Global theme",FONT:"Font:",FONT_COLOR:"Font color:",BACKGROUND_COLOR:"Background color:",THEME_COLORS:"Theme colors:",APPLY_THEME_ALL:"Apply theme to all",EXTRACT_THEME:"Extract theme from slides",PRESET_THEMES:"Preset themes",TEXT_SAMPLE:"Text Aa",SET_AND_APPLY:"Set and apply"},SLIDE_THEME_COLORS:{TITLE:"Edit theme colors",ITEM:"Slide theme color {index}:"},THEME_EXTRACT:{FONT:"Font:",FONT_COLOR:"Text color:",BACKGROUND_COLOR:"Background color:",THEME_COLORS:"Theme colors:",TIP:" (Click a swatch to exclude colors)",SELECT:"Select",APPLY_TO_THEME:"Apply to theme",SAVE_SELECTED:"Save selected settings as theme",FROM_CURRENT:"Extract from current slide",FROM_ALL:"Extract from all slides",THEME_COLOR_LIMIT:"Theme colors exceed the limit. The first 6 were selected automatically."},IMAGE_STYLE:{CROP_IMAGE:"Crop image",CLIP_BY_SHAPE:"By shape:",CLIP_BY:"By {label}:",RADIUS:"Corner radius:",REPLACE_IMAGE:"Replace image",RESET_STYLE:"Reset style",SET_BACKGROUND:"Set as background",RATIO_SQUARE:"Aspect ratio (square)",RATIO_PORTRAIT:"Aspect ratio (portrait)",RATIO_LANDSCAPE:"Aspect ratio (landscape)"},SHAPE_STYLE:{REPLACE_SHAPE:"Click to replace shape",FILL_SOLID:"Solid fill",FILL_GRADIENT:"Gradient fill",FILL_IMAGE:"Image fill",GRADIENT_LINEAR:"Linear gradient",GRADIENT_RADIAL:"Radial gradient",CURRENT_COLOR:"Current color:",GRADIENT_ANGLE:"Gradient angle:",ALIGN_TOP:"Align top",ALIGN_MIDDLE:"Center",ALIGN_BOTTOM:"Align bottom",FORMAT_PAINTER:"Shape format painter"},TABLE_STYLE:{CELL_FILL:"Cell fill",ROW_COUNT:"Rows:",COL_COUNT:"Columns:",ENABLE_THEME:"Enable themed table:",HEADER_ROW:"Header row",FOOTER_ROW:"Footer row",FIRST_COL:"First column",LAST_COL:"Last column",THEME_COLOR:"Theme color:"},CHART_STYLE:{EDIT_CHART:"Edit chart",STACKED:"Stacked",SMOOTH_LINE:"Smooth line",BACKGROUND_FILL:"Background fill:",AXIS_TEXT:"Axes & text:",GRID_COLOR:"Grid color:",THEME_COLORS:"Theme colors:",PRESET_THEMES:"Preset chart themes:",SLIDE_THEME:"Slide theme:",CUSTOM_THEME:"Custom colors"},CHART_THEME_COLORS:{TITLE:"Chart theme colors",ITEM:"Theme color {index}:",ADD:"Add theme color"},CHART_DATA_EDITOR:{TYPE_LABEL:"Chart type: ",CHANGE_TYPE:"Change",CLEAR_DATA:"Clear data",DEFAULT_CATEGORY:"Category {index}",DEFAULT_SERIES:"Series {index}"},AUDIO_STYLE:{ICON_COLOR:"Icon color:",AUTOPLAY:"Autoplay:",LOOP:"Loop:"},VIDEO_STYLE:{PREVIEW_COVER:"Video preview cover",RESET_COVER:"Reset cover",AUTOPLAY:"Autoplay:"},LATEX_STYLE:{EDIT:"Edit LaTeX",COLOR:"Color:",STROKE_WIDTH:"Stroke width:"},CANVAS:{CREATE_SHAPE_TIP:"Click to draw a custom shape. Close the path to finish. Press ESC or right-click to cancel, or press ENTER to finish early."},FORMULA_EDITOR:{TAB_SYMBOLS:"Common symbols",TAB_PRESETS:"Preset formulas",INPUT_PLACEHOLDER:"Enter LaTeX formula",PREVIEW_PLACEHOLDER:"Formula preview",EMPTY_ERROR:"Formula cannot be empty"},FORMULA:{SYMBOLS:{MATH:"Math",GROUP:"Group",FUNCTION:"Function",GREEK:"Greek letters"},PRESET:{GAUSS:"Gauss theorem",FOURIER:"Fourier series",TAYLOR:"Taylor expansion",DEFINITE_INTEGRAL:"Definite integral",TRIG_IDENTITY_1:"Trig identity 1",TRIG_IDENTITY_2:"Trig identity 2",BINOMIAL:"Binomial expansion",EULER:"Euler's formula",BERNOULLI:"Bernoulli equation",TOTAL_DIFFERENTIAL:"Total differential equation",NONHOMOGENEOUS:"Nonhomogeneous equation",CAUCHY:"Cauchy mean value theorem",LAGRANGE:"Lagrange mean value theorem",DERIVATIVE:"Derivative formula",TRIG_INTEGRAL:"Trig integral",QUADRIC:"Quadric surface",SECOND_ORDER:"Second-order differential equation",DIRECTIONAL:"Directional derivative"}},HOTKEY:{GENERAL:{TITLE:"General",CUT:"Cut",COPY:"Copy",PASTE:"Paste",PASTE_PLAIN:"Paste as plain text",DUPLICATE:"Quick duplicate",SELECT_ALL:"Select all",UNDO:"Undo",REDO:"Redo",DELETE:"Delete",MULTI_SELECT:"Multi-select",SEARCH_REPLACE:"Open search & replace",PRINT:"Print",CLOSE_DIALOG:"Close dialog"},SLIDESHOW:{TITLE:"Slide show",START:"Start from beginning",START_CURRENT:"Start from current slide",PREV:"Previous slide",NEXT:"Next slide",NEXT_ENTER:"Next slide",EXIT:"Exit show"},EDITOR:{TITLE:"Slide editing",NEW_SLIDE:"New slide",PAN:"Pan canvas",ZOOM:"Zoom canvas",ZOOM_IN:"Zoom in canvas",ZOOM_OUT:"Zoom out canvas",FIT_SCREEN:"Fit canvas to screen",PREV_NO_SELECTION:"Previous slide (no selection)",NEXT_NO_SELECTION:"Next slide (no selection)",PREV:"Previous slide",NEXT:"Next slide",QUICK_TEXT:"Quick text",QUICK_RECT:"Quick rectangle",QUICK_ELLIPSE:"Quick ellipse",QUICK_LINE:"Quick line",EXIT_DRAW:"Exit drawing mode"},ELEMENT:{TITLE:"Element actions",MOVE:"Move",LOCK:"Lock",GROUP:"Group",UNGROUP:"Ungroup",BRING_TO_FRONT:"Bring to front",SEND_TO_BACK:"Send to back",LOCK_RATIO:"Lock aspect ratio",CREATE_LINE:"Create horizontal / vertical lines",SWITCH_FOCUS:"Switch focus element",CONFIRM_CROP:"Confirm image crop",FINISH_CUSTOM_SHAPE:"Finish custom shape drawing"},TABLE:{TITLE:"Table editing",NEXT_CELL:"Focus next cell",MOVE_CELL:"Move focused cell",INSERT_ROW_ABOVE:"Insert row above",INSERT_ROW_BELOW:"Insert row below",INSERT_COL_LEFT:"Insert column left",INSERT_COL_RIGHT:"Insert column right"},CHART:{TITLE:"Chart data editing",NEXT_ROW:"Focus next row"},TEXT:{TITLE:"Text editing",BOLD:"Bold",ITALIC:"Italic",UNDERLINE:"Underline",INLINE_CODE:"Inline code",SUPERSCRIPT:"Superscript",SUBSCRIPT:"Subscript",SELECT_PARAGRAPH:"Select paragraph"},OTHER:{TITLE:"Other shortcuts",ADD_IMAGE_PASTE:"Add image - paste from clipboard",ADD_IMAGE_DRAG:"Add image - drag local image to canvas",ADD_IMAGE_PASTE_SVG:"Add image - paste SVG code on canvas",ADD_IMAGE_PEXELS:"Add image - paste Pexels image link",ADD_TEXT_PASTE:"Add text - paste from clipboard",ADD_TEXT_DRAG:"Add text - drag selected text into canvas",TEXT_MARKDOWN:"Text editing - markdown lists and quotes"},VALUE:{HOLD_CTRL_SHIFT:"Hold Ctrl or Shift",SPACE_DRAG:"Space + drag mouse",CTRL_SCROLL:"Ctrl + mouse wheel",MOUSE_SCROLL_UP:"Mouse wheel up / PgUp",MOUSE_SCROLL_DOWN:"Mouse wheel down / PgDown",DOUBLE_CLICK_BLANK_T:"Double-click blank area / T",RIGHT_CLICK:"Right click"}},LINES:{STRAIGHT:"Straight lines",POLY_CURVE:"Polylines / curves"},CHART:{TYPE:{BAR:"Column chart",COLUMN:"Bar chart",LINE:"Line chart",AREA:"Area chart",SCATTER:"Scatter chart",PIE:"Pie chart",RING:"Doughnut chart",RADAR:"Radar chart"},DEFAULT:{CATEGORY:"Category {index}",SERIES:"Series {index}",VALUE:"Value",COORD:"Coordinate {index}",X:"X",Y:"Y"}},FONT:{NAME:{DEFAULT:"Default font",SOURCE_HAN_SANS:"Source Han Sans",SOURCE_HAN_SERIF:"Source Han Serif",FZ_HEITI:"FZ Heiti",FZ_KAITI:"FZ Kaiti",FZ_SONG:"FZ Song",FZ_FANGSONG:"FZ Fangsong",ALIBABA_PUHUI:"Alibaba PuHuiTi",ZHUQUE_FANGSONG:"Zhuque Fangsong",LXGW_WENKAI:"LXGW WenKai",WENDING_PL_KAITI:"WenDing PL Kaiti",DEYI_HEI:"Deyi Hei",MISANS:"MiSans",MICROSOFT_YAHEI:"Microsoft YaHei",DM_SANS:"DM Sans",CANGER_XIAOWANZI:"Canger Xiaowanzi",YOUSHE_TITLE_BLACK:"Youshe Title Black",FENGGUANG_MINGRUI:"Fengguang Mingrui",SHETU_MODERN_SQUARE:"Shetu Modern Square",ZCOOL_HAPPY:"ZCOOL Happy",ZIZHI_QU_XIMAI:"Zizhi Qu Ximai",SUCAI_JISHI_KANGKANG:"Sucai Jishi Kangkang",SUCAI_JISHI_COOL_SQUARE:"Sucai Jishi Cool Square",TUNIU_ROUNDED:"Tuniu Rounded",RUIZI_ZHENYAN:"Ruizi Zhenyan"}},ELEMENT:{TYPE:{TEXT:"Text",IMAGE:"Image",SHAPE:"Shape",LINE:"Line",CHART:"Chart",TABLE:"Table",VIDEO:"Video",AUDIO:"Audio",LATEX:"Formula"}},SHAPE:{CATEGORY:{RECT:"Rectangles",COMMON:"Common shapes",ARROW:"Arrows",OTHER:"Other shapes",LINEAR:"Linear"}},CLIP:{SHAPE:{RECT:"Rectangle",RECT_2:"Rectangle 2",RECT_3:"Rectangle 3",ROUND_RECT:"Rounded rectangle",ELLIPSE:"Ellipse",TRIANGLE:"Triangle",TRIANGLE_2:"Triangle 2",TRIANGLE_3:"Triangle 3",RHOMBUS:"Rhombus",PENTAGON:"Pentagon",HEXAGON:"Hexagon",HEPTAGON:"Heptagon",OCTAGON:"Octagon",CHEVRON:"Chevron",POINT:"Point",ARROW:"Arrow",PARALLELOGRAM:"Parallelogram",PARALLELOGRAM_2:"Parallelogram 2",TRAPEZOID:"Trapezoid",TRAPEZOID_2:"Trapezoid 2"}},ANIMATION:{ENTER:{BOUNCE:"Bounce",BOUNCE_IN:"Bounce in",BOUNCE_IN_LEFT:"Bounce in left",BOUNCE_IN_RIGHT:"Bounce in right",BOUNCE_IN_UP:"Bounce in up",BOUNCE_IN_DOWN:"Bounce in down",FADE:"Fade",FADE_IN:"Fade in",FADE_IN_DOWN:"Fade in down",FADE_IN_DOWN_BIG:"Fade in down big",FADE_IN_LEFT:"Fade in left",FADE_IN_LEFT_BIG:"Fade in left big",FADE_IN_RIGHT:"Fade in right",FADE_IN_RIGHT_BIG:"Fade in right big",FADE_IN_UP:"Fade in up",FADE_IN_UP_BIG:"Fade in up big",FADE_IN_TOP_LEFT:"Fade in from top-left",FADE_IN_TOP_RIGHT:"Fade in from top-right",FADE_IN_BOTTOM_LEFT:"Fade in from bottom-left",FADE_IN_BOTTOM_RIGHT:"Fade in from bottom-right",ROTATE:"Rotate",ROTATE_IN:"Rotate in",ROTATE_IN_DOWN_LEFT:"Rotate in down left",ROTATE_IN_DOWN_RIGHT:"Rotate in down right",ROTATE_IN_UP_LEFT:"Rotate in up left",ROTATE_IN_UP_RIGHT:"Rotate in up right",ZOOM:"Zoom",ZOOM_IN:"Zoom in",ZOOM_IN_DOWN:"Zoom in down",ZOOM_IN_LEFT:"Zoom in left",ZOOM_IN_RIGHT:"Zoom in right",ZOOM_IN_UP:"Zoom in up",SLIDE:"Slide",SLIDE_IN_DOWN:"Slide in down",SLIDE_IN_LEFT:"Slide in left",SLIDE_IN_RIGHT:"Slide in right",SLIDE_IN_UP:"Slide in up",FLIP:"Flip",FLIP_IN_X:"Flip in X",FLIP_IN_Y:"Flip in Y",BACK:"Back",BACK_IN_DOWN:"Back in down",BACK_IN_LEFT:"Back in left",BACK_IN_RIGHT:"Back in right",BACK_IN_UP:"Back in up",LIGHT_SPEED:"Light speed",LIGHT_SPEED_IN_RIGHT:"Light speed in right",LIGHT_SPEED_IN_LEFT:"Light speed in left"},EXIT:{BOUNCE:"Bounce",BOUNCE_OUT:"Bounce out",BOUNCE_OUT_LEFT:"Bounce out left",BOUNCE_OUT_RIGHT:"Bounce out right",BOUNCE_OUT_UP:"Bounce out up",BOUNCE_OUT_DOWN:"Bounce out down",FADE:"Fade",FADE_OUT:"Fade out",FADE_OUT_DOWN:"Fade out down",FADE_OUT_DOWN_BIG:"Fade out down big",FADE_OUT_LEFT:"Fade out left",FADE_OUT_LEFT_BIG:"Fade out left big",FADE_OUT_RIGHT:"Fade out right",FADE_OUT_RIGHT_BIG:"Fade out right big",FADE_OUT_UP:"Fade out up",FADE_OUT_UP_BIG:"Fade out up big",FADE_OUT_TOP_LEFT:"Fade out top-left",FADE_OUT_TOP_RIGHT:"Fade out top-right",FADE_OUT_BOTTOM_LEFT:"Fade out bottom-left",FADE_OUT_BOTTOM_RIGHT:"Fade out bottom-right",ROTATE:"Rotate",ROTATE_OUT:"Rotate out",ROTATE_OUT_DOWN_LEFT:"Rotate out down left",ROTATE_OUT_DOWN_RIGHT:"Rotate out down right",ROTATE_OUT_UP_LEFT:"Rotate out up left",ROTATE_OUT_UP_RIGHT:"Rotate out up right",ZOOM:"Zoom",ZOOM_OUT:"Zoom out",ZOOM_OUT_DOWN:"Zoom out down",ZOOM_OUT_LEFT:"Zoom out left",ZOOM_OUT_RIGHT:"Zoom out right",ZOOM_OUT_UP:"Zoom out up",SLIDE:"Slide",SLIDE_OUT_DOWN:"Slide out down",SLIDE_OUT_LEFT:"Slide out left",SLIDE_OUT_RIGHT:"Slide out right",SLIDE_OUT_UP:"Slide out up",FLIP:"Flip",FLIP_OUT_X:"Flip out X",FLIP_OUT_Y:"Flip out Y",BACK:"Back",BACK_OUT_DOWN:"Back out down",BACK_OUT_LEFT:"Back out left",BACK_OUT_RIGHT:"Back out right",BACK_OUT_UP:"Back out up",LIGHT_SPEED:"Light speed",LIGHT_SPEED_OUT_RIGHT:"Light speed out right",LIGHT_SPEED_OUT_LEFT:"Light speed out left"},ATTENTION:{SHAKE:"Shake",SHAKE_X:"Shake X",SHAKE_Y:"Shake Y",HEAD_SHAKE:"Head shake",SWING:"Swing",WOBBLE:"Wobble",TADA:"Tada",JELLO:"Jello",OTHER:"Other",BOUNCE:"Bounce",FLASH:"Flash",PULSE:"Pulse",RUBBER_BAND:"Rubber band",HEART_BEAT:"Heart beat (fast)"},SLIDE:{NO:"None",RANDOM:"Random",SLIDE_X:"Slide X",SLIDE_Y:"Slide Y",SLIDE_X_3D:"Slide X (3D)",SLIDE_Y_3D:"Slide Y (3D)",FADE:"Fade",ROTATE:"Rotate",SCALE_Y:"Expand Y",SCALE_X:"Expand X",SCALE:"Scale up",SCALE_REVERSE:"Scale down"}},SLIDE_ANIMATION:{APPLY_ALL:"Apply to all",APPLIED_ALL:"Applied to all"},ELEMENT_ANIMATION:{ADD:"Add animation",TIP_SELECT:"Select an element on the canvas to add animation",DURATION:"Duration:",TRIGGER:"Trigger:",TRIGGER_CLICK:"On click",TRIGGER_WITH_PREVIOUS:"With previous",TRIGGER_AFTER_PREVIOUS:"After previous",CHANGE:"Change animation",STOP_PREVIEW:"Stop preview",PREVIEW_ALL:"Preview all",TAB_IN:"Entrance",TAB_OUT:"Exit",TAB_ATTENTION:"Emphasis"},LINE_STYLE:{STYLE:"Line style:",COLOR:"Line color:",WIDTH:"Line width:",START:"Start marker:",END:"End marker:",SWAP:"Swap direction"},PPT_COMPONENTS:{THUMBNAIL_LOADING:"Loading...",TABLE_DBLCLICK_EDIT:"Double-click to edit",VIDEO_LOAD_ERROR:"Video failed to load",VIDEO_SPEED:"Speed",VIDEO_LOOP:"Loop",VIDEO_LOOP_ON:"On",VIDEO_LOOP_OFF:"Off",FONT_LOAD_TIP:"Fonts take time to load. Please wait.",TABLE_CONTEXT:{INSERT_COL:"Insert column",INSERT_COL_LEFT:"To left",INSERT_COL_RIGHT:"To right",INSERT_ROW:"Insert row",INSERT_ROW_TOP:"Above",INSERT_ROW_BOTTOM:"Below",DELETE_COL:"Delete column",DELETE_ROW:"Delete row",MERGE_CELLS:"Merge cells",SPLIT_CELLS:"Unmerge cells",SELECT_COL:"Select column",SELECT_ROW:"Select row",SELECT_ALL:"Select all cells"}}},wo={zhCn:"zh-cn",en:"en"},P1=Symbol("ai-ppt-edit-i18n");let Ai=null,ks={[wo.zhCn]:lT,[wo.en]:sT},Pd=null;const Qf=e=>!e||String(e).toLowerCase().startsWith("zh")?wo.zhCn:wo.en,cT=()=>{if(Ai)return Ai;const e=typeof navigator>"u"?"":navigator.language||navigator.userLanguage;return Ai=Qf(e),Ai},Tv=(e,t)=>{if(!e||!t)return;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const n=String(t).split(".");let o=e;for(const a of n)if(o&&Object.prototype.hasOwnProperty.call(o,a))o=o[a];else return;return o},uT=(e,t)=>!t||typeof e!="string"?e:e.replace(/\{(\w+)\}/g,(n,o)=>Object.prototype.hasOwnProperty.call(t,o)?String(t[o]):`{${o}}`),dT=e=>{const t=cT(),n=ks[t],o=ks[wo.zhCn];return Tv(n,e)??Tv(o,e)},Oo=(e,t={})=>{if(typeof Pd=="function")return Pd(e,t);const n=dT(e);return n?uT(n,t):e},fT=e=>{Ai=Qf(e)},pT=(e={})=>{Object.keys(e).forEach(t=>{const n=Qf(t);ks[n]={...ks[n]||{},...e[t]}})},M1=(e={})=>{const{t,locale:n,messages:o}=e;typeof t=="function"&&(Pd=t),n&&fT(n),o&&typeof o=="object"&&pT(o)},_e=()=>{const e=r.inject(P1,null);if(e&&typeof e.t=="function")return e;const n=r.getCurrentInstance()?.appContext?.config?.globalProperties?.t;return typeof n=="function"?{t:n}:{t:Oo}},fa=O_.create({timeout:1e3*300});fa.interceptors.request.use(e=>(e.kebabToCamel&&e.data&&(e.data=Dd(e.data)),e),e=>Promise.reject(e));fa.interceptors.response.use(e=>{const t=e.config;return e.data=t.kebabToCamel?kd(e.data):e.data,e.status>=200&&e.status<400?Promise.resolve(e.data):(Ae.error(Oo("REQUEST.UNKNOWN_ERROR")),Promise.reject(e))},e=>e&&e.response?(e.response.status>=400&&e.response.status<500||e.response.status>=500||Ae.error(Oo("REQUEST.SERVER_UNKNOWN_ERROR")),Promise.reject(e.message)):(Ae.error(Oo("REQUEST.CONNECTION_FAIL")),Promise.reject(e)));const ep={serverBaseUrl:"",assetsUrl:""},vT=e=>{Object.assign(ep,e)},Sv=()=>ep.serverBaseUrl,Md=()=>ep.assetsUrl,hT={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ru=hT&&"/"||"/",mT=ru.endsWith("/")?ru:`${ru}/`,B1=e=>{if(!e)return"";const t=e.replace(/^\/+/,"");return`${mT}${t}`},gT=e=>typeof e=="string"&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")),ET=e=>{if(typeof e!="string")return e;const t=Md();if(!t)return e;const n=t.endsWith("/")?t.slice(0,-1):t,a=[n,"/ai/ppt/ai-ppt-assets","/ai-ppt-assets"].find(i=>e.startsWith(i));return a?`${n}${e.slice(a.length)}`:e},Mi=e=>{if(typeof e!="string"||gT(e))return e;let t=e.trim();const n=ET(t);return n!==t?n:(t.startsWith("../")&&(t=t.slice(3)),t.startsWith("./")&&(t=t.slice(2)),t.startsWith("/")&&(t=t.slice(1)),t.startsWith("template/images/")?B1(t):e)},yT={template_6:"jpeg"},jr=e=>{if(!e)return"";const t=yT[e]||"jpg";return B1(`template/${e}.${t}`)},_T=e=>{if(!e||!Array.isArray(e.slides))return e;const t=e.slides.map(n=>{const o={...n};if(o.background&&typeof o.background=="object"&&o.background.src){const a=Mi(o.background.src);a!==o.background.src&&(o.background={...o.background,src:a})}if(o.background&&typeof o.background=="object"&&o.background.image&&typeof o.background.image=="object"&&o.background.image.src){const a=Mi(o.background.image.src);a!==o.background.image.src&&(o.background={...o.background,image:{...o.background.image,src:a}})}return Array.isArray(o.elements)&&(o.elements=o.elements.map(a=>{if(a&&a.type==="image"&&a.src){const i=Mi(a.src);if(i!==a.src)return{...a,src:i}}return a})),o});return{...e,slides:t}},TT=e=>{if(Array.isArray(e))return e.map(t=>{if(!t||!t.src)return t;const n=Mi(t.src);return n===t.src?t:{...t,src:n}});if(e&&typeof e=="object"){const t={};for(const[n,o]of Object.entries(e))t[n]=Mi(o);return t}return e},Ni={getTemplates(e){const t=`${Md()}/template/${e}.json`;return fa.get(t).then(_T)},getImageList(e){const t=`${Md()}/template/images/${e}`;return fa.get(t).then(TT)},getAIPPTData(e){return fa.get(`${Sv()}/api/v1/ppt/data/${e}`,{kebabToCamel:!0})},saveAIPPTData(e){return fa.put(`${Sv()}/api/v1/ppt/save`,e,{kebabToCamel:!0})}},ST=[{name:"CMI1",nameKey:"TEMPLATE_LIST.CMI1",id:"template_7",imageList:"template_7_images/images_info.json",cover:jr("template_7")},{name:"CMI2",nameKey:"TEMPLATE_LIST.CMI2",id:"template_5",imageList:"template_5_images/images_info.json",cover:jr("template_5")},{name:"CMI3",nameKey:"TEMPLATE_LIST.CMI3",id:"template_6",imageList:"template_6_images/images_info.json",cover:jr("template_6")},{name:"红色通用",nameKey:"TEMPLATE_LIST.RED_GENERAL",id:"template_1",imageList:"template_1_images/images_info.json",cover:jr("template_1")},{name:"蓝色通用",nameKey:"TEMPLATE_LIST.BLUE_GENERAL",id:"template_2",imageList:"template_2_images/images_info.json",cover:jr("template_2")},{name:"紫色通用",nameKey:"TEMPLATE_LIST.PURPLE_GENERAL",id:"template_3",imageList:"template_3_images/images_info.json",cover:jr("template_3")},{name:"莫兰迪配色",nameKey:"TEMPLATE_LIST.MORANDI",id:"template_4",imageList:"template_4_images/images_info.json",cover:jr("template_4")}],Iv=Ne.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",10),Co=ne.defineStore("slides",{state:()=>({title:"未命名演示文稿",theme:{themeColors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"],fontColor:"#333",fontName:"",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},slides:[{id:Iv(),elements:[]}],slideIndex:0,viewportSize:1e3,viewportRatio:.5625,templates:ST}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const o=t.elements.map(a=>a.id);return t.animations.filter(a=>o.includes(a.elId))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const o=t.elements.map(l=>l.id),a=t.animations.filter(l=>o.includes(l.elId)),i=[];for(const l of a)if(l.trigger==="click"||!i.length)i.push({animations:[l],autoNext:!1});else if(l.trigger==="meantime"){const s=i[i.length-1];s.animations=s.animations.filter(c=>c.elId!==l.elId),s.animations.push(l),i[i.length-1]=s}else if(l.trigger==="auto"){const s=i[i.length-1];s.autoNext=!0,i[i.length-1]=s,i.push({animations:[l],autoNext:!1})}return i}},actions:{setTitle(e){e?(this.title=e,document.title=e):this.title="未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportSize(e){this.viewportSize=e},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},setTemplates(e){this.templates=e},resetSlides(){this.slides=[{id:Iv(),elements:[]}],this.slideIndex=0},addSlide(e){const t=Array.isArray(e)?e:[e];for(const o of t)o.sectionTag&&delete o.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}const n=this.slideIndex+1;this.slides.splice(n,0,...t),this.slideIndex=n},addSlideToEnd(e){const t=Array.isArray(e)?e:[e];for(const n of t)n.sectionTag&&delete n.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}this.slides.push(...t),this.slideIndex=this.slides.length-1},updateSlide(e,t){const n=t?this.slides.findIndex(o=>o.id===t):this.slideIndex;this.slides[n]={...this.slides[n],...e}},removeSlideProps(e){const{id:t,propName:n}=e,o=this.slides.map(a=>a.id===t?Xe.omit(a,n):a);this.slides=o},deleteSlide(e){const t=Array.isArray(e)?e:[e],n=JSON.parse(JSON.stringify(this.slides)),o=[];for(const l of t){const s=n.findIndex(u=>u.id===l);o.push(s);const c=n[s].sectionTag;if(c){const u=n[s+1];u&&!u.sectionTag&&(delete n[s].sectionTag,n[s+1].sectionTag=c)}n.splice(s,1)}let a=Math.min(...o);const i=n.length-1;a>i&&(a=i),this.slideIndex=a,this.slides=n},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],o=[...this.slides[this.slideIndex].elements,...t];this.slides[this.slideIndex].elements=o},deleteElement(e){const t=Array.isArray(e)?e:[e],o=this.slides[this.slideIndex].elements.filter(a=>!t.includes(a.id));this.slides[this.slideIndex].elements=o},updateElement(e){const{id:t,props:n,slideId:o}=e,a=typeof t=="string"?[t]:t,i=o?this.slides.findIndex(c=>c.id===o):this.slideIndex,s=this.slides[i].elements.map(c=>a.includes(c.id)?{...c,...n}:c);this.slides[i].elements=s},removeElementProps(e){const{id:t,propName:n}=e,o=typeof n=="string"?[n]:n,a=this.slideIndex,l=this.slides[a].elements.map(s=>s.id===t?Xe.omit(s,o):s);this.slides[a].elements=l}}}),V1=Ne.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),$1=V1(10),Bd=ne.defineStore("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,toolbarState:Tt.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:X_,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:$1,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1,showNotesPanel:!1,showSymbolPanel:!1,showMarkupPanel:!1,showAIPPTDialog:!1,isGenerating:!1,sessionId:V1(),isOutlineFromFile:!1,generateFromUploadedFile:!1,generateFromWebSearch:!1,disabled:!1}),getters:{activeElementList(e){const n=Co(Qt).currentSlide;return!n||!n.elements?[]:n.elements.filter(o=>e.activeElementIdList.includes(o.id))},handleElement(e){const n=Co(Qt).currentSlide;return!n||!n.elements?null:n.elements.find(o=>e.handleElementId===o.id)||null}},actions:{setActiveElementIdList(e){e.length===1?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e},setNotesPanelState(e){this.showNotesPanel=e},setSymbolPanelState(e){this.showSymbolPanel=e},setMarkupPanelState(e){this.showMarkupPanel=e},setAIPPTDialogState(e){this.showAIPPTDialog=e},setGenerating(e){this.isGenerating=e},setOutlineFromFile(e){this.isOutlineFromFile=e},setGenerateFromUploadedFile(e){this.generateFromUploadedFile=e},setGenerateFromWebSearch(e){this.generateFromWebSearch=e},setDisabled(e){this.disabled=e}}}),IT="PPTist",Ar=new w_(`${IT}_${$1}_${new Date().getTime()}`);Ar.version(1).stores({snapshots:"++id",writingBoardImgs:"id"});const AT=ne.defineStore("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor<e.snapshotLength-1}},actions:{setSnapshotCursor(e){this.snapshotCursor=e},setSnapshotLength(e){this.snapshotLength=e},async initSnapshotDatabase(){const e=Co(Qt),t={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await Ar.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=Co(Qt),t=await Ar.snapshots.orderBy("id").keys();let n=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(n=t.slice(this.snapshotCursor+1));const o={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await Ar.snapshots.add(o);let a=t.length-n.length+1;a>20&&(n.push(t[0]),a--),a>=2&&Ar.snapshots.update(t[a-2],{index:e.slideIndex}),await Ar.snapshots.bulkDelete(n),this.setSnapshotCursor(a-1),this.setSnapshotLength(a)},async unDo(){if(this.snapshotCursor<=0)return;const e=Co(Qt),t=Bd(Qt),n=this.snapshotCursor-1,a=(await Ar.snapshots.orderBy("id").toArray())[n],{index:i,slides:l}=a,s=i>l.length-1?l.length-1:i;e.setSlides(l),e.updateSlideIndex(s),this.setSnapshotCursor(n),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=Co(Qt),t=Bd(Qt),n=this.snapshotCursor+1,a=(await Ar.snapshots.orderBy("id").toArray())[n],{index:i,slides:l}=a,s=i>l.length-1?l.length-1:i;e.setSlides(l),e.updateSlideIndex(s),this.setSnapshotCursor(n),t.setActiveElementIdList([])}}}),NT=ne.defineStore("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),LT=ne.defineStore("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),fe=()=>Bd(Qt),pe=()=>Co(Qt),F1=()=>AT(Qt),ln=()=>NT(Qt),CT=()=>LT(Qt),Ta=e=>{const{left:t,top:n,width:o,height:a,rotate:i=0}=e,l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2))/2,s=Math.atan(a/o)*180/Math.PI,c=(180-i-s)*Math.PI/180,u=(s-i)*Math.PI/180,d=t+o/2,f=n+a/2,v=[d+l*Math.cos(c),d+l*Math.cos(u),d-l*Math.cos(c),d-l*Math.cos(u)],p=[f-l*Math.sin(c),f-l*Math.sin(u),f+l*Math.sin(c),f+l*Math.sin(u)];return{xRange:[Math.min(...v),Math.max(...v)],yRange:[Math.min(...p),Math.max(...p)]}},pa=e=>{const{xRange:t,yRange:n}=Ta({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:o,yRange:a}=Ta({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:o[0]-t[0],offsetY:a[0]-n[0]}},vn=e=>{let t,n,o,a;if(e.type==="line")t=e.left,n=e.left+Math.max(e.start[0],e.end[0]),o=e.top,a=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:i,top:l,width:s,height:c,rotate:u}=e,{xRange:d,yRange:f}=Ta({left:i,top:l,width:s,height:c,rotate:u});t=d[0],n=d[1],o=f[0],a=f[1]}else t=e.left,n=e.left+e.width,o=e.top,a=e.top+e.height;return{minX:t,maxX:n,minY:o,maxY:a}},tr=e=>{const t=[],n=[],o=[],a=[];e.forEach(u=>{const{minX:d,maxX:f,minY:v,maxY:p}=vn(u);t.push(d),n.push(v),o.push(f),a.push(p)});const i=Math.min(...t),l=Math.max(...o),s=Math.min(...n),c=Math.max(...a);return{minX:i,maxX:l,minY:s,maxY:c}},xT=e=>{const t=e.end[0]-e.start[0],n=e.end[1]-e.start[1];return Math.sqrt(t*t+n*n)},Ds=e=>{const t=[];return e.forEach(n=>{const o=t.findIndex(a=>a.value===n.value);if(o===-1)t.push(n);else{const a=t[o],i=Math.min(a.range[0],n.range[0]),l=Math.max(a.range[1],n.range[1]),s=[i,l],c={value:n.value,range:s};t[o]=c}}),t},Vd=e=>{const t={};for(const n of e)t[n.id]=Ne.nanoid(10);return t},Bi=e=>{const t={},n={};for(const o of e){const a=o.groupId;a&&!t[a]&&(t[a]=Ne.nanoid(10)),n[o.id]=Ne.nanoid(10)}return{groupIdMap:t,elIdMap:n}},H1=e=>{const t=we(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},tp=e=>{const t=e.start.join(","),n=e.end.join(",");if(e.broken){const o=e.broken.join(",");return`M${t} L${o} L${n}`}else if(e.broken2){const{minX:o,maxX:a,minY:i,maxY:l}=vn(e);return a-o>=l-i?`M${t} L${e.broken2[0]},${e.start[1]} L${e.broken2[0]},${e.end[1]} ${n}`:`M${t} L${e.start[0]},${e.broken2[1]} L${e.end[0]},${e.broken2[1]} ${n}`}else if(e.curve){const o=e.curve.join(",");return`M${t} Q${o} ${n}`}else if(e.cubic){const[o,a]=e.cubic,i=o.join(","),l=a.join(",");return`M${t} C${i} ${l} ${n}`}return`M${t} L${n}`},bT=(e,t)=>{const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return n.top>=o.top&&n.bottom<=o.bottom},be=()=>{const e=F1(),t=Xe.debounce(function(){e.addSnapshot()},300,{trailing:!0}),n=Xe.throttle(function(){e.reDo()},100,{leading:!0,trailing:!1}),o=Xe.throttle(function(){e.unDo()},100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:n,undo:o}},gl=()=>{const e=fe(),t=pe(),{currentSlide:n}=ne.storeToRefs(t),{addHistorySnapshot:o}=be();return{addElementsFromData:s=>{const{groupIdMap:c,elIdMap:u}=Bi(s),d=s[0];let f=0,v;do v=n.value.elements.find(p=>{if(p.type!==d.type)return!1;const{minX:h,maxX:m,minY:g,maxY:E}=vn(p),{minX:y,maxX:_,minY:S,maxY:I}=vn({...d,left:d.left+f,top:d.top+f});return h===y&&m===_&&g===S&&E===I}),v&&(f+=10);while(v);for(const p of s)p.id=u[p.id],p.left=p.left+f,p.top=p.top+f,p.groupId&&(p.groupId=c[p.groupId]);t.addElement(s),e.setActiveElementIdList(Object.values(u)),o()},addSlidesFromData:s=>{const c=Vd(s),u=s.map(d=>{const{groupIdMap:f,elIdMap:v}=Bi(d.elements);for(const p of d.elements)p.id=v[p.id],p.groupId&&(p.groupId=f[p.groupId]),p.link&&p.link.type==="slide"&&(c[p.link.target]?p.link.target=c[p.link.target]:delete p.link);if(d.animations)for(const p of d.animations)p.id=Ne.nanoid(10),p.elId=v[p.elId];return{...d,id:c[d.id]}});t.addSlide(u),o()},addSlidesFromDataToEnd:s=>{const c=Vd(s),u=s.map(d=>{const{groupIdMap:f,elIdMap:v}=Bi(d.elements);for(const p of d.elements)p.id=v[p.id],p.groupId&&(p.groupId=f[p.groupId]),p.link&&p.link.type==="slide"&&(c[p.link.target]?p.link.target=c[p.link.target]:delete p.link);if(d.animations)for(const p of d.animations)p.id=Ne.nanoid(10),p.elId=v[p.elId];return{...d,id:c[d.id]}});t.addSlideToEnd(u),o()}}},U1="pptist",np=e=>Cd.AES.encrypt(e,U1).toString(),G1=e=>Cd.AES.decrypt(e,U1).toString(Cd.enc.Utf8),z1=e=>new Promise((t,n)=>{const o=document.createElement("button"),a=new R_(o,{text:()=>e,action:()=>"copy",container:document.body});a.on("success",i=>{a.destroy(),t(i)}),a.on("error",i=>{a.destroy(),n(i)}),document.body.appendChild(o),o.click(),document.body.removeChild(o)}),Y1=()=>new Promise((e,t)=>{var n;!((n=navigator.clipboard)===null||n===void 0)&&n.readText?navigator.clipboard.readText().then(o=>(o||t("剪贴板为空或者不包含文本"),e(o))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),rp=e=>{let t;try{t=JSON.parse(G1(e))}catch{t=e}return t},X1=e=>{const t=e.split(`\r
16
16
  `);t[t.length-1]===""&&t.pop();let n=-1;const o=[];for(const a in t){if(o[a]=t[a].split(" "),o[a].length===1)return null;if(n===-1)n=o[a].length;else if(n!==o[a].length)return null}return o},W1=e=>{const o=new DOMParser().parseFromString(e,"text/html").querySelector("table"),a=[];if(!o)return a;const i=o.querySelectorAll("tr");for(const l of i){const s=[],c=l.querySelectorAll("td, th");for(const u of c){const d=u.textContent?u.textContent.trim():"",f=parseInt(u.getAttribute("colspan")||"1",10);for(let v=0;v<f;v++)s.push(d)}a.push(s)}return a};var Ee;(function(e){e.C="C",e.X="X",e.Z="Z",e.Y="Y",e.A="A",e.G="G",e.L="L",e.F="F",e.D="D",e.B="B",e.P="P",e.O="O",e.R="R",e.T="T",e.MINUS="-",e.EQUAL="=",e.DIGIT_0="0",e.DELETE="DELETE",e.UP="ARROWUP",e.DOWN="ARROWDOWN",e.LEFT="ARROWLEFT",e.RIGHT="ARROWRIGHT",e.ENTER="ENTER",e.SPACE=" ",e.TAB="TAB",e.BACKSPACE="BACKSPACE",e.ESC="ESCAPE",e.PAGEUP="PAGEUP",e.PAGEDOWN="PAGEDOWN",e.F5="F5"})(Ee||(Ee={}));const wT=[{type:"通用",typeKey:"HOTKEY.GENERAL.TITLE",children:[{label:"剪切",labelKey:"HOTKEY.GENERAL.CUT",value:"Ctrl + X"},{label:"复制",labelKey:"HOTKEY.GENERAL.COPY",value:"Ctrl + C"},{label:"粘贴",labelKey:"HOTKEY.GENERAL.PASTE",value:"Ctrl + V"},{label:"粘贴为纯文本",labelKey:"HOTKEY.GENERAL.PASTE_PLAIN",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",labelKey:"HOTKEY.GENERAL.DUPLICATE",value:"Ctrl + D"},{label:"全选",labelKey:"HOTKEY.GENERAL.SELECT_ALL",value:"Ctrl + A"},{label:"撤销",labelKey:"HOTKEY.GENERAL.UNDO",value:"Ctrl + Z"},{label:"恢复",labelKey:"HOTKEY.GENERAL.REDO",value:"Ctrl + Y"},{label:"删除",labelKey:"HOTKEY.GENERAL.DELETE",value:"Delete / Backspace"},{label:"多选",labelKey:"HOTKEY.GENERAL.MULTI_SELECT",value:"按住 Ctrl 或 Shift",valueKey:"HOTKEY.VALUE.HOLD_CTRL_SHIFT"},{label:"打开搜索替换",labelKey:"HOTKEY.GENERAL.SEARCH_REPLACE",value:"Ctrl + F"},{label:"打印",labelKey:"HOTKEY.GENERAL.PRINT",value:"Ctrl + P"},{label:"关闭弹窗",labelKey:"HOTKEY.GENERAL.CLOSE_DIALOG",value:"ESC"}]},{type:"幻灯片放映",typeKey:"HOTKEY.SLIDESHOW.TITLE",children:[{label:"从头开始放映幻灯片",labelKey:"HOTKEY.SLIDESHOW.START",value:"F5"},{label:"从当前开始放映幻灯片",labelKey:"HOTKEY.SLIDESHOW.START_CURRENT",value:"Shift + F5"},{label:"切换上一页",labelKey:"HOTKEY.SLIDESHOW.PREV",value:"↑ / ← / PgUp"},{label:"切换下一页",labelKey:"HOTKEY.SLIDESHOW.NEXT",value:"↓ / → / PgDown"},{label:"切换下一页",labelKey:"HOTKEY.SLIDESHOW.NEXT_ENTER",value:"Enter / Space"},{label:"退出放映",labelKey:"HOTKEY.SLIDESHOW.EXIT",value:"ESC"}]},{type:"幻灯片编辑",typeKey:"HOTKEY.EDITOR.TITLE",children:[{label:"新建幻灯片",labelKey:"HOTKEY.EDITOR.NEW_SLIDE",value:"Enter"},{label:"移动画布",labelKey:"HOTKEY.EDITOR.PAN",value:"Space + 鼠标拖拽",valueKey:"HOTKEY.VALUE.SPACE_DRAG"},{label:"缩放画布",labelKey:"HOTKEY.EDITOR.ZOOM",value:"Ctrl + 鼠标滚轮",valueKey:"HOTKEY.VALUE.CTRL_SCROLL"},{label:"放大画布",labelKey:"HOTKEY.EDITOR.ZOOM_IN",value:"Ctrl + ="},{label:"缩小画布",labelKey:"HOTKEY.EDITOR.ZOOM_OUT",value:"Ctrl + -"},{label:"使画布适应当前屏幕",labelKey:"HOTKEY.EDITOR.FIT_SCREEN",value:"Ctrl + 0"},{label:"上一页(未选中元素)",labelKey:"HOTKEY.EDITOR.PREV_NO_SELECTION",value:"↑"},{label:"下一页(未选中元素)",labelKey:"HOTKEY.EDITOR.NEXT_NO_SELECTION",value:"↓"},{label:"上一页",labelKey:"HOTKEY.EDITOR.PREV",value:"鼠标上滚 / PgUp",valueKey:"HOTKEY.VALUE.MOUSE_SCROLL_UP"},{label:"下一页",labelKey:"HOTKEY.EDITOR.NEXT",value:"鼠标下滚 / PgDown",valueKey:"HOTKEY.VALUE.MOUSE_SCROLL_DOWN"},{label:"快速创建文本",labelKey:"HOTKEY.EDITOR.QUICK_TEXT",value:"双击空白处 / T",valueKey:"HOTKEY.VALUE.DOUBLE_CLICK_BLANK_T"},{label:"快速创建矩形",labelKey:"HOTKEY.EDITOR.QUICK_RECT",value:"R"},{label:"快速创建圆形",labelKey:"HOTKEY.EDITOR.QUICK_ELLIPSE",value:"O"},{label:"快速创建线条",labelKey:"HOTKEY.EDITOR.QUICK_LINE",value:"L"},{label:"退出绘制状态",labelKey:"HOTKEY.EDITOR.EXIT_DRAW",value:"鼠标右键",valueKey:"HOTKEY.VALUE.RIGHT_CLICK"}]},{type:"元素操作",typeKey:"HOTKEY.ELEMENT.TITLE",children:[{label:"移动",labelKey:"HOTKEY.ELEMENT.MOVE",value:"↑ / ← / ↓ / →"},{label:"锁定",labelKey:"HOTKEY.ELEMENT.LOCK",value:"Ctrl + L"},{label:"组合",labelKey:"HOTKEY.ELEMENT.GROUP",value:"Ctrl + G"},{label:"取消组合",labelKey:"HOTKEY.ELEMENT.UNGROUP",value:"Ctrl + Shift + G"},{label:"置顶层",labelKey:"HOTKEY.ELEMENT.BRING_TO_FRONT",value:"Alt + F"},{label:"置底层",labelKey:"HOTKEY.ELEMENT.SEND_TO_BACK",value:"Alt + B"},{label:"锁定宽高比例",labelKey:"HOTKEY.ELEMENT.LOCK_RATIO",value:"按住 Ctrl 或 Shift",valueKey:"HOTKEY.VALUE.HOLD_CTRL_SHIFT"},{label:"创建水平 / 垂直线条",labelKey:"HOTKEY.ELEMENT.CREATE_LINE",value:"按住 Ctrl 或 Shift",valueKey:"HOTKEY.VALUE.HOLD_CTRL_SHIFT"},{label:"切换焦点元素",labelKey:"HOTKEY.ELEMENT.SWITCH_FOCUS",value:"Tab"},{label:"确认图片裁剪",labelKey:"HOTKEY.ELEMENT.CONFIRM_CROP",value:"Enter"},{label:"完成自定义形状绘制",labelKey:"HOTKEY.ELEMENT.FINISH_CUSTOM_SHAPE",value:"Enter"}]},{type:"表格编辑",typeKey:"HOTKEY.TABLE.TITLE",children:[{label:"聚焦到下一个单元格",labelKey:"HOTKEY.TABLE.NEXT_CELL",value:"Tab"},{label:"移动焦点单元格",labelKey:"HOTKEY.TABLE.MOVE_CELL",value:"↑ / ← / ↓ / →"},{label:"在上方插入一行",labelKey:"HOTKEY.TABLE.INSERT_ROW_ABOVE",value:"Ctrl + ↑"},{label:"在下方插入一行",labelKey:"HOTKEY.TABLE.INSERT_ROW_BELOW",value:"Ctrl + ↓"},{label:"在左侧插入一列",labelKey:"HOTKEY.TABLE.INSERT_COL_LEFT",value:"Ctrl + ←"},{label:"在右侧插入一列",labelKey:"HOTKEY.TABLE.INSERT_COL_RIGHT",value:"Ctrl + →"}]},{type:"图表数据编辑",typeKey:"HOTKEY.CHART.TITLE",children:[{label:"聚焦到下一行",labelKey:"HOTKEY.CHART.NEXT_ROW",value:"Enter"}]},{type:"文本编辑",typeKey:"HOTKEY.TEXT.TITLE",children:[{label:"加粗",labelKey:"HOTKEY.TEXT.BOLD",value:"Ctrl + B"},{label:"斜体",labelKey:"HOTKEY.TEXT.ITALIC",value:"Ctrl + I"},{label:"下划线",labelKey:"HOTKEY.TEXT.UNDERLINE",value:"Ctrl + U"},{label:"行内代码",labelKey:"HOTKEY.TEXT.INLINE_CODE",value:"Ctrl + E"},{label:"上角标",labelKey:"HOTKEY.TEXT.SUPERSCRIPT",value:"Ctrl + ;"},{label:"下角标",labelKey:"HOTKEY.TEXT.SUBSCRIPT",value:"Ctrl + '"},{label:"选中段落",labelKey:"HOTKEY.TEXT.SELECT_PARAGRAPH",value:"ESC"}]},{type:"其他快捷操作",typeKey:"HOTKEY.OTHER.TITLE",children:[{label:"添加图片 - 粘贴来自系统剪贴板的图片",labelKey:"HOTKEY.OTHER.ADD_IMAGE_PASTE"},{label:"添加图片 - 将本地图片拖拽到画布中",labelKey:"HOTKEY.OTHER.ADD_IMAGE_DRAG"},{label:"添加图片 - 在画布中粘贴SVG代码",labelKey:"HOTKEY.OTHER.ADD_IMAGE_PASTE_SVG"},{label:"添加图片 - 粘贴来自 pexels 的图片链接",labelKey:"HOTKEY.OTHER.ADD_IMAGE_PEXELS"},{label:"添加文本 - 粘贴来自系统剪贴板的文字",labelKey:"HOTKEY.OTHER.ADD_TEXT_PASTE"},{label:"添加文本 - 将外部选中文字拖拽到画布中",labelKey:"HOTKEY.OTHER.ADD_TEXT_DRAG"},{label:"文本编辑 - 支持 markdown 语法创建列表和引用",labelKey:"HOTKEY.OTHER.TEXT_MARKDOWN"}]}],$d=e=>{const n=e.replace(/[\n\r]+/g,"<br>").split("<br>");let o="";for(const a of n)a&&(o+=`<div>${a}</div>`);return o},K1=e=>new Promise(t=>{const n=document.createElement("img");n.src=e,n.style.opacity="0",document.body.appendChild(n),n.onload=()=>{const o=n.clientWidth,a=n.clientHeight;n.onload=null,n.onerror=null,document.body.removeChild(n),t({width:o,height:a})},n.onerror=()=>{n.onload=null,n.onerror=null}}),Xr=e=>new Promise(t=>{const n=new FileReader;n.addEventListener("load",()=>{t(n.result)}),n.readAsDataURL(e)}),OT=e=>{if(!/<svg[\s\S]*?>[\s\S]*?<\/svg>/i.test(e))return!1;try{return new DOMParser().parseFromString(e,"image/svg+xml").documentElement.nodeName==="svg"}catch{return!1}},RT=e=>{const t=new Blob([e],{type:"image/svg+xml"});return new File([t],`${Date.now()}.svg`,{type:"image/svg+xml"})};var Pe;(function(e){e.ROUND_RECT="roundRect",e.ROUND_RECT_DIAGONAL="roundRectDiagonal",e.ROUND_RECT_SINGLE="roundRectSingle",e.ROUND_RECT_SAMESIDE="roundRectSameSide",e.CUT_RECT_DIAGONAL="cutRectDiagonal",e.CUT_RECT_SINGLE="cutRectSingle",e.CUT_RECT_SAMESIDE="cutRectSameSide",e.CUT_ROUND_RECT="cutRoundRect",e.MESSAGE="message",e.ROUND_MESSAGE="roundMessage",e.L="L",e.RING_RECT="ringRect",e.PLUS="plus",e.TRIANGLE="triangle",e.PARALLELOGRAM_LEFT="parallelogramLeft",e.PARALLELOGRAM_RIGHT="parallelogramRight",e.TRAPEZOID="trapezoid",e.BULLET="bullet",e.INDICATOR="indicator"})(Pe||(Pe={}));var Ze;(function(e){e.TEXT="text",e.IMAGE="image",e.SHAPE="shape",e.LINE="line",e.CHART="chart",e.TABLE="table",e.LATEX="latex",e.VIDEO="video",e.AUDIO="audio"})(Ze||(Ze={}));const $o={[Pe.ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M ${o} 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t-o} Q ${e} ${t} ${e-o} ${t} L ${o} ${t} Q 0 ${t} 0 ${t-o} L 0 ${o} Q 0 0 ${o} 0 Z`}},[Pe.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 ${t-o} L 0 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} L ${o} ${t} Z`}},[Pe.CUT_RECT_SINGLE]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 ${t} L 0 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} Z`}},[Pe.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:[.2],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 ${o} L ${o} 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} L 0 ${t} Z`}},[Pe.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M ${o} 0 L ${e} 0 L ${e} ${t-o} Q ${e} ${t} ${e-o} ${t} L 0 ${t} L 0 ${o} Q 0 0 ${o} 0 Z`}},[Pe.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["right"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[Pe.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 ${o} Q 0 0 ${o} 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t} L 0 ${t} Z`}},[Pe.CUT_ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M ${o} 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} L 0 ${t} L 0 ${o} Q 0 0 ${o} 0 Z`}},[Pe.MESSAGE]:{editable:!0,range:[[0,.8],[.1,.3]],defaultValue:[.3,.2],relative:["left_bottom","bottom"],getBaseSize:[e=>e,(e,t)=>t],formula:(e,t,n)=>{const o=e*n[0],a=e*.2,i=t*n[1];return`M 0 0 L ${e} 0 L ${e} ${t-i} L ${o+a} ${t-i} L ${o} ${t} L ${o} ${t-i} L 0 ${t-i} Z`}},[Pe.ROUND_MESSAGE]:{formula:(e,t)=>{const n=Math.min(e,t)*.125,o=Math.min(e,t)*.2,a=Math.min(e,t)*.2;return`M 0 ${n} Q 0 0 ${n} 0 L ${e-n} 0 Q ${e} 0 ${e} ${n} L ${e} ${t-n-a} Q ${e} ${t-a} ${e-n} ${t-a} L ${e/2} ${t-a} L ${e/2-o} ${t} L ${e/2-o} ${t-a} L ${n} ${t-a} Q 0 ${t-a} 0 ${t-n-a} L 0 ${n} Z`}},[Pe.L]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-o} L ${o} ${t-o} L ${o} 0 Z`}},[Pe.RING_RECT]:{editable:!0,defaultValue:[.25],range:[[.1,.45]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${o} ${o} L ${o} ${t-o} L ${e-o} ${t-o} L ${e-o} ${o} Z`}},[Pe.PLUS]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["center"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const o=Math.min(e,t)*n[0];return`M ${e/2-o/2} 0 L ${e/2-o/2} ${t/2-o/2} L 0 ${t/2-o/2} L 0 ${t/2+o/2} L ${e/2-o/2} ${t/2+o/2} L ${e/2-o/2} ${t} L ${e/2+o/2} ${t} L ${e/2+o/2} ${t/2+o/2} L ${e} ${t/2+o/2} L ${e} ${t/2-o/2} L ${e/2+o/2} ${t/2-o/2} L ${e/2+o/2} 0 Z`}},[Pe.TRIANGLE]:{editable:!0,defaultValue:[.5],range:[[0,1]],relative:["left"],getBaseSize:[e=>e],formula:(e,t,n)=>`M ${e*n[0]} 0 L 0 ${t} L ${e} ${t} Z`},[Pe.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["left"],getBaseSize:[e=>e],formula:(e,t,n)=>{const o=e*n[0];return`M ${o} 0 L ${e} 0 L ${e-o} ${t} L 0 ${t} Z`}},[Pe.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["right"],getBaseSize:[e=>e],formula:(e,t,n)=>{const o=e*n[0];return`M 0 0 L ${e-o} 0 L ${e} ${t} L ${o} ${t} Z`}},[Pe.TRAPEZOID]:{editable:!0,defaultValue:[.25],range:[[0,.5]],relative:["left"],getBaseSize:[e=>e],formula:(e,t,n)=>{const o=e*n[0];return`M ${o} 0 L ${e-o} 0 L ${e} ${t} L 0 ${t} Z`}},[Pe.BULLET]:{editable:!0,defaultValue:[.2],range:[[0,1]],relative:["top"],getBaseSize:[(e,t)=>t],formula:(e,t,n)=>{const o=t*n[0];return`M ${e/2} 0 L 0 ${o} L 0 ${t} L ${e} ${t} L ${e} ${o} Z`}},[Pe.INDICATOR]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[e=>e],formula:(e,t,n)=>{const o=e*n[0];return`M ${e} ${t/2} L ${e-o} 0 L 0 0 L ${o} ${t/2} L 0 ${t} L ${e-o} ${t} Z`}}},op=[{type:"矩形",typeKey:"SHAPE.CATEGORY.RECT",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:Pe.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:Pe.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:Pe.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:Pe.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:Pe.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:Pe.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:Pe.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:Pe.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"}]},{type:"常用形状",typeKey:"SHAPE.CATEGORY.COMMON",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:Pe.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:Pe.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:Pe.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:Pe.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:Pe.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:Pe.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M100,0 L200,76.6 L161.8,200 L38.2,200 L0,76.6 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M100,0 L170.71,29.29 L200,100 L170.71,170.71 L100,200 L29.29,170.71 L0,100 L29.29,29.29 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z",pptxShapeType:"dodecagon"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z",pptxShapeType:"flowChartManualInput"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 150 C 110 140 110 240 0 180 Z",pptxShapeType:"flowChartDocument"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z",pptxShapeType:"diagStripe"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:Pe.L,pptxShapeType:"corner"},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:Pe.RING_RECT,pptxShapeType:"frame"},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z",pptxShapeType:"donut"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:Pe.PLUS,pptxShapeType:"mathPlus"},{viewBox:[200,200],path:"M 0 70 L 200 70 L 200 130 L 0 130 Z",pptxShapeType:"mathMinus"},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z",pptxShapeType:"mathMultiply"},{viewBox:[200,200],path:"M 0 80 L 200 80 L 200 120 L 0 120 Z M 100 0 A 25 25 0 1 1 100 50 A 25 25 0 1 1 100 0 M 100 200 A 25 25 0 1 1 100 150 A 25 25 0 1 1 100 200",pptxShapeType:"mathDivide"},{viewBox:[200,200],path:"M 0 30 L 200 30 L 200 80 L 0 80 Z M 0 120 L 200 120 L 200 170 L 0 170 Z",pptxShapeType:"mathEqual"},{viewBox:[200,200],path:"M 120 0 L 170 0 L 150 40 L 200 40 L 200 80 L 130 80 L 110 120 L 200 120 L 200 160 L 90 160 L 70 200 L 20 200 L 40 160 L 0 160 L 0 120 L 60 120 L 80 80 L 0 80 L 0 40 L 100 40 Z",pptxShapeType:"mathNotEqual"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:Pe.MESSAGE,pptxShapeType:"wedgeRectCallout"},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:Pe.ROUND_MESSAGE,pptxShapeType:"wedgeRoundRectCallout"},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z",pptxShapeType:"flowChartMagneticTape"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z",pptxShapeType:"flowChartCollate"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z",pptxShapeType:"wave"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",pptxShapeType:"doubleWave"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 130 30 L 170 30 L 170 70 L 200 100 L 170 130 L 170 170 L 130 170 L 100 200 L 70 170 L 30 170 L 30 130 L 0 100 L 30 70 L 30 30 L 70 30 L 100 0",pptxShapeType:"star8"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 0 200 120 A 100 100 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 120 0 L 100 80 L 200 80 L 80 200 L 100 120 L 0 120 L 120 0 Z"},{viewBox:[200,200],path:"M 30 50 Q 40 -20 120 10 Q 180 -10 180 40 Q 210 70 190 100 C 210 140 180 170 160 170 Q 140 210 100 180 C 70 210 20 190 30 150 C -10 140 -10 80 30 50",pptxShapeType:"cloud"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z M 200 100 L 0 100",withborder:!0,pptxShapeType:"flowChartSort"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 30 30 L 170 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170 M 30 30 L 170 170",withborder:!0,pptxShapeType:"flowChartSummingJunction"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 200 100 L 0 100 M 100 0 L 100 200",withborder:!0,pptxShapeType:"flowChartOr"},{viewBox:[200,200],path:"M 160 0 A 40 100 0 1 1 160 200 L 40 200 A 40 100 0 1 1 40 0 L 160 0 Z M 160 200 A 40 100 0 1 1 160 0",withborder:!0,pptxShapeType:"flowChartMagneticDrum"},{viewBox:[200,200],path:"M 0 40 A 50 20 0 1 1 200 40 L 200 160 A 50 20 0 1 1 0 160 L 0 40 Z M 200 40 A 50 20 0 1 1 0 40",withborder:!0,pptxShapeType:"can"},{viewBox:[200,200],path:"M 200 0 L 50 0 L 0 50 L 0 200 L 150 200 L 200 150 L 200 0 Z M 200 0 L 150 50 M 150 50 L 0 50 M 150 50 L 150 200",withborder:!0,pptxShapeType:"cube"}]},{type:"箭头",typeKey:"SHAPE.CATEGORY.ARROW",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z",pptxShapeType:"quadArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z",pptxShapeType:"leftArrowCallout"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z",pptxShapeType:"rightArrowCallout"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z",pptxShapeType:"bentUpArrow"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z",pptxShapeType:"leftUpArrow"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",typeKey:"SHAPE.CATEGORY.OTHER",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",typeKey:"SHAPE.CATEGORY.LINEAR",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],va={bar:{label:"柱状图",labelKey:"CHART.TYPE.BAR"},column:{label:"条形图",labelKey:"CHART.TYPE.COLUMN"},line:{label:"折线图",labelKey:"CHART.TYPE.LINE"},area:{label:"面积图",labelKey:"CHART.TYPE.AREA"},scatter:{label:"散点图",labelKey:"CHART.TYPE.SCATTER"},pie:{label:"饼图",labelKey:"CHART.TYPE.PIE"},ring:{label:"环形图",labelKey:"CHART.TYPE.RING"},radar:{label:"雷达图",labelKey:"CHART.TYPE.RADAR"}},kT=(e,t)=>e.replace(/\{(\w+)\}/g,(n,o)=>t&&o in t?String(t[o]):`{${o}}`),DT={"CHART.DEFAULT.CATEGORY":"类别{index}","CHART.DEFAULT.SERIES":"系列{index}","CHART.DEFAULT.VALUE":"值","CHART.DEFAULT.COORD":"坐标{index}","CHART.DEFAULT.X":"X","CHART.DEFAULT.Y":"Y"},PT=(e,t)=>kT(DT[e]||e,t),Jr=e=>[1,2,3,4,5].map(t=>e("CHART.DEFAULT.CATEGORY",{index:t})),Ja=e=>[1,2].map(t=>e("CHART.DEFAULT.SERIES",{index:t})),MT=e=>[1,2,3,4,5].map(t=>e("CHART.DEFAULT.COORD",{index:t})),q1=e=>({bar:{labels:Jr(e),legends:Ja(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:Jr(e),legends:Ja(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:Jr(e),legends:Ja(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:Jr(e),legends:[e("CHART.DEFAULT.VALUE")],series:[[12,19,5,2,18]]},ring:{labels:Jr(e),legends:[e("CHART.DEFAULT.VALUE")],series:[[12,19,5,2,18]]},area:{labels:Jr(e),legends:Ja(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:Jr(e),legends:Ja(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:MT(e),legends:[e("CHART.DEFAULT.X"),e("CHART.DEFAULT.Y")],series:[[12,19,5,2,18],[7,11,13,21,9]]}});q1(PT);const BT=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],Fo=()=>{const e=fe(),t=pe(),{creatingElement:n}=ne.storeToRefs(e),{theme:o,viewportRatio:a,viewportSize:i}=ne.storeToRefs(t),{addHistorySnapshot:l}=be(),{t:s}=_e(),c=(y,_)=>{t.addElement(y),e.setActiveElementIdList([y.id]),n.value&&e.setCreatingElement(null),setTimeout(()=>{e.setEditorareaFocus(!0)},0),_&&_(),l()};return{createImageElement:y=>{K1(y).then(({width:_,height:S})=>{const I=S/_;I<a.value&&_>i.value?(_=i.value,S=_*I):S>i.value*a.value&&(S=i.value*a.value,_=S/I),c({type:"image",id:Ne.nanoid(10),src:y,width:_,height:S,left:(i.value-_)/2,top:(i.value*a.value-S)/2,fixedRatio:!0,rotate:0})})},createChartElement:y=>{c({type:"chart",id:Ne.nanoid(10),chartType:y,left:300,top:81.25,width:400,height:400,rotate:0,themeColors:o.value.themeColors,textColor:o.value.fontColor,data:q1(s)[y]})},createTableElement:(y,_)=>{const I=(Array.isArray(o.value.themeColors)?o.value.themeColors:[])[0]||"#5b9bd5",A={fontname:o.value.fontName,color:o.value.fontColor},x=[];for(let w=0;w<y;w++){const C=[];for(let P=0;P<_;P++)C.push({id:Ne.nanoid(10),colspan:1,rowspan:1,text:"",style:A});x.push(C)}const N=100,T=36,L=new Array(_).fill(1/_),b=_*N,O=y*T;c({type:"table",id:Ne.nanoid(10),width:b,height:O,colWidths:L,rotate:0,data:x,left:(i.value-b)/2,top:(i.value*a.value-O)/2,outline:{width:2,style:"solid",color:o.value.outline?.color||"#eeece1"},theme:{color:I,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},createTextElement:(y,_)=>{const{left:S,top:I,width:A,height:x}=y,N=_?.content||"",T=_?.vertical||!1,L=Ne.nanoid(10);c({type:"text",id:L,left:S,top:I,width:A,height:x,content:N,rotate:0,defaultFontName:o.value.fontName,defaultColor:o.value.fontColor,vertical:T},()=>{setTimeout(()=>{const b=document.querySelector(`#editable-element-${L} .ProseMirror`);b&&b.focus()},0)})},createShapeElement:(y,_,S={})=>{const{left:I,top:A,width:x,height:N}=y,T={type:"shape",id:Ne.nanoid(10),left:I,top:A,width:x,height:N,viewBox:_.viewBox,path:_.path,fill:o.value.themeColors[0],fixedRatio:!1,rotate:0,...S};if(_.withborder&&(T.outline=o.value.outline),_.special&&(T.special=!0),_.pathFormula){T.pathFormula=_.pathFormula,T.viewBox=[x,N];const L=$o[_.pathFormula];"editable"in L&&L.editable?(T.path=L.formula(x,N,L.defaultValue),T.keypoints=L.defaultValue):T.path=L.formula(x,N)}c(T)},createLineElement:(y,_)=>{const{left:S,top:I,start:A,end:x}=y,N={type:"line",id:Ne.nanoid(10),left:S,top:I,start:A,end:x,points:_.points,color:o.value.themeColors[0],style:_.style,width:2};_.isBroken&&(N.broken=[(A[0]+x[0])/2,(A[1]+x[1])/2]),_.isBroken2&&(N.broken2=[(A[0]+x[0])/2,(A[1]+x[1])/2]),_.isCurve&&(N.curve=[(A[0]+x[0])/2,(A[1]+x[1])/2]),_.isCubic&&(N.cubic=[[(A[0]+x[0])/2,(A[1]+x[1])/2],[(A[0]+x[0])/2,(A[1]+x[1])/2]]),c(N)},createLatexElement:y=>{c({type:"latex",id:Ne.nanoid(10),width:y.w,height:y.h,rotate:0,left:(i.value-y.w)/2,top:(i.value*a.value-y.h)/2,path:y.path,latex:y.latex,color:o.value.fontColor,strokeWidth:2,viewBox:[y.w,y.h],fixedRatio:!0})},createVideoElement:y=>{c({type:"video",id:Ne.nanoid(10),width:500,height:300,rotate:0,left:(i.value-500)/2,top:(i.value*a.value-300)/2,src:y,autoplay:!1})},createAudioElement:y=>{c({type:"audio",id:Ne.nanoid(10),width:50,height:50,rotate:0,left:(i.value-50)/2,top:(i.value*a.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:o.value.themeColors[0],src:y})}}},VT=e=>{const t=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pexels\.com\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(e),n=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pptist\.cn\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(e);return t||n},ap=()=>{const{shiftKeyState:e}=ne.storeToRefs(ln()),{createTextElement:t,createImageElement:n}=Fo(),{addElementsFromData:o,addSlidesFromData:a}=gl(),i=s=>{t({left:0,top:0,width:600,height:50},{content:s})};return{pasteTextClipboardData:(s,c)=>{const u=c?.onlySlide||!1,d=c?.onlyElements||!1,f=rp(s);if(typeof f=="object"){const{type:v,data:p}=f;v==="elements"&&!u?o(p):v==="slides"&&!d&&a(p)}else if(!d&&!u)if(e.value){const v=$d(f);i(v)}else if(VT(f))n(f);else if(oT(f))i(`<a href="${f}" title="${f}" target="_blank">${f}</a>`);else if(OT(f)){const v=RT(f);Xr(v).then(p=>n(p))}else{const v=$d(f);i(v)}}}},Ho=()=>{const e=fe(),t=pe(),{selectedSlidesIndex:n,activeElementIdList:o}=ne.storeToRefs(e),{currentSlide:a,slides:i,theme:l,slideIndex:s}=ne.storeToRefs(t),c=r.computed(()=>[...n.value,s.value]),u=r.computed(()=>i.value.filter((L,b)=>c.value.includes(b))),d=r.computed(()=>u.value.map(L=>L.id)),{pasteTextClipboardData:f}=ap(),{addSlidesFromData:v}=gl(),{addHistorySnapshot:p}=be(),h=()=>{const L={id:Ne.nanoid(10),elements:[],background:{type:"solid",color:l.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([L])},m=L=>{L===Ee.UP&&s.value>0?(o.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(s.value-1)):L===Ee.DOWN&&s.value<i.value.length-1&&(o.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(s.value+1))},g=()=>{const L=np(JSON.stringify({type:"slides",data:u.value}));z1(L).then(()=>{e.setThumbnailsFocus(!0)})},E=()=>{Y1().then(L=>{f(L,{onlySlide:!0})}).catch(L=>Ae.warning(L))},y=()=>{const L={id:Ne.nanoid(10),elements:[],background:{type:"solid",color:l.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(L),p()},_=L=>{const{groupIdMap:b,elIdMap:O}=Bi(L.elements);for(const C of L.elements)C.id=O[C.id],C.groupId&&(C.groupId=b[C.groupId]);const w={...L,id:Ne.nanoid(10)};e.setActiveElementIdList([]),t.addSlide(w),p()},S=()=>{const L=JSON.parse(JSON.stringify(a.value));v([L])},I=(L=d.value)=>{i.value.length===L.length?h():t.deleteSlide(L),e.updateSelectedSlidesIndex([]),p()},A=()=>{const L=[...d.value];g(),I(L)},x=()=>{const L=Array.from(Array(i.value.length),(b,O)=>O);e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(L)},N=(L,b)=>{if(b===L)return;const O=JSON.parse(JSON.stringify(i.value)),w=O[b],C=w.sectionTag;if(C){const k=O[b+1];delete w.sectionTag,k&&!k.sectionTag&&(k.sectionTag=C)}if(L===0){const k=O[0].sectionTag;k&&(delete O[0].sectionTag,w.sectionTag=k)}const P=O[b];O.splice(b,1),O.splice(L,0,P),t.setSlides(O),t.updateSlideIndex(L)},T=r.computed(()=>!(i.value.length>1||i.value[0].elements.length>0));return{resetSlides:h,updateSlideIndex:m,copySlide:g,pasteSlide:E,createSlide:y,createSlideByTemplate:_,copyAndPasteSlide:S,deleteSlide:I,cutSlide:A,selectAllSlide:x,sortSlides:N,isEmptySlide:T}},Qa=e=>e&&e.kind==="chart"&&Array.isArray(e.labels)&&Array.isArray(e.series),Qr=e=>e&&e.kind==="text"&&typeof e.title=="string"&&typeof e.text=="string",eo=e=>e&&e.kind===void 0&&typeof e.title=="string"&&typeof e.text=="string",Av=e=>e&&e.kind==="image",Z1=()=>{const e=pe(),{addSlidesFromDataToEnd:t}=gl(),{isEmptySlide:n}=Ho(),{addHistorySnapshot:o}=be(),a=r.ref([]),i=r.ref(0),l=r.ref(null),s=(b,O)=>b.type==="text"&&b.textType===O||b.type==="shape"&&b.text&&b.text.type===O,c=b=>b.type==="chart"&&b.chartMark==="chartItem",u=(b,O)=>b.type==="image"&&b.imageType===O,d=b=>b.elements.filter(O=>u(O,"itemFigure")).length,f=(b,O,w)=>{if(O===1){const k=b.filter(B=>{const H=B.elements.filter(V=>s(V,w)),U=B.elements.filter(V=>s(V,"title")),$=B.elements.filter(V=>s(V,"content"));return!H.length&&U.length===1&&$.length===1});if(k.length)return k}let C=null;const P=b.filter(k=>k.elements.filter(H=>s(H,w)).length>=O);if(P.length===0){const k=b.sort((B,H)=>{const U=B.elements.filter(V=>s(V,w)).length,$=H.elements.filter(V=>s(V,w)).length;return U-$});C=k[k.length-1]}else C=P.reduce((k,B)=>{const H=B.elements.filter($=>s($,w)).length,U=k.elements.filter($=>s($,w)).length;return H-O<=U-O?B:k});return b.filter(k=>{const B=k.elements.filter(U=>s(U,w)).length,H=C.elements.filter(U=>s(U,w)).length;return B===H})},v=b=>{const O=b.elements.filter(w=>w.type==="chart"&&w.chartMark==="chartItem").length;return O>0?O:b.elements.filter(w=>w.type==="chart").length},p=b=>b.elements.filter(O=>{var w;return O.type==="text"&&O.textType==="item"||O.type==="shape"&&((w=O.text)===null||w===void 0?void 0:w.type)==="item"}).length,h=(b,O)=>{const w=O.filter(Qa).length,C=O.filter(U=>Qr(U)||eo(U)).length,P=O.filter(Av).length;let k=b.filter(U=>v(U)>=w&&p(U)>=C&&(P===0||d(U)>=P));if(k.length===0)if(P>0)k=b.filter(U=>d(U)>0).sort((U,$)=>d($)-d(U)||v($)-v(U)||p($)-p(U));else if(w>0)k=b.filter(U=>v(U)>0).sort((U,$)=>v($)-v(U)||p($)-p(U));else return f(b,C,"item");const B=U=>{const $=Math.max(0,v(U)-w),V=Math.max(0,p(U)-C);return Math.max(0,d(U)-P)*1e4+$*100+V},H=Math.min(...k.map(B));return k.filter(U=>B(U)===H)},m=({text:b,fontSize:O,fontFamily:w,width:C,maxLine:P})=>{const B=document.createElement("canvas").getContext("2d");let H=O;const U=10;for(;H>=U;){B.font=`${H}px ${w}`;const $=B.measureText(b).width;if(Math.ceil($/C)<=P)return H;const z=H<=22?1:2;H=H-z}return U},g=b=>{const O=/font-size:\s*(\d+(?:\.\d+)?)\s*px/i,w=/font-family:\s*['"]?([^'";]+)['"]?\s*(?=;|>|$)/i,C={fontSize:16,fontFamily:"Microsoft Yahei"},P=b.match(O),k=b.match(w);return{fontSize:P?+P[1].trim():C.fontSize,fontFamily:k?k[1].trim():C.fontFamily}},E=({el:b,text:O,maxLine:w,longestText:C,digitPadding:P})=>{const B=b.width-20-2;let H=b.type==="text"?b.content:b.text.content;const U=g(H),$=m({text:C||O,fontSize:U.fontSize,fontFamily:U.fontFamily,width:B,maxLine:w}),z=new DOMParser().parseFromString(H,"text/html"),D=document.createTreeWalker(z.body,NodeFilter.SHOW_TEXT),Y=[];let K;for(;K=D.nextNode();)K.nodeType===Node.TEXT_NODE&&Y.push(K);if(Y.forEach(Z=>{Z.textContent=""}),Y.length>0){const Z=Y[0];P&&O.length===1?Z.textContent="0"+O:Z.textContent=O}else{const Z=z.querySelector("p")||z.createElement("p");Z.parentNode||z.body.appendChild(Z),P&&O.length===1?Z.textContent="0"+O:Z.textContent=O}if(z.body.innerHTML.indexOf("font-size")===-1){const Z=z.querySelector("p");Z&&(Z.style.fontSize="16px")}return H=z.body.innerHTML.replace(/font-size:(.+?)px/g,`font-size: ${$}px`),b.type==="text"?{...b,content:H,lineHeight:$<15?1.2:b.lineHeight}:{...b,text:{...b.text,content:H}}},y=(b,O)=>{const w=O.series.map(P=>{var k;return(k=P.name)!==null&&k!==void 0?k:""}),C=O.series.map(P=>P.data);return{...b,chartType:O.chartType,data:{labels:O.labels,series:C,legends:w},options:{...b.options||{},...O.options||{}},themeColors:O.themeColors||b.themeColors,textColor:O.textColor||b.textColor}},_=b=>{let O=null,w=[];return b.width===b.height?w=a.value.filter(C=>C.width===C.height):b.width>b.height?w=a.value.filter(C=>C.width>C.height):w=a.value.filter(C=>C.width<=C.height),w.length||(w=a.value),O=w[Math.floor(Math.random()*w.length)],a.value=a.value.filter(C=>C.id!==O.id),O},S=b=>{const O=_(b);if(!O)return b;b.width/b.height,O.width/O.height;const w=b.width/O.width,C=b.height/O.height,P=Math.min(w,C),k=O.width*P,B=O.height*P,H=(b.width-k)/2,U=(b.height-B)/2;return{...b,src:O.src,width:k,height:B,left:b.left+H,top:b.top+U,clip:void 0}},I=b=>{const O=/```markdown([^```]*)```/,w=b.match(O);return w?w[1].trim():b.replace("```markdown","").replace("```","")},A=b=>{const O=/```json([^```]*)```/,w=b.match(O);return w?w[1].trim():b.replace("```json","").replace("```","")},x=b=>{a.value=b};function*N(b,O,w){w&&(a.value=w);const C=[];for(const V of O)if(V.type==="content"){const z=V.data.items;if(z.length===5||z.length===6){const D=z.slice(0,3),Y=z.slice(3);C.push({...V,data:{...V.data,items:D}}),C.push({...V,data:{...V.data,items:Y},offset:3})}else if(z.length===7||z.length===8){const D=z.slice(0,4),Y=z.slice(4);C.push({...V,data:{...V.data,items:D}}),C.push({...V,data:{...V.data,items:Y},offset:4})}else if(z.length===9||z.length===10){const D=z.slice(0,3),Y=z.slice(3,6),K=z.slice(6);C.push({...V,data:{...V.data,items:D}}),C.push({...V,data:{...V.data,items:Y},offset:3}),C.push({...V,data:{...V.data,items:K},offset:6})}else if(z.length>10){const D=z.slice(0,4),Y=z.slice(4,8),K=z.slice(8);C.push({...V,data:{...V.data,items:D}}),C.push({...V,data:{...V.data,items:Y},offset:4}),C.push({...V,data:{...V.data,items:K},offset:8})}else C.push(V)}else if(V.type==="contents"){const z=V.data.items;if(z.length===11){const D=z.slice(0,6),Y=z.slice(6);C.push({...V,data:{...V.data,items:D}}),C.push({...V,data:{...V.data,items:Y},offset:6})}else if(z.length>11){const D=z.slice(0,10),Y=z.slice(10);C.push({...V,data:{...V.data,items:D}}),C.push({...V,data:{...V.data,items:Y},offset:10})}else C.push(V)}else if(V.type==="reference"){const z=V.data.references,D=z.length;if(D<=10)C.push(V);else if(D<=20){const Y=Math.ceil(D/2),K=z.slice(0,Y),Z=z.slice(Y);C.push({...V,data:{...V.data,references:K}}),C.push({...V,data:{...V.data,references:Z},offset:Y})}else if(D<=30){const Y=z.slice(0,10),K=z.slice(10,20),Z=z.slice(20);C.push({...V,data:{...V.data,references:Y}}),C.push({...V,data:{...V.data,references:K},offset:10}),C.push({...V,data:{...V.data,references:Z},offset:20})}else{let Y=0;for(;Y<D;){const K=z.slice(Y,Y+10);C.push({...V,data:{...V.data,references:K},offset:Y}),Y+=10}}}else C.push(V);const P=b.filter(V=>V.type==="cover"),k=b.filter(V=>V.type==="contents"),B=b.filter(V=>V.type==="transition"),H=b.filter(V=>V.type==="content"),U=b.filter(V=>V.type==="reference"),$=b.filter(V=>V.type==="end");if(!l.value){const V=B[Math.floor(Math.random()*B.length)];l.value=V}for(const V of C)if(V.type==="cover"){const z=P[Math.floor(Math.random()*P.length)],D=z.elements.map(Y=>Y.type==="image"&&Y.imageType&&a.value.length?S(Y):Y.type!=="text"&&Y.type!=="shape"?Y:s(Y,"title")&&V.data.title?E({el:Y,text:V.data.title,maxLine:1}):s(Y,"content")&&V.data.text?E({el:Y,text:V.data.text,maxLine:3}):Y);yield{...z,id:Ne.nanoid(10),elements:D}}else if(V.type==="contents"){const z=f(k,V.data.items.length,"item"),D=z[Math.floor(Math.random()*z.length)],Y=F=>{let j="";return F.type==="text"&&(j=F.content||""),F.type==="shape"&&(j=F.text&&F.text.content||""),String(j).replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").trim()},K=F=>{const le=Y(F).match(/-?\d+/);if(!le)return null;const ve=Number(le[0]);return Number.isFinite(ve)?ve:null},Z=F=>F.left+F.top*2,oe=D.elements.filter(F=>s(F,"itemNumber")),Q=[...oe].sort((F,j)=>{if(oe.length>6){const le=K(F),ve=K(j);if(le!==null&&ve!==null)return le-ve}return Z(F)-Z(j)}),q=Q.map(F=>F.id),re=[...oe].sort((F,j)=>Z(F)-Z(j)).map(F=>F.id),G=F=>{if(!Q.length)return null;if(F.groupId){const Fe=Q.find(Re=>Re.groupId&&Re.groupId===F.groupId);if(Fe)return Q.indexOf(Fe)}const j=(F.left||0)+(F.width||0)/2,le=(F.top||0)+(F.height||0)/2;let ve=0,he=1/0;for(let Fe=0;Fe<Q.length;Fe++){const Re=Q[Fe],ur=(Re.left||0)+(Re.width||0)/2,dr=(Re.top||0)+(Re.height||0)/2,fr=j-ur,qr=le-dr,ot=fr*fr+qr*qr;ot<he&&(he=ot,ve=Fe)}return ve},M=D.elements.filter(F=>s(F,"item")),X=[...M].sort((F,j)=>{if(M.length>6){const le=G(F),ve=G(j);if(le!==null&&ve!==null&&le!==ve)return le-ve}return Z(F)-Z(j)}).map(F=>F.id),W=[...M].sort((F,j)=>Z(F)-Z(j)).map(F=>F.id),te=V.data.items.reduce((F,j)=>j.length>F.length?j:F,""),ee=[],ce=[],se=D.elements.map(F=>{if(F.type==="image"&&F.imageType&&a.value.length)return S(F);if(F.type!=="text"&&F.type!=="shape")return F;if(s(F,"item")){let j=X.findIndex(ve=>ve===F.id),le=V.data.items[j];if(!le){const ve=W.findIndex(he=>he===F.id);ve!==-1&&(j=ve,le=V.data.items[j])}if(le)return E({el:F,text:le,maxLine:1,longestText:te});ee.push(F.id),F.groupId&&ce.push(F.groupId)}if(s(F,"itemNumber")){let j=q.findIndex(ve=>ve===F.id);if(j===-1&&(j=re.findIndex(ve=>ve===F.id)),j===-1)return F;const le=V.offset||0;return E({el:F,text:j+le+1+"",maxLine:1,digitPadding:!0})}return F}).filter(F=>!ee.includes(F.id)&&!(F.groupId&&ce.includes(F.groupId)));yield{...D,id:Ne.nanoid(10),elements:se}}else if(V.type==="transition"&&l.value){i.value=i.value+1;const z=l.value.elements.map(D=>D.type==="image"&&D.imageType&&a.value.length?S(D):D.type!=="text"&&D.type!=="shape"?D:s(D,"title")&&V.data.title?E({el:D,text:V.data.title,maxLine:1}):s(D,"content")&&V.data.text?E({el:D,text:V.data.text,maxLine:3}):s(D,"partNumber")?E({el:D,text:i.value+"",maxLine:1,digitPadding:!0}):D);yield{...l.value,id:Ne.nanoid(10),elements:z}}else if(V.type==="content"){const z=V.data.items,D=h(H,z),Y=D[Math.floor(Math.random()*D.length)],K=Y.elements.filter(F=>s(F,"itemTitle")).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id),Z=Y.elements.filter(F=>s(F,"subtitle")).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id),oe=Y.elements.filter(F=>u(F,"itemFigure")).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id),Q=Y.elements.filter(F=>s(F,"item")).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id),q=Y.elements.filter(F=>s(F,"content")).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id);let re=Y.elements.filter(F=>c(F)).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id);re.length===0&&(re=Y.elements.filter(F=>F.type==="chart").sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id));const G=Y.elements.filter(F=>s(F,"itemNumber")).sort((F,j)=>F.left+F.top*2-(j.left+j.top*2)).map(F=>F.id),M=[],R=[];z.forEach(F=>{(Qr(F)||eo(F))&&(F.title&&M.push(F.title),F.text&&R.push(F.text))});const X=M.reduce((F,j)=>j.length>F.length?j:F,""),W=R.reduce((F,j)=>j.length>F.length?j:F,""),te=z.filter(Qa),ee=z.filter(Av),ce=ee.length>0,se=Y.elements.map(F=>{if(ce){if(u(F,"itemFigure")){const j=oe.findIndex(ve=>ve===F.id),le=ee[j];return le&&le.src?{...F,src:le.src}:F}if(s(F,"subtitle")){const j=Z.findIndex(ve=>ve===F.id),le=ee[j];return le&&le.title?E({el:F,text:le.title,maxLine:1}):F}if(s(F,"content")){const j=q.findIndex(ve=>ve===F.id),le=ee[j];if(le&&le.text)return E({el:F,text:le.text,maxLine:6})}}if(F.type==="image"&&F.imageType&&a.value.length)return S(F);if(F.type==="chart"){const j=re.findIndex(ve=>ve===F.id),le=te[j];return le?y(F,le):F}if(F.type!=="text"&&F.type!=="shape")return F;if(z.length===1){const j=z[0];if((Qr(j)||eo(j))&&s(F,"content")&&j.text)return E({el:F,text:j.text,maxLine:6});if(Qa(j)&&s(F,"content")&&j.text)return E({el:F,text:j.text,maxLine:6});if((Qr(j)||eo(j))&&s(F,"item")&&j.text)return E({el:F,text:j.text,maxLine:4});if(s(F,"itemTitle")){if((Qr(j)||eo(j))&&j.title)return E({el:F,text:j.title,maxLine:1});if(Qa(j)&&j.title)return E({el:F,text:j.title,maxLine:1})}}else{if(s(F,"itemTitle")){const j=K.findIndex(ve=>ve===F.id),le=z[j];if(le){if(Qr(le)&&le.title)return E({el:F,text:le.title,longestText:X,maxLine:1});if(eo(le)&&le.title)return E({el:F,text:le.title,longestText:X,maxLine:1});if(Qa(le)&&le.title)return E({el:F,text:le.title,longestText:X||le.title,maxLine:1})}}if(s(F,"item")){const j=Q.findIndex(ve=>ve===F.id),le=z[j];if(le){if(Qr(le)&&le.text)return E({el:F,text:le.text,longestText:W,maxLine:4});if(eo(le)&&le.text)return E({el:F,text:le.text,longestText:W,maxLine:4})}}if(s(F,"itemNumber")){const j=G.findIndex(ve=>ve===F.id),le=V.offset||0;return E({el:F,text:j+le+1+"",maxLine:1,digitPadding:!0})}}return s(F,"title")&&V.data.title?E({el:F,text:V.data.title,maxLine:1}):F});yield{...Y,id:Ne.nanoid(10),elements:se}}else if(V.type==="reference"){const z=V.data.references.length;let D=[];D=U.filter(M=>{const R=M.elements.filter(X=>s(X,"referenceNumber")).length;return R>=z&&R<=10}),D.length===0&&(D=f(U,z,"referenceNumber"));const Y=D[Math.floor(Math.random()*D.length)],K=Y.elements.filter(M=>s(M,"referenceNumber")).sort((M,R)=>{const X=M.left+M.top*2,W=R.left+R.top*2;return X-W}).map(M=>M.id),Z=Y.elements.filter(M=>s(M,"pmid")).sort((M,R)=>{const X=M.left+M.top*2,W=R.left+R.top*2;return X-W}).map(M=>M.id),oe=Y.elements.filter(M=>s(M,"url")).sort((M,R)=>{const X=M.left+M.top*2,W=R.left+R.top*2;return X-W}).map(M=>M.id),Q=Y.elements.filter(M=>s(M,"doi")).sort((M,R)=>{const X=M.left+M.top*2,W=R.left+R.top*2;return X-W}).map(M=>M.id),q=[],re=[],G=Y.elements.map(M=>{if(M.type==="image"&&M.imageType&&a.value.length)return S(M);if(M.type!=="text"&&M.type!=="shape")return M;if(s(M,"title")&&V.data.title)return E({el:M,text:V.data.title,maxLine:1});if(s(M,"referenceNumber")){const R=K.findIndex(W=>W===M.id),X=V.data.references[R];if(X){let W="";if(X.number!==void 0){const te=V.offset||0;W=typeof X.number=="number"?(X.number+te).toString():X.number}else{const te=V.offset||0;W=(R+te+1).toString()}return E({el:M,text:`[${W}]`,maxLine:1})}else q.push(M.id),M.groupId&&re.push(M.groupId)}if(s(M,"pmid")){const R=Z.findIndex(W=>W===M.id),X=V.data.references[R];if(X&&X.pmid)return E({el:M,text:`PMID: ${X.pmid}`,maxLine:1});q.push(M.id),M.groupId&&re.push(M.groupId)}if(s(M,"url")){const R=oe.findIndex(W=>W===M.id),X=V.data.references[R];if(X&&X.url)return E({el:M,text:X.url,maxLine:2});q.push(M.id),M.groupId&&re.push(M.groupId)}if(s(M,"doi")){const R=Q.findIndex(W=>W===M.id),X=V.data.references[R];if(X&&X.doi)return E({el:M,text:`DOI: ${X.doi}`,maxLine:1});q.push(M.id),M.groupId&&re.push(M.groupId)}return M}).filter(M=>!q.includes(M.id)&&!(M.groupId&&re.includes(M.groupId)));yield{...Y,id:Ne.nanoid(10),elements:G}}else if(V.type==="end"){const z=$[Math.floor(Math.random()*$.length)],D=z.elements.map(Y=>Y.type==="image"&&Y.imageType&&a.value.length?S(Y):Y);yield{...z,id:Ne.nanoid(10),elements:D}}}return{presetImgPool:x,AIPPT:(b,O,w)=>{const C=[...N(b,O,w)];n.value?e.setSlides(C):t(C)},AIPPTStream:async(b,O,w,C=50,P)=>{var k;const B=N(b,O,w),H=[];for(const V of B)H.push(V);const U=H.length,$=V=>new Promise(z=>setTimeout(z,V));for(let V=0;V<H.length;V++){const z=H[V],D=Vd([z]),{groupIdMap:Y,elIdMap:K}=Bi(z.elements),Z=z.elements.map(G=>{const M={...G};return M.id=K[G.id],G.groupId&&(M.groupId=Y[G.groupId]),M.link&&M.link.type==="slide"&&(D[M.link.target]?M.link.target=D[M.link.target]:delete M.link),M}),oe=(k=z.animations)===null||k===void 0?void 0:k.map(G=>({...G,id:Ne.nanoid(10),elId:K[G.elId]})),Q={...z,id:D[z.id],elements:[],animations:oe};V===0&&n.value?(e.setSlides([Q]),e.updateSlideIndex(0)):(e.addSlideToEnd([Q]),e.updateSlideIndex(e.slides.length-1));const q=Q.id,re=Z.length;for(let G=0;G<Z.length;G++){const M=Z[G],R=e.slides.find(X=>X.id===q);if(R){const X=[...R.elements,M];e.updateSlide({elements:X},q)}P&&P(V+1,U,G+1,re),(G<Z.length-1||V<H.length-1)&&await $(C)}o()}},getMdContent:I,getJSONContent:A,AIPPTGenerator:N}};var ft;(function(e){e.UP="up",e.DOWN="down",e.TOP="top",e.BOTTOM="bottom"})(ft||(ft={}));var Ve;(function(e){e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.CENTER="center"})(Ve||(Ve={}));var ha;(function(e){e.T="top",e.B="bottom",e.L="left",e.R="right"})(ha||(ha={}));var me;(function(e){e.LEFT_TOP="left-top",e.TOP="top",e.RIGHT_TOP="right-top",e.LEFT="left",e.RIGHT="right",e.LEFT_BOTTOM="left-bottom",e.BOTTOM="bottom",e.RIGHT_BOTTOM="right-bottom"})(me||(me={}));var Bt;(function(e){e.START="start",e.END="end",e.C="ctrl",e.C1="ctrl1",e.C2="ctrl2"})(Bt||(Bt={}));const j1=()=>{const e=fe(),t=pe(),{activeElementIdList:n}=ne.storeToRefs(e),{currentSlide:o}=ne.storeToRefs(t),{addHistorySnapshot:a}=be();return{lockElement:()=>{const s=JSON.parse(JSON.stringify(o.value.elements));for(const c of s)n.value.includes(c.id)&&(c.lock=!0);t.updateSlide({elements:s}),e.setActiveElementIdList([]),a()},unlockElement:s=>{const c=JSON.parse(JSON.stringify(o.value.elements));if(s.groupId){const u=[];for(const d of c)d.groupId===s.groupId&&(d.lock=!1,u.push(d.id));t.updateSlide({elements:c}),e.setActiveElementIdList(u)}else{for(const u of c)if(u.id===s.id){u.lock=!1;break}t.updateSlide({elements:c}),e.setActiveElementIdList([s.id])}a()}}},fc=()=>{const e=fe(),t=pe(),{activeElementIdList:n,activeGroupElementId:o}=ne.storeToRefs(e),{currentSlide:a}=ne.storeToRefs(t),{addHistorySnapshot:i}=be();return{deleteElement:()=>{if(!n.value.length)return;let c=[];o.value?c=a.value.elements.filter(u=>u.id!==o.value):c=a.value.elements.filter(u=>!n.value.includes(u.id)),e.setActiveElementIdList([]),t.updateSlide({elements:c}),i()},deleteAllElements:()=>{a.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())}}},ip=()=>{const e=fe(),t=pe(),{activeElementIdList:n,activeElementList:o,handleElementId:a}=ne.storeToRefs(e),{currentSlide:i}=ne.storeToRefs(t),{addHistorySnapshot:l}=be();return{canCombine:r.computed(()=>{if(o.value.length<2)return!1;const d=o.value[0].groupId;return d?!o.value.every(v=>(v.groupId&&v.groupId)===d):!0}),combineElements:()=>{if(!o.value.length)return;let d=JSON.parse(JSON.stringify(i.value.elements));const f=Ne.nanoid(10),v=[];for(const g of d)n.value.includes(g.id)&&(g.groupId=f,v.push(g));const p=d.findIndex(g=>g.id===v[v.length-1].id),h=v.map(g=>g.id);d=d.filter(g=>!h.includes(g.id));const m=p-v.length+1;d.splice(m,0,...v),t.updateSlide({elements:d}),l()},uncombineElements:()=>{if(!o.value.length||!o.value.some(p=>p.groupId))return;const f=JSON.parse(JSON.stringify(i.value.elements));for(const p of f)n.value.includes(p.id)&&p.groupId&&delete p.groupId;t.updateSlide({elements:f});const v=a.value?[a.value]:[];e.setActiveElementIdList(v),l()}}},lp=()=>{const e=fe(),{activeElementIdList:t,activeElementList:n}=ne.storeToRefs(e),{pasteTextClipboardData:o}=ap(),{deleteElement:a}=fc(),i=()=>{if(!t.value.length)return;const u=np(JSON.stringify({type:"elements",data:n.value}));z1(u).then(()=>{e.setEditorareaFocus(!0)})},l=()=>{i(),a()},s=()=>{Y1().then(u=>{o(u)}).catch(u=>Ae.warning(u))};return{copyElement:i,cutElement:l,pasteElement:s,quickCopyElement:()=>{i(),s()}}},pc=()=>{const e=fe(),{currentSlide:t}=ne.storeToRefs(pe()),{hiddenElementIdList:n,handleElementId:o}=ne.storeToRefs(e);return{selectAllElements:()=>{const s=t.value.elements.filter(c=>!c.lock&&!n.value.includes(c.id)).map(c=>c.id);e.setActiveElementIdList(s)},selectElement:l=>{o.value===l||n.value.includes(l)||t.value.elements.filter(c=>c.lock).some(c=>c.id===l)||e.setActiveElementIdList([l])}}},$T=()=>{const e=pe(),{activeElementIdList:t,activeGroupElementId:n}=ne.storeToRefs(fe()),{currentSlide:o}=ne.storeToRefs(e),{addHistorySnapshot:a}=be();return{moveElement:(l,s=1)=>{let c=[];const u=d=>{let{left:f,top:v}=d;switch(l){case Ee.LEFT:f=f-s;break;case Ee.RIGHT:f=f+s;break;case Ee.UP:v=v-s;break;case Ee.DOWN:v=v+s;break}return{...d,left:f,top:v}};n.value?c=o.value.elements.map(d=>n.value===d.id?u(d):d):c=o.value.elements.map(d=>t.value.includes(d.id)?u(d):d),e.updateSlide({elements:c}),a()}}},vc=()=>{const e=pe(),{currentSlide:t}=ne.storeToRefs(e),{addHistorySnapshot:n}=be(),o=(u,d)=>({minLevel:u.findIndex(f=>f.id===d[0].id),maxLevel:u.findIndex(f=>f.id===d[d.length-1].id)}),a=(u,d)=>{const f=JSON.parse(JSON.stringify(u));if(d.groupId){const v=f.filter(E=>E.groupId===d.groupId),{minLevel:p,maxLevel:h}=o(u,v);if(h===u.length-1)return;const m=f[h+1],g=f.splice(p,v.length);if(m.groupId){const E=f.filter(y=>y.groupId===m.groupId);f.splice(p+E.length,0,...g)}else f.splice(p+1,0,...g)}else{const v=u.findIndex(m=>m.id===d.id);if(v===u.length-1)return;const p=f[v+1],h=f.splice(v,1)[0];if(p.groupId){const m=f.filter(g=>g.groupId===p.groupId);f.splice(v+m.length,0,h)}else f.splice(v+1,0,h)}return f},i=(u,d)=>{const f=JSON.parse(JSON.stringify(u));if(d.groupId){const v=f.filter(g=>g.groupId===d.groupId),{minLevel:p}=o(u,v);if(p===0)return;const h=f[p-1],m=f.splice(p,v.length);if(h.groupId){const g=f.filter(E=>E.groupId===h.groupId);f.splice(p-g.length,0,...m)}else f.splice(p-1,0,...m)}else{const v=u.findIndex(m=>m.id===d.id);if(v===0)return;const p=f[v-1],h=f.splice(v,1)[0];if(p.groupId){const m=f.filter(g=>g.groupId===p.groupId);f.splice(v-m.length,0,h)}else f.splice(v-1,0,h)}return f},l=(u,d)=>{const f=JSON.parse(JSON.stringify(u));if(d.groupId){const v=f.filter(g=>g.groupId===d.groupId),{minLevel:p,maxLevel:h}=o(u,v);if(h===u.length-1)return null;const m=f.splice(p,v.length);f.push(...m)}else{const v=u.findIndex(p=>p.id===d.id);if(v===u.length-1)return null;f.splice(v,1),f.push(d)}return f},s=(u,d)=>{const f=JSON.parse(JSON.stringify(u));if(d.groupId){const v=f.filter(m=>m.groupId===d.groupId),{minLevel:p}=o(u,v);if(p===0)return;const h=f.splice(p,v.length);f.unshift(...h)}else{const v=u.findIndex(p=>p.id===d.id);if(v===0)return;f.splice(v,1),f.unshift(d)}return f};return{orderElement:(u,d)=>{let f;d===ft.UP?f=a(t.value.elements,u):d===ft.DOWN?f=i(t.value.elements,u):d===ft.TOP?f=l(t.value.elements,u):d===ft.BOTTOM&&(f=s(t.value.elements,u)),f&&(e.updateSlide({elements:f}),n())}}},FT=(e=document.documentElement)=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},HT=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},UT=()=>!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement),hc=()=>{const e=CT(),t=pe(),n=()=>{const i=document.querySelector(".center-body");i&&(FT(i),e.setScreening(!0))};return{enterScreening:n,enterScreeningFromStart:()=>{t.updateSlideIndex(0),n()},exitScreening:()=>{e.setScreening(!1),UT()&&HT()}}},sp=()=>{const e=fe(),{canvasPercentage:t,canvasScale:n,canvasDragged:o}=ne.storeToRefs(e);return{canvasScalePercentage:r.computed(()=>Math.round(n.value*100)+"%"),setCanvasScalePercentage:c=>{const u=Math.round(c/n.value*t.value)/100;e.setCanvasPercentage(u)},scaleCanvas:c=>{let u=t.value;const d=5,f=200,v=30;c==="+"&&u<=f&&(u+=d),c==="-"&&u>=v&&(u-=d),e.setCanvasPercentage(u)},resetCanvas:()=>{e.setCanvasPercentage(90),o&&e.setCanvasDragged(!1)}}},GT=()=>{const e=fe(),t=ln(),{activeElementIdList:n,disableHotkeys:o,handleElement:a,handleElementId:i,editorAreaFocus:l,thumbnailsFocus:s,showSearchPanel:c}=ne.storeToRefs(e),{currentSlide:u}=ne.storeToRefs(pe()),{ctrlKeyState:d,shiftKeyState:f,spaceKeyState:v}=ne.storeToRefs(t),{updateSlideIndex:p,copySlide:h,createSlide:m,deleteSlide:g,cutSlide:E,copyAndPasteSlide:y,selectAllSlide:_}=Ho(),{combineElements:S,uncombineElements:I}=ip(),{deleteElement:A}=fc(),{lockElement:x}=j1(),{copyElement:N,cutElement:T,quickCopyElement:L}=lp(),{selectAllElements:b}=pc(),{moveElement:O}=$T(),{orderElement:w}=vc(),{redo:C,undo:P}=be(),{enterScreening:k,enterScreeningFromStart:B}=hc(),{scaleCanvas:H,resetCanvas:U}=sp(),$=()=>{n.value.length?N():s.value&&h()},V=()=>{n.value.length?T():s.value&&E()},z=()=>{n.value.length?L():s.value&&y()},D=()=>{l.value&&b(),s.value&&_()},Y=()=>{l.value&&x()},K=()=>{l.value&&S()},Z=()=>{l.value&&I()},oe=()=>{n.value.length?A():s.value&&g()},Q=W=>{n.value.length?O(W):(W===Ee.UP||W===Ee.DOWN)&&p(W)},q=W=>{W===Ee.PAGEUP?p(Ee.UP):W===Ee.PAGEDOWN&&p(Ee.DOWN)},re=W=>{a.value&&w(a.value,W)},G=()=>{s.value&&m()},M=()=>{if(!u.value.elements.length)return;if(!i.value){const ce=u.value.elements[0];e.setActiveElementIdList([ce.id]);return}const W=u.value.elements.findIndex(ce=>ce.id===i.value),te=W>=u.value.elements.length-1?0:W+1,ee=u.value.elements[te].id;e.setActiveElementIdList([ee])},R=W=>{const{ctrlKey:te,shiftKey:ee,altKey:ce,metaKey:se}=W,F=te||se,j=W.key.toUpperCase();if(F&&!d.value&&t.setCtrlKeyState(!0),ee&&!f.value&&t.setShiftKeyState(!0),!o.value&&j===Ee.SPACE&&t.setSpaceKeyState(!0),F&&j===Ee.P){W.preventDefault(),e.setDialogForExport("pdf");return}if(ee&&j===Ee.F5){W.preventDefault(),k(),t.setShiftKeyState(!1);return}if(j===Ee.F5){W.preventDefault(),B();return}if(te&&j===Ee.F){W.preventDefault(),e.setSearchPanelState(!c.value);return}if(te&&j===Ee.MINUS){W.preventDefault(),H("-");return}if(te&&j===Ee.EQUAL){W.preventDefault(),H("+");return}if(te&&j===Ee.DIGIT_0){W.preventDefault(),U();return}if(!(!l.value&&!s.value)){if(F&&j===Ee.C){if(o.value)return;W.preventDefault(),$()}if(F&&j===Ee.X){if(o.value)return;W.preventDefault(),V()}if(F&&j===Ee.D){if(o.value)return;W.preventDefault(),z()}if(F&&j===Ee.Z){if(o.value)return;W.preventDefault(),P()}if(F&&j===Ee.Y){if(o.value)return;W.preventDefault(),C()}if(F&&j===Ee.A){if(o.value)return;W.preventDefault(),D()}if(F&&j===Ee.L){if(o.value)return;W.preventDefault(),Y()}if(!ee&&F&&j===Ee.G){if(o.value)return;W.preventDefault(),K()}if(ee&&F&&j===Ee.G){if(o.value)return;W.preventDefault(),Z()}if(ce&&j===Ee.F){if(o.value)return;W.preventDefault(),re(ft.TOP)}if(ce&&j===Ee.B){if(o.value)return;W.preventDefault(),re(ft.BOTTOM)}if(j===Ee.DELETE||j===Ee.BACKSPACE){if(o.value)return;W.preventDefault(),oe()}if(j===Ee.UP){if(o.value)return;W.preventDefault(),Q(Ee.UP)}if(j===Ee.DOWN){if(o.value)return;W.preventDefault(),Q(Ee.DOWN)}if(j===Ee.LEFT){if(o.value)return;W.preventDefault(),Q(Ee.LEFT)}if(j===Ee.RIGHT){if(o.value)return;W.preventDefault(),Q(Ee.RIGHT)}if(j===Ee.PAGEUP){if(o.value)return;W.preventDefault(),q(Ee.PAGEUP)}if(j===Ee.PAGEDOWN){if(o.value)return;W.preventDefault(),q(Ee.PAGEDOWN)}if(j===Ee.ENTER){if(o.value)return;W.preventDefault(),G()}if(j===Ee.TAB){if(o.value)return;W.preventDefault(),M()}l.value&&!ee&&!F&&!o.value&&(j===Ee.T?e.setCreatingElement({type:"text"}):j===Ee.R?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"}}):j===Ee.O?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"}}):j===Ee.L&&e.setCreatingElement({type:"line",data:{path:"M 0 0 L 20 20",style:"solid",points:["",""]}}))}},X=()=>{d.value&&t.setCtrlKeyState(!1),f.value&&t.setShiftKeyState(!1),v.value&&t.setSpaceKeyState(!1)};r.onMounted(()=>{document.addEventListener("keydown",R),document.addEventListener("keyup",X),window.addEventListener("blur",X)}),r.onUnmounted(()=>{document.removeEventListener("keydown",R),document.removeEventListener("keyup",X),window.removeEventListener("blur",X)})},zT=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:n}=ne.storeToRefs(fe()),{pasteTextClipboardData:o}=ap(),{createImageElement:a}=Fo(),i=s=>{Xr(s).then(c=>a(c))},l=s=>{if(!e.value&&!t.value||n.value||!s.clipboardData)return;const c=s.clipboardData.items,u=c[0];if(!u)return;let d=!1;for(const f of c)if(f.kind==="file"&&f.type.indexOf("image")!==-1){const v=f.getAsFile();v&&i(v),d=!0}d||u.kind==="string"&&u.type==="text/plain"&&u.getAsString(f=>o(f))};r.onMounted(()=>{document.addEventListener("paste",l)}),r.onUnmounted(()=>{document.removeEventListener("paste",l)})},YT=["style","script","template"],XT=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],WT={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},KT=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ro=(e,t)=>{const n=t-e.position;Ps(e,n)},Ps=(e,t)=>{e.position=e.position+t},qT=(e,t)=>{for(;;){const n=e.indexOf("<",t);if(n===-1)return n;const o=e.charAt(n+1);if(o==="/"||o==="!"||/[A-Za-z0-9]/.test(o))return n;t=n+1}return-1},J1=e=>{const{str:t}=e;let n=qT(t,e.position);if(n===e.position)return;n===-1&&(n=t.length);const o=t.slice(e.position,n);Ro(e,n),e.tokens.push({type:"text",content:o})},ZT=e=>{const{str:t}=e;Ps(e,4);let n=t.indexOf("-->",e.position),o=n+3;n===-1&&(n=o=t.length);const a=t.slice(e.position,n);Ro(e,o),e.tokens.push({type:"comment",content:a})},jT=e=>{const{str:t}=e,n=t.length;let o=e.position;for(;o<n;){const l=t.charAt(o);if(!(/\s/.test(l)||l==="/"||l===">"))break;o++}let a=o+1;for(;a<n;){const l=t.charAt(a);if(!!(/\s/.test(l)||l==="/"||l===">"))break;a++}Ro(e,a);const i=t.slice(o,a);return e.tokens.push({type:"tag",content:i}),i},JT=e=>{const{str:t,tokens:n}=e;let o=e.position,a=null,i=o;const l=[],s=t.length;for(;o<s;){const u=t.charAt(o);if(a){u===a&&(a=null),o++;continue}if(u==="/"||u===">"){o!==i&&l.push(t.slice(i,o));break}if(/\s/.test(u)){o!==i&&l.push(t.slice(i,o)),i=o+1,o++;continue}if(u==="'"||u==='"'){a=u,o++;continue}o++}Ro(e,o);const c="attribute";for(let u=0;u<l.length;u++){const d=l[u];if(d.indexOf("=")===-1){const v=l[u+1];if(v&&Xe.startsWith(v,"=")){if(v.length>1){const h=d+v;n.push({type:c,content:h}),u+=1;continue}const p=l[u+2];if(u+=1,p){const h=d+"="+p;n.push({type:c,content:h}),u+=1;continue}}}if(Xe.endsWith(d,"=")){const v=l[u+1];if(v&&v.indexOf("=")===-1){const h=d+v;n.push({type:c,content:h}),u+=1;continue}const p=d.slice(0,-1);n.push({type:c,content:p});continue}n.push({type:c,content:d})}},QT=(e,t)=>{const{str:n,tokens:o}=t,a=e.toLowerCase(),i=n.length;let l=t.position;for(;l<i;){const s=n.indexOf("</",l);if(s===-1){J1(t);break}const c={str:n,position:t.position,tokens:[]};Ro(c,s);const u=Q1(c);if(a!==u.toLowerCase()){l=c.position;continue}if(s!==t.position){const d=t.position;Ro(t,s),o.push({type:"text",content:n.slice(d,s)})}o.push(...c.tokens),Ro(t,c.position);break}},Q1=e=>{const{str:t}=e,o=t.charAt(e.position+1)==="/";Ps(e,o?2:1),e.tokens.push({type:"tag-start",close:o});const a=jT(e);JT(e);const l=t.charAt(e.position)==="/";return Ps(e,l?2:1),e.tokens.push({type:"tag-end",close:l}),a},eS=e=>{const t=e.str,n=t.length;for(;e.position<n;){const o=e.position;if(J1(e),e.position===o)if(Xe.startsWith(t,"!--",o+1))ZT(e);else{const i=Q1(e),l=i.toLowerCase();YT.includes(l)&&QT(i,e)}}},tS=e=>{const t={str:e,position:0,tokens:[]};return eS(t),t.tokens},nS=e=>{const t={tagName:null,children:[]};return eg({tokens:e,cursor:0,stack:[t]}),t.children},rS=(e,t)=>{const n=WT[e];if(n){let o=t.length-1;for(;o>=0;){const a=t[o].tagName;if(a===e)break;if(a&&n.includes(a))return!0;o--}}return!1},Nv=(e,t)=>{e.splice(t)},eg=e=>{const{stack:t,tokens:n}=e;let{cursor:o}=e,a=t[t.length-1].children;const i=n.length;for(;o<i;){const l=n[o];if(l.type!=="tag-start"){a.push(l),o++;continue}const s=n[++o];o++;const c=s.content.toLowerCase();if(l.close){let g=t.length,E=!1;for(;--g>-1;)if(t[g].tagName===c){E=!0;break}for(;o<i&&n[o].type==="tag-end";)o++;if(E){Nv(t,g);break}else continue}let d=XT.includes(c);if(d&&(d=!rS(c,t)),d){let g=t.length-1;for(;g>0;){if(c===t[g].tagName){Nv(t,g);const E=g-1;a=t[E].children;break}g=g-1}}const f=[];let v;for(;o<i;){const g=n[o];if(g.type==="tag-end"){v=g;break}f.push(g.content),o++}if(!v)break;o++;const p=[],h={type:"element",tagName:s.content,attributes:f,children:p};if(a.push(h),!(v.close||KT.includes(c))){t.push({tagName:c,children:p});const g={tokens:n,cursor:o,stack:t};eg(g),o=g.cursor}}e.cursor=o},oS=(e,t)=>{const n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]},aS=e=>{const t=e.charAt(0),n=e.length-1;return(t==='"'||t==="'")&&t===e.charAt(n)?e.slice(1,n):e},iS=e=>e.map(t=>{const n=oS(t.trim(),"="),o=n[0],a=typeof n[1]=="string"?aS(n[1]):null;return{key:o,value:a}}),tg=e=>e.map(t=>{if(t.type==="element"){const o=tg(t.children);return{type:"element",tagName:t.tagName.toLowerCase(),attributes:iS(t.attributes),children:o}}return{type:t.type,content:t.content}}),lS=e=>{const t=tS(e),n=nS(t);return tg(n)},sS={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},Lv=e=>{const t=new x1.SVGPathData(e),n=[];for(const o of t.commands){const a=sS[o.type];if((o.type===2||o.type===16)&&n.push({x:o.x,y:o.y,relative:o.relative,type:a}),o.type===32)n.push({x:o.x,y:o.y,curve:{type:"cubic",x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2},relative:o.relative,type:a});else if(o.type===128)n.push({x:o.x,y:o.y,curve:{type:"quadratic",x1:o.x1,y1:o.y1},relative:o.relative,type:a});else if(o.type===512){const i=n[n.length-1];if(!["M","L","Q","C"].includes(i.type))continue;const l=D_({px:i.x,py:i.y,cx:o.x,cy:o.y,rx:o.rX,ry:o.rY,xAxisRotation:o.xRot,largeArcFlag:o.lArcFlag,sweepFlag:o.sweepFlag});for(const s of l)n.push({x:s.x,y:s.y,curve:{type:"cubic",x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2},relative:!1,type:"C"})}else if(o.type===1)n.push({close:!0,type:a});else continue}return n},Cv=e=>{try{const t=new x1.SVGPathData(e),n=[],o=[];for(const a of t.commands){const i="x"in a?a.x:0,l="y"in a?a.y:0;n.push(i),o.push(l)}return{minX:Math.min(...n),minY:Math.min(...o),maxX:Math.max(...n),maxY:Math.max(...o)}}catch{return{minX:0,minY:0,maxX:0,maxY:0}}},bl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",cS="data:image/svg+xml;base64,",uS=e=>{e=e.replace(/\r\n/g,`
17
17
  `);let t="";for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(o&63|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(o&63|128))}return t},dS=e=>{let t="",n,o,a,i,l,s,c,u=0;for(e=uS(e);u<e.length;)n=e.charCodeAt(u++),o=e.charCodeAt(u++),a=e.charCodeAt(u++),i=n>>2,l=(n&3)<<4|o>>4,s=(o&15)<<2|a>>6,c=a&63,isNaN(o)?s=c=64:isNaN(a)&&(c=64),t=t+bl.charAt(i)+bl.charAt(l)+bl.charAt(s)+bl.charAt(c);return t},xv=e=>{const n=new XMLSerializer().serializeToString(e);return cS+dS(n)},fS="/api/proxy",Ha=()=>{const e=pe(),{slides:t,theme:n,viewportRatio:o,title:a,viewportSize:i}=ne.storeToRefs(e),l=16,s=r.computed(()=>96*(i.value/960)),c=r.computed(()=>96/72*(i.value/960)),u=r.ref(!1),{t:d}=_e();function f(w){try{return new URL(w),!0}catch{return!1}}function v(w){return f(w)?`${fS}?url=${encodeURIComponent(w)}`:w}async function p(w){const C=f(w)?v(w):w,P=await fetch(C);if(!P.ok)throw new Error(`Fetch failed: ${P.status}`);const k=await P.blob();return await new Promise((B,H)=>{const U=new FileReader;U.onload=()=>B(String(U.result)),U.onerror=H,U.readAsDataURL(k)})}async function h(w){return L(w)||b(w)?w:await p(w)}const m=(w,C,P,k=!0)=>{u.value=!0;const B=C==="png"?xd.toPng:xd.toJpeg;w.querySelectorAll("foreignObject [xmlns]").forEach(U=>U.removeAttribute("xmlns")),setTimeout(()=>{const U={quality:P,width:1600};k&&(U.fontEmbedCSS=""),B(w,U).then($=>{u.value=!1,nu.saveAs($,`${a.value}.${C}`)}).catch(()=>{u.value=!1,Ae.error(d("EXPORT.IMAGE_FAIL"))})},200)},g=w=>{const C={title:a.value,width:i.value,height:i.value*o.value,theme:n.value,slides:w},P=new Blob([np(JSON.stringify(C))],{type:""});nu.saveAs(P,`${a.value}.pptist`)},E=()=>{const w={title:a.value,width:i.value,height:i.value*o.value,theme:n.value,slides:t.value},C=new Blob([JSON.stringify(w)],{type:""});nu.saveAs(C,`${a.value}.json`)},y=()=>{const w={title:a.value,width:i.value,height:i.value*o.value,theme:n.value,slides:t.value};return JSON.stringify(w||"")},_=w=>{if(!w)return{alpha:0,color:"#000000"};const C=we(w),P=C.getAlpha(),k=P===0?"#ffffff":C.setAlpha(1).toHexString();return{alpha:P,color:k}},S=w=>{const C=lS(w);let P=!1,k=0;const B=[],H=(U,$={})=>{for(const V of U){if("tagName"in V&&["div","li","p"].includes(V.tagName)&&B.length){const K=B[B.length-1];K.options||(K.options={}),K.options.breakLine=!0}const D={...$},Y="attributes"in V?V.attributes.find(K=>K.key==="style"):null;if(Y&&Y.value){const K=Y.value.split(";");for(const Z of K){const[oe,Q]=Z.split(": "),[q,re]=[Xe.trim(oe),Xe.trim(Q)];q&&re&&(D[q]=re)}}if("tagName"in V){if(V.tagName==="em"&&(D["font-style"]="italic"),V.tagName==="strong"&&(D["font-weight"]="bold"),V.tagName==="sup"&&(D["vertical-align"]="super"),V.tagName==="sub"&&(D["vertical-align"]="sub"),V.tagName==="a"){const K=V.attributes.find(Z=>Z.key==="href");D.href=K?.value||""}if(V.tagName==="ul"&&(D["list-type"]="ul"),V.tagName==="ol"&&(D["list-type"]="ol"),V.tagName==="li"&&(P=!0),V.tagName==="p"&&"attributes"in V){const K=V.attributes.find(Z=>Z.key==="data-indent");K&&K.value&&(k=+K.value)}}if("tagName"in V&&V.tagName==="br")B.push({text:"",options:{breakLine:!0}});else if("content"in V){const K=V.content.replace(/&nbsp;/g," ").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/\n/g,""),Z={};D["font-size"]&&(Z.fontSize=parseInt(D["font-size"])/c.value),D.color&&(Z.color=_(D.color).color),D["background-color"]&&(Z.highlight=_(D["background-color"]).color),D["text-decoration-line"]&&(D["text-decoration-line"].indexOf("underline")!==-1&&(Z.underline={color:Z.color||"#000000",style:"sng"}),D["text-decoration-line"].indexOf("line-through")!==-1&&(Z.strike="sngStrike")),D["text-decoration"]&&(D["text-decoration"].indexOf("underline")!==-1&&(Z.underline={color:Z.color||"#000000",style:"sng"}),D["text-decoration"].indexOf("line-through")!==-1&&(Z.strike="sngStrike")),D["vertical-align"]&&(D["vertical-align"]==="super"&&(Z.superscript=!0),D["vertical-align"]==="sub"&&(Z.subscript=!0)),D["text-align"]&&(Z.align=D["text-align"]),D["font-weight"]&&(Z.bold=D["font-weight"]==="bold"),D["font-style"]&&(Z.italic=D["font-style"]==="italic"),D["font-family"]&&(Z.fontFace=D["font-family"]),D.href&&(Z.hyperlink={url:D.href}),P&&D["list-type"]==="ol"&&(Z.bullet={type:"number",indent:(Z.fontSize||l)*1.25},Z.paraSpaceBefore=.1,P=!1),P&&D["list-type"]==="ul"&&(Z.bullet={indent:(Z.fontSize||l)*1.25},Z.paraSpaceBefore=.1,P=!1),k&&(Z.indentLevel=k,k=0),B.push({text:K,options:Z})}else"children"in V&&H(V.children,D)}};return H(C),B},I=(w,C={x:1,y:1})=>w.map(P=>{if(P.close!==void 0)return{close:!0};if(P.type==="M")return{x:P.x/s.value*C.x,y:P.y/s.value*C.y,moveTo:!0};if(P.curve){if(P.curve.type==="cubic")return{x:P.x/s.value*C.x,y:P.y/s.value*C.y,curve:{type:"cubic",x1:P.curve.x1/s.value*C.x,y1:P.curve.y1/s.value*C.y,x2:P.curve.x2/s.value*C.x,y2:P.curve.y2/s.value*C.y}};if(P.curve.type==="quadratic")return{x:P.x/s.value*C.x,y:P.y/s.value*C.y,curve:{type:"quadratic",x1:P.curve.x1/s.value*C.x,y1:P.curve.y1/s.value*C.y}}}return{x:P.x/s.value*C.x,y:P.y/s.value*C.y}}),A=w=>{const C=_(w.color),{h:P,v:k}=w;let B=4,H=45;return P===0&&k===0?(B=4,H=45):P===0?k>0?(B=k,H=90):(B=-k,H=270):k===0?P>0?(B=P,H=1):(B=-P,H=180):P>0&&k>0?(B=Math.max(P,k),H=45):P>0&&k<0?(B=Math.max(P,-k),H=315):P<0&&k>0?(B=Math.max(-P,k),H=135):P<0&&k<0&&(B=Math.max(-P,-k),H=225),{type:"outer",color:C.color.replace("#",""),opacity:C.alpha,blur:w.blur/c.value,offset:B,angle:H}},x={solid:"solid",dashed:"dash",dotted:"sysDot"},N=w=>{const C=_(w?.color||"#000000");return{color:C.color,transparency:(1-C.alpha)*100,width:(w.width||1)/c.value,dashType:w.style?x[w.style]:"solid"}},T=w=>{const{type:C,target:P}=w;if(C==="web")return{url:P};if(C==="slide"){const k=t.value.findIndex(B=>B.id===P);if(k!==-1)return{slide:k+1}}return null},L=w=>{const C=/^data:image\/[^;]+;base64,/;return w.match(C)!==null},b=w=>{const C=/^data:image\/svg\+xml;base64,/.test(w),P=/\.svg$/.test(w);return C||P};return{exporting:u,exportImage:m,exportJSON:E,exportSpecificFile:g,exportPPTX:async(w,C,P)=>{var k,B,H,U,$,V,z,D,Y,K,Z,oe,Q,q;u.value=!0;const re=new k_;if(o.value===.625?re.layout="LAYOUT_16x10":o.value===.75?re.layout="LAYOUT_4x3":o.value===.70710678?(re.defineLayout({name:"A3",width:10,height:7.0710678}),re.layout="A3"):o.value===1.41421356?(re.defineLayout({name:"A3_V",width:10,height:14.1421356}),re.layout="A3_V"):re.layout="LAYOUT_16x9",C){const{color:G,alpha:M}=_(n.value.backgroundColor);re.defineSlideMaster({title:"PPTIST_MASTER",background:{color:G,transparency:(1-M)*100}})}for(const G of w){const M=re.addSlide();if(G.background){const R=G.background;if(R.type==="image"&&R.image)if(b(R.image.src))M.addImage({data:R.image.src,x:0,y:0,w:i.value/s.value,h:i.value*o.value/s.value});else if(L(R.image.src))M.background={data:R.image.src};else{const X=await h(R.image.src);M.background={data:X}}else if(R.type==="solid"&&R.color){const X=_(R.color);M.background={color:X.color,transparency:(1-X.alpha)*100}}else if(R.type==="gradient"&&R.gradient){const X=R.gradient.colors,W=X[0].color,te=X[X.length-1].color,ee=we.mix(W,te).toHexString(),ce=_(ee);M.background={color:ce.color,transparency:(1-ce.alpha)*100}}}if(G.remark){const X=new DOMParser().parseFromString(G.remark,"text/html").body.querySelectorAll("p"),W=[];for(const te of X){const ee=te.textContent;W.push(ee||"")}M.addNotes(W.join(`
18
18
  `))}if(G.elements){for(const R of G.elements)if(R.type==="text"){const X=S(R.content),W={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value,fontSize:l/c.value,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10/c.value,paraSpaceBefore:5/c.value,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(R.rotate&&(W.rotate=R.rotate),R.wordSpace&&(W.charSpacing=R.wordSpace/c.value),R.lineHeight&&(W.lineSpacingMultiple=R.lineHeight/1.25),R.fill){const te=_(R.fill),ee=R.opacity===void 0?1:R.opacity;W.fill={color:te.color,transparency:(1-te.alpha*ee)*100}}R.defaultColor&&(W.color=_(R.defaultColor).color),R.defaultFontName&&(W.fontFace=R.defaultFontName),R.shadow&&(W.shadow=A(R.shadow)),R.outline&&R.outline.width&&R.outline.width>0&&(W.line=N(R.outline)),R.opacity!==void 0&&(W.transparency=(1-R.opacity)*100),R.paragraphSpace!==void 0&&(W.paraSpaceBefore=R.paragraphSpace/c.value),R.vertical&&(W.vert="eaVert"),M.addText(X,W)}else if(R.type==="image"){const X={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value};if(L(R.src)?X.data=R.src:X.data=await h(R.src),R.flipH&&(X.flipH=R.flipH),R.flipV&&(X.flipV=R.flipV),R.rotate&&(X.rotate=R.rotate),R.link){const W=T(R.link);W&&(X.hyperlink=W)}if(!((k=R.filters)===null||k===void 0)&&k.opacity&&(X.transparency=100-parseInt((B=R.filters)===null||B===void 0?void 0:B.opacity)),R.clip){R.clip.shape==="ellipse"&&(X.rounding=!0);const[W,te]=R.clip.range,[ee,ce]=W,[se,F]=te,j=R.width/((se-ee)/s.value),le=R.height/((F-ce)/s.value);X.w=j/s.value,X.h=le/s.value,X.sizing={type:"crop",x:ee/s.value*j/s.value,y:ce/s.value*le/s.value,w:(se-ee)/s.value*j/s.value,h:(F-ce)/s.value*le/s.value}}M.addImage(X)}else if(R.type==="shape"){let X=!1;if(R.special){const W=document.querySelector(`.thumbnail-list .base-element-${R.id} svg`),te=document.querySelector(`.base-element-${R.id} svg`),ee=W||te;if(ee&&ee.clientWidth>0&&ee.clientHeight>0){const se={data:xv(ee),x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value};if(R.rotate&&(se.rotate=R.rotate),R.flipH&&(se.flipH=R.flipH),R.flipV&&(se.flipV=R.flipV),R.fill){const F=_(R.fill),j=R.opacity===void 0?1:R.opacity,le=F.alpha*j;le<1&&(se.transparency=(1-le)*100)}else R.opacity!==void 0&&R.opacity<1&&(se.transparency=(1-R.opacity)*100);if(R.link){const F=T(R.link);F&&(se.hyperlink=F)}M.addImage(se),X=!0}}if(!X){const W={x:R.width/R.viewBox[0],y:R.height/R.viewBox[1]},te=I(Lv(R.path),W);let ee=_(R.fill);if(R.gradient){const F=R.gradient.colors,j=F[0].color,le=F[F.length-1].color,ve=we.mix(j,le).toHexString();ee=_(ve)}R.pattern&&(ee=_("#00000000"));const ce=R.opacity===void 0?1:R.opacity,se={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value,fill:{color:ee.color,transparency:(1-ee.alpha*ce)*100},points:te};if(R.flipH&&(se.flipH=R.flipH),R.flipV&&(se.flipV=R.flipV),R.shadow&&(se.shadow=A(R.shadow)),R.outline&&R.outline.width&&R.outline.width>0&&(se.line=N(R.outline)),R.rotate&&(se.rotate=R.rotate),R.link){const F=T(R.link);F&&(se.hyperlink=F)}M.addShape("custGeom",se)}if(R.text){const W=S(R.text.content),te={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value,fontSize:l/c.value,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5/c.value,valign:R.text.align};R.rotate&&(te.rotate=R.rotate),R.text.defaultColor&&(te.color=_(R.text.defaultColor).color),R.text.defaultFontName&&(te.fontFace=R.text.defaultFontName),M.addText(W,te)}if(R.pattern){const W={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value};if(L(R.pattern)?W.data=R.pattern:W.data=await h(R.pattern),R.flipH&&(W.flipH=R.flipH),R.flipV&&(W.flipV=R.flipV),R.rotate&&(W.rotate=R.rotate),R.link){const te=T(R.link);te&&(W.hyperlink=te)}M.addImage(W)}}else if(R.type==="line"){const X=tp(R),W=I(Lv(X)),{minX:te,maxX:ee,minY:ce,maxY:se}=vn(R),F=_(R.color),j={x:R.left/s.value,y:R.top/s.value,w:(ee-te)/s.value,h:(se-ce)/s.value,line:{color:F.color,transparency:(1-F.alpha)*100,width:R.width/c.value,dashType:x[R.style],beginArrowType:R.points[0]?"arrow":"none",endArrowType:R.points[1]?"arrow":"none"},points:W};R.shadow&&(j.shadow=A(R.shadow)),M.addShape("custGeom",j)}else if(R.type==="chart"){const X=[];for(let F=0;F<R.data.series.length;F++){const j=R.data.series[F];X.push({name:d("CHART.DEFAULT.SERIES",{index:F+1}),labels:R.data.labels,values:j})}let W=[];if(R.themeColors.length===10)W=R.themeColors.map(F=>_(F).color);else if(R.themeColors.length===1)W=we(R.themeColors[0]).analogous(10).map(F=>_(F.toHexString()).color);else{const F=R.themeColors.length,j=we(R.themeColors[F-1]).analogous(11-F).map(le=>le.toHexString());W=[...R.themeColors.slice(0,F-1),...j].map(le=>_(le).color)}const te={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value,chartColors:R.chartType==="pie"||R.chartType==="ring"?W:W.slice(0,R.data.series.length)},ee=_(R.textColor||"#000000").color;te.catAxisLabelColor=ee,te.valAxisLabelColor=ee;const ce=14/c.value;if(te.catAxisLabelFontSize=ce,te.valAxisLabelFontSize=ce,R.fill||R.outline){const F={};R.fill&&(F.fill={color:_(R.fill).color}),R.outline&&(F.border={pt:R.outline.width/c.value,color:_(R.outline.color).color}),te.plotArea=F}(R.data.series.length>1&&R.chartType!=="scatter"||R.chartType==="pie"||R.chartType==="ring")&&(te.showLegend=!0,te.legendPos="b",te.legendColor=ee,te.legendFontSize=ce);let se=re.ChartType.bar;R.chartType==="bar"?(se=re.ChartType.bar,te.barDir="col",!((H=R.options)===null||H===void 0)&&H.stack&&(te.barGrouping="stacked")):R.chartType==="column"?(se=re.ChartType.bar,te.barDir="bar",!((U=R.options)===null||U===void 0)&&U.stack&&(te.barGrouping="stacked")):R.chartType==="line"?(se=re.ChartType.line,!(($=R.options)===null||$===void 0)&&$.lineSmooth&&(te.lineSmooth=!0)):R.chartType==="area"?se=re.ChartType.area:R.chartType==="radar"?se=re.ChartType.radar:R.chartType==="scatter"?(se=re.ChartType.scatter,te.lineSize=0):R.chartType==="pie"?se=re.ChartType.pie:R.chartType==="ring"&&(se=re.ChartType.doughnut,te.holeSize=60),M.addChart(se,X,te)}else if(R.type==="table"){const X=[];for(let F=0;F<R.data.length;F++){const j=R.data[F];for(let le=0;le<j.length;le++){const ve=j[le];if(ve.colspan>1||ve.rowspan>1)for(let he=F;he<F+ve.rowspan;he++)for(let Fe=he===F?le+1:le;Fe<le+ve.colspan;Fe++)X.push(`${he}_${Fe}`)}}const W=[],te=R.theme;let ee=null,ce=[];te&&(ee=_(te.color),ce=H1(te.color).map(F=>_(F)));for(let F=0;F<R.data.length;F++){const j=R.data[F],le=[];for(let ve=0;ve<j.length;ve++){const he=j[ve],Fe={colspan:he.colspan,rowspan:he.rowspan,bold:((V=he.style)===null||V===void 0?void 0:V.bold)||!1,italic:((z=he.style)===null||z===void 0?void 0:z.em)||!1,underline:{style:!((D=he.style)===null||D===void 0)&&D.underline?"sng":"none"},align:((Y=he.style)===null||Y===void 0?void 0:Y.align)||"left",valign:"middle",fontFace:((K=he.style)===null||K===void 0?void 0:K.fontname)||"微软雅黑",fontSize:(!((Z=he.style)===null||Z===void 0)&&Z.fontsize?parseInt((oe=he.style)===null||oe===void 0?void 0:oe.fontsize):14)/c.value};if(te&&ee){let Re;F%2===0?Re=ce[1]:Re=ce[0],(te.rowHeader&&F===0||te.rowFooter&&F===R.data.length-1||te.colHeader&&ve===0||te.colFooter&&ve===j.length-1)&&(Re=ee),Fe.fill={color:Re.color,transparency:(1-Re.alpha)*100}}if(!((Q=he.style)===null||Q===void 0)&&Q.backcolor){const Re=_(he.style.backcolor);Fe.fill={color:Re.color,transparency:(1-Re.alpha)*100}}!((q=he.style)===null||q===void 0)&&q.color&&(Fe.color=_(he.style.color).color),X.includes(`${F}_${ve}`)||le.push({text:he.text,options:Fe})}le.length&&W.push(le)}const se={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value,colW:R.colWidths.map(F=>R.width*F/s.value)};R.theme&&(se.fill={color:"#ffffff"}),R.outline.width&&R.outline.color&&(se.border={type:R.outline.style==="solid"?"solid":"dash",pt:R.outline.width/c.value,color:_(R.outline.color).color}),M.addTable(W,se)}else if(R.type==="latex"){const X=document.querySelector(`.thumbnail-list .base-element-${R.id} svg`),te={data:xv(X),x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value};if(R.link){const ee=T(R.link);ee&&(te.hyperlink=ee)}M.addImage(te)}else if(!P&&(R.type==="video"||R.type==="audio")){const X={x:R.left/s.value,y:R.top/s.value,w:R.width/s.value,h:R.height/s.value,path:R.src,type:R.type};R.type==="video"&&R.poster&&(X.cover=await h(R.poster));const W=R.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);W&&W[1]?X.extn=W[1]:R.ext&&(X.extn=R.ext);const te=["avi","mp4","m4v","mov","wmv"],ee=["mp3","m4a","mp4","wav","wma"];X.extn&&[...te,...ee].includes(X.extn)&&M.addMedia(X)}}}setTimeout(()=>{re.writeFile({fileName:`${a.value}.pptx`}).then(()=>u.value=!1).catch(()=>{u.value=!1,Ae.error(d("EXPORT.FAIL"))})},200)},getSaveJSON:y}},bv=(e,t)=>e.replace(/font-size:\s*([\d.]+)pt/g,(n,o)=>`font-size: ${(parseFloat(o)*t).toFixed(1)}px`),ng=()=>{const e=pe(),{theme:t}=ne.storeToRefs(pe()),{addHistorySnapshot:n}=be(),{addSlidesFromData:o}=gl(),{isEmptySlide:a}=Ho(),{t:i}=_e(),l=r.ref(!1),s=m=>{try{const g=JSON.parse(m),{title:E,width:y,height:_,theme:S,slides:I}=g;E&&e.setTitle(E),y&&e.setViewportSize(y),y&&_&&e.setViewportRatio(_/y),S&&e.setTheme(S),a.value?(e.setSlides(I),n()):o(I)}catch{Ae.error(i("IMPORT.FILE_PARSE_FAIL"))}},c=(m,g=!1)=>{const E=m[0],y=new FileReader;y.addEventListener("load",()=>{try{const{slides:_}=JSON.parse(y.result);g?(e.updateSlideIndex(0),e.setSlides(_),n()):a.value?(e.setSlides(_),n()):o(_)}catch{Ae.error(i("IMPORT.FILE_PARSE_FAIL"))}}),y.readAsText(E)},u=(m,g=!1)=>{const E=m[0],y=new FileReader;y.addEventListener("load",()=>{try{const{slides:_}=JSON.parse(G1(y.result));g?(e.updateSlideIndex(0),e.setSlides(_),n()):a.value?(e.setSlides(_),n()):o(_)}catch{Ae.error(i("IMPORT.FILE_PARSE_FAIL"))}}),y.readAsText(E)},d=(m,g)=>{const{start:E,end:y}=m,_=g*Math.PI/180,S=(E[0]+y[0])/2,I=(E[1]+y[1])/2,A=E[0]-S,x=E[1]-I,N=y[0]-S,T=y[1]-I,L=Math.cos(_),b=Math.sin(_),O=A*L-x*b,w=A*b+x*L,C=N*L-T*b,P=N*b+T*L,k=O+S,B=w+I,H=C+S,U=P+I,$=Math.min(E[0],y[0]),V=Math.min(E[1],y[1]),z=Math.min(k,H),D=Math.min(B,U),Y=k-z,K=B-D,Z=H-z,oe=U-D,Q=[Y,K],q=[Z,oe],re=[z-$,D-V];return{start:Q,end:q,offset:re}},f=(m,g)=>{let E=[0,0],y=[0,0];!m.isFlipV&&!m.isFlipH?(E=[0,0],y=[m.width,m.height]):m.isFlipV&&m.isFlipH?(E=[m.width,m.height],y=[0,0]):m.isFlipV&&!m.isFlipH?(E=[0,m.height],y=[m.width,0]):(E=[m.width,0],y=[0,m.height]);const _={type:"line",id:Ne.nanoid(10),width:+((m.borderWidth||1)*g).toFixed(2),left:m.left,top:m.top,start:E,end:y,style:m.borderType,color:m.borderColor,points:["",/straightConnector/.test(m.shapType)?"arrow":""]};if(m.rotate){const{start:S,end:I,offset:A}=d(_,m.rotate);_.start=S,_.end=I,_.left=_.left+A[0],_.top=_.top+A[1]}if(/bentConnector/.test(m.shapType)&&(_.broken2=[Math.abs(_.start[0]-_.end[0])/2,Math.abs(_.start[1]-_.end[1])/2]),/curvedConnector/.test(m.shapType)){const S=[Math.abs(_.start[0]-_.end[0])/2,Math.abs(_.start[1]-_.end[1])/2];_.cubic=[S,S]}return _},v=(m,g)=>{const E=Math.min(...m.map(x=>x.left)),y=Math.max(...m.map(x=>x.left+x.width)),_=Math.min(...m.map(x=>x.top)),S=Math.max(...m.map(x=>x.top+x.height)),I=(E+y)/2,A=(_+S)/2;return m.map(x=>{const N={...x};return g==="y"&&(N.left=2*I-x.left-x.width),g==="x"&&(N.top=2*A-x.top-x.height),N})},p=(m,g,E,y,_,S,I)=>{const A=I*(Math.PI/180),x=m+E/2,N=g+y/2,T=_-E/2,L=S-y/2,b=T*Math.cos(A)+L*Math.sin(A),O=-T*Math.sin(A)+L*Math.cos(A),w=x+b,C=N+O;return{x:w,y:C}};return{importSpecificFile:u,importJSON:c,importPPTXFile:(m,g)=>{const E={cover:!1,fixedViewport:!1},{cover:y,fixedViewport:_}={...E,...g},S=m[0];if(!S)return;l.value=!0;const I=[];for(const x of op)I.push(...x.children);const A=new FileReader;A.onload=async x=>{let N=null;try{N=await P_.parse(x.target.result)}catch{l.value=!1,Ae.error(i("IMPORT.FILE_PARSE_FAIL"));return}let T=96/72;const L=N.size.width;_?T=1e3/L:e.setViewportSize(L*T),e.setTheme({themeColors:N.themeColors});const b=[];for(const O of N.slides){const{type:w,value:C}=O.fill;let P;w==="image"?P={type:"image",image:{src:C.picBase64,size:"cover"}}:w==="gradient"?P={type:"gradient",gradient:{type:C.path==="line"?"linear":"radial",colors:C.colors.map(H=>({...H,pos:parseInt(H.pos)})),rotate:C.rot+90}}:P={type:"solid",color:C||"#fff"};const k={id:Ne.nanoid(10),elements:[],background:P,remark:O.note||""},B=H=>{var U,$,V;const z=H.sort((D,Y)=>D.order-Y.order);for(const D of z){const Y=D.width||1,K=D.height||1,Z=D.left,oe=D.top;if(D.width=D.width*T,D.height=D.height*T,D.left=D.left*T,D.top=D.top*T,D.type==="text"){const Q={type:"text",id:Ne.nanoid(10),width:D.width,height:D.height,left:D.left,top:D.top,rotate:D.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:bv(D.content,T),lineHeight:1,outline:{color:D.borderColor,width:+(D.borderWidth*T).toFixed(2),style:D.borderType},fill:D.fill.type==="color"?D.fill.value:"",vertical:D.isVertical};D.shadow&&(Q.shadow={h:D.shadow.h*T,v:D.shadow.v*T,blur:D.shadow.blur*T,color:D.shadow.color}),k.elements.push(Q)}else if(D.type==="image"){const Q={type:"image",id:Ne.nanoid(10),src:D.src,width:D.width,height:D.height,left:D.left,top:D.top,fixedRatio:!0,rotate:D.rotate,flipH:D.isFlipH,flipV:D.isFlipV};D.borderWidth&&(Q.outline={color:D.borderColor,width:+(D.borderWidth*T).toFixed(2),style:D.borderType});const q=["roundRect","ellipse","triangle","rhombus","pentagon","hexagon","heptagon","octagon","parallelogram","trapezoid"];D.rect?Q.clip={shape:D.geom&&q.includes(D.geom)?D.geom:"rect",range:[[D.rect.l||0,D.rect.t||0],[100-(D.rect.r||0),100-(D.rect.b||0)]]}:D.geom&&q.includes(D.geom)&&(Q.clip={shape:D.geom,range:[[0,0],[100,100]]}),k.elements.push(Q)}else if(D.type==="math")k.elements.push({type:"image",id:Ne.nanoid(10),src:D.picBase64,width:D.width,height:D.height,left:D.left,top:D.top,fixedRatio:!0,rotate:0});else if(D.type==="audio")k.elements.push({type:"audio",id:Ne.nanoid(10),src:D.blob,width:D.width,height:D.height,left:D.left,top:D.top,rotate:0,fixedRatio:!1,color:t.value.themeColors[0],loop:!1,autoplay:!1});else if(D.type==="video")k.elements.push({type:"video",id:Ne.nanoid(10),src:D.blob||D.src,width:D.width,height:D.height,left:D.left,top:D.top,rotate:0,autoplay:!1});else if(D.type==="shape")if(D.shapType==="line"||/Connector/.test(D.shapType)){const Q=f(D,T);k.elements.push(Q)}else{const Q=I.find(X=>X.pptxShapeType===D.shapType),q={mid:"middle",down:"bottom",up:"top"},re=((U=D.fill)===null||U===void 0?void 0:U.type)==="gradient"?{type:D.fill.value.path==="line"?"linear":"radial",colors:D.fill.value.colors.map(X=>({...X,pos:parseInt(X.pos)})),rotate:D.fill.value.rot}:void 0,G=(($=D.fill)===null||$===void 0?void 0:$.type)==="image"?D.fill.value.picBase64:void 0,M=((V=D.fill)===null||V===void 0?void 0:V.type)==="color"?D.fill.value:"",R={type:"shape",id:Ne.nanoid(10),width:D.width,height:D.height,left:D.left,top:D.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:M,gradient:re,pattern:G,fixedRatio:!1,rotate:D.rotate,outline:{color:D.borderColor,width:+(D.borderWidth*T).toFixed(2),style:D.borderType},text:{content:bv(D.content,T),defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:q[D.vAlign]||"middle"},flipH:D.isFlipH,flipV:D.isFlipV};if(D.shadow&&(R.shadow={h:D.shadow.h*T,v:D.shadow.v*T,blur:D.shadow.blur*T,color:D.shadow.color}),Q){if(R.path=Q.path,R.viewBox=Q.viewBox,Q.pathFormula){R.pathFormula=Q.pathFormula,R.viewBox=[D.width,D.height];const X=$o[Q.pathFormula];"editable"in X&&X.editable?(R.path=X.formula(D.width,D.height,X.defaultValue),R.keypoints=X.defaultValue):R.path=X.formula(D.width,D.height)}}else if(D.path&&D.path.indexOf("NaN")===-1){const{maxX:X,maxY:W}=Cv(D.path);R.path=D.path,X/W>Y/K?R.viewBox=[X,X*K/Y]:R.viewBox=[W*Y/K,W]}if(D.shapType==="custom"){D.path.indexOf("NaN")!==-1?(R.width===0&&(R.width=.1),R.height===0&&(R.height=.1),R.path=D.path.replace(/NaN/g,"0")):(R.special=!0,R.path=D.path);const{maxX:X,maxY:W}=Cv(R.path);X/W>Y/K?R.viewBox=[X,X*K/Y]:R.viewBox=[W*Y/K,W]}R.path&&k.elements.push(R)}else if(D.type==="table"){const Q=D.data.length,q=D.data[0].length,re={fontname:t.value.fontName,color:t.value.fontColor},G=[];for(let se=0;se<Q;se++){const F=[];for(let j=0;j<q;j++){const le=D.data[se][j];let ve=document.createElement("div");ve.innerHTML=le.text;const he=ve.querySelector("p"),Fe=he?.style.textAlign||"left",Re=ve.querySelector("span"),ur=Re?.style.fontSize?(parseInt(Re?.style.fontSize)*T).toFixed(1)+"px":"",dr=Re?.style.fontFamily||"",fr=Re?.style.color||le.fontColor;F.push({id:Ne.nanoid(10),colspan:le.colSpan||1,rowspan:le.rowSpan||1,text:ve.innerText,style:{...re,align:["left","right","center"].includes(Fe)?Fe:"left",fontsize:ur,fontname:dr,color:fr,bold:le.fontBold,backcolor:le.fillColor}}),ve=null}G.push(F)}const M=D.colWidths.reduce((se,F)=>se+F,0),R=D.colWidths.map(se=>se/M),X=D.data[0][0],W=X.borders.top||X.borders.bottom||D.borders.top||D.borders.bottom||X.borders.left||X.borders.right||D.borders.left||D.borders.right,te=W?.borderWidth||0,ee=W?.borderType||"solid",ce=W?.borderColor||"#eeece1";k.elements.push({type:"table",id:Ne.nanoid(10),width:D.width,height:D.height,left:D.left,top:D.top,colWidths:R,rotate:0,data:G,outline:{width:+(te*T||2).toFixed(2),style:ee,color:ce},cellMinHeight:D.rowHeights[0]?D.rowHeights[0]*T:36})}else if(D.type==="chart"){let Q,q,re;if(D.chartType==="scatterChart"||D.chartType==="bubbleChart")Q=D.data[0].map((R,X)=>i("CHART.DEFAULT.COORD",{index:X+1})),q=["X","Y"],re=D.data;else{const R=D.data;Q=Object.values(R[0].xlabels),q=R.map(X=>X.key),re=R.map(X=>X.values.map(W=>W.y))}const G={};let M="bar";switch(D.chartType){case"barChart":case"bar3DChart":M="bar",D.barDir==="bar"&&(M="column"),(D.grouping==="stacked"||D.grouping==="percentStacked")&&(G.stack=!0);break;case"lineChart":case"line3DChart":(D.grouping==="stacked"||D.grouping==="percentStacked")&&(G.stack=!0),M="line";break;case"areaChart":case"area3DChart":(D.grouping==="stacked"||D.grouping==="percentStacked")&&(G.stack=!0),M="area";break;case"scatterChart":case"bubbleChart":M="scatter";break;case"pieChart":case"pie3DChart":M="pie";break;case"radarChart":M="radar";break;case"doughnutChart":M="ring";break}k.elements.push({type:"chart",id:Ne.nanoid(10),chartType:M,width:D.width,height:D.height,left:D.left,top:D.top,rotate:0,themeColors:D.colors.length?D.colors:t.value.themeColors,textColor:t.value.fontColor,data:{labels:Q,legends:q,series:re},options:G})}else if(D.type==="group"){let Q=D.elements.map(q=>{let re=q.left+Z,G=q.top+oe;if(D.rotate){const{x:R,y:X}=p(Z,oe,Y,K,q.left,q.top,D.rotate);re=R,G=X}const M={...q,left:re,top:G};return D.isFlipH&&"isFlipH"in M&&(M.isFlipH=!0),D.isFlipV&&"isFlipV"in M&&(M.isFlipV=!0),M});D.isFlipH&&(Q=v(Q,"y")),D.isFlipV&&(Q=v(Q,"x")),B(Q)}else if(D.type==="diagram"){const Q=D.elements.map(q=>({...q,left:q.left+Z,top:q.top+oe}));B(Q)}}};B([...O.elements,...O.layoutElements]),b.push(k)}y?(e.updateSlideIndex(0),e.setSlides(b),n()):a.value?(e.setSlides(b),n()):o(b),l.value=!1},A.readAsArrayBuffer(S)},importJSONStr:s,importing:l}},pS={class:"hotkey-doc"},vS={class:"title"},hS={class:"label"},mS={class:"value"},gS={key:1,class:"row"},ES={__name:"HotkeyDoc",setup(e){const{t}=_e();return(n,o)=>(r.openBlock(),r.createElementBlock("div",pS,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wT),a=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:a.type},[r.createElementVNode("div",vS,r.toDisplayString(r.unref(t)(a.typeKey||a.type)),1),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.children,i=>(r.openBlock(),r.createElementBlock("div",{class:"hotkey-item",key:i.label},[i.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",hS,r.toDisplayString(r.unref(t)(i.labelKey||i.label)),1),r.createElementVNode("div",mS,r.toDisplayString(i.valueKey?r.unref(t)(i.valueKey):i.value),1)],64)):(r.openBlock(),r.createElementBlock("div",gS,r.toDisplayString(r.unref(t)(i.labelKey||i.label)),1))]))),128))],64))),128))]))}},yS=ie(ES,[["__scopeId","data-v-7c2a5dcd"]]),_S=["accept"],TS={__name:"FileInput",props:{accept:{type:String,default:"image/*"}},emits:["change"],setup(e,{emit:t}){const n=t,o=r.useTemplateRef("inputRef"),a=()=>{o.value&&(o.value.value="",o.value.click())},i=l=>{const s=l.target.files;s&&n("change",s)};return(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"file-input",onClick:s[2]||(s[2]=c=>a())},[r.renderSlot(l.$slots,"default",{},void 0,!0),r.createElementVNode("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:o,accept:e.accept,onChange:s[0]||(s[0]=c=>i(c)),onClick:s[1]||(s[1]=r.withModifiers(()=>{},["stop"]))},null,40,_S)]))}},El=ie(TS,[["__scopeId","data-v-be6752db"]]),SS={class:"spin"},IS={class:"text"},AS={__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},tip:{type:String,default:""}},setup(e){return(t,n)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[e.loading?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fullscreen-spin",{mask:e.mask}])},[r.createElementVNode("div",SS,[n[0]||(n[0]=r.createElementVNode("div",{class:"spinner"},null,-1)),r.createElementVNode("div",IS,r.toDisplayString(e.tip),1)])],2)):r.createCommentVNode("",!0)]))}},Vi=ie(AS,[["__scopeId","data-v-46d1f3dd"]]),NS={class:"header"},LS={__name:"Drawer",props:{visible:{type:Boolean,required:!0},width:{type:Number,default:320},contentStyle:{type:Object},placement:{type:String,default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(!1),i=r.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));return(l,s)=>{const c=r.resolveComponent("AiPptClose");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=u=>a.value=!1),onBeforeEnter:s[2]||(s[2]=u=>a.value=!0)},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",{class:r.normalizeClass(["drawer",e.placement]),style:r.normalizeStyle({width:n.width+"px"})},[r.createElementVNode("div",NS,[r.renderSlot(l.$slots,"title",{},void 0,!0),r.createElementVNode("span",{class:"close-btn",onClick:s[0]||(s[0]=u=>o("update:visible",!1))},[r.createVNode(c)])]),a.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"content",style:r.normalizeStyle(i.value)},[r.renderSlot(l.$slots,"default",{},void 0,!0)],4)):r.createCommentVNode("",!0)],6),[[r.vShow,e.visible]])]),_:3},8,["name"])])}}},wv=ie(LS,[["__scopeId","data-v-26d3fa48"]]),CS={class:"prefix"},xS=["disabled","value","placeholder","maxlength"],bS={class:"suffix"},wS={__name:"Input",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},simple:{type:Boolean,default:!1},maxlength:{type:Number}},emits:["update:value","change","enter","backspace","blur","focus"],setup(e,{expose:t,emit:n}){const o=n,a=r.ref(!1),i=d=>{o("update:value",d.target.value)},l=d=>{a.value=!1,o("blur",d)},s=d=>{a.value=!0,o("focus",d)},c=r.useTemplateRef("inputRef");return t({focus:()=>{c.value&&c.value.focus()}}),(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["input",{disabled:e.disabled,focused:a.value,simple:e.simple}])},[r.createElementVNode("span",CS,[r.renderSlot(d.$slots,"prefix",{},void 0,!0)]),r.createElementVNode("input",{type:"text",ref_key:"inputRef",ref:c,disabled:e.disabled,value:e.value,placeholder:e.placeholder,maxlength:e.maxlength,onInput:f[0]||(f[0]=v=>i(v)),onFocus:f[1]||(f[1]=v=>s(v)),onBlur:f[2]||(f[2]=v=>l(v)),onChange:f[3]||(f[3]=v=>o("change",v)),onKeydown:[f[4]||(f[4]=r.withKeys(v=>o("enter",v),["enter"])),f[5]||(f[5]=r.withKeys(v=>o("backspace",v),["backspace"]))]},null,40,xS),r.createElementVNode("span",bS,[r.renderSlot(d.$slots,"suffix",{},void 0,!0)])],2))}},Pr=ie(wS,[["__scopeId","data-v-73bb1a5b"]]),OS={__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{type:String,default:"click"},placement:{type:[String,Object],default:"bottom"},appendTo:{type:Object},contentStyle:{type:Object},center:{type:Boolean,default:!1},offset:{type:Number,default:8}},emits:["update:value","show","hide"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(),i=r.ref(!1),l=r.useTemplateRef("triggerRef"),s=r.useTemplateRef("contentRef"),c=r.computed(()=>n.contentStyle||{});return r.watch(()=>n.value,()=>{a.value&&(n.value?a.value.show():a.value.hide())}),r.onUnmounted(()=>{a.value&&a.value.destroy()}),r.onMounted(()=>{a.value=Zf(l.value,{content:s.value,allowHTML:!0,trigger:n.trigger,placement:n.placement,interactive:!0,appendTo:n.appendTo||document.body,maxWidth:"none",offset:[0,n.offset],duration:200,animation:"scale",theme:"popover",onShow(){i.value=!0},onShown(){n.value||(o("update:value",!0),o("show"))},onHidden(){n.value&&(o("update:value",!1),o("hide")),i.value=!1}})}),(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["popover",{center:e.center}]),ref_key:"triggerRef",ref:l},[r.createElementVNode("div",{class:"popover-content",style:r.normalizeStyle(c.value),ref_key:"contentRef",ref:s},[i.value?r.renderSlot(u.$slots,"content",{key:0},void 0,!0):r.createCommentVNode("",!0)],4),r.renderSlot(u.$slots,"default",{},void 0,!0)],2))}},Se=ie(OS,[["__scopeId","data-v-6e0b2f9b"]]),RS={__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["popover-menu-item",{center:e.center}]),onClick:a[0]||(a[0]=i=>n("click"))},[r.renderSlot(o.$slots,"default",{},void 0,!0)],2))}},dt=ie(RS,[["__scopeId","data-v-ef7ddc1a"]]),kS={__name:"Divider",props:{type:{type:String,default:"horizontal"},margin:{type:Number,default:-1}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["divider",e.type]),style:r.normalizeStyle({margin:e.type==="horizontal"?`${e.margin>=0?e.margin:24}px 0`:`0 ${e.margin>=0?e.margin:8}px`})},null,6))}},Oe=ie(kS,[["__scopeId","data-v-139823cc"]]),DS={class:"editor-header"},PS={class:"left"},MS={class:"menu-item"},BS={class:"title"},VS=["title"],$S={class:"right"},FS={class:"group-menu-item"},HS={class:"arrow-btn"},US={class:"aippt-form"},GS={class:"tips"},zS={class:"field"},YS={class:"label"},XS=["placeholder"],WS={class:"btns"},KS={style:{"margin-left":"6px"}},qS={__name:"index",setup(e){const t=r.getCurrentInstance();t&&t.proxy&&t.proxy.$router;const n=fe(),o=pe(),{title:a}=ne.storeToRefs(o),{t:i}=_e(),{enterScreening:l,enterScreeningFromStart:s}=hc(),{importing:c}=ng(),{resetSlides:u}=Ho(),{AIPPTGenerator:d}=Z1(),{addHistorySnapshot:f}=be(),v=r.ref(!1),p=r.ref(!1),h=r.ref(!1),m=r.ref(""),g=r.useTemplateRef("titleInputRef"),E=r.useTemplateRef("tmplPicker"),y=r.ref(!1),_=r.ref(""),S=r.ref(null),I=r.ref(""),A=r.ref(!1),x=U=>{U.length!==0&&(n.setActiveElementIdList([]),o.setSlides(U),o.updateSlideIndex(0),f())},N=()=>{m.value=a.value,h.value=!0,r.nextTick(()=>{var U;return(U=g.value)===null||U===void 0?void 0:U.focus()})},T=()=>{o.setTitle(m.value),h.value=!1},{exportPPTX:L,exporting:b}=Ha(),O=U=>{const{slides:$}=ne.storeToRefs(pe());L($.value,!0,!0)},w=()=>{n.setMarkupPanelState(!0)},C=async U=>{var $;const V=U.target,z=($=V.files)===null||$===void 0?void 0:$[0];if(z)try{I.value=z.name;const D=await z.text();S.value=JSON.parse(D),_.value="",y.value=!0,Ae.success(i("HEADER_BAR.TEMPLATE_LOADED"))}catch(D){console.error(D),Ae.error(i("HEADER_BAR.TEMPLATE_LOAD_FAIL"))}finally{V.value=""}},P=U=>{const $=new Set,V=z=>{if(z){if(Array.isArray(z))return z.forEach(V);if(typeof z=="object"){typeof z.type=="string"&&$.add(z.type);for(const D in z)V(z[D])}}};return V(U),Array.isArray(U?.slides)&&U.slides.forEach(z=>typeof z?.type=="string"&&$.add(z.type)),Array.from($)},k=U=>{const $=[];return U.cover&&$.push({type:"cover",data:{title:U.cover.title||"",text:U.cover.text||""}}),Array.isArray(U.contents)&&U.contents[0]&&$.push({type:"contents",data:{items:U.contents[0].content||[]}}),Array.isArray(U.content)&&U.content.forEach(V=>{V?.title&&$.push({type:"transition",data:{title:V.title,text:""}}),Array.isArray(V?.content)&&V.content.length&&$.push({type:"content",data:{title:V.title||"",items:V.content.map(z=>({title:typeof z=="string"?z:z.title||"",text:typeof z=="string"?"":z.text||z.content||""}))}})}),Array.isArray(U.end)&&U.end.length>0&&$.push({type:"end"}),$},B=(U,$)=>{const V=D=>$.includes(D),z={};return!V("toc")&&V("catalog")&&(z.toc="catalog"),!V("section")&&V("title")&&(z.section="title"),!V("bullets")&&V("list")&&(z.bullets="list"),!V("end")&&V("thankyou")&&(z.end="thankyou"),U.map(D=>({...D,type:z[D.type]||D.type}))},H=()=>{if(!S.value)return Ae.error(i("HEADER_BAR.NEED_TEMPLATE_FILE"));let U;try{U=JSON.parse(_.value||"{}")}catch{return Ae.error(i("HEADER_BAR.AIPPT_PARSE_FAIL"))}try{A.value=!0;const $=S.value,V=Array.isArray($?.slides)?$.slides:[],z=$?.theme;if(!V.length)throw new Error(i("HEADER_BAR.TEMPLATE_SLIDES_MISSING"));z&&typeof o.setTheme=="function"&&o.setTheme(z);const D=P($);let Y;Array.isArray(U)?(Y=U,console.log("使用数组格式的 AIPPT 数据:",Y)):(Y=k(U),console.log("转换对象格式的 AIPPT 数据:",Y));const K=B(Y,D),Z=Array.from(new Set(K.map(q=>q.type).filter(q=>!D.includes(q))));if(Z.length)throw new Error(i("HEADER_BAR.AIPPT_UNKNOWN_TYPES",{unknown:Z.join("、"),supported:D.join("、")||i("HEADER_BAR.AIPPT_UNKNOWN_TYPES_EMPTY")}));const oe=d(V,K),Q=[];for(const q of oe)Q.push(q);console.log("Generated slides:",Q),console.log("First slide structure:",Q[0]),x(Q),y.value=!1,Ae.success(i("HEADER_BAR.RENDER_SUCCESS"))}catch($){console.error($),Ae.error(i("HEADER_BAR.RENDER_FAIL",{reason:$?.message||i("HEADER_BAR.RENDER_FAIL_FALLBACK")}))}finally{A.value=!1}};return(U,$)=>{const V=r.resolveComponent("AiPptDownload"),z=r.resolveComponent("AiPptRefresh"),D=r.resolveComponent("AiPptMark"),Y=r.resolveComponent("AiPptCommand"),K=r.resolveComponent("AiPptHamburgerButton"),Z=r.resolveComponent("AiPptPpt"),oe=r.resolveComponent("AiPptSlideTwo"),Q=r.resolveComponent("AiPptDown"),q=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",DS,[r.createElementVNode("div",PS,[r.createVNode(Se,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":$[4]||($[4]=re=>v.value=re)},{content:r.withCtx(()=>[r.createVNode(dt,{class:"popover-menu-item",onClick:$[0]||($[0]=re=>O())},{default:r.withCtx(()=>[r.createVNode(V,{class:"icon"}),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("HEADER_BAR.EXPORT_FILE")),1)]),_:1}),r.createVNode(Oe,{margin:10}),r.createVNode(dt,{class:"popover-menu-item",onClick:$[1]||($[1]=()=>{r.unref(u)(),v.value=!1})},{default:r.withCtx(()=>[r.createVNode(z,{class:"icon"}),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("HEADER_BAR.RESET_SLIDES")),1)]),_:1}),r.createVNode(dt,{class:"popover-menu-item",onClick:$[2]||($[2]=()=>{w(),v.value=!1})},{default:r.withCtx(()=>[r.createVNode(D,{class:"icon"}),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("HEADER_BAR.MARKUP")),1)]),_:1}),r.createVNode(dt,{class:"popover-menu-item",onClick:$[3]||($[3]=()=>{v.value=!1,p.value=!0})},{default:r.withCtx(()=>[r.createVNode(Y,{class:"icon"}),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("HEADER_BAR.HOTKEY")),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",MS,[r.createVNode(K,{class:"icon"})])]),_:1},8,["value"]),r.createElementVNode("div",BS,[h.value?(r.openBlock(),r.createBlock(Pr,{key:0,class:"title-input",ref_key:"titleInputRef",ref:g,value:m.value,"onUpdate:value":$[5]||($[5]=re=>m.value=re),onBlur:$[6]||($[6]=re=>T())},null,8,["value"])):(r.openBlock(),r.createElementBlock("div",{key:1,class:"title-text",onClick:$[7]||($[7]=re=>N()),title:r.unref(a)},r.toDisplayString(r.unref(a)),9,VS))])]),r.createElementVNode("div",$S,[r.createElementVNode("div",FS,[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"menu-item",onClick:$[8]||($[8]=re=>r.unref(l)())},[r.createVNode(Z,{class:"icon"})])),[[q,r.unref(i)("HEADER_BAR.SLIDE_SHOW_TOOLTIP")]]),r.createVNode(Se,{trigger:"click",center:""},{content:r.withCtx(()=>[r.createVNode(dt,{class:"popover-menu-item",onClick:$[9]||($[9]=re=>r.unref(s)())},{default:r.withCtx(()=>[r.createVNode(oe,{class:"icon"}),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("HEADER_BAR.SLIDE_SHOW_FROM_START")),1)]),_:1}),r.createVNode(dt,{class:"popover-menu-item",onClick:$[10]||($[10]=re=>r.unref(l)())},{default:r.withCtx(()=>[r.createVNode(Z,{class:"icon"}),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("HEADER_BAR.SLIDE_SHOW_FROM_CURRENT")),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",HS,[r.createVNode(Q,{class:"arrow"})])]),_:1})]),r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"menu-item",onClick:$[11]||($[11]=re=>O())},[r.createVNode(V,{class:"icon"})])),[[q,r.unref(i)("HEADER_BAR.EXPORT_TOOLTIP")]])]),r.createVNode(wv,{width:320,visible:p.value,"onUpdate:visible":$[12]||($[12]=re=>p.value=re),placement:"right"},{title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)("HEADER_BAR.HOTKEY_TITLE")),1)]),default:r.withCtx(()=>[r.createVNode(yS)]),_:1},8,["visible"]),r.createElementVNode("input",{ref_key:"tmplPicker",ref:E,type:"file",accept:".json,.pptist",style:{display:"none"},onChange:C},null,544),r.createVNode(wv,{width:560,visible:y.value,"onUpdate:visible":$[14]||($[14]=re=>y.value=re),placement:"right"},{title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)("HEADER_BAR.AIPPT_DRAWER_TITLE")),1)]),default:r.withCtx(()=>[r.createElementVNode("div",US,[r.createElementVNode("div",GS,[r.createTextVNode(r.toDisplayString(r.unref(i)("HEADER_BAR.TEMPLATE_SELECTED"))+":",1),r.createElementVNode("strong",null,r.toDisplayString(I.value||r.unref(i)("HEADER_BAR.TEMPLATE_NOT_SELECTED")),1)]),r.createElementVNode("div",zS,[r.createElementVNode("div",YS,r.toDisplayString(r.unref(i)("HEADER_BAR.AIPPT_JSON_LABEL")),1),r.withDirectives(r.createElementVNode("textarea",{"onUpdate:modelValue":$[13]||($[13]=re=>_.value=re),class:"aippt-textarea",placeholder:r.unref(i)("HEADER_BAR.AIPPT_JSON_PLACEHOLDER")},null,8,XS),[[r.vModelText,_.value]])]),r.createElementVNode("div",WS,[r.createElementVNode("div",{class:"menu-item",onClick:H},[r.createVNode(Z,{class:"icon"}),r.createElementVNode("span",KS,r.toDisplayString(r.unref(i)("HEADER_BAR.RENDER_AND_LOAD")),1)])])])]),_:1},8,["visible"]),r.createVNode(Vi,{loading:r.unref(c),tip:r.unref(i)("HEADER_BAR.IMPORTING")},null,8,["loading","tip"]),r.createVNode(Vi,{loading:r.unref(b),tip:r.unref(i)("EXPORT.EXPORTING")},null,8,["loading","tip"]),r.createVNode(Vi,{loading:A.value,tip:r.unref(i)("HEADER_BAR.RENDERING_AIPPT")},null,8,["loading","tip"])])}}},ZS=ie(qS,[["__scopeId","data-v-95c60ee7"]]),rg=Symbol(),og=Symbol(),jS=()=>{const e=window.getSelection();e&&e.removeAllRanges()},JS=e=>{const t=r.ref(0),n=r.ref(0),o=fe(),{canvasPercentage:a,canvasDragged:i}=ne.storeToRefs(o),{viewportRatio:l,viewportSize:s}=ne.storeToRefs(pe()),c=()=>{if(!e.value)return;const p=e.value.clientWidth,h=e.value.clientHeight;if(h/p>l.value){const m=p*(a.value/100);o.setCanvasScale(m/s.value),t.value=(p-m)/2,n.value=(h-m*l.value)/2}else{const m=h*(a.value/100);o.setCanvasScale(m/(s.value*l.value)),t.value=(p-m/l.value)/2,n.value=(h-m)/2}},u=(p,h)=>{if(!e.value)return;const m=e.value.clientWidth,g=e.value.clientHeight;if(g/m>l.value){const E=m*(p/100),y=m*(h/100),_=E*l.value,S=y*l.value;o.setCanvasScale(E/s.value),t.value=t.value-(E-y)/2,n.value=n.value-(_-S)/2}else{const E=g*(p/100),y=g*(h/100),_=E/l.value,S=y/l.value;o.setCanvasScale(E/(s.value*l.value)),t.value=t.value-(_-S)/2,n.value=n.value-(E-y)/2}};r.watch(a,u),r.watch(l,c),r.watch(s,c),r.watch(i,()=>{i.value||c()});const d=r.computed(()=>({width:s.value,height:s.value*l.value,left:t.value,top:n.value})),f=new ResizeObserver(c);return r.onMounted(()=>{e.value&&f.observe(e.value)}),r.onUnmounted(()=>{e.value&&f.unobserve(e.value)}),{viewportStyles:d,dragViewport:p=>{let h=!0;const m=p.pageX,g=p.pageY,E=t.value,y=n.value;document.onmousemove=_=>{if(!h)return;const S=_.pageX,I=_.pageY;t.value=E+(S-m),n.value=y+(I-g)},document.onmouseup=()=>{h=!1,document.onmousemove=null,document.onmouseup=null,o.setCanvasDragged(!0)}}}},QS=(e,t)=>{const n=fe(),{canvasScale:o,hiddenElementIdList:a}=ne.storeToRefs(n),{ctrlOrShiftKeyActive:i}=ne.storeToRefs(ln()),l=r.ref(!1),s=r.ref(1),c=r.ref({top:0,left:0,width:0,height:0});return{mouseSelection:c,mouseSelectionVisible:l,mouseSelectionQuadrant:s,updateMouseSelection:d=>{if(!t.value)return;let f=!0;const v=t.value.getBoundingClientRect(),p=5,h=d.pageX,m=d.pageY,g=(h-v.x)/o.value,E=(m-v.y)/o.value;c.value={top:E,left:g,width:0,height:0},l.value=!1,s.value=4,document.onmousemove=y=>{if(!f)return;const _=y.pageX,S=y.pageY,I=(_-h)/o.value,A=(S-m)/o.value,x=Math.abs(I),N=Math.abs(A);if(x<p||N<p)return;let T=0;I>0&&A>0?T=4:I<0&&A<0?T=2:I>0&&A<0?T=1:I<0&&A>0&&(T=3),c.value={...c.value,width:x,height:N},l.value=!0,s.value=T},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,f=!1;let y=[];for(let S=0;S<e.value.length;S++){const I=e.value[S],A=c.value.left,x=c.value.top,N=c.value.width,T=c.value.height,{minX:L,maxX:b,minY:O,maxY:w}=vn(I);let C=!1;i.value?s.value===4?C=b>A&&L<A+N&&w>x&&O<x+T:s.value===2?C=b>A-N&&L<A-N+N&&w>x-T&&O<x-T+T:s.value===1?C=b>A&&L<A+N&&w>x-T&&O<x-T+T:s.value===3&&(C=b>A-N&&L<A-N+N&&w>x&&O<x+T):s.value===4?C=L>A&&b<A+N&&O>x&&w<x+T:s.value===2?C=L>A-N&&b<A-N+N&&O>x-T&&w<x-T+T:s.value===1?C=L>A&&b<A+N&&O>x-T&&w<x-T+T:s.value===3&&(C=L>A-N&&b<A-N+N&&O>x&&w<x+T),C&&!I.lock&&!a.value.includes(I.id)&&y.push(I)}y=y.filter(S=>{if(S.groupId){const I=y.map(x=>x.id);return e.value.filter(x=>x.groupId===S.groupId).every(x=>I.includes(x.id))}return!0});const _=y.map(S=>S.id);n.setActiveElementIdList(_),l.value=!1}}}},eI=e=>{const{disableHotkeys:t}=ne.storeToRefs(fe()),{createImageElement:n,createTextElement:o}=Fo(),a=i=>{if(!i.dataTransfer||i.dataTransfer.items.length===0)return;const l=i.dataTransfer.items,s=l[0];let c=!1;for(const u of l)if(u.kind==="file"&&u.type.indexOf("image")!==-1){const d=u.getAsFile();d&&Xr(d).then(f=>n(f)),c=!0}c||s.kind==="string"&&s.type==="text/plain"&&s.getAsString(u=>{if(t.value)return;const d=$d(u);o({left:0,top:0,width:600,height:50},{content:d})})};r.onMounted(()=>{e.value&&e.value.addEventListener("drop",a),document.ondragleave=i=>i.preventDefault(),document.ondrop=i=>i.preventDefault(),document.ondragenter=i=>i.preventDefault(),document.ondragover=i=>i.preventDefault()}),r.onUnmounted(()=>{e.value&&e.value.removeEventListener("drop",a),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null})},tI=(e,t)=>{const n=Math.atan2(e,t);return 180/Math.PI*n},nI=(e,t,n)=>{const o=pe(),{addHistorySnapshot:a}=be();return{rotateElement:(l,s)=>{const c=!(l instanceof MouseEvent);if(c&&(!l.changedTouches||!l.changedTouches[0]))return;let u=!0,d=0;const f=s.rotate||0,v=s.left,p=s.top,h=s.width,m=s.height,g=v+h/2,E=p+m/2;if(!t.value)return;const y=t.value.getBoundingClientRect(),_=I=>{if(!u)return;const A=I instanceof MouseEvent?I.pageX:I.changedTouches[0].pageX,x=I instanceof MouseEvent?I.pageY:I.changedTouches[0].pageY,N=(A-y.left)/n.value,T=(x-y.top)/n.value,L=N-g,b=E-T;d=tI(L,b);const O=5;Math.abs(d)<=O?d=0:d>0&&Math.abs(d-45)<=O?d-=d-45:d<0&&Math.abs(d+45)<=O?d-=d+45:d>0&&Math.abs(d-90)<=O?d-=d-90:d<0&&Math.abs(d+90)<=O?d-=d+90:d>0&&Math.abs(d-135)<=O?d-=d-135:d<0&&Math.abs(d+135)<=O?d-=d+135:d>0&&Math.abs(d-180)<=O?d-=d-180:d<0&&Math.abs(d+180)<=O&&(d-=d+180),e.value=e.value.map(w=>s.id===w.id?{...w,rotate:d}:w)},S=()=>{u=!1,document.onmousemove=null,document.onmouseup=null,f!==d&&(o.updateSlide({elements:e.value}),a())};c?(document.ontouchmove=_,document.ontouchend=S):(document.onmousemove=_,document.onmouseup=S)}}},ag={text:{label:"文本",labelKey:"ELEMENT.TYPE.TEXT"},image:{label:"图片",labelKey:"ELEMENT.TYPE.IMAGE"},shape:{label:"形状",labelKey:"ELEMENT.TYPE.SHAPE"},line:{label:"线条",labelKey:"ELEMENT.TYPE.LINE"},chart:{label:"图表",labelKey:"ELEMENT.TYPE.CHART"},table:{label:"表格",labelKey:"ELEMENT.TYPE.TABLE"},video:{label:"视频",labelKey:"ELEMENT.TYPE.VIDEO"},audio:{label:"音频",labelKey:"ELEMENT.TYPE.AUDIO"},latex:{label:"公式",labelKey:"ELEMENT.TYPE.LATEX"}};Object.fromEntries(Object.entries(ag).map(([e,t])=>[e,t.label]));const Li=(e,t)=>{const n=ag[t];return n?e&&n.labelKey?e(n.labelKey):n.label:t||""},ig={text:40,image:20,shape:20,chart:200,table:30,video:250,audio:20,latex:20},Ov=(e,t)=>{const{left:n,top:o,width:a,height:i}=e,l=Math.sqrt(Math.pow(a,2)+Math.pow(i,2))/2,s=Math.atan(i/a)*180/Math.PI,c=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,d=(90-t)*Math.PI/180,f=t*Math.PI/180,v=a/2,p=i/2,h=n+v,m=o+p,g={left:h+l*Math.cos(c),top:m-l*Math.sin(c)},E={left:h+p*Math.cos(d),top:m-p*Math.sin(d)},y={left:h+l*Math.cos(u),top:m-l*Math.sin(u)},_={left:h+v*Math.cos(f),top:m+v*Math.sin(f)},S={left:h-l*Math.cos(c),top:m+l*Math.sin(c)},I={left:h-p*Math.sin(f),top:m+p*Math.cos(f)},A={left:h-l*Math.cos(u),top:m+l*Math.sin(u)},x={left:h-v*Math.cos(f),top:m-v*Math.sin(f)};return{leftTopPoint:g,topPoint:E,rightTopPoint:y,rightPoint:_,rightBottomPoint:S,bottomPoint:I,leftBottomPoint:A,leftPoint:x}},Rv=(e,t)=>({[me.RIGHT_BOTTOM]:t.leftTopPoint,[me.LEFT_BOTTOM]:t.rightTopPoint,[me.LEFT_TOP]:t.rightBottomPoint,[me.RIGHT_TOP]:t.leftBottomPoint,[me.TOP]:t.bottomPoint,[me.BOTTOM]:t.topPoint,[me.LEFT]:t.rightPoint,[me.RIGHT]:t.leftPoint})[e],rI=(e,t,n)=>{const o=fe(),a=pe(),{activeElementIdList:i,activeGroupElementId:l}=ne.storeToRefs(o),{viewportRatio:s,viewportSize:c}=ne.storeToRefs(a),{ctrlOrShiftKeyActive:u}=ne.storeToRefs(ln()),{addHistorySnapshot:d}=be();return{scaleElement:(p,h,m)=>{const g=!(p instanceof MouseEvent);if(g&&(!p.changedTouches||!p.changedTouches[0]))return;let E=!0;o.setScalingState(!0);const y=h.left,_=h.top,S=h.width,I=h.height,A=h.type==="table"?h.cellMinHeight:0,x="rotate"in h&&h.rotate?h.rotate:0,N=Math.PI*x/180,T=u.value||"fixedRatio"in h&&h.fixedRatio,L=S/I,b=g?p.changedTouches[0].pageX:p.pageX,O=g?p.changedTouches[0].pageY:p.pageY,w=ig[h.type]||20,C=(D,Y)=>{if(!T)return D<w?w:D;let K=w,Z=w;const oe=h.width/h.height;return oe<1&&(Z=w/oe),oe>1&&(K=w*oe),Y==="width"?D<K?K:D:D<Z?Z:D};let P,k=0,B=0,H=[],U=[];if("rotate"in h&&h.rotate){const{left:D,top:Y,width:K,height:Z}=h;P=Ov({left:D,top:Y,width:K,height:Z},x);const oe=Rv(m,P);k=oe.left,B=oe.top}else{const D=c.value,Y=c.value*s.value,K=h.id===l.value;for(const M of e.value){if("rotate"in M&&M.rotate||M.type==="line"||K&&M.id===h.id||!K&&i.value.includes(M.id))continue;const R=M.left,X=M.top,W=M.width,te=M.height,ee=R+W,ce=X+te,se={value:X,range:[R,ee]},F={value:ce,range:[R,ee]},j={value:R,range:[X,ce]},le={value:ee,range:[X,ce]};H.push(se,F),U.push(j,le)}const Z={value:0,range:[0,D]},oe={value:Y,range:[0,D]},Q={value:Y/2,range:[0,D]},q={value:0,range:[0,Y]},re={value:D,range:[0,Y]},G={value:D/2,range:[0,Y]};H.push(Z,oe,Q),U.push(q,re,G),H=Ds(H),U=Ds(U)}const $=(D,Y)=>{const Z=[];let oe=!1,Q=!1;const q={offsetX:0,offsetY:0};if(Y||Y===0)for(let re=0;re<H.length;re++){const{value:G,range:M}=H[re],R=Math.min(...M,D||0),X=Math.max(...M,D||0);Math.abs(Y-G)<5&&!Q&&(q.offsetY=Y-G,Q=!0,Z.push({type:"horizontal",axis:{x:R-50,y:G},length:X-R+100}))}if(D||D===0)for(let re=0;re<U.length;re++){const{value:G,range:M}=U[re],R=Math.min(...M,Y||0),X=Math.max(...M,Y||0);Math.abs(D-G)<5&&!oe&&(q.offsetX=D-G,oe=!0,Z.push({type:"vertical",axis:{x:G,y:R-50},length:X-R+100}))}return t.value=Z,q},V=D=>{if(!E)return;const Y=D instanceof MouseEvent?D.pageX:D.changedTouches[0].pageX,K=D instanceof MouseEvent?D.pageY:D.changedTouches[0].pageY,Z=Y-b,oe=K-O;let Q=S,q=I,re=y,G=_;if(x){const M=(Math.cos(N)*Z+Math.sin(N)*oe)/n.value;let R=(Math.cos(N)*oe-Math.sin(N)*Z)/n.value;T&&((m===me.RIGHT_BOTTOM||m===me.LEFT_TOP)&&(R=M/L),(m===me.LEFT_BOTTOM||m===me.RIGHT_TOP)&&(R=-M/L)),m===me.RIGHT_BOTTOM?(Q=C(S+M,"width"),q=C(I+R,"height")):m===me.LEFT_BOTTOM?(Q=C(S-M,"width"),q=C(I+R,"height"),re=y-(Q-S)):m===me.LEFT_TOP?(Q=C(S-M,"width"),q=C(I-R,"height"),re=y-(Q-S),G=_-(q-I)):m===me.RIGHT_TOP?(Q=C(S+M,"width"),q=C(I-R,"height"),G=_-(q-I)):m===me.TOP?(q=C(I-R,"height"),G=_-(q-I)):m===me.BOTTOM?q=C(I+R,"height"):m===me.LEFT?(Q=C(S-M,"width"),re=y-(Q-S)):m===me.RIGHT&&(Q=C(S+M,"width"));const X=Ov({width:Q,height:q,left:re,top:G},x),W=Rv(m,X),te=W.left,ee=W.top,ce=te-k,se=ee-B;re=re-ce,G=G-se}else{let M=Z/n.value,R=oe/n.value;if(T&&((m===me.RIGHT_BOTTOM||m===me.LEFT_TOP)&&(R=M/L),(m===me.LEFT_BOTTOM||m===me.RIGHT_TOP)&&(R=-M/L)),m===me.RIGHT_BOTTOM){const{offsetX:X,offsetY:W}=$(y+S+M,_+I+R);M=M-X,R=R-W,T&&(W?M=R*L:R=M/L),Q=C(S+M,"width"),q=C(I+R,"height")}else if(m===me.LEFT_BOTTOM){const{offsetX:X,offsetY:W}=$(y+M,_+I+R);M=M-X,R=R-W,T&&(W?M=-R*L:R=-M/L),Q=C(S-M,"width"),q=C(I+R,"height"),re=y-(Q-S)}else if(m===me.LEFT_TOP){const{offsetX:X,offsetY:W}=$(y+M,_+R);M=M-X,R=R-W,T&&(W?M=R*L:R=M/L),Q=C(S-M,"width"),q=C(I-R,"height"),re=y-(Q-S),G=_-(q-I)}else if(m===me.RIGHT_TOP){const{offsetX:X,offsetY:W}=$(y+S+M,_+R);M=M-X,R=R-W,T&&(W?M=-R*L:R=-M/L),Q=C(S+M,"width"),q=C(I-R,"height"),G=_-(q-I)}else if(m===me.LEFT){const{offsetX:X}=$(y+M,null);M=M-X,Q=C(S-M,"width"),re=y-(Q-S)}else if(m===me.RIGHT){const{offsetX:X}=$(y+S+M,null);M=M-X,Q=C(S+M,"width")}else if(m===me.TOP){const{offsetY:X}=$(null,_+R);R=R-X,q=C(I-R,"height"),G=_-(q-I)}else if(m===me.BOTTOM){const{offsetY:X}=$(null,_+I+R);R=R-X,q=C(I+R,"height")}}e.value=e.value.map(M=>{if(h.id!==M.id)return M;if(M.type==="shape"&&"pathFormula"in M&&M.pathFormula){const R=$o[M.pathFormula];let X="";return"editable"in R?X=R.formula(Q,q,M.keypoints):X=R.formula(Q,q),{...M,left:re,top:G,width:Q,height:q,viewBox:[Q,q],path:X}}if(M.type==="table"){let R=A+(q-I)/M.data.length;return R=R<36?36:R,R===A?{...M,left:re,width:Q}:{...M,left:re,top:G,width:Q,height:q,cellMinHeight:R<36?36:R}}return{...M,left:re,top:G,width:Q,height:q}})},z=D=>{E=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const Y=D instanceof MouseEvent?D.pageX:D.changedTouches[0].pageX,K=D instanceof MouseEvent?D.pageY:D.changedTouches[0].pageY;b===Y&&O===K||(a.updateSlide({elements:e.value}),o.setScalingState(!1),d())};g?(document.ontouchmove=V,document.ontouchend=z):(document.onmousemove=V,document.onmouseup=z)},scaleMultiElement:(p,h,m)=>{let g=!0;const{minX:E,maxX:y,minY:_,maxY:S}=h,I=y-E,A=S-_,x=I/A,N=p.pageX,T=p.pageY,L=JSON.parse(JSON.stringify(e.value));document.onmousemove=b=>{if(!g)return;const O=b.pageX,w=b.pageY,C=(O-N)/n.value;let P=(w-T)/n.value;u.value&&((m===me.RIGHT_BOTTOM||m===me.LEFT_TOP)&&(P=C/x),(m===me.LEFT_BOTTOM||m===me.RIGHT_TOP)&&(P=-C/x));let k=E,B=y,H=_,U=S;m===me.RIGHT_BOTTOM?(B=y+C,U=S+P):m===me.LEFT_BOTTOM?(k=E+C,U=S+P):m===me.LEFT_TOP?(k=E+C,H=_+P):m===me.RIGHT_TOP?(B=y+C,H=_+P):m===me.TOP?H=_+P:m===me.BOTTOM?U=S+P:m===me.LEFT?k=E+C:m===me.RIGHT&&(B=y+C);const $=B-k,V=U-H;let z=$/I,D=V/A;z<=0&&(z=0),D<=0&&(D=0),e.value=e.value.map(Y=>{if((Y.type==="image"||Y.type==="shape")&&i.value.includes(Y.id)){const K=L.find(Z=>Z.id===Y.id);return{...Y,width:K.width*z,height:K.height*D,left:k+(K.left-E)*z,top:H+(K.top-_)*D}}return Y})},document.onmouseup=b=>{g=!1,document.onmousemove=null,document.onmouseup=null,!(N===b.pageX&&T===b.pageY)&&(a.updateSlide({elements:e.value}),d())}}}},oI=(e,t)=>{const n=fe(),{activeElementIdList:o,activeGroupElementId:a,handleElementId:i,editorAreaFocus:l}=ne.storeToRefs(n),{ctrlOrShiftKeyActive:s}=ne.storeToRefs(ln());return{selectElement:(u,d,f=!0)=>{if(l.value||n.setEditorareaFocus(!0),o.value.includes(d.id)){if(s.value){let v=[];if(d.groupId){const p=[];e.value.forEach(h=>{h.groupId===d.groupId&&p.push(h.id)}),v=o.value.filter(h=>!p.includes(h))}else v=o.value.filter(p=>p!==d.id);v.length>0&&n.setActiveElementIdList(v)}else if(i.value!==d.id)n.setHandleElementId(d.id);else if(a.value!==d.id){const v=u instanceof MouseEvent?u.pageX:u.changedTouches[0].pageX,p=u instanceof MouseEvent?u.pageY:u.changedTouches[0].pageY;u.target.onmouseup=h=>{const m=h.pageX,g=h.pageY;v===m&&p===g&&(n.setActiveGroupElementId(d.id),h.target.onmouseup=null)}}}else{let v=[];if(s.value?v=[...o.value,d.id]:v=[d.id],d.groupId){const p=[];e.value.forEach(h=>{h.groupId===d.groupId&&p.push(h.id)}),v=[...v,...p]}n.setActiveElementIdList(Xe.uniq(v)),n.setHandleElementId(d.id)}f&&t(u,d)}}},aI=(e,t,n)=>{const o=pe(),{activeElementIdList:a,activeGroupElementId:i}=ne.storeToRefs(fe()),{shiftKeyState:l}=ne.storeToRefs(ln()),{viewportRatio:s,viewportSize:c}=ne.storeToRefs(o),{addHistorySnapshot:u}=be();return{dragElement:(f,v)=>{const p=!(f instanceof MouseEvent);if(p&&(!f.changedTouches||!f.changedTouches[0])||!a.value.includes(v.id))return;let h=!0;const m=c.value,g=c.value*s.value,E=5,_=JSON.parse(JSON.stringify(e.value)).filter(D=>a.value.includes(D.id)),S=v.left,I=v.top,A=v.width,x="height"in v&&v.height?v.height:0,N="rotate"in v&&v.rotate?v.rotate:0,T=p?f.changedTouches[0].pageX:f.pageX,L=p?f.changedTouches[0].pageY:f.pageY;let b=null;const O=v.id===i.value;let w=[],C=[];for(const D of e.value){if(D.type==="line"||O&&D.id===v.id||!O&&a.value.includes(D.id))continue;let Y,K,Z,oe;if("rotate"in D&&D.rotate){const{xRange:ce,yRange:se}=Ta({left:D.left,top:D.top,width:D.width,height:D.height,rotate:D.rotate});Y=ce[0],K=se[0],Z=ce[1]-ce[0],oe=se[1]-se[0]}else Y=D.left,K=D.top,Z=D.width,oe=D.height;const Q=Y+Z,q=K+oe,re=K+oe/2,G=Y+Z/2,M={value:K,range:[Y,Q]},R={value:q,range:[Y,Q]},X={value:re,range:[Y,Q]},W={value:Y,range:[K,q]},te={value:Q,range:[K,q]},ee={value:G,range:[K,q]};w.push(M,R,X),C.push(W,te,ee)}const P={value:0,range:[0,m]},k={value:g,range:[0,m]},B={value:g/2,range:[0,m]},H={value:0,range:[0,g]},U={value:m,range:[0,g]},$={value:m/2,range:[0,g]};w.push(P,k,B),C.push(H,U,$),w=Ds(w),C=Ds(C);const V=D=>{const Y=D instanceof MouseEvent?D.pageX:D.changedTouches[0].pageX,K=D instanceof MouseEvent?D.pageY:D.changedTouches[0].pageY;if(b!==!1&&(b=Math.abs(T-Y)<E&&Math.abs(L-K)<E),!h||b)return;let Z=(Y-T)/n.value,oe=(K-L)/n.value;l.value&&(Math.abs(Z)>Math.abs(oe)&&(oe=0),Math.abs(Z)<Math.abs(oe)&&(Z=0));let Q=S+Z,q=I+oe,re,G,M,R;if(a.value.length===1||O)if(N){const{xRange:se,yRange:F}=Ta({left:Q,top:q,width:A,height:x,rotate:N});re=se[0],G=se[1],M=F[0],R=F[1]}else v.type==="line"?(re=Q,G=Q+Math.max(v.start[0],v.end[0]),M=q,R=q+Math.max(v.start[1],v.end[1])):(re=Q,G=Q+A,M=q,R=q+x);else{const se=[],F=[],j=[],le=[];for(let ve=0;ve<_.length;ve++){const he=_[ve],Fe=he.left+Z,Re=he.top+oe,ur=he.width,dr="height"in he&&he.height?he.height:0,fr="rotate"in he&&he.rotate?he.rotate:0;if("rotate"in he&&he.rotate){const{xRange:qr,yRange:ot}=Ta({left:Fe,top:Re,width:ur,height:dr,rotate:fr});se.push(qr[0]),F.push(ot[0]),j.push(qr[1]),le.push(ot[1])}else he.type==="line"?(se.push(Fe),F.push(Re),j.push(Fe+Math.max(he.start[0],he.end[0])),le.push(Re+Math.max(he.start[1],he.end[1]))):(se.push(Fe),F.push(Re),j.push(Fe+ur),le.push(Re+dr))}re=Math.min(...se),G=Math.max(...j),M=Math.min(...F),R=Math.max(...le)}const X=re+(G-re)/2,W=M+(R-M)/2,te=[];let ee=!1,ce=!1;for(let se=0;se<w.length;se++){const{value:F,range:j}=w[se],le=Math.min(...j,re,G),ve=Math.max(...j,re,G);Math.abs(M-F)<E&&!ce&&(q=q-(M-F),ce=!0,te.push({type:"horizontal",axis:{x:le-50,y:F},length:ve-le+100})),Math.abs(R-F)<E&&!ce&&(q=q-(R-F),ce=!0,te.push({type:"horizontal",axis:{x:le-50,y:F},length:ve-le+100})),Math.abs(W-F)<E&&!ce&&(q=q-(W-F),ce=!0,te.push({type:"horizontal",axis:{x:le-50,y:F},length:ve-le+100}))}for(let se=0;se<C.length;se++){const{value:F,range:j}=C[se],le=Math.min(...j,M,R),ve=Math.max(...j,M,R);Math.abs(re-F)<E&&!ee&&(Q=Q-(re-F),ee=!0,te.push({type:"vertical",axis:{x:F,y:le-50},length:ve-le+100})),Math.abs(G-F)<E&&!ee&&(Q=Q-(G-F),ee=!0,te.push({type:"vertical",axis:{x:F,y:le-50},length:ve-le+100})),Math.abs(X-F)<E&&!ee&&(Q=Q-(X-F),ee=!0,te.push({type:"vertical",axis:{x:F,y:le-50},length:ve-le+100}))}if(t.value=te,a.value.length===1||O)e.value=e.value.map(se=>se.id===v.id?{...se,left:Q,top:q}:se);else{const se=e.value.find(F=>F.id===v.id);if(!se)return;e.value=e.value.map(F=>a.value.includes(F.id)?F.id===v.id?{...F,left:Q,top:q}:{...F,left:F.left+(Q-se.left),top:F.top+(q-se.top)}:F)}},z=D=>{h=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const Y=D instanceof MouseEvent?D.pageX:D.changedTouches[0].pageX,K=D instanceof MouseEvent?D.pageY:D.changedTouches[0].pageY;T===Y&&L===K||(o.updateSlide({elements:e.value}),u())};p?(document.ontouchmove=V,document.ontouchend=z):(document.onmousemove=V,document.onmouseup=z)}}},iI=e=>{const t=pe(),{canvasScale:n}=ne.storeToRefs(fe()),{ctrlOrShiftKeyActive:o}=ne.storeToRefs(ln()),{addHistorySnapshot:a}=be();return{dragLineElement:(l,s,c)=>{let u=!0;const d=8,f=l.pageX,v=l.pageY,p=[];for(let h=0;h<e.value.length;h++){const m=e.value[h];if(m.type==="line"||m.rotate)continue;const g=m.left,E=m.top,y=m.width,_=m.height,S=g+y,I=E+_,A=E+_/2,x=g+y/2,N={x,y:E},T={x,y:I},L={x:g,y:A},b={x:S,y:A},O={x:g,y:E},w={x:S,y:E},C={x:g,y:I},P={x:S,y:I};p.push(N,T,L,b,O,w,C,P)}document.onmousemove=h=>{if(!u)return;const m=h.pageX,g=h.pageY,E=(m-f)/n.value,y=(g-v)/n.value;let _=s.left+s.start[0],S=s.top+s.start[1],I=s.left+s.end[0],A=s.top+s.end[1];const x=s.broken||s.broken2||s.curve||[0,0];let N=s.left+x[0],T=s.top+x[1];const[L,b]=s.cubic||[[0,0],[0,0]];let O=s.left+L[0],w=s.top+L[1],C=s.left+b[0],P=s.top+b[1];if(c===Bt.START){_=_+E,S=S+y,Math.abs(_-I)<d&&(_=I),Math.abs(S-A)<d&&(S=A);for(const z of p){const{x:D,y:Y}=z;if(Math.abs(D-_)<d&&Math.abs(Y-S)<d){_=D,S=Y;break}}}else if(c===Bt.END){I=I+E,A=A+y,Math.abs(_-I)<d&&(I=_),Math.abs(S-A)<d&&(A=S);for(const z of p){const{x:D,y:Y}=z;if(Math.abs(D-I)<d&&Math.abs(Y-A)<d){I=D,A=Y;break}}}else c===Bt.C?(N=N+E,T=T+y,Math.abs(N-_)<d&&(N=_),Math.abs(T-S)<d&&(T=S),Math.abs(N-I)<d&&(N=I),Math.abs(T-A)<d&&(T=A),Math.abs(N-(_+I)/2)<d&&Math.abs(T-(S+A)/2)<d&&(N=(_+I)/2,T=(S+A)/2)):c===Bt.C1?(O=O+E,w=w+y,Math.abs(O-_)<d&&(O=_),Math.abs(w-S)<d&&(w=S),Math.abs(O-I)<d&&(O=I),Math.abs(w-A)<d&&(w=A)):c===Bt.C2&&(C=C+E,P=P+y,Math.abs(C-_)<d&&(C=_),Math.abs(P-S)<d&&(P=S),Math.abs(C-I)<d&&(C=I),Math.abs(P-A)<d&&(P=A));const k=Math.min(_,I),B=Math.min(S,A),H=Math.max(_,I),U=Math.max(S,A),$=[0,0],V=[H-k,U-B];_>I&&($[0]=H-k,V[0]=0),S>A&&($[1]=U-B,V[1]=0),e.value=e.value.map(z=>{if(z.id===s.id){const D={...z,left:k,top:B,start:$,end:V};return c===Bt.START||c===Bt.END?(o.value?(s.broken&&(D.broken=[N-k,T-B]),s.curve&&(D.curve=[N-k,T-B]),s.cubic&&(D.cubic=[[O-k,w-B],[C-k,P-B]])):(s.broken&&(D.broken=[($[0]+V[0])/2,($[1]+V[1])/2]),s.curve&&(D.curve=[($[0]+V[0])/2,($[1]+V[1])/2]),s.cubic&&(D.cubic=[[($[0]+V[0])/2,($[1]+V[1])/2],[($[0]+V[0])/2,($[1]+V[1])/2]])),s.broken2&&(D.broken2=[($[0]+V[0])/2,($[1]+V[1])/2])):c===Bt.C?(s.broken&&(D.broken=[N-k,T-B]),s.curve&&(D.curve=[N-k,T-B]),s.broken2&&(H-k>=U-B?D.broken2=[N-k,D.broken2[1]]:D.broken2=[D.broken2[0],T-B])):s.cubic&&(D.cubic=[[O-k,w-B],[C-k,P-B]]),D}return z})},document.onmouseup=h=>{u=!1,document.onmousemove=null,document.onmouseup=null;const m=h.pageX,g=h.pageY;f===m&&v===g||(t.updateSlide({elements:e.value}),a())}}}},lI=(e,t)=>{const n=pe(),{addHistorySnapshot:o}=be();return{moveShapeKeypoint:(i,l,s=0)=>{const c=!(i instanceof MouseEvent);if(c&&(!i.changedTouches||!i.changedTouches[0]))return;let u=!0;const d=c?i.changedTouches[0].pageX:i.pageX,f=c?i.changedTouches[0].pageY:i.pageY,v=l.keypoints,p=$o[l.pathFormula];let h=null;if("editable"in p&&p.editable){const E=p.getBaseSize[s],y=p.range[s],_=p.relative[s],S=v[s],I=E(l.width,l.height),A=I*S,[x,N]=y;h={baseSize:I,originPos:A,min:x,max:N,relative:_}}const m=E=>{if(!u)return;const y=E instanceof MouseEvent?E.pageX:E.changedTouches[0].pageX,_=E instanceof MouseEvent?E.pageY:E.changedTouches[0].pageY,S=(y-d)/t.value,I=(_-f)/t.value;e.value=e.value.map(A=>{if(A.id===l.id&&h){const{baseSize:x,originPos:N,min:T,max:L,relative:b}=h,O=A;let w=0;b==="center"?w=(N-S*2)/x:b==="left"?w=(N+S)/x:b==="right"?w=(N-S)/x:b==="top"?w=(N+I)/x:b==="bottom"?w=(N-I)/x:b==="left_bottom"?w=(N+S)/x:b==="right_bottom"?w=(N-S)/x:b==="top_right"?w=(N+I)/x:b==="bottom_right"&&(w=(N-I)/x),w<T&&(w=T),w>L&&(w=L);let C=[];return Array.isArray(v)?(C=[...v],C[s]=w):C=[w],{...A,keypoints:C,path:p.formula(O.width,O.height,C)}}return A})},g=E=>{u=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const y=E instanceof MouseEvent?E.pageX:E.changedTouches[0].pageX,_=E instanceof MouseEvent?E.pageY:E.changedTouches[0].pageY;d===y&&f===_||(n.updateSlide({elements:e.value}),o())};c?(document.ontouchmove=m,document.ontouchend=g):(document.onmousemove=m,document.onmouseup=g)}}},sI=e=>{const t=fe(),{canvasScale:n,creatingElement:o}=ne.storeToRefs(t),a=d=>{const{start:f,end:v}=d;if(!e.value)return;const p=e.value.getBoundingClientRect(),[h,m]=f,[g,E]=v,y=Math.min(h,g),_=Math.max(h,g),S=Math.min(m,E),I=Math.max(m,E),A=(y-p.x)/n.value,x=(S-p.y)/n.value,N=(_-y)/n.value,T=(I-S)/n.value;return{left:A,top:x,width:N,height:T}},i=d=>{const{start:f,end:v}=d;if(!e.value)return;const p=e.value.getBoundingClientRect(),[h,m]=f,[g,E]=v,y=Math.min(h,g),_=Math.max(h,g),S=Math.min(m,E),I=Math.max(m,E),A=(y-p.x)/n.value,x=(S-p.y)/n.value,N=(_-y)/n.value,T=(I-S)/n.value;return{left:A,top:x,start:[h===y?0:N,m===S?0:T],end:[g===y?0:N,E===S?0:T]}},{createTextElement:l,createShapeElement:s,createLineElement:c}=Fo();return{formatCreateSelection:a,insertElementFromCreateSelection:d=>{if(!o.value)return;const f=o.value.type;if(f==="text"){const v=a(d);v&&l(v,{vertical:o.value.vertical})}else if(f==="shape"){const v=a(d);v&&s(v,o.value.data)}else if(f==="line"){const v=i(d);v&&c(v,o.value.data)}t.setCreatingElement(null)}}},cp=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=ne.storeToRefs(fe()),{currentSlide:o,viewportRatio:a,viewportSize:i}=ne.storeToRefs(e),{addHistorySnapshot:l}=be();return{alignElementToCanvas:c=>{const u=i.value,d=i.value*a.value,{minX:f,maxX:v,minY:p,maxY:h}=tr(n.value),m=JSON.parse(JSON.stringify(o.value.elements));for(const g of m)if(t.value.includes(g.id)){if(c===Ve.CENTER){const E=p+(h-p)/2-d/2,y=f+(v-f)/2-u/2;g.top=g.top-E,g.left=g.left-y}if(c===Ve.TOP){const E=p-0;g.top=g.top-E}else if(c===Ve.VERTICAL){const E=p+(h-p)/2-d/2;g.top=g.top-E}else if(c===Ve.BOTTOM){const E=h-d;g.top=g.top-E}else if(c===Ve.LEFT){const E=f-0;g.left=g.left-E}else if(c===Ve.HORIZONTAL){const E=f+(v-f)/2-u/2;g.left=g.left-E}else if(c===Ve.RIGHT){const E=v-u;g.left=g.left-E}}e.updateSlide({elements:m}),l()}}},Wr=e=>({shadowStyle:r.computed(()=>{if(e.value){const{h:n,v:o,blur:a,color:i}=e.value;return`${n}px ${o}px ${a}px ${i}`}return""})}),mc=(e,t)=>({flipStyle:r.computed(()=>{let o="";return e.value&&t.value?o="rotateX(180deg) rotateY(180deg)":t.value?o="rotateX(180deg)":e.value&&(o="rotateY(180deg)"),o})});var at;(function(e){e.RECT="rect",e.ELLIPSE="ellipse",e.POLYGON="polygon"})(at||(at={}));var kv;(function(e){e.RECT="rect",e.ROUNDRECT="roundRect",e.ELLIPSE="ellipse",e.TRIANGLE="triangle",e.PENTAGON="pentagon",e.RHOMBUS="rhombus",e.STAR="star"})(kv||(kv={}));const Fd={rect:{name:"矩形",nameKey:"CLIP.SHAPE.RECT",type:at.RECT,radius:"0",style:""},rect2:{name:"矩形2",nameKey:"CLIP.SHAPE.RECT_2",type:at.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",nameKey:"CLIP.SHAPE.RECT_3",type:at.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L ${e*.2} ${t} L 0 ${t*.8} Z`},roundRect:{name:"圆角矩形",nameKey:"CLIP.SHAPE.ROUND_RECT",type:at.RECT,radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",nameKey:"CLIP.SHAPE.ELLIPSE",type:at.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",nameKey:"CLIP.SHAPE.TRIANGLE",type:at.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${e*.5} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",nameKey:"CLIP.SHAPE.TRIANGLE_2",type:at.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${e*.5} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",nameKey:"CLIP.SHAPE.TRIANGLE_3",type:at.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",nameKey:"CLIP.SHAPE.RHOMBUS",type:at.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${t*.5} L ${e*.5} ${t} L 0 ${t*.5} Z`},pentagon:{name:"五边形",nameKey:"CLIP.SHAPE.PENTAGON",type:at.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",nameKey:"CLIP.SHAPE.HEXAGON",type:at.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.2} 0 L ${e*.8} 0 L ${e} ${t*.5} L ${e*.8} ${t} L ${e*.2} ${t} L 0 ${t*.5} Z`},heptagon:{name:"七边形",nameKey:"CLIP.SHAPE.HEPTAGON",type:at.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e*.9} ${t*.2} L ${e} ${t*.6} L ${e*.75} ${t} L ${e*.25} ${t} L 0 ${t*.6} L ${e*.1} ${t*.2} Z`},octagon:{name:"八边形",nameKey:"CLIP.SHAPE.OCTAGON",type:at.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e*.7} 0 L ${e} ${t*.3} L ${e} ${t*.7} L ${e*.7} ${t} L ${e*.3} ${t} L 0 ${t*.7} L 0 ${t*.3} Z`},chevron:{name:"V形",nameKey:"CLIP.SHAPE.CHEVRON",type:at.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} L ${e*.25} ${t*.5} L 0 0 Z`},point:{name:"点",nameKey:"CLIP.SHAPE.POINT",type:at.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} Z`},arrow:{name:"箭头",nameKey:"CLIP.SHAPE.ARROW",type:at.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${t*.2} L ${e*.6} ${t*.2} L ${e*.6} 0 L ${e} ${t*.5} L ${e*.6} ${t} L ${e*.6} ${t*.8} L 0 ${t*.8} Z`},parallelogram:{name:"平行四边形",nameKey:"CLIP.SHAPE.PARALLELOGRAM",type:at.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e} 0 L ${e*.7} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",nameKey:"CLIP.SHAPE.PARALLELOGRAM_2",type:at.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${e*.3} ${t} L ${e} ${t} L ${e*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",nameKey:"CLIP.SHAPE.TRAPEZOID",type:at.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.25} 0 L ${e*.75} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",nameKey:"CLIP.SHAPE.TRAPEZOID_2",type:at.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${e*.75} ${t} L ${e*.25} ${t} Z`}},up=e=>{const t=r.computed(()=>{let o=Fd.rect;if(e.value.clip){const a=e.value.clip.shape||at.RECT;o=Fd[a]}return o.radius!==void 0&&e.value.radius&&(o={...o,radius:`${e.value.radius}px`,style:`inset(0 round ${e.value.radius}px)`}),o}),n=r.computed(()=>{if(!e.value.clip)return{top:"0",left:"0",width:"100%",height:"100%"};const[o,a]=e.value.clip.range,i=(a[0]-o[0])/100,l=(a[1]-o[1])/100,s=o[0]/i,c=o[1]/l;return{left:-s+"%",top:-c+"%",width:100/i+"%",height:100/l+"%"}});return{clipShape:t,imgPosition:n}},lg=e=>({filter:r.computed(()=>{if(!e.value)return"";let n="";const o=Object.keys(e.value);for(const a of o)n+=`${a}(${e.value[a]}) `;return n})}),cI=["src"],uI=["src"],dI=["onMousedown"],fI=["onMousedown"],pI={__name:"ImageClipHandler",props:{src:{type:String,required:!0},clipPath:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},top:{type:Number,required:!0},left:{type:Number,required:!0},rotate:{type:Number,required:!0},clipData:{type:Object}},emits:["clip"],setup(e,{emit:t}){const n=e,o=t,{canvasScale:a}=ne.storeToRefs(fe()),{ctrlOrShiftKeyActive:i}=ne.storeToRefs(ln()),l=r.ref({top:"0",left:"0"}),s=r.ref(!1),c=r.ref(null),u=()=>{const[N,T]=n.clipData?n.clipData.range:[[0,0],[100,100]],L=(T[0]-N[0])/100,b=(T[1]-N[1])/100,O=N[0]/L,w=N[1]/b;return{widthScale:L,heightScale:b,left:O,top:w}},d=r.computed(()=>{const{widthScale:N,heightScale:T,left:L,top:b}=u();return{left:-L,top:-b,width:100/N,height:100/T}}),f=r.computed(()=>({top:d.value.top+"%",left:d.value.left+"%",width:d.value.width+"%",height:d.value.height+"%"})),v=r.ref({top:0,left:0,width:0,height:0}),p=r.computed(()=>{const{top:N,left:T,width:L,height:b}=v.value;return{top:N+"%",left:T+"%",width:L+"%",height:b+"%"}}),h=r.computed(()=>{const N=d.value.width,T=d.value.height,{top:L,left:b,width:O,height:w}=v.value;return{left:-b*(100/O)+"%",top:-L*(100/w)+"%",width:N/O*100+"%",height:T/w*100+"%"}}),m=()=>{const{left:N,top:T}=u();v.value={left:N,top:T,width:100,height:100},l.value={top:-T+"%",left:-N+"%"}},g=()=>{if(s.value)return;if(!c.value){o("clip",null);return}const{left:N,top:T}=u(),L={left:(v.value.left-N)/100*n.width,top:(v.value.top-T)/100*n.height,width:(v.value.width-100)/100*n.width,height:(v.value.height-100)/100*n.height},b={range:c.value,position:L};o("clip",b)},E=N=>{N.key.toUpperCase()===Ee.ENTER&&g()};r.onMounted(()=>{m(),document.addEventListener("keydown",E)}),r.onUnmounted(()=>{document.removeEventListener("keydown",E)});const y=()=>{const N={left:parseInt(h.value.left),top:parseInt(h.value.top),width:parseInt(h.value.width),height:parseInt(h.value.height)},T=100/N.width,L=100/N.height,b=[-N.left*T,-N.top*L],O=[T*100+b[0],L*100+b[1]];c.value=[b,O]},_=N=>{s.value=!0;let T=!0;const L=N.pageX,b=N.pageY,O=d.value,w={...v.value};document.onmousemove=C=>{if(!T)return;const P=C.pageX,k=C.pageY,B=(P-L)/a.value,H=(k-b)/a.value,U=Math.sqrt(B*B+H*H),V=Math.atan2(H,B)-n.rotate/180*Math.PI,z=U*Math.cos(V)/n.width*100,D=U*Math.sin(V)/n.height*100;let Y=w.left+z,K=w.top+D;Y<0?Y=0:Y+w.width>O.width&&(Y=O.width-w.width),K<0?K=0:K+w.height>O.height&&(K=O.height-w.height),v.value={...v.value,left:Y,top:K}},document.onmouseup=()=>{T=!1,document.onmousemove=null,document.onmouseup=null,y(),setTimeout(()=>{s.value=!1},0)}},S=(N,T)=>{s.value=!0;let L=!0;const b=50/n.width*100,O=50/n.height*100,w=N.pageX,C=N.pageY,P=d.value,k={...v.value},B=v.value.width/v.value.height;document.onmousemove=H=>{if(!L)return;const U=H.pageX,$=H.pageY,V=(U-w)/a.value,z=($-C)/a.value,D=Math.sqrt(V*V+z*z),K=Math.atan2(z,V)-n.rotate/180*Math.PI;let Z=D*Math.cos(K)/n.width*100,oe=D*Math.sin(K)/n.height*100;i.value&&((T===me.RIGHT_BOTTOM||T===me.LEFT_TOP)&&(oe=Z/B),(T===me.LEFT_BOTTOM||T===me.RIGHT_TOP)&&(oe=-Z/B));let Q,q,re,G;T===me.LEFT_TOP?(k.left+Z<0&&(Z=-k.left),k.top+oe<0&&(oe=-k.top),k.width-Z<b&&(Z=k.width-b),k.height-oe<O&&(oe=k.height-O),re=k.width-Z,G=k.height-oe,Q=k.left+Z,q=k.top+oe):T===me.RIGHT_TOP?(k.left+k.width+Z>P.width&&(Z=P.width-(k.left+k.width)),k.top+oe<0&&(oe=-k.top),k.width+Z<b&&(Z=b-k.width),k.height-oe<O&&(oe=k.height-O),re=k.width+Z,G=k.height-oe,Q=k.left,q=k.top+oe):T===me.LEFT_BOTTOM?(k.left+Z<0&&(Z=-k.left),k.top+k.height+oe>P.height&&(oe=P.height-(k.top+k.height)),k.width-Z<b&&(Z=k.width-b),k.height+oe<O&&(oe=O-k.height),re=k.width-Z,G=k.height+oe,Q=k.left+Z,q=k.top):T===me.RIGHT_BOTTOM?(k.left+k.width+Z>P.width&&(Z=P.width-(k.left+k.width)),k.top+k.height+oe>P.height&&(oe=P.height-(k.top+k.height)),k.width+Z<b&&(Z=b-k.width),k.height+oe<O&&(oe=O-k.height),re=k.width+Z,G=k.height+oe,Q=k.left,q=k.top):T===me.TOP?(k.top+oe<0&&(oe=-k.top),k.height-oe<O&&(oe=k.height-O),re=k.width,G=k.height-oe,Q=k.left,q=k.top+oe):T===me.BOTTOM?(k.top+k.height+oe>P.height&&(oe=P.height-(k.top+k.height)),k.height+oe<O&&(oe=O-k.height),re=k.width,G=k.height+oe,Q=k.left,q=k.top):T===me.LEFT?(k.left+Z<0&&(Z=-k.left),k.width-Z<b&&(Z=k.width-b),re=k.width-Z,G=k.height,Q=k.left+Z,q=k.top):(k.left+k.width+Z>P.width&&(Z=P.width-(k.left+k.width)),k.width+Z<b&&(Z=b-k.width),G=k.height,re=k.width+Z,Q=k.left,q=k.top),v.value={left:Q,top:q,width:re,height:G}},document.onmouseup=()=>{L=!1,document.onmousemove=null,document.onmouseup=null,y(),setTimeout(()=>s.value=!1,0)}},I=r.computed(()=>{const N="rotate-",T=n.rotate;return T>-22.5&&T<=22.5?N+0:T>22.5&&T<=67.5?N+45:T>67.5&&T<=112.5?N+90:T>112.5&&T<=157.5?N+135:T>157.5||T<=-157.5?N+0:T>-157.5&&T<=-112.5?N+45:T>-112.5&&T<=-67.5?N+90:T>-67.5&&T<=-22.5?N+135:N+0}),A=[me.LEFT_TOP,me.RIGHT_TOP,me.LEFT_BOTTOM,me.RIGHT_BOTTOM],x=[me.TOP,me.BOTTOM,me.LEFT,me.RIGHT];return(N,T)=>{const L=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"image-clip-handler",style:r.normalizeStyle(l.value)},[r.createElementVNode("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:r.normalizeStyle(f.value)},null,12,cI),r.createElementVNode("div",{class:"top-image-content",style:r.normalizeStyle({...p.value,clipPath:e.clipPath})},[r.createElementVNode("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:r.normalizeStyle(h.value)},null,12,uI)],4),r.createElementVNode("div",{class:"operate",style:r.normalizeStyle(p.value),onMousedown:T[0]||(T[0]=r.withModifiers(b=>_(b),["stop"]))},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(A,b=>r.createElementVNode("div",{class:r.normalizeClass(["clip-point",b,I.value]),key:b,onMousedown:r.withModifiers(O=>S(O,b),["stop"])},[...T[1]||(T[1]=[r.createElementVNode("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[r.createElementVNode("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1)])],42,dI)),64)),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(x,b=>r.createElementVNode("div",{class:r.normalizeClass(["clip-point",b,I.value]),key:b,onMousedown:r.withModifiers(O=>S(O,b),["stop"])},[...T[2]||(T[2]=[r.createElementVNode("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[r.createElementVNode("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1)])],42,fI)),64))],36)],4)),[[L,g]])}}},vI=ie(pI,[["__scopeId","data-v-81b5d90a"]]),Ua=e=>{const t=r.computed(()=>{var i,l;return(l=(i=e.value)===null||i===void 0?void 0:i.width)!==null&&l!==void 0?l:0}),n=r.computed(()=>{var i;return((i=e.value)===null||i===void 0?void 0:i.style)||"solid"}),o=r.computed(()=>{var i;return((i=e.value)===null||i===void 0?void 0:i.color)||"#d14424"}),a=r.computed(()=>{const i=t.value;return n.value==="dashed"?i<=6?`${i*4.5} ${i*2}`:`${i*4} ${i*1.5}`:n.value==="dotted"?i<=6?`${i*1.8} ${i*1.6}`:`${i*1.5} ${i*1.2}`:"0 0"});return{outlineWidth:t,outlineStyle:n,outlineColor:o,strokeDashArray:a}},hI=["width","height"],mI=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"],gI={__name:"ImageRectOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:"0"}},setup(e){const t=e,{outlineWidth:n,outlineColor:o,strokeDashArray:a}=Ua(r.toRef(t,"outline"));return(i,l)=>e.outline?(r.openBlock(),r.createElementBlock("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[r.createElementVNode("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:r.unref(o),"stroke-width":r.unref(n),"stroke-dasharray":r.unref(a)},null,8,mI)],8,hI)):r.createCommentVNode("",!0)}},EI=ie(gI,[["__scopeId","data-v-0f8b574b"]]),yI=["width","height"],_I=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"],TI={__name:"ImageEllipseOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:n,outlineColor:o,strokeDashArray:a}=Ua(r.toRef(t,"outline"));return(i,l)=>e.outline?(r.openBlock(),r.createElementBlock("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[r.createElementVNode("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:r.unref(o),"stroke-width":r.unref(n),"stroke-dasharray":r.unref(a)},null,8,_I)],8,yI)):r.createCommentVNode("",!0)}},SI=ie(TI,[["__scopeId","data-v-bfcecd18"]]),II=["width","height"],AI=["d","stroke","stroke-width","stroke-dasharray"],NI={__name:"ImagePolygonOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},createPath:{type:Function,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:n,outlineColor:o,strokeDashArray:a}=Ua(r.toRef(t,"outline"));return(i,l)=>e.outline?(r.openBlock(),r.createElementBlock("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[r.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:r.unref(o),"stroke-width":r.unref(n),"stroke-dasharray":r.unref(a)},null,8,AI)],8,II)):r.createCommentVNode("",!0)}},LI=ie(NI,[["__scopeId","data-v-140dc288"]]),CI={class:"image-outline"},sg={__name:"index",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>t.elementInfo),{clipShape:o}=up(n);return(a,i)=>(r.openBlock(),r.createElementBlock("div",CI,[r.unref(o).type==="rect"?(r.openBlock(),r.createBlock(EI,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:r.unref(o).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):r.unref(o).type==="ellipse"?(r.openBlock(),r.createBlock(SI,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):r.unref(o).type==="polygon"?(r.openBlock(),r.createBlock(LI,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:r.unref(o).createPath},null,8,["width","height","outline","createPath"])):r.createCommentVNode("",!0)]))}},xI=["src"],bI={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=fe(),o=pe(),{clipingImageElementId:a}=ne.storeToRefs(n),i=r.computed(()=>a.value===t.elementInfo.id),{addHistorySnapshot:l}=be(),s=r.computed(()=>t.elementInfo.shadow),{shadowStyle:c}=Wr(s),u=r.computed(()=>t.elementInfo.flipH),d=r.computed(()=>t.elementInfo.flipV),{flipStyle:f}=mc(u,d),v=r.computed(()=>t.elementInfo),{clipShape:p,imgPosition:h}=up(v),m=r.computed(()=>t.elementInfo.filters),{filter:g}=lg(m),E=_=>{t.elementInfo.lock||(_.stopPropagation(),t.selectElement(_,t.elementInfo))},y=_=>{if(n.setClipingImageElementId(""),!_)return;const{range:S,position:I}=_,A=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},x=t.elementInfo.left+I.left,N=t.elementInfo.top+I.top,T=t.elementInfo.width+I.width,L=t.elementInfo.height+I.height;let b=0,O=0;if(t.elementInfo.rotate){const C=x+T/2-(t.elementInfo.left+t.elementInfo.width/2),P=-(N+L/2-(t.elementInfo.top+t.elementInfo.height/2)),k=-t.elementInfo.rotate*Math.PI/180,B=C*Math.cos(k)-P*Math.sin(k),H=C*Math.sin(k)+P*Math.cos(k);b=B-C,O=-(H-P)}const w={clip:{...A,range:S},left:x+b,top:N+O,width:T,height:L};o.updateElement({id:t.elementInfo.id,props:w}),l()};return(_,S)=>{const I=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-image",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[i.value?(r.openBlock(),r.createBlock(vI,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:r.unref(p).style,onClip:S[0]||(S[0]=A=>y(A))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:1,class:"element-content",style:r.normalizeStyle({filter:r.unref(c)?`drop-shadow(${r.unref(c)})`:"",transform:r.unref(f)}),onMousedown:S[2]||(S[2]=A=>E(A)),onTouchstart:S[3]||(S[3]=A=>E(A))},[r.createVNode(sg,{elementInfo:e.elementInfo},null,8,["elementInfo"]),r.createElementVNode("div",{class:"image-content",style:r.normalizeStyle({clipPath:r.unref(p).style})},[r.createElementVNode("img",{src:e.elementInfo.src,draggable:!1,style:r.normalizeStyle({top:r.unref(h).top,left:r.unref(h).left,width:r.unref(h).width,height:r.unref(h).height,filter:r.unref(g)}),onDragstart:S[1]||(S[1]=r.withModifiers(()=>{},["prevent"])),alt:""},null,44,xI),e.elementInfo.colorMask?(r.openBlock(),r.createElementBlock("div",{key:0,class:"color-mask",style:r.normalizeStyle({backgroundColor:e.elementInfo.colorMask})},null,4)):r.createCommentVNode("",!0)],4)],36)),[[I,e.contextmenus]])],4)],6)}}},wI=ie(bI,[["__scopeId","data-v-308e6980"]]),OI=["width","height"],RI=["d","stroke","stroke-width","stroke-dasharray"],kI={__name:"ElementOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:n,outlineColor:o,strokeDashArray:a}=Ua(r.toRef(t,"outline"));return(i,l)=>e.outline?(r.openBlock(),r.createElementBlock("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[r.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:r.unref(o),"stroke-width":r.unref(n),"stroke-dasharray":r.unref(a)},null,8,RI)],8,OI)):r.createCommentVNode("",!0)}},gc=ie(kI,[["__scopeId","data-v-a9189103"]]),DI=e=>{const t={},n=(o,a)=>t[o]=a;return n("Alt-ArrowUp",Ge.joinUp),n("Alt-ArrowDown",Ge.joinDown),n("Mod-z",wd.undo),n("Mod-y",wd.redo),n("Backspace",zn.undoInputRule),n("Escape",Ge.selectParentNode),n("Mod-b",Ge.toggleMark(e.marks.strong)),n("Mod-i",Ge.toggleMark(e.marks.em)),n("Mod-u",Ge.toggleMark(e.marks.underline)),n("Mod-d",Ge.toggleMark(e.marks.strikethrough)),n("Mod-e",Ge.toggleMark(e.marks.code)),n("Mod-;",Ge.toggleMark(e.marks.superscript)),n("Mod-'",Ge.toggleMark(e.marks.subscript)),n("Enter",Ge.chainCommands(Lo.splitListItem(e.nodes.list_item),Ge.newlineInCode,Ge.createParagraphNear,Ge.liftEmptyBlock,Ge.splitBlockKeepMarks)),n("Mod-[",Lo.liftListItem(e.nodes.list_item)),n("Mod-]",Lo.sinkListItem(e.nodes.list_item)),n("Tab",Lo.sinkListItem(e.nodes.list_item)),t},PI=e=>zn.wrappingInputRule(/^\s*>\s$/,e),MI=e=>zn.wrappingInputRule(/^(\d+)\.\s$/,e,t=>({order:+t[1]}),(t,n)=>n.childCount+n.attrs.order===+t[1]),BI=e=>zn.wrappingInputRule(/^\s*([-+*])\s$/,e),VI=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new zn.InputRule(e,(t,n,o,a)=>{const{schema:i}=t,l=t.tr.insertText(`${n[2]} `,o,a),s=i.marks.code.create();return l.addMark(o,o+n[2].length,s)})},$I=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new zn.InputRule(e,(t,n,o,a)=>{const{schema:i}=t,l=t.tr.insertText(n[0],o,a),s=i.marks.link.create({href:n[0],title:n[0]});return l.addMark(o,o+n[0].length,s)})},FI=e=>{const t=[...zn.smartQuotes,zn.ellipsis,zn.emDash];return t.push(PI(e.nodes.blockquote)),t.push(MI(e.nodes.ordered_list)),t.push(BI(e.nodes.bullet_list)),t.push(VI()),t.push($I()),zn.inputRules({rules:t})},HI=e=>e.type.name==="paragraph"&&e.nodeSize===2,UI=e=>new Os.Plugin({props:{decorations(t){const{$from:n}=t.selection;if(HI(n.parent)){const o=bd.Decoration.node(n.before(),n.after(),{"data-placeholder":e});return bd.DecorationSet.create(t.doc,[o])}}}}),GI=(e,t)=>{const n=t?.placeholder,o=[FI(e),yv.keymap(DI(e)),yv.keymap(Ge.baseKeymap),M_.dropCursor(),B_.gapCursor(),wd.history()];return n&&o.push(UI(n)),o},zI={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const n={order:+((e.hasAttribute("start")?e.getAttribute("start"):1)||1)},{listStyleType:o,fontSize:a,color:i}=e.style;return o&&(n.listStyleType=o),a&&(n.fontsize=a),i&&(n.color=i),n}}],toDOM:e=>{const{order:t,listStyleType:n,fontsize:o,color:a}=e.attrs;let i="";n&&(i+=`list-style-type: ${n};`),o&&(i+=`font-size: ${o};`),a&&(i+=`color: ${a};`);const l={style:i};return t!==1&&(l.start=t),["ol",l,0]}},YI={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const t={},{listStyleType:n,fontSize:o,color:a}=e.style;return n&&(t.listStyleType=n),o&&(t.fontsize=o),a&&(t.color=a),t}}],toDOM:e=>{const{listStyleType:t,fontsize:n,color:o}=e.attrs;let a="";return t&&(a+=`list-style-type: ${t};`),n&&(a+=`font-size: ${n};`),o&&(a+=`color: ${o};`),["ul",{style:a},0]}},XI={...Lo.listItem,content:"paragraph block*",group:"block"},WI={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:n}=e.style;let o=e.getAttribute("align")||t||"";o=/(left|right|center|justify)/.test(o)?o:"";let a=0;n&&(/em/.test(n)?a=parseInt(n):/px/.test(n)&&(a=Math.floor(parseInt(n)/16),a||(a=1)));const i=+(e.getAttribute("data-indent")||0);return{align:o,indent:i,textIndent:a}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:n,textIndent:o}=e.attrs;let a="";t&&t!=="left"&&(a+=`text-align: ${t};`),o&&(a+=`text-indent: ${o}em;`);const i={style:a};return n&&(i["data-indent"]=n),["p",i,0]}},{doc:KI,blockquote:qI,text:ZI}=w1.nodes,jI={doc:KI,paragraph:WI,blockquote:qI,text:ZI,ordered_list:zI,bullet_list:YI,list_item:XI},JI={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>e==="sub"&&null}],toDOM:()=>["sub",0]},QI={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>e==="super"&&null}],toDOM:()=>["sup",0]},eA={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>e==="line-through"&&null},{style:"text-decoration-line",getAttrs:e=>e==="line-through"&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},tA={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>e==="underline"&&null},{style:"text-decoration-line",getAttrs:e=>e==="underline"&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},nA={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let n="";return t&&(n+=`color: ${t};`),["span",{style:n},0]}},rA={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let n="";return t&&(n+=`background-color: ${t};`),["span",{style:n},0]}},oA={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let n="";return t&&(n+=`font-size: ${t};`),["span",{style:n},0]}},aA={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&typeof e=="string"?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let n="";return t&&(n+=`font-family: ${t};`),["span",{style:n},0]}},iA={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),n=e.getAttribute("title");return{href:t,title:n}}}],toDOM:e=>["a",e.attrs,0]},lA={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>({index:e.dataset.index})}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:sA,strong:cA,code:uA}=w1.marks,dA={em:sA,strong:cA,fontsize:oA,fontname:aA,code:uA,forecolor:nA,backcolor:rA,subscript:JI,superscript:QI,strikethrough:eA,underline:tA,link:iA,mark:lA},fA=jI,pA=dA,cg=new b1.Schema({nodes:fA,marks:pA}),dp=e=>{const t=`<div>${e}</div>`,o=new window.DOMParser().parseFromString(t,"text/html").body.firstElementChild;return b1.DOMParser.fromSchema(cg).parse(o)},ug=(e,t,n,o)=>new bd.EditorView(e,{state:Os.EditorState.create({doc:dp(t),plugins:GI(cg,o)}),...n});var Et;(function(e){e.RICH_TEXT_COMMAND="RICH_TEXT_COMMAND",e.SYNC_RICH_TEXT_ATTRS_TO_STORE="SYNC_RICH_TEXT_ATTRS_TO_STORE",e.OPEN_CHART_DATA_EDITOR="OPEN_CHART_DATA_EDITOR",e.OPEN_LATEX_EDITOR="OPEN_LATEX_EDITOR"})(Et||(Et={}));const bt=V_(),vA=(e,t,n)=>{const{selection:o,doc:a}=e;if(!o||!a)return e;const{from:i,to:l}=o,{nodes:s}=t,c=s.blockquote,u=s.list_item,d=s.paragraph,f=[];n=n||"";const v=new Set([c,u,d]);return a.nodesBetween(i,l,(p,h)=>{const m=p.type;return(p.attrs.align||"")!==n&&v.has(m)&&f.push({node:p,pos:h,nodeType:m}),!0}),f.length&&f.forEach(p=>{const{node:h,pos:m,nodeType:g}=p;let{attrs:E}=h;n?E={...E,align:n}:E={...E,align:null},e=e.setNodeMarkup(m,g,E,h.marks)}),e},hA=(e,t)=>{const{state:n}=e,{schema:o,selection:a}=n,i=vA(n.tr.setSelection(a),o,t);e.dispatch(i)};function mA(e,t,n,o){if(!e.doc)return e;const a=e.doc.nodeAt(t);if(!a)return e;const i=0,l=8;let s=(a.attrs[o]||0)+n;if(s<i&&(s=i),s>l&&(s=l),s===a.attrs[o])return e;const c={...a.attrs,[o]:s};return e.setNodeMarkup(t,a.type,c,a.marks)}const dg=(e,t,n,o)=>{const{selection:a,doc:i}=e;if(!a||!i||!(a instanceof Os.TextSelection||a instanceof Os.AllSelection))return e;const{from:l,to:s}=a;return i.nodesBetween(l,s,(c,u)=>{const d=c.type;return d.name==="paragraph"||d.name==="blockquote"?(e=mA(e,u,n,o),!1):!Rs(c,t)}),e},gA=(e,t)=>{const{state:n}=e,{schema:o,selection:a}=n,i=dg(n.tr.setSelection(a),o,t,"indent");return i.docChanged?(e.dispatch(i),!0):!1},EA=(e,t)=>{const{state:n}=e,{schema:o,selection:a}=n,i=dg(n.tr.setSelection(a),o,t,"textIndent");return i.docChanged?(e.dispatch(i),!0):!1},Ms=(e,t,n,o={})=>(a,i)=>{const{schema:l,selection:s}=a,{$from:c,$to:u}=s,d=c.blockRange(u);if(!d)return!1;const f=O1(p=>Rs(p,l))(s);if(d.depth>=1&&f&&d.depth-f.depth<=1){if(f.node.type===e&&!n)return Lo.liftListItem(t)(a,i);if(Rs(f.node,l)&&e.validContent(f.node.content)){const{tr:p}=a,h={...f.node.attrs,...o};return n&&(h.listStyleType=n),p.setNodeMarkup(f.pos,e,h),i&&i(p),!1}}const v={...o};return n&&(v.listStyleType=n),Lo.wrapInList(e,v)(a,i)},ei=(e,t)=>{const{state:n}=e,{schema:o,selection:a}=n,i=n.tr.setSelection(a),{doc:l}=i;if(!l)return i;const{from:s,to:c}=a;l.nodesBetween(s,c,(u,d)=>{if(Rs(u,o)&&s-3<=d&&c+3>=d+u.nodeSize){const f=Array.isArray(t)?t:[t];for(const v of f)i.setNodeAttribute(d,v.key,v.value)}return!1}),e.dispatch(i)},yA=(e,t)=>{const{state:n}=e,{schema:o,doc:a}=n;let i=[],l=o.nodes.paragraph;if(a.content.size>2){const d=a.resolve(1);i=[...d.marks()],l=d.parent.type}const c=t.split(`
@@ -33,7 +33,7 @@ echarts.use([`+O+"]);":"Unknown series "+b))}return}if(f==="tooltip"){if(_){proc
33
33
  `)){var g=new ms;g.newline=!0,u.add(g);return}var E=a.getSeriesByName(m)[0];if(!d.get(m)){if(E){var y=E.getData(),_=y.getVisual("legendLineStyle")||{},S=y.getVisual("legendIcon"),I=y.getVisual("style"),A=this._createItem(E,m,h,p,o,n,_,I,S,f,i);A.on("click",ia(Jm,m,null,i,v)).on("mouseover",ia(Gf,E.name,null,i,v)).on("mouseout",ia(zf,E.name,null,i,v)),a.ssr&&A.eachChild(function(x){var N=rt(x);N.seriesIndex=E.seriesIndex,N.dataIndex=h,N.ssrType="legend"}),d.set(m,!0)}else a.eachRawSeries(function(x){if(!d.get(m)&&x.legendVisualProvider){var N=x.legendVisualProvider;if(!N.containName(m))return;var T=N.indexOfName(m),L=N.getItemVisual(T,"style"),b=N.getItemVisual(T,"legendIcon"),O=Xn(L.fill);O&&O[3]===0&&(O[3]=.2,L=de(de({},L),{fill:_c(O,"rgba")}));var w=this._createItem(x,m,h,p,o,n,{},L,b,f,i);w.on("click",ia(Jm,null,m,i,v)).on("mouseover",ia(Gf,null,m,i,v)).on("mouseout",ia(zf,null,m,i,v)),a.ssr&&w.eachChild(function(C){var P=rt(C);P.seriesIndex=x.seriesIndex,P.dataIndex=h,P.ssrType="legend"}),d.set(m,!0)}},this);process.env.NODE_ENV!=="production"&&(d.get(m)||console.warn(m+" series not exists. Legend data should be same with series name or data name."))}},this),l&&this._createSelector(l,o,i,s,c)},t.prototype._createSelector=function(n,o,a,i,l){var s=this.getSelectorGroup();Uf(n,function(u){var d=u.type,f=new on({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:d==="all"?"legendAllSelect":"legendInverseSelect",legendId:o.id})}});s.add(f);var v=o.getModel("selectorLabel"),p=o.getModel(["emphasis","selectorLabel"]);Ya(f,{normal:v,emphasis:p},{defaultText:u.title}),gf(f)})},t.prototype._createItem=function(n,o,a,i,l,s,c,u,d,f,v){var p=n.visualDrawType,h=l.get("itemWidth"),m=l.get("itemHeight"),g=l.isSelected(o),E=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");d=_||d||"roundRect";var S=L8(d,i,c,u,p,g,v),I=new ms,A=i.getModel("textStyle");if(De(n.getLegendIcon)&&(!_||_==="inherit"))I.add(n.getLegendIcon({itemWidth:h,itemHeight:m,icon:d,iconRotate:E,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var x=_==="inherit"&&n.getData().getVisual("symbol")?E==="inherit"?n.getData().getVisual("symbolRotate"):E:0;I.add(C8({itemWidth:h,itemHeight:m,icon:d,iconRotate:x,itemStyle:S.itemStyle,symbolKeepAspect:y}))}var N=s==="left"?h+5:-5,T=s,L=l.get("formatter"),b=o;Le(L)&&L?b=L.replace("{name}",o??""):De(L)&&(b=L(o));var O=g?A.getTextColor():i.get("inactiveColor");I.add(new on({style:ll(A,{text:b,x:N,y:m/2,fill:O,align:T,verticalAlign:"middle"},{inheritColor:O})}));var w=new It({shape:I.getBoundingRect(),style:{fill:"transparent"}}),C=i.getModel("tooltip");return C.get("show")&&Pc({el:w,componentModel:l,itemName:o,itemTooltipOption:C.option}),I.add(w),I.eachChild(function(P){P.silent=!0}),w.silent=!f,this.getContentGroup().add(I),gf(I),I.__legendDataIndex=a,I},t.prototype.layoutInner=function(n,o,a,i,l,s){var c=this.getContentGroup(),u=this.getSelectorGroup();qi(n.get("orient"),c,n.get("itemGap"),a.width,a.height);var d=c.getBoundingRect(),f=[-d.x,-d.y];if(u.markRedraw(),c.markRedraw(),l){qi("horizontal",u,n.get("selectorItemGap",!0));var v=u.getBoundingRect(),p=[-v.x,-v.y],h=n.get("selectorButtonGap",!0),m=n.getOrient().index,g=m===0?"width":"height",E=m===0?"height":"width",y=m===0?"y":"x";s==="end"?p[m]+=d[g]+h:f[m]+=v[g]+h,p[1-m]+=d[E]/2-v[E]/2,u.x=p[0],u.y=p[1],c.x=f[0],c.y=f[1];var _={x:0,y:0};return _[g]=d[g]+h+v[g],_[E]=Math.max(d[E],v[E]),_[y]=Math.min(0,v[y]+p[1-m]),_}else return c.x=f[0],c.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(ir);function L8(e,t,n,o,a,i,l){function s(g,E){g.lineWidth==="auto"&&(g.lineWidth=E.lineWidth>0?2:0),Uf(g,function(y,_){g[_]==="inherit"&&(g[_]=E[_])})}var c=t.getModel("itemStyle"),u=c.getItemStyle(),d=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=c.getShallow("decal");u.decal=!f||f==="inherit"?o.decal:wf(f,l),u.fill==="inherit"&&(u.fill=o[a]),u.stroke==="inherit"&&(u.stroke=o[d]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?o:n).opacity),s(u,o);var v=t.getModel("lineStyle"),p=v.getLineStyle();if(s(p,n),u.fill==="auto"&&(u.fill=o.fill),u.stroke==="auto"&&(u.stroke=o.fill),p.stroke==="auto"&&(p.stroke=o.fill),!i){var h=t.get("inactiveBorderWidth"),m=u[d];u.lineWidth=h==="auto"?o.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=v.get("inactiveColor"),p.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}function C8(e){var t=e.icon||"roundRect",n=Gr(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function Jm(e,t,n,o){zf(e,t,n,o),n.dispatchAction({type:"legendToggleSelect",name:e??t}),Gf(e,t,n,o)}function J2(e){for(var t=e.getZr().storage.getDisplayList(),n,o=0,a=t.length;o<a&&!(n=t[o].states.emphasis);)o++;return n&&n.hoverLayer}function Gf(e,t,n,o){J2(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:o})}function zf(e,t,n,o){J2(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:o})}function x8(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(n){for(var o=0;o<t.length;o++)if(!t[o].isSelected(n.name))return!1;return!0})}function _i(e,t,n){var o=e==="allSelect"||e==="inverseSelect",a={},i=[];n.eachComponent({mainType:"legend",query:t},function(s){o?s[e]():s[e](t.name),Qm(s,a),i.push(s.componentIndex)});var l={};return n.eachComponent("legend",function(s){J(a,function(c,u){s[c?"select":"unSelect"](u)}),Qm(s,l)}),o?{selected:l,legendIndex:i}:{name:t.name,selected:l}}function Qm(e,t){var n=t||{};return J(e.getData(),function(o){var a=o.get("name");if(!(a===`
34
34
  `||a==="")){var i=e.isSelected(a);wa(n,a)?n[a]=n[a]&&i:n[a]=i}}),n}function b8(e){e.registerAction("legendToggleSelect","legendselectchanged",tn(_i,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",tn(_i,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",tn(_i,"inverseSelect")),e.registerAction("legendSelect","legendselected",tn(_i,"select")),e.registerAction("legendUnSelect","legendunselected",tn(_i,"unSelect"))}function Q2(e){e.registerComponentModel(Hf),e.registerComponentView(j2),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,x8),e.registerSubTypeDefaulter("legend",function(){return"plain"}),b8(e)}var w8=(function(e){ge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(n){this.option.scrollDataIndex=n},t.prototype.init=function(n,o,a){var i=zc(n);e.prototype.init.call(this,n,o,a),e1(this,n,i)},t.prototype.mergeOption=function(n,o){e.prototype.mergeOption.call(this,n,o),e1(this,this.option,n)},t.type="legend.scroll",t.defaultOption=UE(Hf.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t})(Hf);function e1(e,t,n){var o=e.getOrient(),a=[1,1];a[o.index]=0,Ma(t,n,{type:"box",ignoreSize:!!a})}var t1=_t,yd=["width","height"],_d=["x","y"],O8=(function(e){ge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new t1),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new t1)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(n,o,a,i,l,s,c){var u=this;e.prototype.renderInner.call(this,n,o,a,i,l,s,c);var d=this._controllerGroup,f=o.get("pageIconSize",!0),v=Te(f)?f:[f,f];h("pagePrev",0);var p=o.getModel("pageTextStyle");d.add(new on({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1);function h(m,g){var E=m+"DataIndex",y=VE(o.get("pageIcons",!0)[o.getOrient().name][g],{onclick:pt(u._pageGo,u,E,o,i)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});y.name=m,d.add(y)}},t.prototype.layoutInner=function(n,o,a,i,l,s){var c=this.getSelectorGroup(),u=n.getOrient().index,d=yd[u],f=_d[u],v=yd[1-u],p=_d[1-u];l&&qi("horizontal",c,n.get("selectorItemGap",!0));var h=n.get("selectorButtonGap",!0),m=c.getBoundingRect(),g=[-m.x,-m.y],E=He(a);l&&(E[d]=a[d]-m[d]-h);var y=this._layoutContentAndController(n,i,E,u,d,v,p,f);if(l){if(s==="end")g[u]+=y[d]+h;else{var _=m[d]+h;g[u]-=_,y[f]-=_}y[d]+=m[d]+h,g[1-u]+=y[p]+y[v]/2-m[v]/2,y[v]=Math.max(y[v],m[v]),y[p]=Math.min(y[p],m[p]+g[1-u]),c.x=g[0],c.y=g[1],c.markRedraw()}return y},t.prototype._layoutContentAndController=function(n,o,a,i,l,s,c,u){var d=this.getContentGroup(),f=this._containerGroup,v=this._controllerGroup;qi(n.get("orient"),d,n.get("itemGap"),i?a.width:null,i?null:a.height),qi("horizontal",v,n.get("pageButtonItemGap",!0));var p=d.getBoundingRect(),h=v.getBoundingRect(),m=this._showController=p[l]>a[l],g=[-p.x,-p.y];o||(g[i]=d[u]);var E=[0,0],y=[-h.x,-h.y],_=Ce(n.get("pageButtonGap",!0),n.get("itemGap",!0));if(m){var S=n.get("pageButtonPosition",!0);S==="end"?y[i]+=a[l]-h[l]:E[i]+=h[l]+_}y[1-i]+=p[s]/2-h[s]/2,d.setPosition(g),f.setPosition(E),v.setPosition(y);var I={x:0,y:0};if(I[l]=m?a[l]:p[l],I[s]=Math.max(p[s],h[s]),I[c]=Math.min(0,h[c]+y[1-i]),f.__rectSize=a[l],m){var A={x:0,y:0};A[l]=Math.max(a[l]-h[l]-_,0),A[s]=I[s],f.setClipPath(new It({shape:A})),f.__rectSize=A[l]}else v.eachChild(function(N){N.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(n);return x.pageIndex!=null&&Mt(d,{x:x.contentPosition[0],y:x.contentPosition[1]},m?n:null),this._updatePageInfoView(n,x),I},t.prototype._pageGo=function(n,o,a){var i=this._getPageInfo(o)[n];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:o.id})},t.prototype._updatePageInfoView=function(n,o){var a=this._controllerGroup;J(["pagePrev","pageNext"],function(d){var f=d+"DataIndex",v=o[f]!=null,p=a.childOfName(d);p&&(p.setStyle("fill",v?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),p.cursor=v?"pointer":"default")});var i=a.childOfName("pageText"),l=n.get("pageFormatter"),s=o.pageIndex,c=s!=null?s+1:0,u=o.pageCount;i&&l&&i.setStyle("text",Le(l)?l.replace("{current}",c==null?"":c+"").replace("{total}",u==null?"":u+""):l({current:c,total:u}))},t.prototype._getPageInfo=function(n){var o=n.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,l=n.getOrient().index,s=yd[l],c=_d[l],u=this._findTargetItemIndex(o),d=a.children(),f=d[u],v=d.length,p=v?1:0,h={contentPosition:[a.x,a.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return h;var m=S(f);h.contentPosition[l]=-m.s;for(var g=u+1,E=m,y=m,_=null;g<=v;++g)_=S(d[g]),(!_&&y.e>E.s+i||_&&!I(_,E.s))&&(y.i>E.i?E=y:E=_,E&&(h.pageNextDataIndex==null&&(h.pageNextDataIndex=E.i),++h.pageCount)),y=_;for(var g=u-1,E=m,y=m,_=null;g>=-1;--g)_=S(d[g]),(!_||!I(y,_.s))&&E.i<y.i&&(y=E,h.pagePrevDataIndex==null&&(h.pagePrevDataIndex=E.i),++h.pageCount,++h.pageIndex),E=_;return h;function S(A){if(A){var x=A.getBoundingRect(),N=x[c]+A[c];return{s:N,e:N+x[s],i:A.__legendDataIndex}}}function I(A,x){return A.e>=x&&A.s<=x+i}},t.prototype._findTargetItemIndex=function(n){if(!this._showController)return 0;var o,a=this.getContentGroup(),i;return a.eachChild(function(l,s){var c=l.__legendDataIndex;i==null&&c!=null&&(i=s),c===n&&(o=s)}),o??i},t.type="legend.scroll",t})(j2);function R8(e){e.registerAction("legendScroll","legendscroll",function(t,n){var o=t.scrollDataIndex;o!=null&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(o)})})}function k8(e){Vo(Q2),e.registerComponentModel(w8),e.registerComponentView(O8),R8(e)}function D8(e){Vo(Q2),Vo(k8)}var Td=Math.sin,Sd=Math.cos,e_=Math.PI,Io=Math.PI*2,P8=180/e_,t_=(function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,n){this._add("M",t,n)},e.prototype.lineTo=function(t,n){this._add("L",t,n)},e.prototype.bezierCurveTo=function(t,n,o,a,i,l){this._add("C",t,n,o,a,i,l)},e.prototype.quadraticCurveTo=function(t,n,o,a){this._add("Q",t,n,o,a)},e.prototype.arc=function(t,n,o,a,i,l){this.ellipse(t,n,o,o,0,a,i,l)},e.prototype.ellipse=function(t,n,o,a,i,l,s,c){var u=s-l,d=!c,f=Math.abs(u),v=xr(f-Io)||(d?u>=Io:-u>=Io),p=u>0?u%Io:u%Io+Io,h=!1;v?h=!0:xr(f)?h=!1:h=p>=e_==!!d;var m=t+o*Sd(l),g=n+a*Td(l);this._start&&this._add("M",m,g);var E=Math.round(i*P8);if(v){var y=1/this._p,_=(d?1:-1)*(Io-y);this._add("A",o,a,E,1,+d,t+o*Sd(l+_),n+a*Td(l+_)),y>.01&&this._add("A",o,a,E,0,+d,m,g)}else{var S=t+o*Sd(s),I=n+a*Td(s);this._add("A",o,a,E,+h,+d,S,I)}},e.prototype.rect=function(t,n,o,a){this._add("M",t,n),this._add("l",o,0),this._add("l",0,a),this._add("l",-o,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,n,o,a,i,l,s,c,u){for(var d=[],f=this._p,v=1;v<arguments.length;v++){var p=arguments[v];if(isNaN(p)){this._invalid=!0;return}d.push(Math.round(p*f)/f)}this._d.push(t+d.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e})(),uv="none",M8=Math.round;function B8(e){var t=e.fill;return t!=null&&t!==uv}function V8(e){var t=e.stroke;return t!=null&&t!==uv}var Yf=["lineCap","miterLimit","lineJoin"],$8=ye(Yf,function(e){return"stroke-"+e.toLowerCase()});function F8(e,t,n,o){var a=t.opacity==null?1:t.opacity;if(n instanceof On){e("opacity",a);return}if(B8(t)){var i=tl(t.fill);e("fill",i.color);var l=t.fillOpacity!=null?t.fillOpacity*i.opacity*a:i.opacity*a;l<1&&e("fill-opacity",l)}else e("fill",uv);if(V8(t)){var s=tl(t.stroke);e("stroke",s.color);var c=t.strokeNoScale?n.getLineScale():1,u=c?(t.lineWidth||0)/c:0,d=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*a:s.opacity*a,f=t.strokeFirst;if(u!==1&&e("stroke-width",u),f&&e("paint-order",f?"stroke":"fill"),d<1&&e("stroke-opacity",d),t.lineDash){var v=qp(n),p=v[0],h=v[1];p&&(h=M8(h||0),e("stroke-dasharray",p.join(",")),(h||o)&&e("stroke-dashoffset",h))}for(var m=0;m<Yf.length;m++){var g=Yf[m];if(t[g]!==Xs[g]){var E=t[g]||Xs[g];E&&e($8[m],E)}}}}var n_="http://www.w3.org/2000/svg",r_="http://www.w3.org/1999/xlink",H8="http://www.w3.org/2000/xmlns/",U8="http://www.w3.org/XML/1998/namespace",n1="ecmeta_";function o_(e){return document.createElementNS(n_,e)}function yt(e,t,n,o,a){return{tag:e,attrs:n||{},children:o,text:a,key:t}}function G8(e,t){var n=[];if(t)for(var o in t){var a=t[o],i=o;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),n.push(i))}return"<"+e+" "+n.join(" ")+">"}function z8(e){return"</"+e+">"}function dv(e,t){t=t||{};var n=t.newline?`
35
35
  `:"";function o(a){var i=a.children,l=a.tag,s=a.attrs,c=a.text;return G8(l,s)+(l!=="style"?SN(c):c||"")+(i?""+n+ye(i,function(u){return o(u)}).join(n)+n:"")+z8(l)}return o(e)}function Y8(e,t,n){n=n||{};var o=n.newline?`
36
- `:"",a=" {"+o,i=o+"}",l=ye(Ue(e),function(c){return c+a+ye(Ue(e[c]),function(u){return u+":"+e[c][u]+";"}).join(o)+i}).join(o),s=ye(Ue(t),function(c){return"@keyframes "+c+a+ye(Ue(t[c]),function(u){return u+a+ye(Ue(t[c][u]),function(d){var f=t[c][u][d];return d==="d"&&(f='path("'+f+'")'),d+":"+f+";"}).join(o)+i}).join(o)+i}).join(o);return!l&&!s?"":["<![CDATA[",l,s,"]]>"].join(o)}function Xf(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function r1(e,t,n,o){return yt("svg","root",{width:e,height:t,xmlns:n_,"xmlns:xlink":r_,version:"1.1",baseProfile:"full",viewBox:o?"0 0 "+e+" "+t:!1},n)}var X8=0;function a_(){return X8++}var o1={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ao="transform-origin";function W8(e,t,n){var o=de({},e.shape);de(o,t),e.buildPath(n,o);var a=new t_;return a.reset(Fg(e)),n.rebuildPath(a,1),a.generateStr(),a.getStr()}function K8(e,t){var n=t.originX,o=t.originY;(n||o)&&(e[Ao]=n+"px "+o+"px")}var q8={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function i_(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Z8(e,t,n){var o=e.shape.paths,a={},i,l;if(J(o,function(c){var u=Xf(n.zrId);u.animation=!0,Jc(c,{},u,!0);var d=u.cssAnims,f=u.cssNodes,v=Ue(d),p=v.length;if(p){l=v[p-1];var h=d[l];for(var m in h){var g=h[m];a[m]=a[m]||{d:""},a[m].d+=g.d||""}for(var E in f){var y=f[E].animation;y.indexOf(l)>=0&&(i=y)}}}),!!i){t.d=!1;var s=i_(a,n);return i.replace(l,s)}}function a1(e){return Le(e)?o1[e]?"cubic-bezier("+o1[e]+")":_p(e)?e:"":""}function Jc(e,t,n,o){var a=e.animators,i=a.length,l=[];if(e instanceof wE){var s=Z8(e,t,n);if(s)l.push(s);else if(!i)return}else if(!i)return;for(var c={},u=0;u<i;u++){var d=a[u],f=[d.getMaxTime()/1e3+"s"],v=a1(d.getClip().easing),p=d.getDelay();v?f.push(v):f.push("linear"),p&&f.push(p/1e3+"s"),d.getLoop()&&f.push("infinite");var h=f.join(" ");c[h]=c[h]||[h,[]],c[h][1].push(d)}function m(y){var _=y[1],S=_.length,I={},A={},x={},N="animation-timing-function";function T(Q,q,re){for(var G=Q.getTracks(),M=Q.getMaxTime(),R=0;R<G.length;R++){var X=G[R];if(X.needsAnimate()){var W=X.keyframes,te=X.propName;if(re&&(te=re(te)),te)for(var ee=0;ee<W.length;ee++){var ce=W[ee],se=Math.round(ce.time/M*100)+"%",F=a1(ce.easing),j=ce.rawValue;(Le(j)||tt(j))&&(q[se]=q[se]||{},q[se][te]=ce.rawValue,F&&(q[se][N]=F))}}}}for(var L=0;L<S;L++){var b=_[L],O=b.targetName;O?O==="shape"&&T(b,A):!o&&T(b,I)}for(var w in I){var C={};Yg(C,e),de(C,I[w]);var P=Hg(C),k=I[w][N];x[w]=P?{transform:P}:{},K8(x[w],C),k&&(x[w][N]=k)}var B,H=!0;for(var w in A){x[w]=x[w]||{};var U=!B,k=A[w][N];U&&(B=new Hr);var $=B.len();B.reset(),x[w].d=W8(e,A[w],B);var V=B.len();if(!U&&$!==V){H=!1;break}k&&(x[w][N]=k)}if(!H)for(var w in x)delete x[w].d;if(!o)for(var L=0;L<S;L++){var b=_[L],O=b.targetName;O==="style"&&T(b,x,function(G){return q8[G]})}for(var z=Ue(x),D=!0,Y,L=1;L<z.length;L++){var K=z[L-1],Z=z[L];if(x[K][Ao]!==x[Z][Ao]){D=!1;break}Y=x[K][Ao]}if(D&&Y){for(var w in x)x[w][Ao]&&delete x[w][Ao];t[Ao]=Y}if(St(z,function(Q){return Ue(x[Q]).length>0}).length){var oe=i_(x,n);return oe+" "+y[0]+" both"}}for(var g in c){var s=m(c[g]);s&&l.push(s)}if(l.length){var E=n.zrId+"-cls-"+a_();n.cssNodes["."+E]={animation:l.join(",")},t.class=E}}function j8(e,t,n){if(!e.ignore)if(e.isSilent()){var o={"pointer-events":"none"};i1(o,t,n)}else{var a=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=a.fill;if(!i){var l=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf("select")>=0&&s||l;c&&(i=Zd(c))}var u=a.lineWidth;if(u){var d=!a.strokeNoScale&&e.transform?e.transform[0]:1;u=u/d}var o={cursor:"pointer"};i&&(o.fill=i),a.stroke&&(o.stroke=a.stroke),u&&(o["stroke-width"]=u),i1(o,t,n)}}function i1(e,t,n,o){var a=JSON.stringify(e),i=n.cssStyleCache[a];i||(i=n.zrId+"-cls-"+a_(),n.cssStyleCache[a]=i,n.cssNodes["."+i+":hover"]=e),t.class=t.class?t.class+" "+i:i}var hl=Math.round;function l_(e){return e&&Le(e.src)}function s_(e){return e&&De(e.toDataURL)}function fv(e,t,n,o){F8(function(a,i){var l=a==="fill"||a==="stroke";l&&$g(i)?u_(t,e,a,o):l&&Tp(i)?d_(n,e,a,o):e[a]=i,l&&o.ssr&&i==="none"&&(e["pointer-events"]="visible")},t,n,!1),o6(n,e,o)}function pv(e,t){var n=xL(t);n&&(n.each(function(o,a){o!=null&&(e[(n1+a).toLowerCase()]=o+"")}),t.isSilent()&&(e[n1+"silent"]="true"))}function l1(e){return xr(e[0]-1)&&xr(e[1])&&xr(e[2])&&xr(e[3]-1)}function J8(e){return xr(e[4])&&xr(e[5])}function vv(e,t,n){if(t&&!(J8(t)&&l1(t))){var o=1e4;e.transform=l1(t)?"translate("+hl(t[4]*o)/o+" "+hl(t[5]*o)/o+")":jN(t)}}function s1(e,t,n){for(var o=e.points,a=[],i=0;i<o.length;i++)a.push(hl(o[i][0]*n)/n),a.push(hl(o[i][1]*n)/n);t.points=a.join(" ")}function c1(e){return!e.smooth}function Q8(e){var t=ye(e,function(n){return typeof n=="string"?[n,n]:n});return function(n,o,a){for(var i=0;i<t.length;i++){var l=t[i],s=n[l[0]];s!=null&&(o[l[1]]=hl(s*a)/a)}}}var e6={circle:[Q8(["cx","cy","r"])],polyline:[s1,c1],polygon:[s1,c1]};function t6(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName==="shape")return!0;return!1}function c_(e,t){var n=e.style,o=e.shape,a=e6[e.type],i={},l=t.animation,s="path",c=e.style.strokePercent,u=t.compress&&Fg(e)||4;if(a&&!t.willUpdate&&!(a[1]&&!a[1](o))&&!(l&&t6(e))&&!(c<1)){s=e.type;var d=Math.pow(10,u);a[0](o,i,d)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var v=e.path;f&&(v.beginPath(),e.buildPath(v,e.shape),e.pathUpdated());var p=v.getVersion(),h=e,m=h.__svgPathBuilder;(h.__svgPathVersion!==p||!m||c!==h.__svgPathStrokePercent)&&(m||(m=h.__svgPathBuilder=new t_),m.reset(u),v.rebuildPath(m,c),m.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=c),i.d=m.getStr()}return vv(i,e.transform),fv(i,n,e,t),pv(i,e),t.animation&&Jc(e,i,t),t.emphasis&&j8(e,i,t),yt(s,e.id+"",i)}function n6(e,t){var n=e.style,o=n.image;if(o&&!Le(o)&&(l_(o)?o=o.src:s_(o)&&(o=o.toDataURL())),!!o){var a=n.x||0,i=n.y||0,l=n.width,s=n.height,c={href:o,width:l,height:s};return a&&(c.x=a),i&&(c.y=i),vv(c,e.transform),fv(c,n,e,t),pv(c,e),t.animation&&Jc(e,c,t),yt("image",e.id+"",c)}}function r6(e,t){var n=e.style,o=n.text;if(o!=null&&(o+=""),!(!o||isNaN(n.x)||isNaN(n.y))){var a=n.font||Br,i=n.x||0,l=QN(n.y||0,Sc(a),n.textBaseline),s=JN[n.textAlign]||n.textAlign,c={"dominant-baseline":"central","text-anchor":s};if(vE(n)){var u="",d=n.fontStyle,f=pE(n.fontSize);if(!parseFloat(f))return;var v=n.fontFamily||mg,p=n.fontWeight;u+="font-size:"+f+";font-family:"+v+";",d&&d!=="normal"&&(u+="font-style:"+d+";"),p&&p!=="normal"&&(u+="font-weight:"+p+";"),c.style=u}else c.style="font: "+a;return o.match(/\s/)&&(c["xml:space"]="preserve"),i&&(c.x=i),l&&(c.y=l),vv(c,e.transform),fv(c,n,e,t),pv(c,e),t.animation&&Jc(e,c,t),yt("text",e.id+"",c,void 0,o)}}function u1(e,t){if(e instanceof We)return c_(e,t);if(e instanceof On)return n6(e,t);if(e instanceof ol)return r6(e,t)}function o6(e,t,n){var o=e.style;if(eL(o)){var a=tL(e),i=n.shadowCache,l=i[a];if(!l){var s=e.getGlobalScale(),c=s[0],u=s[1];if(!c||!u)return;var d=o.shadowOffsetX||0,f=o.shadowOffsetY||0,v=o.shadowBlur,p=tl(o.shadowColor),h=p.opacity,m=p.color,g=v/2/c,E=v/2/u,y=g+" "+E;l=n.zrId+"-s"+n.shadowIdx++,n.defs[l]=yt("filter",l,{id:l,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yt("feDropShadow","",{dx:d/c,dy:f/u,stdDeviation:y,"flood-color":m,"flood-opacity":h})]),i[a]=l}t.filter=Tc(l)}}function u_(e,t,n,o){var a=e[n],i,l={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(Bg(a))i="linearGradient",l.x1=a.x,l.y1=a.y,l.x2=a.x2,l.y2=a.y2;else if(Vg(a))i="radialGradient",l.cx=Ce(a.x,.5),l.cy=Ce(a.y,.5),l.r=Ce(a.r,.5);else{process.env.NODE_ENV!=="production"&&ba("Illegal gradient type.");return}for(var s=a.colorStops,c=[],u=0,d=s.length;u<d;++u){var f=jd(s[u].offset)*100+"%",v=s[u].color,p=tl(v),h=p.color,m=p.opacity,g={offset:f};g["stop-color"]=h,m<1&&(g["stop-opacity"]=m),c.push(yt("stop",u+"",g))}var E=yt(i,"",l,c),y=dv(E),_=o.gradientCache,S=_[y];S||(S=o.zrId+"-g"+o.gradientIdx++,_[y]=S,l.id=S,o.defs[S]=yt(i,S,l,c)),t[n]=Tc(S)}function d_(e,t,n,o){var a=e.style[n],i=e.getBoundingRect(),l={},s=a.repeat,c=s==="no-repeat",u=s==="repeat-x",d=s==="repeat-y",f;if(Mg(a)){var v=a.imageWidth,p=a.imageHeight,h=void 0,m=a.image;if(Le(m)?h=m:l_(m)?h=m.src:s_(m)&&(h=m.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Be(v,g),Be(p,g)}else if(v==null||p==null){var E=function(L,b){if(L){var O=L.elm,w=v||b.width,C=p||b.height;L.tag==="pattern"&&(u?(C=1,w/=i.width):d&&(w=1,C/=i.height)),L.attrs.width=w,L.attrs.height=C,O&&(O.setAttribute("width",w),O.setAttribute("height",C))}},y=Lp(h,null,e,function(L){c||E(A,L),E(f,L)});y&&y.width&&y.height&&(v=v||y.width,p=p||y.height)}f=yt("image","img",{href:h,width:v,height:p}),l.width=v,l.height=p}else a.svgElement&&(f=He(a.svgElement),l.width=a.svgWidth,l.height=a.svgHeight);if(f){var _,S;c?_=S=1:u?(S=1,_=l.width/i.width):d?(_=1,S=l.height/i.height):l.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(l.width=_),S!=null&&!isNaN(S)&&(l.height=S);var I=Hg(a);I&&(l.patternTransform=I);var A=yt("pattern","",l,[f]),x=dv(A),N=o.patternCache,T=N[x];T||(T=o.zrId+"-p"+o.patternIdx++,N[x]=T,l.id=T,A=o.defs[T]=yt("pattern",T,l,[f])),t[n]=Tc(T)}}function a6(e,t,n){var o=n.clipPathCache,a=n.defs,i=o[e.id];if(!i){i=n.zrId+"-c"+n.clipPathIdx++;var l={id:i};o[e.id]=i,a[i]=yt("clipPath",i,l,[c_(e,n)])}t["clip-path"]=Tc(i)}function d1(e){return document.createTextNode(e)}function No(e,t,n){e.insertBefore(t,n)}function f1(e,t){e.removeChild(t)}function p1(e,t){e.appendChild(t)}function f_(e){return e.parentNode}function p_(e){return e.nextSibling}function Id(e,t){e.textContent=t}var v1=58,i6=120,l6=yt("","");function Wf(e){return e===void 0}function Fn(e){return e!==void 0}function s6(e,t,n){for(var o={},a=t;a<=n;++a){var i=e[a].key;i!==void 0&&(process.env.NODE_ENV!=="production"&&o[i]!=null&&console.error("Duplicate key "+i),o[i]=a)}return o}function Pi(e,t){var n=e.key===t.key,o=e.tag===t.tag;return o&&n}function ml(e){var t,n=e.children,o=e.tag;if(Fn(o)){var a=e.elm=o_(o);if(hv(l6,e),Te(n))for(t=0;t<n.length;++t){var i=n[t];i!=null&&p1(a,ml(i))}else Fn(e.text)&&!xe(e.text)&&p1(a,d1(e.text))}else e.elm=d1(e.text);return e.elm}function v_(e,t,n,o,a){for(;o<=a;++o){var i=n[o];i!=null&&No(e,ml(i),t)}}function dc(e,t,n,o){for(;n<=o;++n){var a=t[n];if(a!=null)if(Fn(a.tag)){var i=f_(a.elm);f1(i,a.elm)}else f1(e,a.elm)}}function hv(e,t){var n,o=t.elm,a=e&&e.attrs||{},i=t.attrs||{};if(a!==i){for(n in i){var l=i[n],s=a[n];s!==l&&(l===!0?o.setAttribute(n,""):l===!1?o.removeAttribute(n):n==="style"?o.style.cssText=l:n.charCodeAt(0)!==i6?o.setAttribute(n,l):n==="xmlns:xlink"||n==="xmlns"?o.setAttributeNS(H8,n,l):n.charCodeAt(3)===v1?o.setAttributeNS(U8,n,l):n.charCodeAt(5)===v1?o.setAttributeNS(r_,n,l):o.setAttribute(n,l))}for(n in a)n in i||o.removeAttribute(n)}}function c6(e,t,n){for(var o=0,a=0,i=t.length-1,l=t[0],s=t[i],c=n.length-1,u=n[0],d=n[c],f,v,p,h;o<=i&&a<=c;)l==null?l=t[++o]:s==null?s=t[--i]:u==null?u=n[++a]:d==null?d=n[--c]:Pi(l,u)?(da(l,u),l=t[++o],u=n[++a]):Pi(s,d)?(da(s,d),s=t[--i],d=n[--c]):Pi(l,d)?(da(l,d),No(e,l.elm,p_(s.elm)),l=t[++o],d=n[--c]):Pi(s,u)?(da(s,u),No(e,s.elm,l.elm),s=t[--i],u=n[++a]):(Wf(f)&&(f=s6(t,o,i)),v=f[u.key],Wf(v)?No(e,ml(u),l.elm):(p=t[v],p.tag!==u.tag?No(e,ml(u),l.elm):(da(p,u),t[v]=void 0,No(e,p.elm,l.elm))),u=n[++a]);(o<=i||a<=c)&&(o>i?(h=n[c+1]==null?null:n[c+1].elm,v_(e,h,n,a,c)):dc(e,t,o,i))}function da(e,t){var n=t.elm=e.elm,o=e.children,a=t.children;e!==t&&(hv(e,t),Wf(t.text)?Fn(o)&&Fn(a)?o!==a&&c6(n,o,a):Fn(a)?(Fn(e.text)&&Id(n,""),v_(n,null,a,0,a.length-1)):Fn(o)?dc(n,o,0,o.length-1):Fn(e.text)&&Id(n,""):e.text!==t.text&&(Fn(o)&&dc(n,o,0,o.length-1),Id(n,t.text)))}function u6(e,t){if(Pi(e,t))da(e,t);else{var n=e.elm,o=f_(n);ml(t),o!==null&&(No(o,t.elm,p_(n)),dc(o,[e],0,0))}return t}var d6=0,f6=(function(){function e(t,n,o){if(this.type="svg",this.refreshHover=h1("refreshHover"),this.configLayer=h1("configLayer"),this.storage=n,this._opts=o=de({},o),this.root=t,this._id="zr"+d6++,this._oldVNode=r1(o.width,o.height),t&&!o.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=o_("svg");hv(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(o.width,o.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",u6(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return u1(t,Xf(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var n=this.storage.getDisplayList(!0),o=this._width,a=this._height,i=Xf(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var l=[],s=this._bgVNode=p6(o,a,this._backgroundColor,i);s&&l.push(s);var c=t.compress?null:this._mainVNode=yt("g","main",{},[]);this._paintList(n,i,c?c.children:l),c&&l.push(c);var u=ye(Ue(i.defs),function(v){return i.defs[v]});if(u.length&&l.push(yt("defs","defs",{},u)),t.animation){var d=Y8(i.cssNodes,i.cssAnims,{newline:!0});if(d){var f=yt("style","stl",{},[],d);l.push(f)}}return r1(o,a,l,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},dv(this.renderToVNode({animation:Ce(t.cssAnimation,!0),emphasis:Ce(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ce(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,n,o){for(var a=t.length,i=[],l=0,s,c,u=0,d=0;d<a;d++){var f=t[d];if(!f.invisible){var v=f.__clipPaths,p=v&&v.length||0,h=c&&c.length||0,m=void 0;for(m=Math.max(p-1,h-1);m>=0&&!(v&&c&&v[m]===c[m]);m--);for(var g=h-1;g>m;g--)l--,s=i[l-1];for(var E=m+1;E<p;E++){var y={};a6(v[E],y,n);var _=yt("g","clip-g-"+u++,y,[]);(s?s.children:o).push(_),i[l++]=_,s=_}c=v;var S=u1(f,n);S&&(s?s.children:o).push(S)}}},e.prototype.resize=function(t,n){var o=this._opts,a=this.root,i=this._viewport;if(t!=null&&(o.width=t),n!=null&&(o.height=n),a&&i&&(i.style.display="none",t=H0(a,0,o),n=H0(a,1,o),i.style.display=""),this._width!==t||this._height!==n){if(this._width=t,this._height=n,i){var l=i.style;l.width=t+"px",l.height=n+"px"}if(Tp(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",n));var c=this._bgVNode&&this._bgVNode.elm;c&&(c.setAttribute("width",t),c.setAttribute("height",n))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var n=this.renderToString(),o="data:image/svg+xml;";return t?(n=rL(n),n&&o+"base64,"+n):o+"charset=UTF-8,"+encodeURIComponent(n)},e})();function h1(e){return function(){process.env.NODE_ENV!=="production"&&ba('In SVG mode painter not support method "'+e+'"')}}function p6(e,t,n,o){var a;if(n&&n!=="none")if(a=yt("rect","bg",{width:e,height:t,x:"0",y:"0"}),$g(n))u_({fill:n},a.attrs,"fill",o);else if(Tp(n))d_({style:{fill:n},dirty:nn,getBoundingRect:function(){return{width:e,height:t}}},a.attrs,"fill",o);else{var i=tl(n),l=i.color,s=i.opacity;a.attrs.fill=l,s<1&&(a.attrs["fill-opacity"]=s)}return a}function v6(e){e.registerPainter("svg",f6)}const h6={__name:"Chart",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},type:{type:[Object,String],required:!0},data:{type:Object,required:!0},themeColors:{type:Array,required:!0},textColor:{type:String},lineColor:{type:String},options:{type:Object}},setup(e){Vo([TO,iO,OO,f8,I8,D8,v6]);const t=e;let n=null;const o=r.useTemplateRef("chartRef"),a=r.computed(()=>{let l=[];if(t.themeColors.length>=10)l=t.themeColors;else if(t.themeColors.length===1)l=we(t.themeColors[0]).analogous(10).map(s=>s.toRgbString());else{const s=t.themeColors.length,c=we(t.themeColors[s-1]).analogous(11-s).map(u=>u.toRgbString());l=[...t.themeColors.slice(0,s-1),...c]}return l}),i=()=>{var l,s;const c=HA({type:t.type,data:t.data,themeColors:a.value,textColor:t.textColor,lineColor:t.lineColor,lineSmooth:((l=t.options)===null||l===void 0?void 0:l.lineSmooth)||!1,stack:((s=t.options)===null||s===void 0?void 0:s.stack)||!1});c&&n.setOption(c,!0)};return r.onMounted(()=>{n=lb(o.value,null,{renderer:"svg"}),i();const l=()=>n.resize();new ResizeObserver(l).observe(o.value)}),r.watch(()=>t.type,i),r.watch(()=>t.data,i),r.watch(()=>t.themeColors,i),r.watch(()=>t.textColor,i),(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"chart",ref_key:"chartRef",ref:o},null,512))}},h_=ie(h6,[["__scopeId","data-v-9bffff48"]]),m6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=a=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo))},o=()=>{bt.emit(Et.OPEN_CHART_DATA_EDITOR)};return(a,i)=>{const l=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-chart",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",style:r.normalizeStyle({backgroundColor:e.elementInfo.fill}),onMousedown:i[0]||(i[0]=s=>n(s)),onTouchstart:i[1]||(i[1]=s=>n(s)),onDblclick:i[2]||(i[2]=s=>o())},[r.createVNode(gc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),r.createVNode(h_,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,lineColor:e.elementInfo.lineColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","lineColor","options"])],36)),[[l,e.contextmenus]])],4)],6)}}},g6=ie(m6,[["__scopeId","data-v-72eb0bdc"]]),m_=e=>({hideCells:r.computed(()=>{const n=[];for(let o=0;o<e.value.length;o++){const a=e.value[o];for(let i=0;i<a.length;i++){const l=a[i];if(l.colspan>1||l.rowspan>1)for(let s=o;s<o+l.rowspan;s++)for(let c=s===o?i+1:i;c<i+l.colspan;c++)n.push(`${s}_${c}`)}}return n})}),g_=e=>{const t=r.ref(["",""]);return r.watch(()=>e.value,()=>{e.value&&(t.value=H1(e.value.color))},{immediate:!0}),{subThemeColor:t}},E6=["innerHTML"],y6={__name:"CustomTextarea",props:{value:{type:String,default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const n=e,o=t,a=r.useTemplateRef("textareaRef"),i=r.ref(""),l=r.ref(!1);r.watch(()=>n.value,()=>{l.value||(i.value=n.value,a.value&&(a.value.innerHTML=n.value))},{immediate:!0});const s=()=>{if(!a.value)return;const d=a.value.innerHTML;o("updateValue",d)},c=()=>{l.value=!0,a.value&&(a.value.onpaste=d=>{if(d.preventDefault(),!d.clipboardData)return;const f=d.clipboardData.items[0];f&&f.kind==="string"&&(f.type==="text/plain"?f.getAsString(v=>{if(typeof rp(v)=="object")return;const h=X1(v);if(h){o("insertExcelData",h),a.value&&(a.value.innerHTML=h[0][0]);return}document.execCommand("insertText",!1,v)}):f.type==="text/html"&&f.getAsString(v=>{const p=W1(v);p&&(o("insertExcelData",p),a.value&&(a.value.innerHTML=p[0][0]))}))})},u=()=>{l.value=!1,a.value&&(a.value.onpaste=null)};return r.onBeforeUnmount(()=>{a.value&&(a.value.onpaste=null)}),(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:"custom-textarea",ref_key:"textareaRef",ref:a,contenteditable:!0,onFocus:f[0]||(f[0]=v=>c()),onBlur:f[1]||(f[1]=v=>u()),onInput:f[2]||(f[2]=v=>s()),innerHTML:i.value},null,40,E6))}},_6=ie(y6,[["__scopeId","data-v-b6560cf9"]]),E_=e=>{if(!e)return{};const{bold:t,em:n,underline:o,strikethrough:a,color:i,backcolor:l,fontsize:s,fontname:c,align:u}=e;let d=`${o?"underline":""} ${a?"line-through":""}`;return d===" "&&(d="none"),{fontWeight:t?"bold":"normal",fontStyle:n?"italic":"normal",textDecoration:d,color:i||"#000",backgroundColor:l||"",fontSize:s||"14px",fontFamily:c||"",textAlign:u||"left"}},y_=e=>e.replace(/\n/g,"</br>").replace(/ /g,"&nbsp;"),T6={key:0,class:"handler"},S6=["onMousedown"],I6=["width"],A6=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],N6=["innerHTML"],L6={__name:"EditableTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const n=e,{t:o}=_e(),a=t,{canvasScale:i}=ne.storeToRefs(fe()),l=r.ref(!1),s=r.ref([]),c=r.ref([]),u=r.computed({get(){return n.data},set(G){a("change",G)}}),d=r.computed(()=>n.theme),{subThemeColor:f}=g_(d),v=r.ref([]),p=r.computed(()=>v.value.reduce((G,M)=>G+M));r.watch([()=>n.colWidths,()=>n.width],()=>{v.value=n.colWidths.map(G=>G*n.width)},{immediate:!0});const h=()=>{s.value=[],c.value=[]};r.watch(()=>n.editable,()=>{n.editable||h()});const m=r.computed(()=>{const G=[];for(let M=1;M<v.value.length+1;M++){const R=v.value.slice(0,M).reduce((X,W)=>X+W);G.push(R)}return G}),g=r.computed(()=>n.data),{hideCells:E}=m_(g),y=r.computed(()=>{if(!s.value.length)return[];const[G,M]=s.value;if(!c.value.length)return[`${G}_${M}`];const[R,X]=c.value;if(G===R&&M===X)return[`${G}_${M}`];const W=[],te=Math.min(G,R),ee=Math.min(M,X),ce=Math.max(G,R),se=Math.max(M,X);for(let F=0;F<u.value.length;F++){const j=u.value[F];for(let le=0;le<j.length;le++)F>=te&&F<=ce&&le>=ee&&le<=se&&W.push(`${F}_${le}`)}return W});r.watch(y,(G,M)=>{Xe.isEqual(G,M)||a("changeSelectedCells",y.value)});const _=r.computed(()=>y.value.length>1?null:y.value[0]),S=()=>l.value=!1,I=(G,M,R)=>{G.button===0&&(c.value=[],l.value=!0,s.value=[M,R])},A=(G,M)=>{l.value&&(c.value=[G,M])};r.onMounted(()=>{document.addEventListener("mouseup",S)}),r.onUnmounted(()=>{document.removeEventListener("mouseup",S)});const x=(G,M)=>E.value.includes(`${G}_${M}`),N=G=>{const M=u.value.length-1;s.value=[0,G],c.value=[M,G]},T=G=>{const M=u.value[G].length-1;s.value=[G,0],c.value=[G,M]},L=()=>{const G=u.value.length-1,M=u.value[G].length-1;s.value=[0,0],c.value=[G,M]},b=G=>{const M=JSON.parse(JSON.stringify(u.value)),R=u.value[G],X=[];for(let W=0;W<R.length;W++)x(G,W)&&X.push(W);for(const W of X)for(let te=G;te>=0;te--)if(!x(te,W)){M[te][W].rowspan=M[te][W].rowspan-1;break}M.splice(G,1),u.value=M},O=G=>{const M=JSON.parse(JSON.stringify(u.value)),R=[];for(let X=0;X<u.value.length;X++)x(X,G)&&R.push(X);for(const X of R)for(let W=G;W>=0;W--)if(!x(X,W)){M[X][W].colspan=M[X][W].colspan-1;break}u.value=M.map(X=>(X.splice(G,1),X)),v.value.splice(G,1),a("changeColWidths",v.value)},w=G=>{const M=JSON.parse(JSON.stringify(u.value)),R=[];for(let X=0;X<M[0].length;X++)R.push({colspan:1,rowspan:1,text:"",id:Ne.nanoid(10)});M.splice(G,0,R),u.value=M},C=G=>{u.value=u.value.map(M=>{const R={colspan:1,rowspan:1,text:"",id:Ne.nanoid(10)};return M.splice(G,0,R),M}),v.value.splice(G,0,100),a("changeColWidths",v.value)},P=(G,M)=>{let R=JSON.parse(JSON.stringify(u.value));const X={colspan:1,rowspan:1,text:""};if(G){const W=[];for(let te=0;te<G;te++){const ee=[];for(let ce=0;ce<R[0].length;ce++)ee.push({...X,id:Ne.nanoid(10)});W.push(ee)}R=[...R,...W]}M&&(R=R.map(W=>{const te=[];for(let ee=0;ee<M;ee++){const ce={...X,id:Ne.nanoid(10)};te.push(ce)}return[...W,...te]}),v.value=[...v.value,...new Array(M).fill(100)],a("changeColWidths",v.value)),u.value=R},k=()=>{const[G,M]=s.value,[R,X]=c.value,W=Math.min(G,R),te=Math.min(M,X),ee=Math.max(G,R),ce=Math.max(M,X),se=JSON.parse(JSON.stringify(u.value));se[W][te].rowspan=ee-W+1,se[W][te].colspan=ce-te+1,u.value=se,h()},B=(G,M)=>{const R=JSON.parse(JSON.stringify(u.value));R[G][M].rowspan=1,R[G][M].colspan=1,u.value=R,h()},H=(G,M)=>{h();let R=!0;const X=v.value[M],W=G.pageX,te=50;document.onmousemove=ee=>{if(!R)return;const ce=(ee.pageX-W)/i.value,se=X+ce<te?te:Math.round(X+ce);v.value[M]=se},document.onmouseup=()=>{R=!1,document.onmousemove=null,document.onmouseup=null,a("changeColWidths",v.value)}},U=()=>{const G=JSON.parse(JSON.stringify(u.value));for(let M=0;M<G.length;M++)for(let R=0;R<G[M].length;R++)y.value.includes(`${M}_${R}`)&&(G[M][R].text="");u.value=G},$=()=>{r.nextTick(()=>{const G=document.querySelector(".cell-text.active");G&&G.focus()})},V=()=>{const G=(W,te)=>u.value[W]?u.value[W][te]?x(W,te)?G(W,te+1):[W,te]:G(W+1,0):null;c.value=[];const M=s.value[0],R=s.value[1]+1,X=G(M,R);X?s.value=X:(w(M+1),s.value=[M+1,0]),$()},z=G=>{const M=+y.value[0].split("_")[0],R=+y.value[0].split("_")[1],X=u.value.length,W=u.value[0].length,te=ee=>{if(ee[0]<0||ee[1]<0||ee[0]>X-1||ee[1]>W-1)return[0,0];const ce=`${ee[0]}_${ee[1]}`;return E.value.includes(ce)?G==="UP"?te([ee[0],ee[1]-1]):G==="DOWN"?te([ee[0],ee[1]-1]):G==="LEFT"?te([ee[0]-1,ee[1]]):G==="RIGHT"?te([ee[0]-1,ee[1]]):[0,0]:ee};if(G==="UP"){const ee=M-1;if(ee<0)return;c.value=[],s.value=te([ee,R])}else if(G==="DOWN"){const ee=M+1;if(ee>X-1)return;c.value=[],s.value=te([ee,R])}else if(G==="LEFT"){const ee=R-1;if(ee<0)return;c.value=[],s.value=te([M,ee])}else if(G==="RIGHT"){const ee=R+1;if(ee>W-1)return;c.value=[],s.value=te([M,ee])}$()},D=G=>{var M;const R=window.getSelection();if(R&&R.rangeCount>0){const X=R.getRangeAt(0),W=X.cloneRange();W.selectNodeContents(G),W.setEnd(X.startContainer,X.startOffset);const te=W.toString().length;W.setEnd(X.endContainer,X.endOffset);const ee=W.toString().length,ce=((M=G.textContent)===null||M===void 0?void 0:M.length)||0;return{start:te,end:ee,len:ce}}return null},Y=G=>{if(!n.editable||!y.value.length)return;const M=G.key.toUpperCase();if(y.value.length<2){if(M===Ee.TAB)G.preventDefault(),V();else if(G.ctrlKey&&M===Ee.UP){G.preventDefault();const R=+y.value[0].split("_")[0];w(R)}else if(G.ctrlKey&&M===Ee.DOWN){G.preventDefault();const R=+y.value[0].split("_")[0];w(R+1)}else if(G.ctrlKey&&M===Ee.LEFT){G.preventDefault();const R=+y.value[0].split("_")[1];C(R)}else if(G.ctrlKey&&M===Ee.RIGHT){G.preventDefault();const R=+y.value[0].split("_")[1];C(R+1)}else if(M===Ee.UP){const R=D(G.target);R&&R.start===R.end&&R.start===0&&z("UP")}else if(M===Ee.DOWN){const R=D(G.target);R&&R.start===R.end&&R.start===R.len&&z("DOWN")}else if(M===Ee.LEFT){const R=D(G.target);R&&R.start===R.end&&R.start===0&&z("LEFT")}else if(M===Ee.RIGHT){const R=D(G.target);R&&R.start===R.end&&R.start===R.len&&z("RIGHT")}}else M===Ee.DELETE&&U()};r.onMounted(()=>{document.addEventListener("keydown",Y)}),r.onUnmounted(()=>{document.removeEventListener("keydown",Y)});const K=Xe.debounce(function(G,M,R){u.value[M][R].text=G,a("change",u.value)},300,{trailing:!0}),Z=(G,M,R)=>{const X=G.length,W=G[0].length;let te=0,ee=0;M+X>u.value.length&&(te=M+X-u.value.length),R+W>u.value[0].length&&(ee=R+W-u.value[0].length),(te||ee)&&P(te,ee),r.nextTick(()=>{for(let ce=0;ce<X;ce++)for(let se=0;se<W;se++)u.value[M+ce][R+se]&&(u.value[M+ce][R+se].text=G[ce][se]);a("change",u.value)})},oe=()=>{const G=[];for(let M=0;M<u.value.length;M++){const R=u.value[M],X=[];for(let W=0;W<R.length;W++)x(M,W)||X.push(R[W]);X.length&&G.push(X)}return G},Q=()=>{const G=oe(),M=G.length>1,R=G[0].length>1;return{canDeleteRow:M,canDeleteCol:R}},q=(G,M)=>{const R=y.value.length>1,X=u.value[G][M],W=R,te=!R&&(X.rowspan>1||X.colspan>1);return{canMerge:W,canSplit:te}},re=G=>{const M=G.dataset.cellIndex,R=+M.split("_")[0],X=+M.split("_")[1];y.value.includes(`${R}_${X}`)||(s.value=[R,X],c.value=[]);const{canMerge:W,canSplit:te}=q(R,X),{canDeleteRow:ee,canDeleteCol:ce}=Q();return[{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_COL"),children:[{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_COL_LEFT"),handler:()=>C(X)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_COL_RIGHT"),handler:()=>C(X+1)}]},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_ROW"),children:[{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_ROW_TOP"),handler:()=>w(R)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_ROW_BOTTOM"),handler:()=>w(R+1)}]},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.DELETE_COL"),disable:!ce,handler:()=>O(X)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.DELETE_ROW"),disable:!ee,handler:()=>b(R)},{divider:!0},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.MERGE_CELLS"),disable:!W,handler:k},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SPLIT_CELLS"),disable:!te,handler:()=>B(R,X)},{divider:!0},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SELECT_COL"),handler:()=>N(X)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SELECT_ROW"),handler:()=>T(R)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SELECT_ALL"),handler:L}]};return(G,M)=>{const R=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:"editable-table",style:r.normalizeStyle({width:p.value+"px"})},[e.editable?(r.openBlock(),r.createElementBlock("div",T6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(X,W)=>(r.openBlock(),r.createElementBlock("div",{class:"drag-line",key:W,style:r.normalizeStyle({left:X+"px"}),onMousedown:te=>H(te,W)},null,44,S6))),128))])):r.createCommentVNode("",!0),r.createElementVNode("table",{class:r.normalizeClass({theme:d.value,"row-header":d.value?.rowHeader,"row-footer":d.value?.rowFooter,"col-header":d.value?.colHeader,"col-footer":d.value?.colFooter}),style:r.normalizeStyle(`--themeColor: ${d.value?.color}; --subThemeColor1: ${r.unref(f)[0]}; --subThemeColor2: ${r.unref(f)[1]}`)},[r.createElementVNode("colgroup",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,(X,W)=>(r.openBlock(),r.createElementBlock("col",{span:"1",key:W,width:X},null,8,I6))),128))]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,(X,W)=>(r.openBlock(),r.createElementBlock("tr",{key:W,style:r.normalizeStyle({height:e.cellMinHeight+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(X,(te,ee)=>r.withDirectives((r.openBlock(),r.createElementBlock("td",{class:r.normalizeClass(["cell",{selected:y.value.includes(`${W}_${ee}`)&&y.value.length>1,active:_.value===`${W}_${ee}`}]),style:r.normalizeStyle({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...r.unref(E_)(te.style)}),key:te.id,rowspan:te.rowspan,colspan:te.colspan,"data-cell-index":`${W}_${ee}`,onMousedown:ce=>I(ce,W,ee),onMouseenter:ce=>A(W,ee)},[_.value===`${W}_${ee}`?(r.openBlock(),r.createBlock(_6,{key:0,class:r.normalizeClass(["cell-text",{active:_.value===`${W}_${ee}`}]),style:r.normalizeStyle({minHeight:e.cellMinHeight-4+"px"}),value:te.text,onUpdateValue:ce=>r.unref(K)(ce,W,ee),onInsertExcelData:ce=>Z(ce,W,ee)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):(r.openBlock(),r.createElementBlock("div",{key:1,class:"cell-text",style:r.normalizeStyle({minHeight:e.cellMinHeight-4+"px"}),innerHTML:r.unref(y_)(te.text)},null,12,N6))],46,A6)),[[r.vShow,!r.unref(E).includes(`${W}_${ee}`)],[R,ce=>re(ce)]])),128))],4))),128))])],6)],4)}}},C6=ie(L6,[["__scopeId","data-v-ac64b07f"]]),x6={class:"element-content"},b6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=fe(),o=pe(),{t:a}=_e(),{canvasScale:i,handleElementId:l,isScaling:s}=ne.storeToRefs(n),c=r.useTemplateRef("elementRef"),{addHistorySnapshot:u}=be(),d=_=>{t.elementInfo.lock||(_.stopPropagation(),t.selectElement(_,t.elementInfo))},f=r.ref(!1);r.watch(l,()=>{l.value!==t.elementInfo.id&&(f.value=!1)}),r.watch(f,()=>{n.setDisableHotkeysState(f.value)});const v=()=>{t.elementInfo.lock||(f.value=!0)},p=r.ref(-1);r.watch(s,()=>{l.value===t.elementInfo.id&&(s.value&&(f.value=!1),!s.value&&p.value!==-1&&(o.updateElement({id:t.elementInfo.id,props:{height:p.value}}),p.value=-1))});const h=_=>{const S=_[0].contentRect;if(!c.value)return;const I=S.height;t.elementInfo.height!==I&&(s.value?p.value=I:o.updateElement({id:t.elementInfo.id,props:{height:I}}))},m=new ResizeObserver(h);r.onMounted(()=>{c.value&&m.observe(c.value)}),r.onUnmounted(()=>{c.value&&m.unobserve(c.value)});const g=_=>{o.updateElement({id:t.elementInfo.id,props:{data:_}}),u()},E=_=>{const S=_.reduce((A,x)=>A+x),I=_.map(A=>A/S);o.updateElement({id:t.elementInfo.id,props:{width:S,colWidths:I}}),u()},y=_=>{r.nextTick(()=>n.setSelectedTableCells(_))};return(_,S)=>{const I=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:c,style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",x6,[r.createVNode(C6,{onMousedown:S[0]||(S[0]=r.withModifiers(()=>{},["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:f.value,onChange:S[1]||(S[1]=A=>g(A)),onChangeColWidths:S[2]||(S[2]=A=>E(A)),onChangeSelectedCells:S[3]||(S[3]=A=>y(A))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!f.value||e.elementInfo.lock?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:S[4]||(S[4]=A=>v()),onMousedown:S[5]||(S[5]=A=>d(A)),onTouchstart:S[6]||(S[6]=A=>d(A))},[r.unref(l)===e.elementInfo.id?(r.openBlock(),r.createElementBlock("div",{key:0,class:"mask-tip",style:r.normalizeStyle({transform:`scale(${1/r.unref(i)})`})},r.toDisplayString(r.unref(a)("PPT_COMPONENTS.TABLE_DBLCLICK_EDIT")),5)):r.createCommentVNode("",!0)],34)):r.createCommentVNode("",!0)])),[[I,e.contextmenus]])],4)],6)}}},w6=ie(b6,[["__scopeId","data-v-a259991f"]]),O6=["width","height","stroke","stroke-width"],R6=["transform"],k6=["d"],D6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=a=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo))},o=()=>{bt.emit(Et.OPEN_LATEX_EDITOR)};return(a,i)=>{const l=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-latex",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",onMousedown:i[0]||(i[0]=s=>n(s)),onTouchstart:i[1]||(i[1]=s=>n(s)),onDblclick:i[2]||(i[2]=s=>o())},[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{d:e.elementInfo.path},null,8,k6)],8,R6)],8,O6))],32)),[[l,e.contextmenus]])],4)],6)}}},P6=ie(D6,[["__scopeId","data-v-3b9080fc"]]),M6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=(a,i=!0)=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo,i))};return(a,i)=>{const l=r.resolveComponent("VideoPlayer"),s=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-video",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",onMousedown:i[2]||(i[2]=c=>o(c,!1)),onTouchstart:i[3]||(i[3]=c=>o(c,!1))},[r.createVNode(l,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:r.unref(n)},null,8,["width","height","src","poster","scale"]),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(["t","b","l","r"],c=>r.createElementVNode("div",{class:r.normalizeClass(["handler-border",c]),key:c,onMousedown:i[0]||(i[0]=u=>o(u)),onTouchstart:i[1]||(i[1]=u=>o(u))},null,34)),64))],32)),[[s,e.contextmenus]])],4)],6)}}},B6=ie(M6,[["__scopeId","data-v-60bb0bc4"]]),V6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,handleElementId:o}=ne.storeToRefs(fe()),{viewportRatio:a,viewportSize:i}=ne.storeToRefs(pe()),l=r.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),s=r.computed(()=>{const u=i.value,d=i.value*a.value,f=280/n.value,v=50/n.value,p=t.elementInfo.width,h=t.elementInfo.height,m=t.elementInfo.left,g=t.elementInfo.top;let E=0,y=h;return m+f>=u&&(E=p-f),g+h+v>=d&&(y=-v),{left:E+"px",top:y+"px"}}),c=u=>{t.elementInfo.lock||(u.stopPropagation(),t.selectElement(u,t.elementInfo))};return(u,d)=>{const f=r.resolveComponent("AiPptVolumeNotice"),v=r.resolveComponent("AudioPlayer"),p=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-audio",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",onMousedown:d[1]||(d[1]=h=>c(h)),onTouchstart:d[2]||(d[2]=h=>c(h))},[r.createVNode(f,{class:"audio-icon",style:r.normalizeStyle({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"]),r.unref(o)===e.elementInfo.id?(r.openBlock(),r.createBlock(v,{key:0,class:"audio-player",style:r.normalizeStyle({...s.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:r.unref(n),onMousedown:d[0]||(d[0]=r.withModifiers(()=>{},["stop"]))},null,8,["style","src","loop","scale"])):r.createCommentVNode("",!0)],32)),[[p,e.contextmenus]])],4)],6)}}},$6=ie(V6,[["__scopeId","data-v-498b91e9"]]),F6=["id"],H6={__name:"EditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{t:n}=_e(),o=r.computed(()=>({[Ze.IMAGE]:wI,[Ze.TEXT]:SA,[Ze.SHAPE]:kA,[Ze.LINE]:FA,[Ze.CHART]:g6,[Ze.TABLE]:w6,[Ze.LATEX]:P6,[Ze.VIDEO]:B6,[Ze.AUDIO]:$6})[t.elementInfo.type]||null),{orderElement:a}=vc(),{alignElementToCanvas:i}=cp(),{combineElements:l,uncombineElements:s}=ip(),{deleteElement:c}=fc(),{lockElement:u,unlockElement:d}=j1(),{copyElement:f,pasteElement:v,cutElement:p}=lp(),{selectAllElements:h}=pc(),m=()=>t.elementInfo.lock?[{text:n("EDITABLE_ELEMENT.UNLOCK"),handler:()=>d(t.elementInfo)}]:[{text:n("COMMON.CUT"),subText:"Ctrl + X",handler:p},{text:n("COMMON.COPY"),subText:"Ctrl + C",handler:f},{text:n("COMMON.PASTE"),subText:"Ctrl + V",handler:v},{divider:!0},{text:n("EDITABLE_ELEMENT.ALIGN_HORIZONTAL"),handler:()=>i(Ve.HORIZONTAL),children:[{text:n("EDITABLE_ELEMENT.ALIGN_CENTER_BOTH"),handler:()=>i(Ve.CENTER)},{text:n("EDITABLE_ELEMENT.ALIGN_HORIZONTAL"),handler:()=>i(Ve.HORIZONTAL)},{text:n("EDITABLE_ELEMENT.ALIGN_LEFT"),handler:()=>i(Ve.LEFT)},{text:n("EDITABLE_ELEMENT.ALIGN_RIGHT"),handler:()=>i(Ve.RIGHT)}]},{text:n("EDITABLE_ELEMENT.ALIGN_VERTICAL"),handler:()=>i(Ve.VERTICAL),children:[{text:n("EDITABLE_ELEMENT.ALIGN_CENTER_BOTH"),handler:()=>i(Ve.CENTER)},{text:n("EDITABLE_ELEMENT.ALIGN_VERTICAL"),handler:()=>i(Ve.VERTICAL)},{text:n("EDITABLE_ELEMENT.ALIGN_TOP"),handler:()=>i(Ve.TOP)},{text:n("EDITABLE_ELEMENT.ALIGN_BOTTOM"),handler:()=>i(Ve.BOTTOM)}]},{divider:!0},{text:n("EDITABLE_ELEMENT.BRING_TO_FRONT"),disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,ft.TOP),children:[{text:n("EDITABLE_ELEMENT.BRING_TO_FRONT"),handler:()=>a(t.elementInfo,ft.TOP)},{text:n("EDITABLE_ELEMENT.MOVE_UP"),handler:()=>a(t.elementInfo,ft.UP)}]},{text:n("EDITABLE_ELEMENT.SEND_TO_BACK"),disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,ft.BOTTOM),children:[{text:n("EDITABLE_ELEMENT.SEND_TO_BACK"),handler:()=>a(t.elementInfo,ft.BOTTOM)},{text:n("EDITABLE_ELEMENT.MOVE_DOWN"),handler:()=>a(t.elementInfo,ft.DOWN)}]},{divider:!0},{text:n("EDITABLE_ELEMENT.SET_LINK"),handler:t.openLinkDialog},{text:t.elementInfo.groupId?n("EDITABLE_ELEMENT.UNGROUP"):n("EDITABLE_ELEMENT.GROUP"),subText:"Ctrl + G",handler:t.elementInfo.groupId?s:l,hide:!t.isMultiSelect},{text:n("COMMON.SELECT_ALL"),subText:"Ctrl + A",handler:h},{text:n("EDITABLE_ELEMENT.LOCK"),subText:"Ctrl + L",handler:u},{text:n("COMMON.DELETE"),subText:"Delete",handler:c}];return(g,E)=>(r.openBlock(),r.createElementBlock("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:r.normalizeStyle({zIndex:e.elementIndex})},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:m},null,8,["elementInfo","selectElement"]))],12,F6))}},U6={__name:"MouseSelection",props:{top:{type:Number,required:!0},left:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},quadrant:{type:Number,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`mouse-selection quadrant-${e.quadrant}`),style:r.normalizeStyle({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}},G6=ie(U6,[["__scopeId","data-v-9373e579"]]),z6={class:"grid-lines"},Y6=["d","stroke"],X6={__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:n}=ne.storeToRefs(fe()),{currentSlide:o,viewportRatio:a,viewportSize:i}=ne.storeToRefs(pe()),l=r.computed(()=>{var u;return(u=o.value)===null||u===void 0?void 0:u.background}),s=r.computed(()=>{var u;const d=((u=l.value)===null||u===void 0?void 0:u.color)||"#fff",f=["#000","#fff"];return we.mostReadable(d,f,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()}),c=r.computed(()=>{const u=i.value,d=i.value*a.value;let f="";for(let v=0;v<=Math.floor(d/n.value);v++)f+=`M0 ${v*n.value} L${u} ${v*n.value} `;for(let v=0;v<=Math.floor(u/n.value);v++)f+=`M${v*n.value} 0 L${v*n.value} ${d} `;return f});return(u,d)=>(r.openBlock(),r.createElementBlock("svg",z6,[r.createElementVNode("path",{style:r.normalizeStyle({transform:`scale(${r.unref(t)})`}),d:c.value,fill:"none",stroke:s.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,Y6)]))}},W6=ie(X6,[["__scopeId","data-v-6ecd6c64"]]),__=e=>({backgroundStyle:r.computed(()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:n,color:o,image:a,gradient:i}=e.value;if(n==="solid")return{backgroundColor:o};if(n==="image"&&a){const{src:l,size:s}=a;return l?s==="repeat"?{backgroundImage:`url(${l}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${l}`,backgroundRepeat:"no-repeat",backgroundSize:s||"cover"}:{backgroundColor:"#fff"}}else if(n==="gradient"&&i){const{type:l,colors:s,rotate:c}=i,u=s.map(d=>`${d.color} ${d.pos}%`);return l==="radial"?{backgroundImage:`radial-gradient(${u.join(",")}`}:{backgroundImage:`linear-gradient(${c}deg, ${u.join(",")}`}}return{backgroundColor:"#fff"}})}),K6={__name:"ViewportBackground",setup(e){const{gridLineSize:t}=ne.storeToRefs(fe()),{currentSlide:n}=ne.storeToRefs(pe()),o=r.computed(()=>{var i;return(i=n.value)===null||i===void 0?void 0:i.background}),{backgroundStyle:a}=__(o);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:"viewport-background",style:r.normalizeStyle(r.unref(a))},[r.unref(t)?(r.openBlock(),r.createBlock(W6,{key:0})):r.createCommentVNode("",!0)],4))}},q6=ie(K6,[["__scopeId","data-v-6be5d55c"]]),Z6={__name:"AlignmentLine",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0},canvasScale:{type:Number,required:!0}},setup(e){const t=e,n=r.computed(()=>t.axis.x*t.canvasScale+"px"),o=r.computed(()=>t.axis.y*t.canvasScale+"px"),a=r.computed(()=>t.type==="vertical"?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:"alignment-line",style:r.normalizeStyle({left:n.value,top:o.value})},[r.createElementVNode("div",{class:r.normalizeClass(["line",e.type]),style:r.normalizeStyle(a.value)},null,6)],4))}},j6=ie(Z6,[["__scopeId","data-v-1e3607b1"]]),J6={class:"ruler"},Q6={key:0},eR={key:0},tR={__name:"Ruler",props:{viewportStyles:{type:Object,required:!0},elementList:{type:Array,required:!0}},setup(e){const t=e,{canvasScale:n,activeElementIdList:o}=ne.storeToRefs(fe()),{viewportRatio:a,viewportSize:i}=ne.storeToRefs(pe()),l=r.ref(null);r.watchEffect(()=>{const c=t.elementList.filter(u=>o.value.includes(u.id));if(!c.length)return l.value=null;l.value=tr(c)});const s=r.computed(()=>t.viewportStyles.width*n.value/(i.value/100));return(c,u)=>(r.openBlock(),r.createElementBlock("div",J6,[r.createElementVNode("div",{class:"h",style:r.normalizeStyle({width:e.viewportStyles.width*r.unref(n)+"px",left:e.viewportStyles.left+"px"})},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(20,d=>r.createElementVNode("div",{class:r.normalizeClass(["ruler-marker-100",{hide:s.value<36,omit:s.value<72}]),key:`h-marker-100-${d}`,style:r.normalizeStyle({width:s.value+"px"})},[d*100<=r.unref(i)?(r.openBlock(),r.createElementBlock("span",Q6,r.toDisplayString(d*100),1)):r.createCommentVNode("",!0)],6)),64)),l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"range",style:r.normalizeStyle({left:l.value.minX*r.unref(n)+"px",width:(l.value.maxX-l.value.minX)*r.unref(n)+"px"})},null,4)):r.createCommentVNode("",!0)],4),r.createElementVNode("div",{class:"v",style:r.normalizeStyle({height:e.viewportStyles.height*r.unref(n)+"px",top:e.viewportStyles.top+"px"})},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(20,d=>r.createElementVNode("div",{class:r.normalizeClass(["ruler-marker-100",{hide:s.value<36,omit:s.value<72}]),key:`v-marker-100-${d}`,style:r.normalizeStyle({height:s.value+"px"})},[d*100<=r.unref(i)*r.unref(a)?(r.openBlock(),r.createElementBlock("span",eR,r.toDisplayString(d*100),1)):r.createCommentVNode("",!0)],6)),64)),l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"range",style:r.normalizeStyle({top:l.value.minY*r.unref(n)+"px",height:(l.value.maxY-l.value.minY)*r.unref(n)+"px"})},null,4)):r.createCommentVNode("",!0)],4)]))}},nR=ie(tR,[["__scopeId","data-v-91d8b4f2"]]),rR=["width","height"],oR=["d"],aR={__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const n=t,o=fe(),{creatingElement:a}=ne.storeToRefs(o),{ctrlOrShiftKeyActive:i}=ne.storeToRefs(ln()),l=r.ref(),s=r.ref(),c=r.useTemplateRef("selectionRef"),u=r.ref({x:0,y:0});r.onMounted(()=>{if(!c.value)return;const{x:p,y:h}=c.value.getBoundingClientRect();u.value={x:p,y:h}});const d=p=>{let h=!0;const m=p.pageX,g=p.pageY;l.value=[m,g],document.onmousemove=E=>{if(!a.value||!h)return;let y=E.pageX,_=E.pageY;if(i.value){const S=y-m,I=_-g,A=Math.abs(S),x=Math.abs(I);if(a.value.type==="shape"){const N=I>0&&S<0||I<0&&S>0;A>x?_=N?g-S:g+S:y=N?m-I:m+I}else a.value.type==="line"&&(A>x?_=g:y=m)}s.value=[y,_]},document.onmouseup=E=>{var y,_;if(document.onmousemove=null,document.onmouseup=null,E.button===2){setTimeout(()=>o.setCreatingElement(null),0);return}h=!1;const S=E.pageX,I=E.pageY,A=30;if(((y=a.value)===null||y===void 0?void 0:y.type)==="line"&&(Math.abs(S-m)>=A||Math.abs(I-g)>=A))n("created",{start:l.value,end:s.value});else if(((_=a.value)===null||_===void 0?void 0:_.type)!=="line"&&Math.abs(S-m)>=A&&Math.abs(I-g)>=A)n("created",{start:l.value,end:s.value});else{const N=Math.min(S,m),T=Math.min(I,g),L=Math.max(S,m),b=Math.max(I,g),O=L-N>=A?L-N:200,w=b-T>=A?b-T:200;n("created",{start:[N,T],end:[N+O,T+w]})}}},f=r.computed(()=>{if(!l.value||!s.value||!a.value||a.value.type!=="line")return null;const[p,h]=l.value,[m,g]=s.value,E=Math.min(p,m),y=Math.max(p,m),_=Math.min(h,g),S=Math.max(h,g),I=y-E>=24?y-E:24,A=S-_>=24?S-_:24,x=p===E?0:y-E,N=h===_?0:S-_,T=m===E?0:y-E,L=g===_?0:S-_,b=`M${x}, ${N} L${T}, ${L}`;return{svgWidth:I,svgHeight:A,startX:x,startY:N,endX:T,endY:L,path:b}}),v=r.computed(()=>{if(!l.value||!s.value)return{};const[p,h]=l.value,[m,g]=s.value,E=Math.min(p,m),y=Math.max(p,m),_=Math.min(h,g),S=Math.max(h,g),I=y-E,A=S-_;return{left:E-u.value.x+"px",top:_-u.value.y+"px",width:I+"px",height:A+"px"}});return(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:"element-create-selection",ref_key:"selectionRef",ref:c,onMousedown:h[0]||(h[0]=r.withModifiers(m=>d(m),["stop"])),onContextmenu:h[1]||(h[1]=r.withModifiers(()=>{},["stop","prevent"]))},[l.value&&s.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["selection",r.unref(a)?.type]),style:r.normalizeStyle(v.value)},[r.unref(a)?.type==="line"&&f.value?(r.openBlock(),r.createElementBlock("svg",{key:0,overflow:"visible",width:f.value.svgWidth,height:f.value.svgHeight},[r.createElementVNode("path",{d:f.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,oR)],8,rR)):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)],544))}},iR=ie(aR,[["__scopeId","data-v-42856106"]]),lR={overflow:"visible"},sR=["d","fill"],cR={__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const n=t,o=fe(),{ctrlOrShiftKeyActive:a}=ne.storeToRefs(ln()),{theme:i}=ne.storeToRefs(pe()),l=r.useTemplateRef("shapeCanvasRef"),s=r.ref(!1),c=r.ref({x:0,y:0});r.onMounted(()=>{if(!l.value)return;const{x:I,y:A}=l.value.getBoundingClientRect();c.value={x:I,y:A}});const u=r.ref(null),d=r.ref([]),f=r.ref(!1),{t:v}=_e(),p=(I,A=!1)=>{let x=I.pageX-c.value.x,N=I.pageY-c.value.y;if(A)return{pageX:x,pageY:N};if(a.value&&d.value.length){const[T,L]=d.value[d.value.length-1];Math.abs(T-x)-Math.abs(L-N)>0?N=L:x=T}return{pageX:x,pageY:N}},h=I=>{if(s.value){const{pageX:N,pageY:T}=p(I,!0);d.value.push([N,T]),u.value=null;return}const{pageX:A,pageY:x}=p(I);if(u.value=[A,x],d.value.length>=2){const[N,T]=d.value[0];Math.abs(N-A)<5&&Math.abs(T-x)<5?f.value=!0:f.value=!1}else f.value=!1},m=r.computed(()=>{let I="";for(let A=0;A<d.value.length;A++){const x=d.value[A];A===0?I+=`M ${x[0]} ${x[1]} `:I+=`L ${x[0]} ${x[1]} `}return d.value.length&&u.value&&(I+=`L ${u.value[0]} ${u.value[1]}`),I}),g=(I=!0)=>{const A=d.value.map(B=>B[0]),x=d.value.map(B=>B[1]),N=Math.min(...A),T=Math.min(...x),L=Math.max(...A),b=Math.max(...x),O=d.value.map(B=>[B[0]-N,B[1]-T]);let w="";for(let B=0;B<O.length;B++){const H=O[B];B===0?w+=`M ${H[0]} ${H[1]} `:w+=`L ${H[0]} ${H[1]} `}I&&(w+="Z");const C=[N+c.value.x,T+c.value.y],P=[L+c.value.x,b+c.value.y],k=[L-N,b-T];return{start:C,end:P,path:w,viewBox:k}},E=I=>{const{pageX:A,pageY:x}=p(I);s.value=!0,f.value?n("created",g()):d.value.push([A,x]),document.onmouseup=()=>{s.value=!1}},y=()=>{o.setCreatingCustomShapeState(!1)},_=()=>{n("created",{...g(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:i.value.themeColors[0],style:"solid"}}),y()},S=I=>{const A=I.key.toUpperCase();A===Ee.ESC&&y(),A===Ee.ENTER&&_()};return r.onMounted(()=>{Ae.success(v("CANVAS.CREATE_SHAPE_TIP"),{duration:0}),document.addEventListener("keydown",S)}),r.onUnmounted(()=>{document.removeEventListener("keydown",S),Ae.closeAll()}),(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:l,onMousedown:A[0]||(A[0]=r.withModifiers(x=>E(x),["stop"])),onMousemove:A[1]||(A[1]=x=>h(x)),onContextmenu:A[2]||(A[2]=r.withModifiers(x=>y(),["stop","prevent"]))},[(r.openBlock(),r.createElementBlock("svg",lR,[r.createElementVNode("path",{d:m.value,stroke:"#d14424",fill:f.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,sR)]))],544))}},uR=ie(cR,[["__scopeId","data-v-22fbde12"]]),Za=(e,t)=>{const n=r.computed(()=>[{direction:me.LEFT_TOP,style:{}},{direction:me.TOP,style:{left:e.value/2+"px"}},{direction:me.RIGHT_TOP,style:{left:e.value+"px"}},{direction:me.LEFT,style:{top:t.value/2+"px"}},{direction:me.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:me.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:me.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:me.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}]),o=r.computed(()=>[{direction:me.LEFT,style:{top:t.value/2+"px"}},{direction:me.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}]),a=r.computed(()=>[{direction:me.TOP,style:{left:e.value/2+"px"}},{direction:me.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}]),i=r.computed(()=>[{type:ha.T,style:{width:e.value+"px"}},{type:ha.B,style:{top:t.value+"px",width:e.value+"px"}},{type:ha.L,style:{height:t.value+"px"}},{type:ha.R,style:{left:e.value+"px",height:t.value+"px"}}]);return{resizeHandlers:n,textElementResizeHandlers:o,verticalTextElementResizeHandlers:a,borderLines:i}},dR={__name:"ResizeHandler",props:{type:{type:String},rotate:{type:Number,default:0}},setup(e){const t=e,n=r.computed(()=>{const o="rotate-",a=t.rotate;return a>-22.5&&a<=22.5?o+0:a>22.5&&a<=67.5?o+45:a>67.5&&a<=112.5?o+90:a>112.5&&a<=157.5?o+135:a>157.5||a<=-157.5?o+0:a>-157.5&&a<=-112.5?o+45:a>-112.5&&a<=-67.5?o+90:a>-67.5&&a<=-22.5?o+135:o+0});return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["resize-handler",n.value,e.type])},null,2))}},zo=ie(dR,[["__scopeId","data-v-75ba5f8e"]]),fR={__name:"BorderLine",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-line",e.type,{wide:e.isWide}])},null,2))}},ja=ie(fR,[["__scopeId","data-v-ec5612b2"]]),pR={__name:"MultiSelectOperate",props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup(e){const t=e,{activeElementIdList:n,canvasScale:o}=ne.storeToRefs(fe()),a=r.computed(()=>t.elementList.filter(v=>n.value.includes(v.id))),i=r.ref({minX:0,maxX:0,minY:0,maxY:0}),l=r.computed(()=>(i.value.maxX-i.value.minX)*o.value),s=r.computed(()=>(i.value.maxY-i.value.minY)*o.value),{resizeHandlers:c,borderLines:u}=Za(l,s),d=()=>{const{minX:v,maxX:p,minY:h,maxY:m}=tr(a.value);i.value={minX:v,maxX:p,minY:h,maxY:m}};r.watchEffect(d);const f=r.computed(()=>a.value.some(v=>!((v.type==="image"||v.type==="shape")&&!v.rotate)));return(v,p)=>(r.openBlock(),r.createElementBlock("div",{class:"multi-select-operate",style:r.normalizeStyle({left:i.value.minX*r.unref(o)+"px",top:i.value.minY*r.unref(o)+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u),h=>(r.openBlock(),r.createBlock(ja,{key:h.type,type:h.type,style:r.normalizeStyle(h.style)},null,8,["type","style"]))),128)),f.value?r.createCommentVNode("",!0):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(c),h=>(r.openBlock(),r.createBlock(zo,{key:h.direction,type:h.direction,style:r.normalizeStyle(h.style),onMousedown:r.withModifiers(m=>e.scaleMultiElement(m,i.value,h.direction),["stop"])},null,8,["type","style","onMousedown"]))),128))],4))}},vR=ie(pR,[["__scopeId","data-v-dd904583"]]),hR={},mR={class:"rotate-handler"};function gR(e,t){return r.openBlock(),r.createElementBlock("div",mR)}const Nl=ie(hR,[["render",gR],["__scopeId","data-v-b399a3d2"]]),ER={inheritAttrs:!1},yR=Object.assign(ER,{__name:"ImageElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,clipingImageElementId:o}=ne.storeToRefs(fe()),a=r.computed(()=>o.value===t.elementInfo.id),i=r.computed(()=>t.elementInfo.width*n.value),l=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:s,borderLines:c}=Za(i,l);return(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["image-element-operate",{cliping:a.value}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),f=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:f.type,type:f.type,style:r.normalizeStyle(f.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s),f=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:f.direction,type:f.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(f.style),onMousedown:r.withModifiers(v=>e.scaleElement(v,e.elementInfo,f.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:i.value/2+"px"}),onMousedown:d[0]||(d[0]=r.withModifiers(f=>e.rotateElement(f,e.elementInfo),["stop"]))},null,8,["style"])],64)):r.createCommentVNode("",!0)],2))}}),_R=ie(yR,[["__scopeId","data-v-c89993da"]]),TR={class:"text-element-operate"},SR={inheritAttrs:!1},IR=Object.assign(SR,{__name:"TextElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.width*n.value),a=r.computed(()=>t.elementInfo.height*n.value),{textElementResizeHandlers:i,verticalTextElementResizeHandlers:l,borderLines:s}=Za(o,a),c=r.computed(()=>t.elementInfo.vertical?l.value:i.value);return(u,d)=>(r.openBlock(),r.createElementBlock("div",TR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s),f=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:f.type,type:f.type,style:r.normalizeStyle(f.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,f=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:f.direction,type:f.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(f.style),onMousedown:r.withModifiers(v=>e.scaleElement(v,e.elementInfo,f.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:o.value/2+"px"}),onMousedown:d[0]||(d[0]=r.withModifiers(f=>e.rotateElement(f,e.elementInfo),["stop"]))},null,8,["style"])],64)):r.createCommentVNode("",!0)]))}}),AR={class:"shape-element-operate"},NR=["onMousedown"],LR={inheritAttrs:!1},CR=Object.assign(LR,{__name:"ShapeElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.width*n.value),a=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:i,borderLines:l}=Za(o,a),s=r.computed(()=>{if(!t.elementInfo.pathFormula||t.elementInfo.keypoints===void 0)return[];const c=$o[t.elementInfo.pathFormula];return t.elementInfo.keypoints.map((u,d)=>{const f=c.getBaseSize[d],v=c.relative[d],p=f(t.elementInfo.width,t.elementInfo.height)*u;let h={};return v==="left"?h={left:p*n.value+"px"}:v==="right"?h={left:(t.elementInfo.width-p)*n.value+"px"}:v==="center"?h={left:(t.elementInfo.width-p)/2*n.value+"px"}:v==="top"?h={top:p*n.value+"px"}:v==="bottom"?h={top:(t.elementInfo.height-p)*n.value+"px"}:v==="left_bottom"?h={left:p*n.value+"px",top:t.elementInfo.height*n.value+"px"}:v==="right_bottom"?h={left:(t.elementInfo.width-p)*n.value+"px",top:t.elementInfo.height*n.value+"px"}:v==="top_right"?h={left:t.elementInfo.width*n.value+"px",top:p*n.value+"px"}:v==="bottom_right"&&(h={left:t.elementInfo.width*n.value+"px",top:(t.elementInfo.height-p)*n.value+"px"}),{keypoint:u,styles:h}})});return(c,u)=>(r.openBlock(),r.createElementBlock("div",AR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),d=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:d.type,type:d.type,style:r.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),d=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(d.style),onMousedown:r.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:o.value/2+"px"}),onMousedown:u[0]||(u[0]=r.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:"operate-keypoint-handler",key:f,style:r.normalizeStyle(d.styles),onMousedown:r.withModifiers(v=>e.moveShapeKeypoint(v,e.elementInfo,f),["stop"])},null,44,NR))),128))],64)):r.createCommentVNode("",!0)]))}}),xR=ie(CR,[["__scopeId","data-v-5d1f3238"]]),bR={class:"line-element-operate"},wR=["width","height","stroke"],OR={key:0},RR=["x1","y1","x2","y2"],kR=["x1","y1","x2","y2"],DR=["x1","y1","x2","y2"],PR=["x1","y1","x2","y2"],MR={inheritAttrs:!1},BR=Object.assign(MR,{__name:"LineElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0])),a=r.computed(()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1])),i=r.computed(()=>{const l=[{handler:Bt.START,style:{left:t.elementInfo.start[0]*n.value+"px",top:t.elementInfo.start[1]*n.value+"px"}},{handler:Bt.END,style:{left:t.elementInfo.end[0]*n.value+"px",top:t.elementInfo.end[1]*n.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken||t.elementInfo.broken2){const s=t.elementInfo.curve||t.elementInfo.broken||t.elementInfo.broken2;l.push({handler:Bt.C,style:{left:s[0]*n.value+"px",top:s[1]*n.value+"px"}})}else if(t.elementInfo.cubic){const[s,c]=t.elementInfo.cubic;l.push({handler:Bt.C1,style:{left:s[0]*n.value+"px",top:s[1]*n.value+"px"}}),l.push({handler:Bt.C2,style:{left:c[0]*n.value+"px",top:c[1]*n.value+"px"}})}return l});return(l,s)=>(r.openBlock(),r.createElementBlock("div",bR,[e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:c.handler,style:r.normalizeStyle(c.style),onMousedown:r.withModifiers(u=>e.dragLineElement(u,e.elementInfo,c.handler),["stop"])},null,8,["style","onMousedown"]))),128)),(r.openBlock(),r.createElementBlock("svg",{width:o.value||1,height:a.value||1,stroke:e.elementInfo.color,overflow:"visible",style:r.normalizeStyle({transform:`scale(${r.unref(n)})`})},[e.elementInfo.curve?(r.openBlock(),r.createElementBlock("g",OR,[r.createElementVNode("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,RR),r.createElementVNode("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,kR)])):r.createCommentVNode("",!0),e.elementInfo.cubic?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(e.elementInfo.cubic,(c,u)=>(r.openBlock(),r.createElementBlock("g",{key:u},[u===0?(r.openBlock(),r.createElementBlock("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:c[0],y2:c[1]},null,8,DR)):r.createCommentVNode("",!0),u===1?(r.openBlock(),r.createElementBlock("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:c[0],y2:c[1]},null,8,PR)):r.createCommentVNode("",!0)]))),128)):r.createCommentVNode("",!0)],12,wR))],64)):r.createCommentVNode("",!0)]))}}),VR=ie(BR,[["__scopeId","data-v-74abd926"]]),$R={class:"table-element-operate"},FR={inheritAttrs:!1},HR=Object.assign(FR,{__name:"TableElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.outline.width||1),a=r.computed(()=>(t.elementInfo.width+o.value)*n.value),i=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:l,borderLines:s}=Za(a,i);return(c,u)=>(r.openBlock(),r.createElementBlock("div",$R,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s),d=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:d.type,type:d.type,style:r.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),d=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(d.style),onMousedown:r.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:a.value/2+"px"}),onMousedown:u[0]||(u[0]=r.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"])],64)):r.createCommentVNode("",!0)]))}}),UR={class:"common-element-operate"},GR={inheritAttrs:!1},gs=Object.assign(GR,{__name:"CommonElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.width*n.value),a=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:i,borderLines:l}=Za(o,a),s=r.computed(()=>["chart","video","audio"].includes(t.elementInfo.type));return(c,u)=>(r.openBlock(),r.createElementBlock("div",UR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),d=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:d.type,type:d.type,style:r.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),d=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(d.style),onMousedown:r.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),s.value?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Nl,{key:0,class:"operate-rotate-handler",style:r.normalizeStyle({left:o.value/2+"px"}),onMousedown:u[0]||(u[0]=r.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"]))],64)):r.createCommentVNode("",!0)]))}}),T_=()=>{const e=pe(),{addHistorySnapshot:t}=be(),{t:n}=_e();return{setLink:(i,l)=>{const s=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(l.type==="web"&&!s.test(l.target))return Ae.error(n("RICH_TEXT.INVALID_LINK")),!1;if(l.type==="slide"&&!l.target)return Ae.error(n("LINK_DIALOG.SELECT_TARGET")),!1;const c={link:l};return e.updateElement({id:i.id,props:c}),t(),!0},removeLink:i=>{e.removeElementProps({id:i.id,propName:"link"}),t()}}},zR=["href"],YR={class:"btns"},XR={__name:"LinkHandler",props:{elementInfo:{type:Object,required:!0},link:{type:Object,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,n=fe(),o=pe(),{canvasScale:a}=ne.storeToRefs(n),{slides:i}=ne.storeToRefs(o),{t:l}=_e(),{removeLink:s}=T_(),c=r.computed(()=>t.elementInfo.type==="line"?0:t.elementInfo.height),u=d=>{const f=i.value.findIndex(v=>v.id===d);f!==-1&&(n.setActiveElementIdList([]),o.updateSlideIndex(f))};return(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:"link-handler",style:r.normalizeStyle({top:c.value*r.unref(a)+10+"px"})},[e.link.type==="web"?(r.openBlock(),r.createElementBlock("a",{key:0,class:"link",href:e.link.target,target:"_blank"},r.toDisplayString(e.link.target),9,zR)):(r.openBlock(),r.createElementBlock("a",{key:1,class:"link",onClick:f[0]||(f[0]=v=>u(e.link.target))},r.toDisplayString(r.unref(l)("LINK_HANDLER.SLIDE_PAGE"))+" "+r.toDisplayString(e.link.target),1)),r.createElementVNode("div",YR,[r.createElementVNode("div",{class:"btn",onClick:f[1]||(f[1]=v=>e.openLinkDialog())},r.toDisplayString(r.unref(l)("LINK_HANDLER.CHANGE")),1),r.createVNode(Oe,{type:"vertical"}),r.createElementVNode("div",{class:"btn",onClick:f[2]||(f[2]=v=>r.unref(s)(e.elementInfo))},r.toDisplayString(r.unref(l)("COMMON.REMOVE")),1)])],4))}},WR=ie(XR,[["__scopeId","data-v-786316db"]]),KR={key:1,class:"animation-index"},qR={__name:"index",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},isActive:{type:Boolean,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},dragLineElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,toolbarState:o}=ne.storeToRefs(fe()),{formatedAnimations:a}=ne.storeToRefs(pe()),i=r.computed(()=>({[Ze.IMAGE]:_R,[Ze.TEXT]:IR,[Ze.SHAPE]:xR,[Ze.LINE]:VR,[Ze.TABLE]:HR,[Ze.CHART]:gs,[Ze.LATEX]:gs,[Ze.VIDEO]:gs,[Ze.AUDIO]:gs})[t.elementInfo.type]||null),l=r.computed(()=>{const u=[];for(let d=0;d<a.value.length;d++)a.value[d].animations.map(v=>v.elId).includes(t.elementInfo.id)&&u.push(d);return u}),s=r.computed(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),c=r.computed(()=>"height"in t.elementInfo?t.elementInfo.height:0);return(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:r.normalizeStyle({top:e.elementInfo.top*r.unref(n)+"px",left:e.elementInfo.left*r.unref(n)+"px",transform:`rotate(${s.value}deg)`,transformOrigin:`${e.elementInfo.width*r.unref(n)/2}px ${c.value*r.unref(n)/2}px`})},[e.isSelected?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):r.createCommentVNode("",!0),r.unref(o)==="elAnimation"&&l.value.length?(r.openBlock(),r.createElementBlock("div",KR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,f=>(r.openBlock(),r.createElementBlock("div",{class:"index-item",key:f},r.toDisplayString(f+1),1))),128))])):r.createCommentVNode("",!0),e.isActive&&e.elementInfo.link?(r.openBlock(),r.createBlock(WR,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:d[0]||(d[0]=r.withModifiers(()=>{},["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):r.createCommentVNode("",!0)],6))}},ZR=ie(qR,[["__scopeId","data-v-f954715b"]]),jR={class:"element-content"},JR={__name:"BaseAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px");return(o,a)=>{const i=r.resolveComponent("AiPptVolumeNotice");return r.openBlock(),r.createElementBlock("div",{class:"base-element-audio",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",jR,[r.createVNode(i,{class:"audio-icon",style:r.normalizeStyle({fontSize:n.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}},QR=ie(JR,[["__scopeId","data-v-7d586ad8"]]),ek={__name:"BaseChartElement",props:{elementInfo:{type:Object,required:!0},target:{type:String}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["base-element-chart",{"is-thumbnail":e.target==="thumbnail"}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({backgroundColor:e.elementInfo.fill})},[r.createVNode(gc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),r.createVNode(h_,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,lineColor:e.elementInfo.lineColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","lineColor","options"])],4)],4)],6))}},tk=ie(ek,[["__scopeId","data-v-4c4f517d"]]),nk=["src"],rk={__name:"BaseImageElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>t.elementInfo.shadow),{shadowStyle:o}=Wr(n),a=r.computed(()=>t.elementInfo.flipH),i=r.computed(()=>t.elementInfo.flipV),{flipStyle:l}=mc(a,i),s=r.computed(()=>t.elementInfo),{clipShape:c,imgPosition:u}=up(s),d=r.computed(()=>t.elementInfo.filters),{filter:f}=lg(d);return(v,p)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-image",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({filter:r.unref(o)?`drop-shadow(${r.unref(o)})`:"",transform:r.unref(l)})},[r.createVNode(sg,{elementInfo:e.elementInfo},null,8,["elementInfo"]),r.createElementVNode("div",{class:"image-content",style:r.normalizeStyle({clipPath:r.unref(c).style})},[r.createElementVNode("img",{src:e.elementInfo.src,draggable:!1,style:r.normalizeStyle({top:r.unref(u).top,left:r.unref(u).left,width:r.unref(u).width,height:r.unref(u).height,filter:r.unref(f)}),alt:""},null,12,nk),e.elementInfo.colorMask?(r.openBlock(),r.createElementBlock("div",{key:0,class:"color-mask",style:r.normalizeStyle({backgroundColor:e.elementInfo.colorMask})},null,4)):r.createCommentVNode("",!0)],4)],4)],4)],4))}},ok=ie(rk,[["__scopeId","data-v-e6e907c1"]]),ak={class:"element-content"},ik=["width","height","stroke","stroke-width"],lk=["transform"],sk=["d"],ck={__name:"BaseLatexElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-latex",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",ak,[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{d:e.elementInfo.path},null,8,sk)],8,lk)],8,ik))])],4)],4))}},uk=ie(ck,[["__scopeId","data-v-d300c419"]]),dk=["width","height"],fk=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],pk={__name:"BaseLineElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>t.elementInfo.shadow),{shadowStyle:o}=Wr(n),a=r.computed(()=>{const c=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return c<24?24:c}),i=r.computed(()=>{const c=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return c<24?24:c}),l=r.computed(()=>{const c=t.elementInfo.width;return t.elementInfo.style==="dashed"?c<=8?`${c*5} ${c*2.5}`:`${c*5} ${c*1.5}`:t.elementInfo.style==="dotted"?c<=8?`${c*1.8} ${c*1.6}`:`${c*1.5} ${c*1.2}`:"0 0"}),s=r.computed(()=>tp(t.elementInfo));return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-line",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({filter:r.unref(o)?`drop-shadow(${r.unref(o)})`:""})},[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:a.value,height:i.value},[r.createElementVNode("defs",null,[e.elementInfo.points[0]?(r.openBlock(),r.createBlock(Mr,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0),e.elementInfo.points[1]?(r.openBlock(),r.createBlock(Mr,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0)]),r.createElementVNode("path",{d:s.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":l.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,fk)],8,dk))],4)],4))}},vk=ie(pk,[["__scopeId","data-v-c82e8794"]]),hk=["width","height"],mk=["transform"],gk=["d","fill","stroke","stroke-width","stroke-dasharray"],Ek=["innerHTML"],yk={__name:"BaseShapeElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,{theme:n}=ne.storeToRefs(pe()),o=r.computed(()=>t.elementInfo),{fill:a}=pg(o,"base"),i=r.computed(()=>t.elementInfo.outline),{outlineWidth:l,outlineColor:s,strokeDashArray:c}=Ua(i),u=r.computed(()=>t.elementInfo.shadow),{shadowStyle:d}=Wr(u),f=r.computed(()=>t.elementInfo.flipH),v=r.computed(()=>t.elementInfo.flipV),{flipStyle:p}=mc(f,v),h=r.computed(()=>{const m={content:"",align:"middle",defaultFontName:n.value.fontName,defaultColor:n.value.fontColor};return t.elementInfo.text?t.elementInfo.text:m});return(m,g)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-shape",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({opacity:e.elementInfo.opacity,filter:r.unref(d)?`drop-shadow(${r.unref(d)})`:"",transform:r.unref(p),color:h.value.defaultColor,fontFamily:h.value.defaultFontName})},[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[r.createElementVNode("defs",null,[e.elementInfo.pattern?(r.openBlock(),r.createBlock(vg,{key:0,id:`base-pattern-${e.elementInfo.id}`,src:e.elementInfo.pattern},null,8,["id","src"])):e.elementInfo.gradient?(r.openBlock(),r.createBlock(hg,{key:1,id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,colors:e.elementInfo.gradient.colors,rotate:e.elementInfo.gradient.rotate},null,8,["id","type","colors","rotate"])):r.createCommentVNode("",!0)]),r.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:r.unref(a),stroke:r.unref(s),"stroke-width":r.unref(l),"stroke-dasharray":r.unref(c)},null,8,gk)],8,mk)],8,hk)),r.createElementVNode("div",{class:r.normalizeClass(["shape-text",h.value.align])},[r.createElementVNode("div",{class:"ProseMirror-static",innerHTML:h.value.content},null,8,Ek)],2)],4)],4)],4))}},_k=ie(yk,[["__scopeId","data-v-371d3741"]]),Tk=["width"],Sk=["rowspan","colspan"],Ik=["innerHTML"],Ak={__name:"StaticTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},setup(e){const t=e,n=r.ref([]),o=r.computed(()=>n.value.reduce((c,u)=>c+u));r.watch([()=>t.colWidths,()=>t.width],()=>{n.value=t.colWidths.map(c=>c*t.width)},{immediate:!0});const a=r.computed(()=>t.data),{hideCells:i}=m_(a),l=r.computed(()=>t.theme),{subThemeColor:s}=g_(l);return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:"static-table",style:r.normalizeStyle({width:o.value+"px"})},[r.createElementVNode("table",{class:r.normalizeClass({theme:l.value,"row-header":l.value?.rowHeader,"row-footer":l.value?.rowFooter,"col-header":l.value?.colHeader,"col-footer":l.value?.colFooter}),style:r.normalizeStyle(`--themeColor: ${l.value?.color}; --subThemeColor1: ${r.unref(s)[0]}; --subThemeColor2: ${r.unref(s)[1]}`)},[r.createElementVNode("colgroup",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(d,f)=>(r.openBlock(),r.createElementBlock("col",{span:"1",key:f,width:d},null,8,Tk))),128))]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.data,(d,f)=>(r.openBlock(),r.createElementBlock("tr",{key:f,style:r.normalizeStyle({height:e.cellMinHeight+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d,(v,p)=>r.withDirectives((r.openBlock(),r.createElementBlock("td",{class:"cell",style:r.normalizeStyle({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...r.unref(E_)(v.style)}),key:v.id,rowspan:v.rowspan,colspan:v.colspan},[r.createElementVNode("div",{class:"cell-text",style:r.normalizeStyle({minHeight:e.cellMinHeight-4+"px"}),innerHTML:r.unref(y_)(v.text)},null,12,Ik)],12,Sk)),[[r.vShow,!r.unref(i).includes(`${f}_${p}`)]])),128))],4))),128))])],6)],4))}},Nk=ie(Ak,[["__scopeId","data-v-fb0b4043"]]),Lk={class:"element-content"},Ck={__name:"BaseTableElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-table",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",Lk,[r.createVNode(Nk,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}},xk=ie(Ck,[["__scopeId","data-v-0bf953d4"]]),bk=["innerHTML"],wk={__name:"BaseTextElement",props:{elementInfo:{type:Object,required:!0},target:{type:String}},setup(e){const t=e,n=r.computed(()=>t.elementInfo.shadow),{shadowStyle:o}=Wr(n);return(a,i)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-text",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:r.unref(o),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[r.createVNode(gc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),r.createElementVNode("div",{class:r.normalizeClass(["text ProseMirror-static",{thumbnail:e.target==="thumbnail"}]),style:r.normalizeStyle({"--paragraphSpace":`${e.elementInfo.paragraphSpace===void 0?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,14,bk)],4)],4)],4))}},Ok=ie(wk,[["__scopeId","data-v-663c1273"]]),Rk={__name:"BaseVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>{const o=r.resolveComponent("AiPptPlayOne");return r.openBlock(),r.createElementBlock("div",{class:"base-element-video",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[r.createVNode(o,{class:"icon"})],4)],4)],4)}}},kk=ie(Rk,[["__scopeId","data-v-42b264d2"]]),Dk={__name:"ThumbnailElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n={audio:QR,chart:tk,image:ok,latex:uk,line:vk,shape:_k,table:xk,text:Ok,video:kk},o=r.computed(()=>n[t.elementInfo.type]),a=r.computed(()=>t.elementInfo.type==="text"||t.elementInfo.type==="chart"?{target:"thumbnail"}:{});return(i,l)=>o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),r.mergeProps({key:0,elementInfo:e.elementInfo},a.value),null,16,["elementInfo"])):r.createCommentVNode("",!0)}},Pk={key:1,class:"placeholder"},Mk={__name:"index",props:{slide:{type:Object,required:!0},size:{type:Number,required:!0},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:n,viewportSize:o}=ne.storeToRefs(pe()),{t:a}=_e(),i=r.computed(()=>t.slide.background),{backgroundStyle:l}=__(i),s=r.computed(()=>t.size/o.value);return r.provide(rg,s),(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:"thumbnail-slide",style:r.normalizeStyle({width:e.size+"px",height:e.size*r.unref(n)+"px"})},[e.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"elements",style:r.normalizeStyle({width:r.unref(o)+"px",height:r.unref(o)*r.unref(n)+"px",transform:`scale(${s.value})`})},[r.createElementVNode("div",{class:"background",style:r.normalizeStyle(r.unref(l))},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.slide.elements,(d,f)=>(r.openBlock(),r.createBlock(Dk,{key:d.id,elementInfo:d,elementIndex:f+1},null,8,["elementInfo","elementIndex"]))),128))],4)):(r.openBlock(),r.createElementBlock("div",Pk,r.toDisplayString(r.unref(a)("PPT_COMPONENTS.THUMBNAIL_LOADING")),1))],4))}},$a=ie(Mk,[["__scopeId","data-v-1b313304"]]),Bk=["onClick"],Vk={__name:"Tabs",props:{value:{type:String,required:!0},tabs:{type:Array,required:!0},card:{type:Boolean,default:!1},tabsStyle:{type:Object},tabStyle:{type:Object},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=t;return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:r.normalizeStyle(e.tabsStyle||{})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.tabs,i=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["tab",{active:i.key===e.value}]),key:i.key,style:r.normalizeStyle({...e.tabStyle||{},"--color":i.color}),onClick:l=>n("update:value",i.key)},r.toDisplayString(i.label),15,Bk))),128))],6))}},qn=ie(Vk,[["__scopeId","data-v-06264902"]]),$k={__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,a=()=>{n.disabled||o("click")};return(i,l)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&e.type==="default",primary:!e.disabled&&e.type==="primary",checkbox:!e.disabled&&e.type==="checkbox",radio:!e.disabled&&e.type==="radio",small:e.size==="small",first:e.first,last:e.last}]),onClick:l[0]||(l[0]=s=>a())},[r.renderSlot(i.$slots,"default",{},void 0,!0)],2))}},ue=ie($k,[["__scopeId","data-v-2acfea0c"]]),Fk={key:0,class:"select-wrap"},Hk={class:"selector"},Uk={class:"icon"},Gk=["onClick"],zk={class:"selector"},Yk={class:"icon"},Xk={__name:"Select",props:{value:{type:[String,Number,Object],required:!0},options:{type:Array,required:!0},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{type:String,default:"搜索"}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(!1),i=r.ref(0),l=r.ref(""),s=r.useTemplateRef("selectRef"),c=r.useTemplateRef("searchInputRef"),u=r.computed(()=>{var h;return((h=n.options.find(m=>m.value===n.value))===null||h===void 0?void 0:h.label)||n.value}),d=r.computed(()=>{if(!n.search||!l.value.trim())return n.options;const h=n.options.filter(m=>m.label.toLowerCase().indexOf(l.value.toLowerCase())!==-1);return h.length?h:n.options});r.watch(a,()=>{a.value?r.nextTick(()=>{c.value&&c.value.focus()}):l.value=""}),r.onBeforeUnmount(()=>{l.value=""});const f=()=>{s.value&&(i.value=s.value.clientWidth)},v=new ResizeObserver(f);r.onMounted(()=>{s.value&&v.observe(s.value)}),r.onUnmounted(()=>{s.value&&v.unobserve(s.value)});const p=h=>{h.disabled||(o("update:value",h.value),a.value=!1)};return(h,m)=>{const g=r.resolveComponent("AiPptDown");return e.disabled?(r.openBlock(),r.createElementBlock("div",Fk,[r.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:s},[r.createElementVNode("div",Hk,r.toDisplayString(e.value),1),r.createElementVNode("div",Uk,[r.renderSlot(h.$slots,"icon",{},()=>[r.createVNode(g,{size:14})],!0)])],512)])):(r.openBlock(),r.createBlock(Se,{key:1,class:"select-wrap",trigger:"click",value:a.value,"onUpdate:value":m[1]||(m[1]=E=>a.value=E),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:r.withCtx(()=>[e.search?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(Pr,{ref_key:"searchInputRef",ref:c,simple:"",placeholder:e.searchLabel,value:l.value,"onUpdate:value":m[0]||(m[0]=E=>l.value=E),style:r.normalizeStyle({width:i.value+2+"px"})},null,8,["placeholder","value","style"]),r.createVNode(Oe,{margin:0})],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"options",style:r.normalizeStyle({width:i.value+2+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.value,E=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["option",{disabled:E.disabled,selected:E.value===e.value}]),key:E.value,onClick:y=>p(E)},r.toDisplayString(E.label),11,Gk))),128))],4)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:"select",ref_key:"selectRef",ref:s},[r.createElementVNode("div",zk,r.toDisplayString(u.value),1),r.createElementVNode("div",Yk,[r.renderSlot(h.$slots,"icon",{},()=>[r.createVNode(g,{size:14})],!0)])],512)]),_:3},8,["value"]))}}},st=ie(Xk,[["__scopeId","data-v-e2a00fda"]]),Wk={class:"link-dialog"},Kk={key:2,class:"preview"},qk={class:"btns"},Zk={__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){var n;const o=t,a=fe(),{handleElement:i}=ne.storeToRefs(a),{slides:l,currentSlide:s}=ne.storeToRefs(pe()),{t:c}=_e(),u=r.ref("web"),d=r.ref(""),f=r.ref(""),v=r.useTemplateRef("inputRef"),p=r.computed(()=>l.value.map((y,_)=>({label:c("LINK_DIALOG.SLIDE_LABEL",{index:_+1}),value:y.id,disabled:s.value.id===y.id})));f.value=((n=l.value.find(y=>y.id!==s.value.id))===null||n===void 0?void 0:n.id)||"";const h=r.computed(()=>f.value&&l.value.find(y=>y.id===f.value)||null),m=[{key:"web",label:c("LINK_DIALOG.WEB")},{key:"slide",label:c("LINK_DIALOG.SLIDE")}],{setLink:g}=T_();r.onMounted(()=>{var y;a.setDisableHotkeysState(!0),!((y=i.value)===null||y===void 0)&&y.link&&(i.value.link.type==="web"?d.value=i.value.link.target:i.value.link.type==="slide"&&(f.value=i.value.link.target),u.value=i.value.link.type),u.value==="web"&&r.nextTick(()=>{v.value.focus()})}),r.onUnmounted(()=>{a.setDisableHotkeysState(!1)});const E=()=>{const y={type:u.value,target:u.value==="web"?d.value:f.value};i.value&&(g(i.value,y)?o("close"):d.value="")};return(y,_)=>(r.openBlock(),r.createElementBlock("div",Wk,[r.createVNode(qn,{tabs:m,value:u.value,"onUpdate:value":_[0]||(_[0]=S=>u.value=S),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),u.value==="web"?(r.openBlock(),r.createBlock(Pr,{key:0,class:"input",ref_key:"inputRef",ref:v,value:d.value,"onUpdate:value":_[1]||(_[1]=S=>d.value=S),placeholder:r.unref(c)("LINK_DIALOG.WEB_PLACEHOLDER"),onEnter:_[2]||(_[2]=S=>E())},null,8,["value","placeholder"])):r.createCommentVNode("",!0),u.value==="slide"?(r.openBlock(),r.createBlock(st,{key:1,class:"input",value:f.value,"onUpdate:value":_[3]||(_[3]=S=>f.value=S),options:p.value},null,8,["value","options"])):r.createCommentVNode("",!0),u.value==="slide"&&h.value?(r.openBlock(),r.createElementBlock("div",Kk,[r.createElementVNode("div",null,r.toDisplayString(r.unref(c)("LINK_DIALOG.PREVIEW")),1),r.createVNode($a,{class:"thumbnail",slide:h.value,size:500},null,8,["slide"])])):r.createCommentVNode("",!0),r.createElementVNode("div",qk,[r.createVNode(ue,{onClick:_[4]||(_[4]=S=>o("close")),style:{"margin-right":"10px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(c)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{type:"primary",onClick:_[5]||(_[5]=S=>E())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(c)("COMMON.CONFIRM")),1)]),_:1})])]))}},jk=ie(Zk,[["__scopeId","data-v-894855cc"]]),Jk={class:"modal-content-wrap"},Qk={__name:"Modal",props:{visible:{type:Boolean,required:!0},width:{type:Number,default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{type:Object}},emits:["update:visible","closed"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(!1),i=r.ref(null),l=r.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));r.watch(()=>n.visible,()=>{n.visible&&r.nextTick(()=>i.value.focus())});const s=()=>{o("update:visible",!1),o("closed")},c=()=>{n.visible&&n.closeOnEsc&&s()},u=()=>{n.closeOnClickMask&&s()};return(d,f)=>{const v=r.resolveComponent("AiPptClose");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"modal-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",{class:"modal",ref_key:"modalRef",ref:i,tabindex:"-1",onKeyup:f[4]||(f[4]=r.withKeys(p=>c(),["esc"]))},[r.createElementVNode("div",{class:"mask",onClick:f[0]||(f[0]=p=>u())}),r.createVNode(r.Transition,{name:"modal-zoom",onAfterLeave:f[2]||(f[2]=p=>a.value=!1),onBeforeEnter:f[3]||(f[3]=p=>a.value=!0)},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",Jk,[r.createElementVNode("div",{class:"modal-content",style:r.normalizeStyle(l.value)},[e.closeButton?(r.openBlock(),r.createElementBlock("span",{key:0,class:"close-btn",onClick:f[1]||(f[1]=p=>s())},[r.createVNode(v)])):r.createCommentVNode("",!0),a.value?r.renderSlot(d.$slots,"default",{key:1},void 0,!0):r.createCommentVNode("",!0)],4)],512),[[r.vShow,e.visible]])]),_:3})],544),[[r.vShow,e.visible]])]),_:3})])}}},Yr=ie(Qk,[["__scopeId","data-v-991069ef"]]),e7={class:"operates"},t7={key:2,class:"drag-mask"},n7={__name:"index",setup(e){const t=fe(),{activeElementIdList:n,activeGroupElementId:o,handleElementId:a,hiddenElementIdList:i,editorAreaFocus:l,gridLineSize:s,showRuler:c,creatingElement:u,creatingCustomShape:d,canvasScale:f,textFormatPainter:v}=ne.storeToRefs(t),{currentSlide:p}=ne.storeToRefs(pe()),{ctrlKeyState:h,spaceKeyState:m}=ne.storeToRefs(ln()),g=r.useTemplateRef("viewportRef"),E=r.ref([]),y=r.ref(!1),_=()=>y.value=!0;r.watch(a,()=>{t.setActiveGroupElementId("")});const S=r.ref([]),I=()=>{S.value=p.value?JSON.parse(JSON.stringify(p.value.elements)):[]};r.watchEffect(I);const A=r.useTemplateRef("canvasRef"),{dragViewport:x,viewportStyles:N}=JS(A);eI(A);const{mouseSelection:T,mouseSelectionVisible:L,mouseSelectionQuadrant:b,updateMouseSelection:O}=QS(S,g),{dragElement:w}=aI(S,E,f),{dragLineElement:C}=iI(S),{selectElement:P}=oI(S,w),{scaleElement:k,scaleMultiElement:B}=rI(S,E,f),{rotateElement:H}=nI(S,g,f),{moveShapeKeypoint:U}=lI(S,f),{selectAllElements:$}=pc(),{deleteAllElements:V}=fc(),{pasteElement:z}=lp(),{enterScreeningFromStart:D}=hc(),{updateSlideIndex:Y}=Ho(),{createTextElement:K,createShapeElement:Z}=Fo(),{t:oe}=_e();r.onMounted(()=>{n.value.length&&r.nextTick(()=>t.setActiveElementIdList([]))});const Q=F=>{n.value.length&&t.setActiveElementIdList([]),m.value?x(F):O(F),l.value||t.setEditorareaFocus(!0),v.value&&t.setTextFormatPainter(null),jS()},q=F=>{if(n.value.length||u.value||d.value||!g.value)return;const j=g.value.getBoundingClientRect(),le=(F.pageX-j.x)/f.value,ve=(F.pageY-j.y)/f.value;K({left:le,top:ve,width:200/f.value,height:0})};r.onUnmounted(()=>{v.value&&t.setTextFormatPainter(null)});const re=()=>{l.value&&t.setEditorareaFocus(!1)},{scaleCanvas:G}=sp(),M=Xe.throttle(G,100,{leading:!0,trailing:!1}),R=Xe.throttle(Y,300,{leading:!0,trailing:!1}),X=F=>{F.preventDefault(),h.value?F.deltaY>0?M("-"):F.deltaY<0&&M("+"):F.deltaY>0?R(Ee.DOWN):F.deltaY<0&&R(Ee.UP)},W=()=>{t.setRulerState(!c.value)},{insertElementFromCreateSelection:te,formatCreateSelection:ee}=sI(g),ce=F=>{const{start:j,end:le,path:ve,viewBox:he}=F,Fe=ee({start:j,end:le});if(Fe){const Re={};F.fill&&(Re.fill=F.fill),F.outline&&(Re.outline=F.outline),Z(Fe,{path:ve,viewBox:he},Re)}t.setCreatingCustomShapeState(!1)},se=()=>[{text:oe("COMMON.PASTE"),subText:"Ctrl + V",handler:z},{text:oe("COMMON.SELECT_ALL"),subText:"Ctrl + A",handler:$},{text:oe("CANVAS_MENU.RULER"),subText:c.value?"√":"",handler:W},{text:oe("CANVAS_MENU.GRID_LINES"),handler:()=>t.setGridLineSize(s.value?0:50),children:[{text:oe("CANVAS_MENU.GRID_NONE"),subText:s.value===0?"√":"",handler:()=>t.setGridLineSize(0)},{text:oe("CANVAS_MENU.GRID_SMALL"),subText:s.value===25?"√":"",handler:()=>t.setGridLineSize(25)},{text:oe("CANVAS_MENU.GRID_MEDIUM"),subText:s.value===50?"√":"",handler:()=>t.setGridLineSize(50)},{text:oe("CANVAS_MENU.GRID_LARGE"),subText:s.value===100?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:oe("CANVAS_MENU.RESET_SLIDE"),handler:V},{divider:!0},{text:oe("CANVAS_MENU.SLIDE_SHOW"),subText:"F5",handler:D}];return r.provide(rg,f),(F,j)=>{const le=r.resolveDirective("contextmenu"),ve=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"canvas",ref_key:"canvasRef",ref:A,onWheel:j[4]||(j[4]=he=>X(he)),onMousedown:j[5]||(j[5]=he=>Q(he)),onDblclick:j[6]||(j[6]=he=>q(he))},[r.unref(u)?(r.openBlock(),r.createBlock(iR,{key:0,onCreated:j[0]||(j[0]=he=>r.unref(te)(he))})):r.createCommentVNode("",!0),r.unref(d)?(r.openBlock(),r.createBlock(uR,{key:1,onCreated:j[1]||(j[1]=he=>ce(he))})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"viewport-wrapper",style:r.normalizeStyle({width:r.unref(N).width*r.unref(f)+"px",height:r.unref(N).height*r.unref(f)+"px",left:r.unref(N).left+"px",top:r.unref(N).top+"px"})},[r.createElementVNode("div",e7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.value,(he,Fe)=>(r.openBlock(),r.createBlock(j6,{key:Fe,type:he.type,axis:he.axis,length:he.length,canvasScale:r.unref(f)},null,8,["type","axis","length","canvasScale"]))),128)),r.unref(n).length>1?(r.openBlock(),r.createBlock(vR,{key:0,elementList:S.value,scaleMultiElement:r.unref(B)},null,8,["elementList","scaleMultiElement"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,he=>r.withDirectives((r.openBlock(),r.createBlock(ZR,{key:he.id,elementInfo:he,isSelected:r.unref(n).includes(he.id),isActive:r.unref(a)===he.id,isActiveGroupElement:r.unref(o)===he.id,isMultiSelect:r.unref(n).length>1,rotateElement:r.unref(H),scaleElement:r.unref(k),openLinkDialog:_,dragLineElement:r.unref(C),moveShapeKeypoint:r.unref(U)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[r.vShow,!r.unref(i).includes(he.id)]])),128)),r.createVNode(q6)]),r.createElementVNode("div",{class:"viewport",ref_key:"viewportRef",ref:g,style:r.normalizeStyle({transform:`scale(${r.unref(f)})`})},[r.unref(L)?(r.openBlock(),r.createBlock(G6,{key:0,top:r.unref(T).top,left:r.unref(T).left,width:r.unref(T).width,height:r.unref(T).height,quadrant:r.unref(b)},null,8,["top","left","width","height","quadrant"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(he,Fe)=>r.withDirectives((r.openBlock(),r.createBlock(H6,{key:he.id,elementInfo:he,elementIndex:Fe+1,isMultiSelect:r.unref(n).length>1,selectElement:r.unref(P),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[r.vShow,!r.unref(i).includes(he.id)]])),128))],4)],4),r.unref(m)?(r.openBlock(),r.createElementBlock("div",t7)):r.createCommentVNode("",!0),r.unref(c)?(r.openBlock(),r.createBlock(nR,{key:3,viewportStyles:r.unref(N),elementList:S.value},null,8,["viewportStyles","elementList"])):r.createCommentVNode("",!0),r.createVNode(Yr,{visible:y.value,"onUpdate:visible":j[3]||(j[3]=he=>y.value=he),width:540},{default:r.withCtx(()=>[r.createVNode(jk,{onClose:j[2]||(j[2]=he=>y.value=!1)})]),_:1},8,["visible"])],32)),[[le,se],[ve,re]])}}},r7=ie(n7,[["__scopeId","data-v-b0c2695e"]]),o7={class:"shape-item-thumbnail"},a7={class:"shape-content"},i7={overflow:"visible",width:"18",height:"18"},l7=["transform"],s7=["fill","stroke","d"],c7={__name:"ShapeItemThumbnail",props:{shape:{type:Object,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",o7,[r.createElementVNode("div",a7,[(r.openBlock(),r.createElementBlock("svg",i7,[r.createElementVNode("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{class:r.normalizeClass(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,s7)],8,l7)]))])]))}},S_=ie(c7,[["__scopeId","data-v-2bb4bea6"]]),u7={class:"shape-pool"},d7={class:"category-name"},f7={class:"shape-list"},p7={__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const{t:n}=_e(),o=t,a=i=>{o("select",i)};return(i,l)=>(r.openBlock(),r.createElementBlock("div",u7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(op),s=>(r.openBlock(),r.createElementBlock("div",{class:"category",key:s.type},[r.createElementVNode("div",d7,r.toDisplayString(r.unref(n)(s.typeKey||s.type)),1),r.createElementVNode("div",f7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.children,(c,u)=>(r.openBlock(),r.createBlock(S_,{class:"shape-item",key:u,shape:c,onClick:d=>a(c)},null,8,["shape","onClick"]))),128))])]))),128))]))}},v7=ie(p7,[["__scopeId","data-v-7f60f33c"]]),h7=[{type:"直线",typeKey:"LINES.STRAIGHT",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",typeKey:"LINES.POLY_CURVE",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 L 10 0 L 10 20 L 20 20",style:"solid",points:["","arrow"],isBroken2:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],m7={class:"line-pool"},g7={class:"category-name"},E7={class:"line-list"},y7=["onClick"],_7={overflow:"visible",width:"20",height:"20"},T7=["d","stroke-dasharray","marker-start","marker-end"],S7={__name:"LinePool",emits:["select"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=i=>{n("select",i)};return(i,l)=>(r.openBlock(),r.createElementBlock("div",m7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h7),(s,c)=>(r.openBlock(),r.createElementBlock("div",{class:"category",key:s.type},[r.createElementVNode("div",g7,r.toDisplayString(r.unref(o)(s.typeKey||s.type)),1),r.createElementVNode("div",E7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.children,(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:"line-item",key:d},[r.createElementVNode("div",{class:"line-content",onClick:f=>a(u)},[(r.openBlock(),r.createElementBlock("svg",_7,[r.createElementVNode("defs",null,[u.points[0]?(r.openBlock(),r.createBlock(Mr,{key:0,class:"line-marker",id:`preset-line-${c}-${d}`,position:"start",type:u.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):r.createCommentVNode("",!0),u.points[1]?(r.openBlock(),r.createBlock(Mr,{key:1,class:"line-marker",id:`preset-line-${c}-${d}`,position:"end",type:u.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):r.createCommentVNode("",!0)]),r.createElementVNode("path",{class:"line-path",d:u.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":u.style==="solid"?"0, 0":"4, 1","marker-start":u.points[0]?`url(#${`preset-line-${c}-${d}`}-${u.points[0]}-start)`:"","marker-end":u.points[1]?`url(#${`preset-line-${c}-${d}`}-${u.points[1]}-end)`:""},null,8,T7)]))],8,y7)]))),128))])]))),128))]))}},I7=ie(S7,[["__scopeId","data-v-bed8f637"]]),A7={class:"chart-pool"},N7=["onClick"],L7={class:"name"},C7={__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=["bar","column","line","area","scatter","pie","ring","radar"],i=l=>{n("select",l)};return(l,s)=>{const c=r.resolveComponent("AiPptChartLine"),u=r.resolveComponent("AiPptChartHistogram"),d=r.resolveComponent("AiPptChartPie"),f=r.resolveComponent("AiPptChartHistogramOne"),v=r.resolveComponent("AiPptChartLineArea"),p=r.resolveComponent("AiPptChartRing"),h=r.resolveComponent("AiPptChartScatter"),m=r.resolveComponent("AiPptRadarChart");return r.openBlock(),r.createElementBlock("ul",A7,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(a,(g,E)=>r.createElementVNode("li",{class:"chart-item",key:E},[r.createElementVNode("div",{class:"chart-content",onClick:y=>i(g)},[g==="line"?(r.openBlock(),r.createBlock(c,{key:0,size:"24"})):g==="bar"?(r.openBlock(),r.createBlock(u,{key:1,size:"24"})):g==="pie"?(r.openBlock(),r.createBlock(d,{key:2,size:"24"})):g==="column"?(r.openBlock(),r.createBlock(f,{key:3,size:"24"})):g==="area"?(r.openBlock(),r.createBlock(v,{key:4,size:"24"})):g==="ring"?(r.openBlock(),r.createBlock(p,{key:5,size:"24"})):g==="scatter"?(r.openBlock(),r.createBlock(h,{key:6,size:"24"})):g==="radar"?(r.openBlock(),r.createBlock(m,{key:7,size:"23"})):r.createCommentVNode("",!0),r.createElementVNode("div",L7,r.toDisplayString(r.unref(o)(r.unref(va)[g].labelKey||r.unref(va)[g].label)),1)],8,N7)])),64))])}}},x7=ie(C7,[["__scopeId","data-v-85f332f2"]]),b7={class:"prefix"},w7={class:"input-wrap"},O7=["disabled","placeholder"],R7={class:"handlers"},k7={class:"suffix"},D7={__name:"NumberInput",props:{value:{type:Number,required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:1/0},step:{type:Number,default:1}},emits:["update:value","input","change","enter","blur","focus"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(0),i=r.ref(!1);r.watch(()=>n.value,()=>{n.value!==a.value&&(a.value=n.value)},{immediate:!0}),r.watch(a,()=>{const d=+a.value;if(!isNaN(d)){{if(d>n.max)return;if(d<n.min)return}a.value=d,o("update:value",a.value)}});const l=()=>{let d=+a.value;isNaN(d)?d=n.min:d>n.max?d=n.max:d<n.min&&(d=n.min),a.value=d,o("update:value",a.value)},s=d=>{l(),o("enter",d)},c=d=>{l(),i.value=!1,o("blur",d)},u=d=>{i.value=!0,o("focus",d)};return(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["number-input",{disabled:e.disabled,focused:i.value}])},[r.createElementVNode("span",b7,[r.renderSlot(d.$slots,"prefix",{},void 0,!0)]),r.createElementVNode("div",w7,[r.withDirectives(r.createElementVNode("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),placeholder:e.placeholder,onInput:f[1]||(f[1]=v=>o("input",v)),onFocus:f[2]||(f[2]=v=>u(v)),onBlur:f[3]||(f[3]=v=>c(v)),onChange:f[4]||(f[4]=v=>o("change",v)),onKeydown:f[5]||(f[5]=r.withKeys(v=>s(v),["enter"]))},null,40,O7),[[r.vModelText,a.value]]),r.createElementVNode("div",R7,[r.createElementVNode("span",{class:"handler",onClick:f[6]||(f[6]=v=>a.value+=e.step)},[...f[8]||(f[8]=[r.createElementVNode("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[r.createElementVNode("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1)])]),r.createElementVNode("span",{class:"handler",onClick:f[7]||(f[7]=v=>a.value-=e.step)},[...f[9]||(f[9]=[r.createElementVNode("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[r.createElementVNode("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1)])])])]),r.createElementVNode("span",k7,[r.renderSlot(d.$slots,"suffix",{},void 0,!0)])],2))}},Xt=ie(D7,[["__scopeId","data-v-abfce75d"]]),P7={class:"table-generator"},M7={class:"title"},B7={class:"lef"},V7=["onMouseenter"],$7={key:1,class:"custom"},F7={class:"row"},H7={class:"label",style:{width:"25%"}},U7={class:"row"},G7={class:"label",style:{width:"25%"}},z7={class:"btns"},Y7={__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=r.ref([]),i=r.ref(3),l=r.ref(3),s=r.ref(!1),c=()=>{if(!a.value.length)return;const[f,v]=a.value;n("insert",{row:f,col:v})},u=()=>{if(i.value<1||i.value>20||l.value<1||l.value>20)return Ae.warning(o("TABLE_GENERATOR.COUNT_LIMIT"));n("insert",{row:i.value,col:l.value}),s.value=!1},d=()=>{n("close"),s.value=!1};return(f,v)=>(r.openBlock(),r.createElementBlock("div",P7,[r.createElementVNode("div",M7,[r.createElementVNode("div",B7,r.toDisplayString(r.unref(o)("TABLE_GENERATOR.TITLE"))+" "+r.toDisplayString(a.value.length?`${a.value[0]} x ${a.value[1]}`:""),1),r.createElementVNode("div",{class:"right",onClick:v[0]||(v[0]=p=>s.value=!s.value)},r.toDisplayString(s.value?r.unref(o)("COMMON.BACK"):r.unref(o)("TABLE_GENERATOR.CUSTOM")),1)]),s.value?(r.openBlock(),r.createElementBlock("div",$7,[r.createElementVNode("div",F7,[r.createElementVNode("div",H7,r.toDisplayString(r.unref(o)("TABLE_GENERATOR.ROW_COUNT")),1),r.createVNode(Xt,{min:1,max:20,value:i.value,"onUpdate:value":v[3]||(v[3]=p=>i.value=p),style:{width:"75%"}},null,8,["value"])]),r.createElementVNode("div",U7,[r.createElementVNode("div",G7,r.toDisplayString(r.unref(o)("TABLE_GENERATOR.COL_COUNT")),1),r.createVNode(Xt,{min:1,max:20,value:l.value,"onUpdate:value":v[4]||(v[4]=p=>l.value=p),style:{width:"75%"}},null,8,["value"])]),r.createElementVNode("div",z7,[r.createVNode(ue,{class:"btn",onClick:v[5]||(v[5]=p=>d())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{class:"btn",type:"primary",onClick:v[6]||(v[6]=p=>u())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CONFIRM")),1)]),_:1})])])):(r.openBlock(),r.createElementBlock("table",{key:0,onMouseleave:v[1]||(v[1]=p=>a.value=[]),onClick:v[2]||(v[2]=p=>c())},[r.createElementVNode("tbody",null,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(10,p=>r.createElementVNode("tr",{key:p},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(10,h=>r.createElementVNode("td",{onMouseenter:m=>a.value=[p,h],key:h},[r.createElementVNode("div",{class:r.normalizeClass(["cell",{active:a.value.length&&p<=a.value[0]&&h<=a.value[1]}])},null,2)],40,V7)),64))])),64))])],32))]))}},X7=ie(Y7,[["__scopeId","data-v-734e843c"]]),W7={class:"media-input"},K7={class:"btns"},q7={class:"btns"},Z7={__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=r.ref("video"),i=r.ref(""),l=r.ref(""),s=[{key:"video",label:o("MEDIA_INPUT.VIDEO")},{key:"audio",label:o("MEDIA_INPUT.AUDIO")}],c=()=>{if(!i.value)return Ae.error(o("MEDIA_INPUT.VIDEO_ERROR"));n("insertVideo",i.value)},u=()=>{if(!l.value)return Ae.error(o("MEDIA_INPUT.AUDIO_ERROR"));n("insertAudio",l.value)};return(d,f)=>(r.openBlock(),r.createElementBlock("div",W7,[r.createVNode(qn,{tabs:s,value:a.value,"onUpdate:value":f[0]||(f[0]=v=>a.value=v),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),a.value==="video"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(Pr,{value:i.value,"onUpdate:value":f[1]||(f[1]=v=>i.value=v),placeholder:r.unref(o)("MEDIA_INPUT.VIDEO_PLACEHOLDER")},null,8,["value","placeholder"]),r.createElementVNode("div",K7,[r.createVNode(ue,{onClick:f[2]||(f[2]=v=>n("close")),style:{"margin-right":"10px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{type:"primary",onClick:f[3]||(f[3]=v=>c())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CONFIRM")),1)]),_:1})])],64)):r.createCommentVNode("",!0),a.value==="audio"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Pr,{value:l.value,"onUpdate:value":f[4]||(f[4]=v=>l.value=v),placeholder:r.unref(o)("MEDIA_INPUT.AUDIO_PLACEHOLDER")},null,8,["value","placeholder"]),r.createElementVNode("div",q7,[r.createVNode(ue,{onClick:f[5]||(f[5]=v=>n("close")),style:{"margin-right":"10px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{type:"primary",onClick:f[6]||(f[6]=v=>u())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CONFIRM")),1)]),_:1})])],64)):r.createCommentVNode("",!0)]))}},j7=ie(Z7,[["__scopeId","data-v-5393d941"]]),J7=[{label:"高斯公式",labelKey:"FORMULA.PRESET.GAUSS",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",labelKey:"FORMULA.PRESET.FOURIER",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",labelKey:"FORMULA.PRESET.TAYLOR",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",labelKey:"FORMULA.PRESET.DEFINITE_INTEGRAL",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",labelKey:"FORMULA.PRESET.TRIG_IDENTITY_1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",labelKey:"FORMULA.PRESET.TRIG_IDENTITY_2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",labelKey:"FORMULA.PRESET.BINOMIAL",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",labelKey:"FORMULA.PRESET.EULER",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",labelKey:"FORMULA.PRESET.BERNOULLI",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",labelKey:"FORMULA.PRESET.TOTAL_DIFFERENTIAL",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",labelKey:"FORMULA.PRESET.NONHOMOGENEOUS",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",labelKey:"FORMULA.PRESET.CAUCHY",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",labelKey:"FORMULA.PRESET.LAGRANGE",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",labelKey:"FORMULA.PRESET.DERIVATIVE",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",labelKey:"FORMULA.PRESET.TRIG_INTEGRAL",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",labelKey:"FORMULA.PRESET.QUADRIC",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",labelKey:"FORMULA.PRESET.SECOND_ORDER",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",labelKey:"FORMULA.PRESET.DIRECTIONAL",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],Ad=[{type:"operators",label:"数学",labelKey:"FORMULA.SYMBOLS.MATH",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",labelKey:"FORMULA.SYMBOLS.GROUP",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",labelKey:"FORMULA.SYMBOLS.FUNCTION",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",labelKey:"FORMULA.SYMBOLS.GREEK",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Q7=["disabled","value","rows","placeholder"],eD={__name:"TextArea",props:{value:{type:String,required:!0},rows:{type:Number,default:4},padding:{type:Number},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{type:String,default:""}},emits:["update:value","focus","blur","enter"],setup(e,{expose:t,emit:n}){const o=n,a=s=>{o("update:value",s.target.value)},i=r.useTemplateRef("textareaRef");return t({focus:()=>{i.value&&i.value.focus()}}),(s,c)=>(r.openBlock(),r.createElementBlock("textarea",{class:r.normalizeClass(["textarea",{disabled:e.disabled,resizable:e.resizable}]),ref_key:"textareaRef",ref:i,disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,style:r.normalizeStyle({padding:e.padding?`${e.padding}px`:"10px"}),onInput:c[0]||(c[0]=u=>a(u)),onFocus:c[1]||(c[1]=u=>o("focus",u)),onBlur:c[2]||(c[2]=u=>o("blur",u)),onKeydown:c[3]||(c[3]=r.withKeys(u=>o("enter",u),["enter"]))},null,46,Q7))}},Kf=ie(eD,[["__scopeId","data-v-e8f93f19"]]),tD=["width","height"],nD=["transform"],rD=["d"],oD={__name:"FormulaContent",props:{latex:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(e){const t=e,n=r.ref({x:0,y:0,w:0,h:0}),o=r.ref("");r.watch(()=>t.latex,()=>{const i=new jf.hfmath(t.latex);o.value=i.pathd({}),n.value=i.box({})},{immediate:!0});const a=r.computed(()=>{const i=n.value.w+32,l=n.value.h+32;return i>t.width||l>t.height?i/l>t.width/t.height?t.width/i:t.height/l:1});return(i,l)=>(r.openBlock(),r.createElementBlock("svg",{class:"formula-content",overflow:"visible",width:n.value.w+32,height:n.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("g",{transform:`scale(${a.value}, ${a.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[r.createElementVNode("path",{d:o.value},null,8,rD)],8,nD)],8,tD))}},m1=ie(oD,[["__scopeId","data-v-cb4ab294"]]),aD=["innerHTML"],iD={__name:"SymbolContent",props:{latex:{type:String,required:!0}},setup(e){const t=e,n=r.computed(()=>new jf.hfmath(t.latex).svg({SCALE_X:10,SCALE_Y:10}));return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:"symbol-content",innerHTML:n.value},null,8,aD))}},lD={class:"latex-editor"},sD={class:"container"},cD={class:"left"},uD={class:"input-area"},dD={class:"preview"},fD={key:0,class:"placeholder"},pD={key:1,class:"preview-content"},vD={class:"right"},hD={class:"content"},mD={key:0,class:"symbol"},gD={class:"symbol-pool"},ED=["onClick"],yD={key:1,class:"formula"},_D={class:"formula-title"},TD=["onClick"],SD={class:"footer"},ID={__name:"index",props:{value:{type:String,default:""}},emits:["update","close"],setup(e,{emit:t}){const{t:n}=_e(),o=r.computed(()=>[{label:n("FORMULA_EDITOR.TAB_SYMBOLS"),key:"symbol"},{label:n("FORMULA_EDITOR.TAB_PRESETS"),key:"formula"}]),a=e,i=t,l=J7,s=r.computed(()=>Ad.map(g=>({label:n(g.labelKey||g.label),key:g.type}))),c=r.ref(""),u=r.ref("symbol"),d=r.useTemplateRef("textAreaRef"),f=r.ref(Ad[0].type),v=r.computed(()=>{const g=Ad.find(E=>E.type===f.value);return g?.children||[]}),p=g=>n(g.labelKey||g.label);r.onMounted(()=>{a.value&&(c.value=a.value)});const h=()=>{if(!c.value)return Ae.error(n("FORMULA_EDITOR.EMPTY_ERROR"));const g=new jf.hfmath(c.value),E=g.pathd({}),y=g.box({});i("update",{latex:c.value,path:E,w:y.w+32,h:y.h+32})},m=g=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,g))};return(g,E)=>(r.openBlock(),r.createElementBlock("div",lD,[r.createElementVNode("div",sD,[r.createElementVNode("div",cD,[r.createElementVNode("div",uD,[r.createVNode(Kf,{value:c.value,"onUpdate:value":E[0]||(E[0]=y=>c.value=y),placeholder:r.unref(n)("FORMULA_EDITOR.INPUT_PLACEHOLDER"),ref_key:"textAreaRef",ref:d},null,8,["value","placeholder"])]),r.createElementVNode("div",dD,[c.value?(r.openBlock(),r.createElementBlock("div",pD,[r.createVNode(m1,{width:518,height:138,latex:c.value},null,8,["latex"])])):(r.openBlock(),r.createElementBlock("div",fD,r.toDisplayString(r.unref(n)("FORMULA_EDITOR.PREVIEW_PLACEHOLDER")),1))])]),r.createElementVNode("div",vD,[r.createVNode(qn,{tabs:o.value,value:u.value,"onUpdate:value":E[1]||(E[1]=y=>u.value=y),card:""},null,8,["tabs","value"]),r.createElementVNode("div",hD,[u.value==="symbol"?(r.openBlock(),r.createElementBlock("div",mD,[r.createVNode(qn,{tabs:s.value,value:f.value,"onUpdate:value":E[2]||(E[2]=y=>f.value=y),spaceBetween:""},null,8,["tabs","value"]),r.createElementVNode("div",gD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,y=>(r.openBlock(),r.createElementBlock("div",{class:"symbol-item",key:y.latex,onClick:_=>m(y.latex)},[r.createVNode(iD,{latex:y.latex},null,8,["latex"])],8,ED))),128))])])):(r.openBlock(),r.createElementBlock("div",yD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),y=>(r.openBlock(),r.createElementBlock("div",{class:"formula-item",key:y.latex},[r.createElementVNode("div",_D,r.toDisplayString(p(y)),1),r.createElementVNode("div",{class:"formula-item-content",onClick:_=>c.value=y.latex},[r.createVNode(m1,{width:236,height:60,latex:y.latex},null,8,["latex"])],8,TD)]))),128))]))])])]),r.createElementVNode("div",SD,[r.createVNode(ue,{class:"btn",onClick:E[3]||(E[3]=y=>i("close"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{class:"btn",type:"primary",onClick:E[4]||(E[4]=y=>h())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("COMMON.CONFIRM")),1)]),_:1})])]))}},I_=ie(ID,[["__scopeId","data-v-631999a0"]]),AD={class:"canvas-tool"},ND={class:"left-handler"},LD={class:"more"},CD={class:"add-element-handler"},xD={class:"handler-item group-btn"},bD={class:"handler-item group-btn",offset:10},wD={class:"right-handler"},OD={class:"text"},RD={__name:"index",setup(e){const t=fe(),{t:n}=_e(),{creatingElement:o,creatingCustomShape:a,showSelectPanel:i,showSearchPanel:l,showNotesPanel:s,showSymbolPanel:c}=ne.storeToRefs(t),{canUndo:u,canRedo:d}=ne.storeToRefs(F1()),{redo:f,undo:v}=be(),{scaleCanvas:p,setCanvasScalePercentage:h,resetCanvas:m,canvasScalePercentage:g}=sp(),E=[200,150,125,100,75,50],y=r.ref(!1),_=Q=>{h(Q),y.value=!1},{createImageElement:S,createChartElement:I,createTableElement:A,createLatexElement:x,createVideoElement:N,createAudioElement:T}=Fo(),L=Q=>{const q=Q[0];q&&Xr(q).then(re=>S(re))},b=r.ref(!1),O=r.ref(!1),w=r.ref(!1),C=r.ref(!1),P=r.ref(!1),k=r.ref(!1),B=r.ref(!1),H=r.ref(!1),U=r.ref(!1),$=(Q=!1)=>{t.setCreatingElement({type:"text",vertical:Q})},V=Q=>{t.setCreatingElement({type:"shape",data:Q}),b.value=!1},z=()=>{t.setCreatingCustomShapeState(!0),b.value=!1},D=Q=>{t.setCreatingElement({type:"line",data:Q}),O.value=!1},Y=()=>{t.setSelectPanelState(!i.value)},K=()=>{t.setSearchPanelState(!l.value)},Z=()=>{t.setNotesPanelState(!s.value)},oe=()=>{t.setSymbolPanelState(!c.value)};return(Q,q)=>{const re=r.resolveComponent("AiPptBack"),G=r.resolveComponent("AiPptNext"),M=r.resolveComponent("AiPptMore"),R=r.resolveComponent("AiPptComment"),X=r.resolveComponent("AiPptMoveOne"),W=r.resolveComponent("AiPptSearch"),te=r.resolveComponent("AiPptFontSize"),ee=r.resolveComponent("AiPptTextRotationNone"),ce=r.resolveComponent("AiPptTextRotationDown"),se=r.resolveComponent("AiPptDown"),F=r.resolveComponent("AiPptGraphicDesign"),j=r.resolveComponent("AiPptPicture"),le=r.resolveComponent("AiPptConnection"),ve=r.resolveComponent("AiPptChartProportion"),he=r.resolveComponent("AiPptInsertTable"),Fe=r.resolveComponent("AiPptFormula"),Re=r.resolveComponent("AiPptVideoTwo"),ur=r.resolveComponent("AiPptSymbol"),dr=r.resolveComponent("AiPptMinus"),fr=r.resolveComponent("AiPptPlus"),qr=r.resolveComponent("AiPptFullScreen"),ot=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",AD,[r.createElementVNode("div",ND,[r.withDirectives(r.createVNode(re,{class:r.normalizeClass(["handler-item",{disable:!r.unref(u)}]),onClick:q[0]||(q[0]=Ie=>r.unref(v)())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.UNDO")]]),r.withDirectives(r.createVNode(G,{class:r.normalizeClass(["handler-item",{disable:!r.unref(d)}]),onClick:q[1]||(q[1]=Ie=>r.unref(f)())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.REDO")]]),r.createElementVNode("div",LD,[r.createVNode(Oe,{type:"vertical",style:{height:"20px"}}),r.createVNode(Se,{class:"more-icon",trigger:"click",value:U.value,"onUpdate:value":q[5]||(q[5]=Ie=>U.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:q[2]||(q[2]=()=>{Z(),U.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.NOTES_PANEL")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:q[3]||(q[3]=()=>{Y(),U.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.SELECTION_PANEL")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:q[4]||(q[4]=()=>{K(),U.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.SEARCH_REPLACE")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(M,{class:"handler-item"})]),_:1},8,["value"]),r.withDirectives(r.createVNode(R,{class:r.normalizeClass(["handler-item",{active:r.unref(s)}]),onClick:q[6]||(q[6]=Ie=>Z())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.NOTES_PANEL")]]),r.withDirectives(r.createVNode(X,{class:r.normalizeClass(["handler-item",{active:r.unref(i)}]),onClick:q[7]||(q[7]=Ie=>Y())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.SELECTION_PANEL")]]),r.withDirectives(r.createVNode(W,{class:r.normalizeClass(["handler-item",{active:r.unref(l)}]),onClick:q[8]||(q[8]=Ie=>K())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.SEARCH_REPLACE_TOOLTIP")]])])]),r.createElementVNode("div",CD,[r.withDirectives((r.openBlock(),r.createElementBlock("div",xD,[r.createVNode(te,{class:r.normalizeClass(["icon",{active:r.unref(o)?.type==="text"}]),onClick:q[9]||(q[9]=Ie=>$())},null,8,["class"]),r.createVNode(Se,{trigger:"click",value:B.value,"onUpdate:value":q[12]||(q[12]=Ie=>B.value=Ie),style:{height:"100%"},offset:10},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:q[10]||(q[10]=()=>{$(),B.value=!1})},{default:r.withCtx(()=>[r.createVNode(ee),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("CANVAS_TOOL.TEXT_HORIZONTAL")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:q[11]||(q[11]=()=>{$(!0),B.value=!1})},{default:r.withCtx(()=>[r.createVNode(ce),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("CANVAS_TOOL.TEXT_VERTICAL")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(se,{class:"arrow"})]),_:1},8,["value"])])),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_TEXT")]]),r.withDirectives((r.openBlock(),r.createElementBlock("div",bD,[r.createVNode(Se,{trigger:"click",style:{height:"100%"},value:b.value,"onUpdate:value":q[14]||(q[14]=Ie=>b.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(v7,{onSelect:q[13]||(q[13]=Ie=>V(Ie))})]),default:r.withCtx(()=>[r.createVNode(F,{class:r.normalizeClass(["icon",{active:r.unref(a)||r.unref(o)?.type==="shape"}])},null,8,["class"])]),_:1},8,["value"]),r.createVNode(Se,{trigger:"click",value:H.value,"onUpdate:value":q[16]||(q[16]=Ie=>H.value=Ie),style:{height:"100%"},offset:10},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:q[15]||(q[15]=()=>{z(),H.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.FREE_DRAW")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(se,{class:"arrow"})]),_:1},8,["value"])])),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_SHAPE")]]),r.createVNode(El,{onChange:q[17]||(q[17]=Ie=>L(Ie))},{default:r.withCtx(()=>[r.withDirectives(r.createVNode(j,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_IMAGE")]])]),_:1}),r.createVNode(Se,{trigger:"click",value:O.value,"onUpdate:value":q[19]||(q[19]=Ie=>O.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(I7,{onSelect:q[18]||(q[18]=Ie=>D(Ie))})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(le,{class:r.normalizeClass(["handler-item",{active:r.unref(o)?.type==="line"}])},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_LINE")]])]),_:1},8,["value"]),r.createVNode(Se,{trigger:"click",value:w.value,"onUpdate:value":q[21]||(q[21]=Ie=>w.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(x7,{onSelect:q[20]||(q[20]=Ie=>{r.unref(I)(Ie),w.value=!1})})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(ve,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_CHART")]])]),_:1},8,["value"]),r.createVNode(Se,{trigger:"click",value:C.value,"onUpdate:value":q[24]||(q[24]=Ie=>C.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(X7,{onClose:q[22]||(q[22]=Ie=>C.value=!1),onInsert:q[23]||(q[23]=({row:Ie,col:Ev})=>{r.unref(A)(Ie,Ev),C.value=!1})})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(he,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_TABLE")]])]),_:1},8,["value"]),r.withDirectives(r.createVNode(Fe,{class:"handler-item",onClick:q[25]||(q[25]=Ie=>k.value=!0)},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_FORMULA")]]),r.createVNode(Se,{trigger:"click",value:P.value,"onUpdate:value":q[29]||(q[29]=Ie=>P.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(j7,{onClose:q[26]||(q[26]=Ie=>P.value=!1),onInsertVideo:q[27]||(q[27]=Ie=>{r.unref(N)(Ie),P.value=!1}),onInsertAudio:q[28]||(q[28]=Ie=>{r.unref(T)(Ie),P.value=!1})})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(Re,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_MEDIA")]])]),_:1},8,["value"]),r.withDirectives(r.createVNode(ur,{class:r.normalizeClass(["handler-item",{active:r.unref(c)}]),onClick:q[30]||(q[30]=Ie=>oe())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_SYMBOL")]])]),r.createElementVNode("div",wD,[r.withDirectives(r.createVNode(dr,{class:"handler-item viewport-size",onClick:q[31]||(q[31]=Ie=>r.unref(p)("-"))},null,512),[[ot,r.unref(n)("CANVAS_TOOL.SCALE_DOWN")]]),r.createVNode(Se,{trigger:"click",value:y.value,"onUpdate:value":q[33]||(q[33]=Ie=>y.value=Ie)},{content:r.withCtx(()=>[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(E,Ie=>r.createVNode(dt,{center:"",key:Ie,onClick:Ev=>_(Ie)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(Ie)+"%",1)]),_:2},1032,["onClick"])),64)),r.createVNode(dt,{center:"",onClick:q[32]||(q[32]=()=>{r.unref(m)(),y.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.FIT_SCREEN")),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",OD,r.toDisplayString(r.unref(g)),1)]),_:1},8,["value"]),r.withDirectives(r.createVNode(fr,{class:"handler-item viewport-size",onClick:q[34]||(q[34]=Ie=>r.unref(p)("+"))},null,512),[[ot,r.unref(n)("CANVAS_TOOL.SCALE_UP")]]),r.withDirectives(r.createVNode(qr,{class:"handler-item viewport-size-adaptation",onClick:q[35]||(q[35]=Ie=>r.unref(m)())},null,512),[[ot,r.unref(n)("CANVAS_TOOL.FIT_SCREEN_TOOLTIP")]])]),r.createVNode(Yr,{visible:k.value,"onUpdate:visible":q[38]||(q[38]=Ie=>k.value=Ie),width:880},{default:r.withCtx(()=>[r.createVNode(I_,{onClose:q[36]||(q[36]=Ie=>k.value=!1),onUpdate:q[37]||(q[37]=Ie=>{r.unref(x)(Ie),k.value=!1})})]),_:1},8,["visible"])])}}},kD=ie(RD,[["__scopeId","data-v-072b3f8c"]]),DD=()=>{const e=pe(),{slides:t}=ne.storeToRefs(e),{addHistorySnapshot:n}=be(),{deleteSlide:o}=Ho();return{createSection:()=>{e.updateSlide({sectionTag:{id:Ne.nanoid(6)}}),n()},removeSection:u=>{if(!u)return;const d=t.value.find(f=>{var v;return((v=f.sectionTag)===null||v===void 0?void 0:v.id)===u});e.removeSlideProps({id:d.id,propName:"sectionTag"}),n()},removeAllSection:()=>{const u=t.value.map(d=>(d.sectionTag&&delete d.sectionTag,d));e.setSlides(u),n()},removeSectionSlides:u=>{let d=0;u&&(d=t.value.findIndex(v=>{var p;return((p=v.sectionTag)===null||p===void 0?void 0:p.id)===u}));const f=[];for(let v=d;v<t.value.length;v++){const p=t.value[v];if(v!==d&&p.sectionTag)break;f.push(p.id)}o(f)},updateSectionTitle:(u,d)=>{if(d){if(u==="default")e.updateSlide({sectionTag:{id:Ne.nanoid(6),title:d}},t.value[0].id);else{const f=t.value.find(v=>{var p;return((p=v.sectionTag)===null||p===void 0?void 0:p.id)===u});if(!f)return;e.updateSlide({sectionTag:{...f.sectionTag,title:d}},f.id)}n()}}}},PD=()=>{const{slides:e}=ne.storeToRefs(pe()),t=r.ref(null),n=r.ref(50),o=()=>{e.value.length>n.value?t.value=setTimeout(()=>{n.value=n.value+20,o()},600):n.value=9999};return r.onMounted(o),r.onUnmounted(()=>{t.value&&clearTimeout(t.value)}),{slidesLoadLimit:n}},MD={class:"templates"},BD={class:"catalogs"},VD=["onClick"],$D={class:"content"},FD={class:"header"},HD={class:"types"},UD=["onClick"],GD={key:0,class:"loading-mask"},zD={class:"loading-text"},YD={key:0,class:"slide-item"},XD={class:"thumb-wrap"},WD={class:"btns"},KD={__name:"Templates",emits:["select","selectAll"],setup(e,{emit:t}){const n=t,o=pe(),{templates:a}=ne.storeToRefs(o),{t:i}=_e(),l=r.ref([]),s=r.ref(!1),c=r.useTemplateRef("listRef"),u=r.ref([{label:i("SLIDE_TEMPLATES.TYPE_ALL"),value:"all"},{label:i("SLIDE_TEMPLATES.TYPE_COVER"),value:"cover"},{label:i("SLIDE_TEMPLATES.TYPE_CONTENTS"),value:"contents"},{label:i("SLIDE_TEMPLATES.TYPE_TRANSITION"),value:"transition"},{label:i("SLIDE_TEMPLATES.TYPE_CONTENT"),value:"content"},{label:i("SLIDE_TEMPLATES.TYPE_REFERENCE"),value:"reference"},{label:i("SLIDE_TEMPLATES.TYPE_END"),value:"end"}]),d=r.ref("all"),f=r.ref(""),v=r.ref(0),p=g=>{n("select",g)},h=g=>{n("selectAll",g)},m=async g=>{const E=++v.value;f.value=g,s.value=!0;try{const y=await Ni.getTemplates(f.value);if(E!==v.value)return;l.value=y.slides,y.width&&y.height&&(o.setViewportSize(y.width),o.setViewportRatio(y.height/y.width)),c.value&&c.value.scrollTo(0,0)}finally{E===v.value&&(s.value=!1)}};return r.onMounted(()=>{m(a.value[0].id)}),(g,E)=>(r.openBlock(),r.createElementBlock("div",MD,[r.createElementVNode("div",BD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(a),y=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["catalog",{active:f.value===y.id}]),key:y.id,onClick:_=>m(y.id)},r.toDisplayString(r.unref(i)(y.nameKey||y.name)),11,VD))),128))]),r.createElementVNode("div",$D,[r.createElementVNode("div",FD,[r.createElementVNode("div",HD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,y=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["type",{active:d.value===y.value}]),key:y.value,onClick:_=>d.value=y.value},r.toDisplayString(y.label),11,UD))),128))]),r.createElementVNode("div",{class:"insert-all",onClick:E[0]||(E[0]=y=>h(l.value))},r.toDisplayString(r.unref(i)("SLIDE_TEMPLATES.INSERT_ALL")),1)]),r.createElementVNode("div",{class:"list",ref_key:"listRef",ref:c},[s.value?(r.openBlock(),r.createElementBlock("div",GD,[E[1]||(E[1]=r.createElementVNode("div",{class:"spinner"},null,-1)),r.createElementVNode("div",zD,r.toDisplayString(r.unref(i)("PPT_COMPONENTS.THUMBNAIL_LOADING")),1)])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,y=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:y.id},[y.type===d.value||d.value==="all"?(r.openBlock(),r.createElementBlock("div",YD,[r.createElementVNode("div",XD,[r.createVNode($a,{class:"thumbnail",slide:y,size:180},null,8,["slide"]),r.createElementVNode("div",WD,[r.createVNode(ue,{class:"btn",type:"primary",size:"small",onClick:_=>p(y)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)("SLIDE_TEMPLATES.INSERT_TEMPLATE")),1)]),_:1},8,["onClick"])])])])):r.createCommentVNode("",!0)],64))),128))],512)])]))}},qD=ie(KD,[["__scopeId","data-v-730180fd"]]),ZD={class:"add-slide"},jD={class:"select-btn"},JD={class:"thumbnail-container"},QD=["data-section-id","onDblclick"],eP=["id","value","placeholder"],tP={key:1,class:"text"},nP={class:"text-content"},rP=["onMousedown"],oP={class:"page-number"},aP={__name:"index",setup(e){const t=fe(),n=pe(),o=ln(),{t:a}=_e(),{selectedSlidesIndex:i,thumbnailsFocus:l}=ne.storeToRefs(t),{slides:s,slideIndex:c,currentSlide:u}=ne.storeToRefs(n),{ctrlKeyState:d,shiftKeyState:f}=ne.storeToRefs(o),{slidesLoadLimit:v}=PD(),p=r.computed(()=>[...i.value,c.value]),h=r.ref(!1),m=r.computed(()=>s.value.some(G=>G.sectionTag)),{addSlidesFromData:g}=gl(),{copySlide:E,pasteSlide:y,createSlide:_,createSlideByTemplate:S,copyAndPasteSlide:I,deleteSlide:A,cutSlide:x,selectAllSlide:N,sortSlides:T,isEmptySlide:L}=Ho(),{createSection:b,removeSection:O,removeAllSection:w,removeSectionSlides:C,updateSectionTitle:P}=DD(),k=r.useTemplateRef("thumbnailsRef");r.watch(()=>c.value,()=>{p.value.length&&t.updateSelectedSlidesIndex([]),r.nextTick(()=>{var G,M;const R=(M=(G=k.value)===null||G===void 0?void 0:G.$el)===null||M===void 0?void 0:M.querySelector(".thumbnail-item.active");k.value&&R&&!bT(R,k.value.$el)&&setTimeout(()=>{R.scrollIntoView({behavior:"smooth"})},100)})},{immediate:!0});const B=G=>{t.setActiveElementIdList([]),c.value!==G&&n.updateSlideIndex(G)},H=(G,M)=>{if(z.value)return;const R=p.value.length>1;if(!(R&&p.value.includes(M)&&G.button!==0))if(d.value)if(c.value===M){if(!R)return;const X=p.value.filter(W=>W!==M);t.updateSelectedSlidesIndex(X),B(p.value[0])}else if(p.value.includes(M)){const X=p.value.filter(W=>W!==M);t.updateSelectedSlidesIndex(X)}else{const X=[...p.value,M];t.updateSelectedSlidesIndex(X)}else if(f.value){if(c.value===M&&!R)return;let X=Math.min(...p.value),W=M;M<X&&(W=Math.max(...p.value),X=M);const te=[];for(let ee=X;ee<=W;ee++)te.push(ee);t.updateSelectedSlidesIndex(te)}else t.updateSelectedSlidesIndex([]),B(M)},U=G=>{l.value!==G&&(t.setThumbnailsFocus(G),G||t.updateSelectedSlidesIndex([]))},$=G=>{const{newIndex:M,oldIndex:R}=G;M===void 0||R===void 0||M===R||T(M,R)},V=()=>{t.setNotesPanelState(!0)},z=r.ref(""),D=G=>{t.setDisableHotkeysState(!0),z.value=G||"default",r.nextTick(()=>{document.querySelector(`#section-title-input-${G||"default"}`).focus()})},Y=G=>{const M=G.target.value;P(z.value,M),z.value="",t.setDisableHotkeysState(!1)},K=G=>{L.value?n.setSlides(G):g(G)},Z=G=>{const M=G.dataset.sectionId;return[{text:a("SLIDE_THUMBS.SECTION_DELETE"),handler:()=>O(M)},{text:a("SLIDE_THUMBS.SECTION_DELETE_WITH_SLIDES"),handler:()=>{t.setActiveElementIdList([]),C(M)}},{text:a("SLIDE_THUMBS.SECTION_DELETE_ALL"),handler:w},{text:a("SLIDE_THUMBS.SECTION_RENAME"),handler:()=>D(M)}]},{enterScreening:oe,enterScreeningFromStart:Q}=hc(),q=()=>[{text:a("SLIDE_THUMBS.PASTE"),subText:"Ctrl + V",handler:y},{text:a("SLIDE_THUMBS.SELECT_ALL"),subText:"Ctrl + A",handler:N},{text:a("SLIDE_THUMBS.NEW_SLIDE"),subText:"Enter",handler:_},{text:a("SLIDE_THUMBS.SLIDE_SHOW"),subText:"F5",handler:Q}],re=()=>[{text:a("SLIDE_THUMBS.CUT"),subText:"Ctrl + X",handler:x},{text:a("SLIDE_THUMBS.COPY"),subText:"Ctrl + C",handler:E},{text:a("SLIDE_THUMBS.PASTE"),subText:"Ctrl + V",handler:y},{text:a("SLIDE_THUMBS.SELECT_ALL"),subText:"Ctrl + A",handler:N},{divider:!0},{text:a("SLIDE_THUMBS.NEW_SLIDE"),subText:"Enter",handler:_},{text:a("SLIDE_THUMBS.DUPLICATE_SLIDE"),subText:"Ctrl + D",handler:I},{text:a("SLIDE_THUMBS.DELETE_SLIDE"),subText:"Delete",handler:()=>A()},{text:a("SLIDE_THUMBS.SECTION_ADD"),handler:b,disable:!!u.value.sectionTag},{divider:!0},{text:a("SLIDE_THUMBS.SLIDE_SHOW_FROM_CURRENT"),subText:"Shift + F5",handler:oe}];return(G,M)=>{const R=r.resolveComponent("AiPptPlus"),X=r.resolveComponent("AiPptDown"),W=r.resolveDirective("contextmenu"),te=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"thumbnails",onMousedown:M[8]||(M[8]=()=>U(!0))},[r.createElementVNode("div",ZD,[r.createElementVNode("div",{class:"btn",onClick:M[0]||(M[0]=ee=>r.unref(_)())},[r.createVNode(R,{class:"icon"}),r.createTextVNode(r.toDisplayString(r.unref(a)("SLIDE_THUMBS.ADD_SLIDE")),1)]),r.createVNode(Se,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":M[3]||(M[3]=ee=>h.value=ee),center:""},{content:r.withCtx(()=>[r.createVNode(qD,{onSelect:M[1]||(M[1]=ee=>{r.unref(S)(ee),h.value=!1}),onSelectAll:M[2]||(M[2]=ee=>{K(ee),h.value=!1})})]),default:r.withCtx(()=>[r.createElementVNode("div",jD,[r.createVNode(X)])]),_:1},8,["value"])]),r.createVNode(r.unref(Jf),{class:"thumbnail-list",ref_key:"thumbnailsRef",ref:k,modelValue:r.unref(s),animation:200,scroll:!0,scrollSensitivity:50,disabled:z.value,onEnd:$,itemKey:"id"},{item:r.withCtx(({element:ee,index:ce})=>[r.createElementVNode("div",JD,[ee.sectionTag||m.value&&ce===0?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,class:"section-title","data-section-id":ee?.sectionTag?.id||"",onDblclick:()=>D(ee?.sectionTag?.id||"")},[z.value===ee?.sectionTag?.id||ce===0&&z.value==="default"?(r.openBlock(),r.createElementBlock("input",{key:0,id:`section-title-input-${ee?.sectionTag?.id||"default"}`,type:"text",value:ee?.sectionTag?.title||"",placeholder:r.unref(a)("SLIDE_THUMBS.SECTION_PLACEHOLDER"),onBlur:M[4]||(M[4]=se=>Y(se)),onKeydown:M[5]||(M[5]=r.withKeys(r.withModifiers(se=>Y(se),["stop"]),["enter"]))},null,40,eP)):(r.openBlock(),r.createElementBlock("span",tP,[r.createElementVNode("div",nP,r.toDisplayString(ee?.sectionTag?ee?.sectionTag?.title||r.unref(a)("SLIDE_THUMBS.SECTION_UNTITLED"):r.unref(a)("SLIDE_THUMBS.SECTION_DEFAULT")),1)]))],40,QD)),[[W,Z]]):r.createCommentVNode("",!0),r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["thumbnail-item",{active:r.unref(c)===ce,selected:p.value.includes(ce)}]),onMousedown:se=>H(se,ce),onDblclick:M[7]||(M[7]=se=>r.unref(oe)())},[r.createElementVNode("div",{class:r.normalizeClass(["label",{"offset-left":ce>=99}])},r.toDisplayString(r.unref(rT)(ce+1,2)),3),r.createVNode($a,{class:"thumbnail",slide:ee,size:120,visible:ce<r.unref(v)},null,8,["slide","visible"]),ee.notes&&ee.notes.length?(r.openBlock(),r.createElementBlock("div",{key:0,class:"note-flag",onClick:M[6]||(M[6]=se=>V())},r.toDisplayString(ee.notes.length),1)):r.createCommentVNode("",!0)],42,rP)),[[W,re]])])]),_:1},8,["modelValue","disabled"]),r.createElementVNode("div",oP,r.toDisplayString(r.unref(a)("SLIDE_THUMBS.PAGE_NUMBER",{current:r.unref(c)+1,total:r.unref(s).length})),1)],32)),[[te,()=>U(!1)],[W,q]])}}},iP=ie(aP,[["__scopeId","data-v-c29273ca"]]),lP={class:"bar"},sP=["data-tooltip"],cP=["data-tooltip"],uP=["data-tooltip"],dP={__name:"Slider",props:{value:{type:Number,default:0},disabled:{type:Boolean,default:!1},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=S=>S.getBoundingClientRect().left,o=e,a=t,i=r.useTemplateRef("sliderRef"),l=r.ref(0),s=r.ref(0),c=r.ref(0),u=r.ref("end"),d=S=>{let I=S/100*(o.max-o.min);if(o.step>=1)I=Math.fround(I);else{const A=o.step.toString(),x=A.match(/^[0.]*([1-9])/);if(x){const N=x[1],T=A.indexOf(N)-1;if(T>0){const L=Math.pow(10,T);I=Math.fround(I*L)/L}}}return $_.plus(I,o.min)},f=r.computed(()=>d(l.value)),v=r.computed(()=>d(s.value)),p=r.computed(()=>d(c.value));r.watch(()=>o.value,()=>{o.max!==o.min&&(typeof o.value=="number"?l.value=(o.value-o.min)/(o.max-o.min)*100:(s.value=(o.value[0]-o.min)/(o.max-o.min)*100,c.value=(o.value[1]-o.min)/(o.max-o.min)*100))},{immediate:!0});const h=S=>{if(!i.value)return 0;let A=(("clientX"in S?S.clientX:S.changedTouches[0].clientX)-n(i.value))/i.value.clientWidth;A=Math.max(A,0),A=Math.min(A,1);let x=A*100;const N=o.step/(o.max-o.min)*100,T=x%N;return T>0&&(T<=N/2?x=x-T:x=x-T+N),x},m=S=>{const I=h(S);u.value==="start"?s.value=I:c.value=I},g=S=>{E(S);const I=d(l.value),A=o.value,x=u.value==="start"?[I,A[1]]:[A[0],I];x[0]>x[1]&&([x[0],x[1]]=[x[1],x[0]]),a("update:value",x),document.removeEventListener("mousemove",m),document.removeEventListener("touchmove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},E=S=>{l.value=h(S)},y=S=>{E(S);const I=d(l.value);a("update:value",I),document.removeEventListener("mousemove",E),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",y),document.removeEventListener("touchend",y)},_=S=>{if(!o.disabled)if(o.range){const I=h(S);Math.abs(I-s.value)<Math.abs(I-c.value)?u.value="start":u.value="end",document.addEventListener("mousemove",m),document.addEventListener("touchmove",m),document.addEventListener("mouseup",g),document.addEventListener("touchend",g)}else document.addEventListener("mousemove",E),document.addEventListener("touchmove",E),document.addEventListener("mouseup",y),document.addEventListener("touchend",y)};return(S,I)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:i,onMousedown:I[0]||(I[0]=A=>_(A))},[r.createElementVNode("div",lP,[e.range?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:"track",style:r.normalizeStyle({width:`${c.value-s.value}%`,left:`${s.value}%`})},null,4),r.createElementVNode("div",{class:"thumb",style:r.normalizeStyle({left:`${s.value}%`}),"data-tooltip":v.value},null,12,cP),r.createElementVNode("div",{class:"thumb",style:r.normalizeStyle({left:`${c.value}%`}),"data-tooltip":p.value},null,12,uP)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:"track",style:r.normalizeStyle({width:`${l.value}%`})},null,4),r.createElementVNode("div",{class:"thumb",style:r.normalizeStyle({left:`${l.value}%`}),"data-tooltip":f.value},null,12,sP)],64))])],34))}},Wt=ie(dP,[["__scopeId","data-v-cce60a76"]]),fP={class:"element-opacity"},pP={class:"row"},vP={style:{width:"45%"}},hP={__name:"ElementOpacity",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),{t:o}=_e(),a=r.ref(1);r.watch(n,()=>{n.value&&(a.value="opacity"in n.value&&n.value.opacity!==void 0?n.value.opacity:1)},{deep:!0,immediate:!0});const{addHistorySnapshot:i}=be(),l=s=>{if(!n.value)return;const c={opacity:s};t.updateElement({id:n.value.id,props:c}),i()};return(s,c)=>(r.openBlock(),r.createElementBlock("div",fP,[r.createElementVNode("div",pP,[r.createElementVNode("div",vP,r.toDisplayString(r.unref(o)("STYLE_PARTS.OPACITY")),1),r.createVNode(Wt,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":c[0]||(c[0]=u=>l(u)),style:{width:"60%"}},null,8,["value"])])]))}},A_=ie(hP,[["__scopeId","data-v-fa757a8e"]]),mP={width:"100%",height:"100%",viewBox:"0 0 100 10"},gP=["x1","x2","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],En={__name:"SVGLine",props:{width:{type:Number,default:2},color:{type:String,default:"#333"},markers:{type:Array},type:{type:String},padding:{type:Number,default:0}},setup(e){const t=e,n=r.ref("");r.onMounted(()=>{n.value=Ne.nanoid()});const o=r.computed(()=>{const a=t.width;return t.type==="dashed"?a<=8?`${a*5} ${a*2.5}`:`${a*5} ${a*1.5}`:t.type==="dotted"?a<=8?`${a*1.8} ${a*1.6}`:`${a*1.5} ${a*1.2}`:"0 0"});return(a,i)=>(r.openBlock(),r.createElementBlock("svg",mP,[r.createElementVNode("defs",null,[e.markers&&e.markers[0]?(r.openBlock(),r.createBlock(Mr,{key:0,id:n.value,position:"start",type:e.markers[0],color:e.color,baseSize:e.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0),e.markers&&e.markers[1]?(r.openBlock(),r.createBlock(Mr,{key:1,id:n.value,position:"end",type:e.markers[1],color:e.color,baseSize:e.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0)]),r.createElementVNode("line",{x1:e.padding,y1:5,x2:100-e.padding,y2:5,stroke:e.color,"stroke-width":e.width,"stroke-dasharray":o.value,"marker-start":e.markers&&e.markers[0]?`url(#${n.value}-${e.markers[0]}-start)`:"","marker-end":e.markers&&e.markers[1]?`url(#${n.value}-${e.markers[1]}-end)`:""},null,8,gP)]))}},EP={class:"color-block"},yP={__name:"ColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,n)=>{const o=r.resolveComponent("AiPptPlatte");return r.openBlock(),r.createBlock(ue,{class:"color-btn"},{default:r.withCtx(()=>[r.createElementVNode("div",EP,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundColor:e.color})},null,4)]),r.createVNode(o,{class:"color-btn-icon"})]),_:1})}}},lt=ie(yP,[["__scopeId","data-v-2c666772"]]),_P={__name:"Saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.computed(()=>{const p=we(n.value).toHsv();return n.hue!==-1&&(p.h=n.hue),p}),i=r.computed(()=>`hsl(${a.value.h}, 100%, 50%)`),l=r.computed(()=>-(a.value.v*100)+1+100+"%"),s=r.computed(()=>a.value.s*100+"%"),c=Xe.throttle(function(p){o("colorChange",p)},20,{leading:!0,trailing:!1}),u=r.useTemplateRef("saturationRef"),d=p=>{if(p.preventDefault(),!u.value)return;const h=u.value.clientWidth,m=u.value.clientHeight,g=u.value.getBoundingClientRect().left+window.pageXOffset,E=u.value.getBoundingClientRect().top+window.pageYOffset,y=Xe.clamp(p.pageX-g,0,h),_=Xe.clamp(p.pageY-E,0,m),S=y/h,I=Xe.clamp(-(_/m)+1,0,1);c({h:a.value.h,s:S,v:I,a:a.value.a})},f=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)},v=p=>{d(p),window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)};return r.onUnmounted(f),(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:"saturation",ref_key:"saturationRef",ref:u,style:r.normalizeStyle({background:i.value}),onMousedown:h[0]||(h[0]=m=>v(m))},[h[2]||(h[2]=r.createElementVNode("div",{class:"saturation-white"},null,-1)),h[3]||(h[3]=r.createElementVNode("div",{class:"saturation-black"},null,-1)),r.createElementVNode("div",{class:"saturation-pointer",style:r.normalizeStyle({top:l.value,left:s.value})},[...h[1]||(h[1]=[r.createElementVNode("div",{class:"saturation-circle"},null,-1)])],4)],36))}},TP=ie(_P,[["__scopeId","data-v-52d747ae"]]),SP={class:"hue"},IP={__name:"Hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(0),i=r.ref(""),l=r.computed(()=>{const v=we(n.value).toHsl();return n.hue!==-1&&(v.h=n.hue),v}),s=r.computed(()=>l.value.h===0&&i.value==="right"?"100%":l.value.h*100/360+"%");r.watch(()=>n.value,()=>{const v=we(n.value).toHsl(),p=v.s===0?n.hue:v.h;p!==0&&p-a.value>0&&(i.value="right"),p!==0&&p-a.value<0&&(i.value="left"),a.value=p});const c=r.useTemplateRef("hueRef"),u=v=>{if(v.preventDefault(),!c.value)return;const p=c.value.clientWidth,h=c.value.getBoundingClientRect().left+window.pageXOffset,m=v.pageX-h;let g,E;m<0?g=0:m>p?g=360:(E=m*100/p,g=360*E/100),(n.hue===-1||l.value.h!==g)&&o("colorChange",{h:g,l:l.value.l,s:l.value.s,a:l.value.a})},d=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d)},f=v=>{u(v),window.addEventListener("mousemove",u),window.addEventListener("mouseup",d)};return r.onUnmounted(d),(v,p)=>(r.openBlock(),r.createElementBlock("div",SP,[r.createElementVNode("div",{class:"hue-container",ref_key:"hueRef",ref:c,onMousedown:p[0]||(p[0]=h=>f(h))},[r.createElementVNode("div",{class:"hue-pointer",style:r.normalizeStyle({left:s.value})},[...p[1]||(p[1]=[r.createElementVNode("div",{class:"hue-picker"},null,-1)])],4)],544)]))}},AP=ie(IP,[["__scopeId","data-v-95510d36"]]),NP={__name:"Checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},setup(e){const t=e,n={},o=(l,s,c)=>{const u=document.createElement("canvas");u.width=u.height=c*2;const d=u.getContext("2d");return d?(d.fillStyle=l,d.fillRect(0,0,u.width,u.height),d.fillStyle=s,d.fillRect(0,0,c,c),d.translate(c,c),d.fillRect(0,0,c,c),u.toDataURL()):null},a=(l,s,c)=>{const u=l+","+s+","+c;if(n[u])return n[u];const d=o(l,s,c);return n[u]=d,d},i=r.computed(()=>({backgroundImage:`url(${a(t.white,t.grey,t.size)})`}));return(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"checkerboard",style:r.normalizeStyle(i.value)},null,4))}},qf=ie(NP,[["__scopeId","data-v-c8d51d1a"]]),LP={class:"alpha"},CP={class:"alpha-checkboard-wrap"},xP={__name:"Alpha",props:{value:{type:[String,Object],default:"#000000"}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.computed(()=>n.value),i=r.computed(()=>{const d=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${d}, 0) 0%, rgba(${d}, 1) 100%)`}),l=r.useTemplateRef("alphaRef"),s=d=>{if(d.preventDefault(),!l.value)return;const f=l.value.clientWidth,v=l.value.getBoundingClientRect().left+window.pageXOffset,p=d.pageX-v;let h;p<0?h=0:p>f?h=1:h=Math.round(p*100/f)/100,a.value.a!==h&&o("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:h})},c=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)},u=d=>{s(d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",c)};return r.onUnmounted(c),(d,f)=>(r.openBlock(),r.createElementBlock("div",LP,[r.createElementVNode("div",CP,[r.createVNode(qf)]),r.createElementVNode("div",{class:"alpha-gradient",style:r.normalizeStyle({background:i.value})},null,4),r.createElementVNode("div",{class:"alpha-container",ref_key:"alphaRef",ref:l,onMousedown:f[0]||(f[0]=v=>u(v))},[r.createElementVNode("div",{class:"alpha-pointer",style:r.normalizeStyle({left:a.value.a*100+"%"})},[...f[1]||(f[1]=[r.createElementVNode("div",{class:"alpha-picker"},null,-1)])],4)],544)]))}},bP=ie(xP,[["__scopeId","data-v-03d1989d"]]),wP={class:"editable-input"},OP=["value"],RP={__name:"EditableInput",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.computed(()=>{let l="";return n.value.a<1?l=we(n.value).toHex8String().toUpperCase():l=we(n.value).toHexString().toUpperCase(),l.replace("#","")}),i=l=>{const s=l.target.value;if(s.length>=6){const c=we(s);c.isValid()&&o("colorChange",c.toRgb())}};return(l,s)=>(r.openBlock(),r.createElementBlock("div",wP,[r.createElementVNode("input",{class:"input-content",value:a.value,onInput:s[0]||(s[0]=c=>i(c))},null,40,OP)]))}},kP=ie(RP,[["__scopeId","data-v-d5fea83f"]]),DP={class:"color-picker"},PP={class:"picker-saturation-wrap"},MP={class:"picker-controls"},BP={class:"picker-color-wrap"},VP={class:"picker-sliders"},$P={class:"picker-hue-wrap"},FP={class:"picker-alpha-wrap"},HP={class:"picker-field"},UP={class:"picker-presets"},GP=["onClick"],zP={class:"picker-gradient-presets"},YP=["onClick"],XP={class:"picker-presets"},WP=["onClick"],KP={key:0,class:"recent-colors-title"},qP={class:"picker-presets"},ZP=["onClick"],g1="RECENT_COLORS",jP={__name:"index",props:{modelValue:{type:String,default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,{t:o}=_e(),a=t,i=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],l=(I,A,x)=>{const N=we(I).toRgb(),T=we(A).toRgb(),L=(T.r-N.r)/x,b=(T.g-N.g)/x,O=(T.b-N.b)/x,w=[];for(let C=0;C<x;C++){const P=we({r:N.r+L*C,g:N.g+b*C,b:N.b+O*C}).toRgbString();w.push(P)}return w},s=()=>{const I=[];for(const A of i)I.push(l(A[1],A[0],5));return I},c=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],u=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],d=r.ref(-1),f=r.ref([]),v=r.computed({get(){return we(n.modelValue).toRgb()},set(I){const A=`rgba(${[I.r,I.g,I.b,I.a].join(",")})`;a("update:modelValue",A)}}),p=s(),h=r.computed(()=>`rgba(${[v.value.r,v.value.g,v.value.b,v.value.a].join(",")})`),m=I=>{d.value=we(I).toHsl().h,a("update:modelValue",I)},g=Xe.debounce(function(){const I=we(v.value).toRgbString();if(!f.value.includes(I)){f.value=[I,...f.value];const A=10;f.value.length>A&&(f.value=f.value.slice(0,A))}},300,{trailing:!0});r.onMounted(()=>{const I=localStorage.getItem(g1);I&&(f.value=JSON.parse(I))}),r.watch(f,()=>{const I=JSON.stringify(f.value);localStorage.setItem(g1,I)});const E=I=>{"h"in I?(d.value=I.h,v.value=we(I).toRgb()):(d.value=we(I).toHsl().h,v.value=I),g()},y=()=>{"EyeDropper"in window?_():S()},_=()=>{Ae.success(o("COLOR_PICKER.EYEDROPPER_HINT"),{duration:0}),new window.EyeDropper().open().then(A=>{const x=we(A.sRGBHex);d.value=x.toHsl().h,v.value=x.toRgb(),Ae.closeAll(),g()}).catch(()=>{Ae.closeAll()})},S=()=>{const I=document.querySelector(".canvas");if(!I)return;const A=document.createElement("div");A.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(A);const x=document.createElement("div");x.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",A.appendChild(x);const{left:N,top:T,width:L,height:b}=I.getBoundingClientRect(),O=w=>!(w.tagName&&w.tagName.toUpperCase()==="FOREIGNOBJECT"||w.classList&&w.classList.contains("operate"));xd.toCanvas(I,{filter:O,fontEmbedCSS:"",width:L,height:b,canvasWidth:L,canvasHeight:b,pixelRatio:1}).then(w=>{w.style.cssText=`position: absolute; top: ${T}px; left: ${N}px; cursor: crosshair;`,A.style.cursor="default",A.appendChild(w);const C=w.getContext("2d");if(!C)return;let P="";const k=U=>{const $=U.x,V=U.y,z=$-N,D=V-T,[Y,K,Z,oe]=C.getImageData(z,D,1,1).data;P=`rgba(${Y}, ${K}, ${Z}, ${(oe/255).toFixed(2)})`,x.style.left=$+10+"px",x.style.top=V+10+"px",x.style.backgroundColor=P},B=()=>{P="",x.style.left="-100px",x.style.top="-100px",x.style.backgroundColor=""},H=U=>{if(P&&U.button===0){const $=we(P);d.value=$.toHsl().h,v.value=$.toRgb(),g()}document.body.removeChild(A),w.removeEventListener("mousemove",k),w.removeEventListener("mouseleave",B),window.removeEventListener("mousedown",H)};w.addEventListener("mousemove",k),w.addEventListener("mouseleave",B),window.addEventListener("mousedown",H)}).catch(()=>{Ae.error(o("COLOR_PICKER.EYEDROPPER_INIT_FAIL")),document.body.removeChild(A)})};return(I,A)=>{const x=r.resolveComponent("AiPptNeedle");return r.openBlock(),r.createElementBlock("div",DP,[r.createElementVNode("div",PP,[r.createVNode(TP,{value:v.value,hue:d.value,onColorChange:A[0]||(A[0]=N=>E(N))},null,8,["value","hue"])]),r.createElementVNode("div",MP,[r.createElementVNode("div",BP,[r.createElementVNode("div",{class:"picker-current-color",style:r.normalizeStyle({background:h.value})},null,4),r.createVNode(qf)]),r.createElementVNode("div",VP,[r.createElementVNode("div",$P,[r.createVNode(AP,{value:v.value,hue:d.value,onColorChange:A[1]||(A[1]=N=>E(N))},null,8,["value","hue"])]),r.createElementVNode("div",FP,[r.createVNode(bP,{value:v.value,onColorChange:A[2]||(A[2]=N=>E(N))},null,8,["value"])])])]),r.createElementVNode("div",HP,[r.createVNode(kP,{class:"input",value:v.value,onColorChange:A[3]||(A[3]=N=>E(N))},null,8,["value"]),r.createElementVNode("div",{class:"straw",onClick:A[4]||(A[4]=N=>y())},[r.createVNode(x)]),r.createElementVNode("div",{class:"transparent",onClick:A[5]||(A[5]=N=>m("#00000000"))},[r.createVNode(qf)])]),r.createElementVNode("div",UP,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(c,N=>r.createElementVNode("div",{class:"picker-presets-color",key:N,style:r.normalizeStyle({background:N}),onClick:T=>m(N)},null,12,GP)),64))]),r.createElementVNode("div",zP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(p),(N,T)=>(r.openBlock(),r.createElementBlock("div",{class:"picker-gradient-col",key:T},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N,L=>(r.openBlock(),r.createElementBlock("div",{class:"picker-gradient-color",key:L,style:r.normalizeStyle({background:L}),onClick:b=>m(L)},null,12,YP))),128))]))),128))]),r.createElementVNode("div",XP,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(u,N=>r.createElementVNode("div",{key:N,class:"picker-presets-color",style:r.normalizeStyle({background:N}),onClick:T=>m(N)},null,12,WP)),64))]),f.value.length?(r.openBlock(),r.createElementBlock("div",KP,r.toDisplayString(r.unref(o)("COLOR_PICKER.RECENT_USED")),1)):r.createCommentVNode("",!0),r.createElementVNode("div",qP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,N=>(r.openBlock(),r.createElementBlock("div",{key:N,class:"picker-presets-color alpha",onClick:T=>m(N)},[r.createElementVNode("div",{class:"picker-presets-color-content",style:r.normalizeStyle({background:N})},null,4)],8,ZP))),128))])])}}},Ye=ie(jP,[["__scopeId","data-v-f95f28d4"]]),JP={__name:"Switch",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=()=>{n.disabled||o("update:value",!n.value)};return(i,l)=>(r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(["switch",{active:e.value,disabled:e.disabled}]),onClick:l[0]||(l[0]=s=>a())},[...l[1]||(l[1]=[r.createElementVNode("span",{class:"switch-core"},null,-1)])],2))}},Sn=ie(JP,[["__scopeId","data-v-17012de8"]]),QP={key:0,class:"select-wrap"},eM={class:"selector"},tM={class:"icon"},nM={class:"selector"},rM={class:"icon"},oM={__name:"SelectCustom",props:{disabled:{type:Boolean,default:!1}},setup(e){const t=r.ref(!1),n=r.useTemplateRef("selectRef"),o=r.ref(0),a=()=>{n.value&&(o.value=n.value.clientWidth)},i=new ResizeObserver(a);return r.onMounted(()=>{n.value&&i.observe(n.value)}),r.onUnmounted(()=>{n.value&&i.unobserve(n.value)}),(l,s)=>{const c=r.resolveComponent("AiPptDown");return e.disabled?(r.openBlock(),r.createElementBlock("div",QP,[r.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:n},[r.createElementVNode("div",eM,[r.renderSlot(l.$slots,"label",{},void 0,!0)]),r.createElementVNode("div",tM,[r.renderSlot(l.$slots,"icon",{},()=>[r.createVNode(c,{size:14})],!0)])],512)])):(r.openBlock(),r.createBlock(Se,{key:1,class:"select-wrap",trigger:"click",value:t.value,"onUpdate:value":s[1]||(s[1]=u=>t.value=u),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)"}},{content:r.withCtx(()=>[r.createElementVNode("div",{class:"options",style:r.normalizeStyle({width:o.value+2+"px"}),onClick:s[0]||(s[0]=u=>t.value=!1)},[r.renderSlot(l.$slots,"options",{},void 0,!0)],4)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:"select",ref_key:"selectRef",ref:n},[r.createElementVNode("div",nM,[r.renderSlot(l.$slots,"label",{},void 0,!0)]),r.createElementVNode("div",rM,[r.renderSlot(l.$slots,"icon",{},()=>[r.createVNode(c,{size:14})],!0)])],512)]),_:3},8,["value"]))}}},xa=ie(oM,[["__scopeId","data-v-83660aa4"]]),aM={class:"element-outline"},iM={key:0,class:"row"},lM={style:{width:"45%"}},sM={class:"switch-wrapper",style:{width:"60%"}},cM={class:"row"},uM={style:{width:"45%"}},dM=["onClick"],fM={class:"row"},pM={style:{width:"45%"}},vM={class:"row"},hM={style:{width:"45%"}},mM={__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=pe(),{theme:n}=ne.storeToRefs(t),{handleElement:o}=ne.storeToRefs(fe()),{t:a}=_e(),i=r.ref(),l=r.ref(!1),s=r.ref(["solid","dashed","dotted"]);r.watch(o,()=>{o.value&&(i.value="outline"in o.value?o.value.outline:void 0,l.value=!!i.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:c}=be(),u=f=>{if(!o.value)return;const v={outline:{...i.value,...f}};t.updateElement({id:o.value.id,props:v}),c()},d=f=>{if(o.value){if(f){const v=n.value.outline;t.updateElement({id:o.value.id,props:{outline:v}})}else t.removeElementProps({id:o.value.id,propName:"outline"});c()}};return(f,v)=>(r.openBlock(),r.createElementBlock("div",aM,[e.fixed?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",iM,[r.createElementVNode("div",lM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_ENABLE")),1),r.createElementVNode("div",sM,[r.createVNode(Sn,{value:l.value,"onUpdate:value":v[0]||(v[0]=p=>d(p))},null,8,["value"])])])),l.value&&i.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",cM,[r.createElementVNode("div",uM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:p,onClick:h=>u({style:p})},[r.createVNode(En,{type:p},null,8,["type"])],8,dM))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:i.value.style},null,8,["type"])]),_:1})]),r.createElementVNode("div",fM,[r.createElementVNode("div",pM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:i.value.color,"onUpdate:modelValue":v[1]||(v[1]=p=>u({color:p}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:i.value.color||"#000"},null,8,["color"])]),_:1})]),r.createElementVNode("div",vM,[r.createElementVNode("div",hM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_WIDTH")),1),r.createVNode(Xt,{value:i.value.width||0,"onUpdate:value":v[2]||(v[2]=p=>u({width:p})),style:{width:"60%"}},null,8,["value"])])],64)):r.createCommentVNode("",!0)]))}},Ll=ie(mM,[["__scopeId","data-v-3077abec"]]),gM={class:"element-shadow"},EM={class:"row"},yM={style:{width:"45%"}},_M={class:"switch-wrapper",style:{width:"60%"}},TM={class:"row"},SM={style:{width:"45%"}},IM={class:"row"},AM={style:{width:"45%"}},NM={class:"row"},LM={style:{width:"45%"}},CM={class:"row"},xM={style:{width:"45%"}},bM={__name:"ElementShadow",setup(e){const t=pe(),{theme:n}=ne.storeToRefs(t),{handleElement:o}=ne.storeToRefs(fe()),{t:a}=_e(),i=r.ref(),l=r.ref(!1);r.watch(o,()=>{o.value&&(i.value="shadow"in o.value?o.value.shadow:void 0,l.value=!!i.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:s}=be(),c=d=>{if(!o.value||!i.value)return;const f={...i.value,...d};t.updateElement({id:o.value.id,props:{shadow:f}}),s()},u=d=>{if(o.value){if(d){const f=n.value.shadow;t.updateElement({id:o.value.id,props:{shadow:f}})}else t.removeElementProps({id:o.value.id,propName:"shadow"});s()}};return(d,f)=>(r.openBlock(),r.createElementBlock("div",gM,[r.createElementVNode("div",EM,[r.createElementVNode("div",yM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_ENABLE")),1),r.createElementVNode("div",_M,[r.createVNode(Sn,{value:l.value,"onUpdate:value":f[0]||(f[0]=v=>u(v))},null,8,["value"])])]),l.value&&i.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",TM,[r.createElementVNode("div",SM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_X")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:i.value.h,"onUpdate:value":f[1]||(f[1]=v=>c({h:v}))},null,8,["value"])]),r.createElementVNode("div",IM,[r.createElementVNode("div",AM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_Y")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:i.value.v,"onUpdate:value":f[2]||(f[2]=v=>c({v}))},null,8,["value"])]),r.createElementVNode("div",NM,[r.createElementVNode("div",LM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_BLUR")),1),r.createVNode(Wt,{style:{width:"60%"},min:1,max:20,step:1,value:i.value.blur,"onUpdate:value":f[3]||(f[3]=v=>c({blur:v}))},null,8,["value"])]),r.createElementVNode("div",CM,[r.createElementVNode("div",xM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:i.value.color,"onUpdate:modelValue":f[4]||(f[4]=v=>c({color:v}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:i.value.color},null,8,["color"])]),_:1})])],64)):r.createCommentVNode("",!0)]))}},Qc=ie(bM,[["__scopeId","data-v-c3a7a58b"]]),mv=[{label:"默认字体",value:"",labelKey:"FONT.NAME.DEFAULT"},{label:"思源黑体",value:"SourceHanSans",labelKey:"FONT.NAME.SOURCE_HAN_SANS"},{label:"思源宋体",value:"SourceHanSerif",labelKey:"FONT.NAME.SOURCE_HAN_SERIF"},{label:"方正黑体",value:"FangZhengHeiTi",labelKey:"FONT.NAME.FZ_HEITI"},{label:"方正楷体",value:"FangZhengKaiTi",labelKey:"FONT.NAME.FZ_KAITI"},{label:"方正宋体",value:"FangZhengShuSong",labelKey:"FONT.NAME.FZ_SONG"},{label:"方正仿宋",value:"FangZhengFangSong",labelKey:"FONT.NAME.FZ_FANGSONG"},{label:"阿里巴巴普惠体",value:"AlibabaPuHuiTi",labelKey:"FONT.NAME.ALIBABA_PUHUI"},{label:"朱雀仿宋",value:"ZhuQueFangSong",labelKey:"FONT.NAME.ZHUQUE_FANGSONG"},{label:"霞鹜文楷",value:"LXGWWenKai",labelKey:"FONT.NAME.LXGW_WENKAI"},{label:"文鼎PL楷体",value:"WenDingPLKaiTi",labelKey:"FONT.NAME.WENDING_PL_KAITI"},{label:"得意黑",value:"DeYiHei",labelKey:"FONT.NAME.DEYI_HEI"},{label:"MiSans",value:"MiSans",labelKey:"FONT.NAME.MISANS"},{label:"仓耳小丸子",value:"CangerXiaowanzi",labelKey:"FONT.NAME.CANGER_XIAOWANZI"},{label:"优设标题黑",value:"YousheTitleBlack",labelKey:"FONT.NAME.YOUSHE_TITLE_BLACK"},{label:"峰广明锐体",value:"FengguangMingrui",labelKey:"FONT.NAME.FENGGUANG_MINGRUI"},{label:"摄图摩登小方体",value:"ShetuModernSquare",labelKey:"FONT.NAME.SHETU_MODERN_SQUARE"},{label:"站酷快乐体",value:"ZcoolHappy",labelKey:"FONT.NAME.ZCOOL_HAPPY"},{label:"字制区喜脉体",value:"ZizhiQuXiMai",labelKey:"FONT.NAME.ZIZHI_QU_XIMAI"},{label:"素材集市康康体",value:"SucaiJishiKangkang",labelKey:"FONT.NAME.SUCAI_JISHI_KANGKANG"},{label:"素材集市酷方体",value:"SucaiJishiCoolSquare",labelKey:"FONT.NAME.SUCAI_JISHI_COOL_SQUARE"},{label:"途牛类圆体",value:"TuniuRounded",labelKey:"FONT.NAME.TUNIU_ROUNDED"},{label:"锐字真言体",value:"RuiziZhenyan",labelKey:"FONT.NAME.RUIZI_ZHENYAN"}],Cl=e=>mv.map(t=>({...t,label:e&&t.labelKey?e(t.labelKey):t.label})),wM=()=>{const e=fe(),{richTextAttrs:t,textFormatPainter:n}=ne.storeToRefs(e);return{toggleTextFormatPainter:(a=!1)=>{n.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})}}},OM={class:"text-color-block"},RM={__name:"TextColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createBlock(ue,{class:"text-color-btn"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{},void 0,!0),r.createElementVNode("div",OM,[r.createElementVNode("div",{class:"text-color-block-content",style:r.normalizeStyle({backgroundColor:e.color})},null,4)])]),_:3}))}},Fa=ie(RM,[["__scopeId","data-v-224eea4f"]]),mt={__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(r.openBlock(),r.createBlock(ue,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default")]),_:3},8,["checked","disabled"]))}},kM={__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["button-group",{passive:e.passive}]),ref:"groupRef"},[r.renderSlot(t.$slots,"default",{},void 0,!0)],2))}},it=ie(kM,[["__scopeId","data-v-95e7f3ee"]]),DM={},PM={class:"select-group"};function MM(e,t){return r.openBlock(),r.createElementBlock("div",PM,[r.renderSlot(e.$slots,"default",{},void 0,!0)])}const gv=ie(DM,[["render",MM],["__scopeId","data-v-842f0d1c"]]),je={__name:"RadioButton",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:n}=r.inject(og);return(o,a)=>(r.openBlock(),r.createBlock(ue,{checked:!e.disabled&&r.unref(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=i=>!e.disabled&&r.unref(n)(e.value))},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3},8,["checked","disabled"]))}},lr={__name:"RadioGroup",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=l=>{n.disabled||o("update:value",l)},i=r.computed(()=>n.value);return r.provide(og,{value:i,updateValue:a}),(l,s)=>(r.openBlock(),r.createBlock(it,{class:"radio-group"},{default:r.withCtx(()=>[r.renderSlot(l.$slots,"default")]),_:3}))}},BM={class:"rich-text-base"},VM={class:"link-popover"},$M={class:"btns"},FM={class:"row",passive:""},HM={class:"list-wrap"},UM=["onClick"],GM={class:"list-wrap"},zM=["onClick"],YM={class:"row"},XM={__name:"RichTextBase",setup(e){const{handleElement:t,handleElementId:n,richTextAttrs:o,textFormatPainter:a}=ne.storeToRefs(fe()),{toggleTextFormatPainter:i}=wM(),{t:l}=_e(),s=r.computed(()=>Cl(l)),c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],u=(N,T)=>{bt.emit(Et.RICH_TEXT_COMMAND,{action:{command:N,value:T}})},d=r.ref(!1),f=r.ref(!1),v=r.ref(!1),p=r.ref(!1),h=r.ref(["disc","circle","square"]),m=r.ref(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),g=r.ref(""),E=r.ref(!1),y=r.ref(!1),_=r.ref(!1);r.watch(o,()=>E.value=!1),r.watch(n,()=>{_.value&&(_.value=!1)});const S=()=>{g.value=o.value.link},I=N=>{if(!N||!/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/.test(N))return Ae.error(l("RICH_TEXT.INVALID_LINK"));u("link",N),E.value=!1},A=()=>{u("link"),E.value=!1},x=async N=>{Ae.error(l("RICH_TEXT.IN_DEVELOPMENT"))};return(N,T)=>{const L=r.resolveComponent("AiPptFontSize"),b=r.resolveComponent("AiPptAddText"),O=r.resolveComponent("AiPptText"),w=r.resolveComponent("AiPptHighLight"),C=r.resolveComponent("AiPptTextBold"),P=r.resolveComponent("AiPptTextItalic"),k=r.resolveComponent("AiPptTextUnderline"),B=r.resolveComponent("AiPptStrikethrough"),H=r.resolveComponent("AiPptCode"),U=r.resolveComponent("AiPptQuote"),$=r.resolveComponent("AiPptFormat"),V=r.resolveComponent("AiPptFormatBrush"),z=r.resolveComponent("AiPptLinkOne"),D=r.resolveComponent("AiPptAlignTextLeft"),Y=r.resolveComponent("AiPptAlignTextCenter"),K=r.resolveComponent("AiPptAlignTextRight"),Z=r.resolveComponent("AiPptAlignTextBoth"),oe=r.resolveComponent("AiPptList"),Q=r.resolveComponent("AiPptDown"),q=r.resolveComponent("AiPptOrderedList"),re=r.resolveComponent("AiPptIndentLeft"),G=r.resolveComponent("AiPptIndentRight"),M=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",BM,[r.createVNode(gv,{class:"row"},{default:r.withCtx(()=>[r.createVNode(st,{style:{width:"60%"},value:r.unref(o).fontname,search:"",searchLabel:r.unref(l)("COMMON.SEARCH_FONT"),"onUpdate:value":T[0]||(T[0]=R=>u("fontname",R)),options:s.value},{icon:r.withCtx(()=>[r.createVNode(L)]),_:1},8,["value","searchLabel","options"]),r.createVNode(st,{style:{width:"40%"},value:r.unref(o).fontsize,search:"",searchLabel:r.unref(l)("COMMON.SEARCH_FONT_SIZE"),"onUpdate:value":T[1]||(T[1]=R=>u("fontsize",R)),options:c.map(R=>({label:R,value:R}))},{icon:r.withCtx(()=>[r.createVNode(b)]),_:1},8,["value","searchLabel","options"])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).color,"onUpdate:modelValue":T[2]||(T[2]=R=>u("color",R))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{first:"",color:r.unref(o).color},{default:r.withCtx(()=>[r.createVNode(O)]),_:1},8,["color"])),[[M,r.unref(l)("RICH_TEXT.TEXT_COLOR")]])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).backcolor,"onUpdate:modelValue":T[3]||(T[3]=R=>u("backcolor",R))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{color:r.unref(o).backcolor},{default:r.withCtx(()=>[r.createVNode(w)]),_:1},8,["color"])),[[M,r.unref(l)("RICH_TEXT.TEXT_HIGHLIGHT")]])]),_:1}),r.withDirectives((r.openBlock(),r.createBlock(ue,{class:"font-size-btn",style:{width:"20%"},onClick:T[4]||(T[4]=R=>u("fontsize-add"))},{default:r.withCtx(()=>[r.createVNode(L),T[37]||(T[37]=r.createTextVNode("+ ",-1))]),_:1})),[[M,r.unref(l)("RICH_TEXT.FONT_SIZE_INCREASE")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:T[5]||(T[5]=R=>u("fontsize-reduce"))},{default:r.withCtx(()=>[r.createVNode(L),T[38]||(T[38]=r.createTextVNode("- ",-1))]),_:1})),[[M,r.unref(l)("RICH_TEXT.FONT_SIZE_DECREASE")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).bold,onClick:T[6]||(T[6]=R=>u("bold"))},{default:r.withCtx(()=>[r.createVNode(C)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.BOLD")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).em,onClick:T[7]||(T[7]=R=>u("em"))},{default:r.withCtx(()=>[r.createVNode(P)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.ITALIC")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).underline,onClick:T[8]||(T[8]=R=>u("underline"))},{default:r.withCtx(()=>[r.createVNode(k)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.UNDERLINE")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).strikethrough,onClick:T[9]||(T[9]=R=>u("strikethrough"))},{default:r.withCtx(()=>[r.createVNode(B)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.STRIKETHROUGH")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).superscript,onClick:T[10]||(T[10]=R=>u("superscript"))},{default:r.withCtx(()=>[...T[39]||(T[39]=[r.createTextVNode("A²",-1)])]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.SUPERSCRIPT")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).subscript,onClick:T[11]||(T[11]=R=>u("subscript"))},{default:r.withCtx(()=>[...T[40]||(T[40]=[r.createTextVNode("A₂",-1)])]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.SUBSCRIPT")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).code,onClick:T[12]||(T[12]=R=>u("code"))},{default:r.withCtx(()=>[r.createVNode(H)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.INLINE_CODE")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).blockquote,onClick:T[13]||(T[13]=R=>u("blockquote"))},{default:r.withCtx(()=>[r.createVNode(U)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.BLOCKQUOTE")]])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",value:y.value,"onUpdate:value":T[17]||(T[17]=R=>y.value=R),style:{width:"25%"}},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:T[14]||(T[14]=R=>x())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.AI_POLISH")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:T[15]||(T[15]=R=>x())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.AI_EXPAND")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:T[16]||(T[16]=R=>x())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.AI_CONDENSE")),1)]),_:1})]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{first:"",style:{width:"100%"}},{default:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass({"ai-loading":_.value})},r.toDisplayString(_.value?"":"AI"),3)]),_:1})),[[M,r.unref(l)("RICH_TEXT.AI_ASSIST")]])]),_:1},8,["value"]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},onClick:T[18]||(T[18]=R=>u("clear"))},{default:r.withCtx(()=>[r.createVNode($)]),_:1})),[[M,r.unref(l)("RICH_TEXT.CLEAR_FORMAT")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:!!r.unref(a),onClick:T[19]||(T[19]=R=>r.unref(i)()),onDblclick:T[20]||(T[20]=R=>r.unref(i)(!0))},{default:r.withCtx(()=>[r.createVNode(V)]),_:1},8,["checked"])),[[M,r.unref(l)("COMMON.FORMAT_PAINTER_TIP")]]),r.createVNode(Se,{placement:"bottom-end",trigger:"click",value:E.value,"onUpdate:value":T[25]||(T[25]=R=>E.value=R),style:{width:"25%"}},{content:r.withCtx(()=>[r.createElementVNode("div",VM,[r.createVNode(Pr,{value:g.value,"onUpdate:value":T[21]||(T[21]=R=>g.value=R),placeholder:r.unref(l)("RICH_TEXT.LINK_PLACEHOLDER")},null,8,["value","placeholder"]),r.createElementVNode("div",$M,[r.createVNode(ue,{size:"small",disabled:!r.unref(o).link,onClick:T[22]||(T[22]=R=>A()),style:{"margin-right":"5px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("COMMON.REMOVE")),1)]),_:1},8,["disabled"]),r.createVNode(ue,{size:"small",type:"primary",onClick:T[23]||(T[23]=R=>I(g.value))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("COMMON.CONFIRM")),1)]),_:1})])])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{last:"",style:{width:"100%"},checked:!!r.unref(o).link,onClick:T[24]||(T[24]=R=>S())},{default:r.withCtx(()=>[r.createVNode(z)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.LINK")]])]),_:1},8,["value"])]),_:1}),r.createVNode(Oe),r.createVNode(lr,{class:"row","button-style":"solid",value:r.unref(o).align,"onUpdate:value":T[26]||(T[26]=R=>u("align",R))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"left",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(D)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"center",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(Y)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_CENTER")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"right",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(K)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_RIGHT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"justify",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(Z)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_JUSTIFY")]])]),_:1},8,["value"]),r.createElementVNode("div",FM,[r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",type:r.unref(o).bulletList?"primary":"default",style:{flex:"1"},onClick:T[27]||(T[27]=R=>u("bulletList"))},{default:r.withCtx(()=>[r.createVNode(oe)]),_:1},8,["type"])),[[M,r.unref(l)("RICH_TEXT.BULLET_LIST")]]),r.createVNode(Se,{trigger:"click",value:d.value,"onUpdate:value":T[28]||(T[28]=R=>d.value=R)},{content:r.withCtx(()=>[r.createElementVNode("div",HM,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.value,R=>(r.openBlock(),r.createElementBlock("ul",{class:"list",key:R,style:r.normalizeStyle({listStyleType:R}),onClick:X=>u("bulletList",R)},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(3,X=>r.createElementVNode("li",{class:"list-item",key:X},[...T[41]||(T[41]=[r.createElementVNode("span",null,null,-1)])])),64))],12,UM))),128))])]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1}),T[43]||(T[43]=r.createElementVNode("div",{style:{width:"10px"}},null,-1)),r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",type:r.unref(o).orderedList?"primary":"default",style:{flex:"1"},onClick:T[29]||(T[29]=R=>u("orderedList"))},{default:r.withCtx(()=>[r.createVNode(q)]),_:1},8,["type"])),[[M,r.unref(l)("RICH_TEXT.ORDERED_LIST")]]),r.createVNode(Se,{trigger:"click",value:f.value,"onUpdate:value":T[30]||(T[30]=R=>f.value=R)},{content:r.withCtx(()=>[r.createElementVNode("div",GM,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,R=>(r.openBlock(),r.createElementBlock("ul",{class:"list",key:R,style:r.normalizeStyle({listStyleType:R}),onClick:X=>u("orderedList",R)},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(3,X=>r.createElementVNode("li",{class:"list-item",key:X},[...T[42]||(T[42]=[r.createElementVNode("span",null,null,-1)])])),64))],12,zM))),128))])]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1})]),r.createElementVNode("div",YM,[r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",style:{flex:"1"},onClick:T[31]||(T[31]=R=>u("indent","-1"))},{default:r.withCtx(()=>[r.createVNode(re)]),_:1})),[[M,r.unref(l)("RICH_TEXT.INDENT_DECREASE")]]),r.createVNode(Se,{trigger:"click",value:v.value,"onUpdate:value":T[33]||(T[33]=R=>v.value=R)},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:T[32]||(T[32]=R=>u("textIndent","-1"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.TEXT_INDENT_DECREASE")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1}),T[44]||(T[44]=r.createElementVNode("div",{style:{width:"10px"}},null,-1)),r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",style:{flex:"1"},onClick:T[34]||(T[34]=R=>u("indent","+1"))},{default:r.withCtx(()=>[r.createVNode(G)]),_:1})),[[M,r.unref(l)("RICH_TEXT.INDENT_INCREASE")]]),r.createVNode(Se,{trigger:"click",value:p.value,"onUpdate:value":T[36]||(T[36]=R=>p.value=R)},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:T[35]||(T[35]=R=>u("textIndent","+1"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.TEXT_INDENT_INCREASE")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1})])])}}},N_=ie(XM,[["__scopeId","data-v-ea1d9249"]]),WM={class:"text-style-panel"},KM={class:"preset-style"},qM=["onClick"],ZM={class:"row"},jM={style:{width:"45%"}},JM={class:"row"},QM={style:{width:"45%"}},e9={class:"row"},t9={style:{width:"45%"}},n9={class:"row"},r9={style:{width:"45%"}},o9={__name:"TextStylePanel",setup(e){const{t}=_e(),n=[{label:t("TEXT_STYLE.PRESET_TITLE_LG"),style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:t("TEXT_STYLE.PRESET_TITLE_SM"),style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:t("TEXT_STYLE.PRESET_BODY"),style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:t("TEXT_STYLE.PRESET_BODY_SM"),style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:t("TEXT_STYLE.PRESET_NOTE_1"),style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:t("TEXT_STYLE.PRESET_NOTE_2"),style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],o=fe(),a=pe(),{handleElement:i,handleElementId:l}=ne.storeToRefs(o),{addHistorySnapshot:s}=be(),c=I=>{a.updateElement({id:l.value,props:I}),s()},u=r.ref("#000"),d=r.ref(),f=r.ref(),v=r.ref();r.watch(i,()=>{!i.value||i.value.type!=="text"||(u.value=i.value.fill||"#fff",d.value=i.value.lineHeight||1.5,f.value=i.value.wordSpace||0,v.value=i.value.paragraphSpace===void 0?5:i.value.paragraphSpace,bt.emit(Et.SYNC_RICH_TEXT_ATTRS_TO_STORE))},{deep:!0,immediate:!0});const p=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],h=[0,1,2,3,4,5,6,8,10],m=[0,5,10,15,20,25,30,40,50,80],g=I=>{c({lineHeight:I})},E=I=>{c({paragraphSpace:I})},y=I=>{c({wordSpace:I})},_=I=>{c({fill:I})},S=I=>{bt.emit(Et.RICH_TEXT_COMMAND,{action:I})};return(I,A)=>{const x=r.resolveComponent("AiPptRowHeight"),N=r.resolveComponent("AiPptVerticalSpacingBetweenItems"),T=r.resolveComponent("AiPptFullwidth");return r.openBlock(),r.createElementBlock("div",WM,[r.createElementVNode("div",KM,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(n,L=>r.createElementVNode("div",{class:"preset-style-item",key:L.label,style:r.normalizeStyle(L.style),onClick:b=>S(L.cmd)},r.toDisplayString(L.label),13,qM)),64))]),r.createVNode(Oe),r.createVNode(N_),r.createVNode(Oe),r.createElementVNode("div",ZM,[r.createElementVNode("div",jM,r.toDisplayString(r.unref(t)("TEXT_STYLE.LINE_HEIGHT")),1),r.createVNode(st,{style:{width:"60%"},value:d.value||1,"onUpdate:value":A[0]||(A[0]=L=>g(L)),options:p.map(L=>({label:r.unref(t)("TEXT_STYLE.LINE_HEIGHT_OPTION",{value:L}),value:L}))},{icon:r.withCtx(()=>[r.createVNode(x)]),_:1},8,["value","options"])]),r.createElementVNode("div",JM,[r.createElementVNode("div",QM,r.toDisplayString(r.unref(t)("TEXT_STYLE.PARAGRAPH_SPACING")),1),r.createVNode(st,{style:{width:"60%"},value:v.value||0,"onUpdate:value":A[1]||(A[1]=L=>E(L)),options:m.map(L=>({label:r.unref(t)("TEXT_STYLE.PX_OPTION",{value:L}),value:L}))},{icon:r.withCtx(()=>[r.createVNode(N)]),_:1},8,["value","options"])]),r.createElementVNode("div",e9,[r.createElementVNode("div",t9,r.toDisplayString(r.unref(t)("TEXT_STYLE.LETTER_SPACING")),1),r.createVNode(st,{style:{width:"60%"},value:f.value||0,"onUpdate:value":A[2]||(A[2]=L=>y(L)),options:h.map(L=>({label:r.unref(t)("TEXT_STYLE.PX_OPTION",{value:L}),value:L}))},{icon:r.withCtx(()=>[r.createVNode(T)]),_:1},8,["value","options"])]),r.createElementVNode("div",n9,[r.createElementVNode("div",r9,r.toDisplayString(r.unref(t)("TEXT_STYLE.BOX_FILL")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value,"onUpdate:modelValue":A[3]||(A[3]=L=>_(L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:u.value},null,8,["color"])]),_:1})]),r.createVNode(Oe),r.createVNode(Ll),r.createVNode(Oe),r.createVNode(Qc),r.createVNode(Oe),r.createVNode(A_)])}}},a9=ie(o9,[["__scopeId","data-v-a8aa2308"]]),i9={class:"element-flip"},l9={__name:"ElementFlip",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),{t:o}=_e(),a=r.ref(!1),i=r.ref(!1);r.watch(n,()=>{n.value&&(n.value.type==="image"||n.value.type==="shape")&&(a.value=!!n.value.flipH,i.value=!!n.value.flipV)},{deep:!0,immediate:!0});const{addHistorySnapshot:l}=be(),s=c=>{n.value&&(t.updateElement({id:n.value.id,props:c}),l())};return(c,u)=>{const d=r.resolveComponent("AiPptFlipVertically"),f=r.resolveComponent("AiPptFlipHorizontally");return r.openBlock(),r.createElementBlock("div",i9,[r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(mt,{style:{flex:"1"},checked:i.value,onClick:u[0]||(u[0]=v=>s({flipV:!i.value}))},{default:r.withCtx(()=>[r.createVNode(d),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("STYLE_PARTS.FLIP_VERTICAL")),1)]),_:1},8,["checked"]),r.createVNode(mt,{style:{flex:"1"},checked:a.value,onClick:u[1]||(u[1]=v=>s({flipH:!a.value}))},{default:r.withCtx(()=>[r.createVNode(f),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("STYLE_PARTS.FLIP_HORIZONTAL")),1)]),_:1},8,["checked"])]),_:1})])}}},L_=ie(l9,[["__scopeId","data-v-10e0099f"]]),s9={class:"element-filter"},c9={class:"row"},u9={style:{flex:"2"}},d9={class:"switch-wrapper",style:{flex:"3"}},f9={class:"presets"},p9=["onClick"],v9=["src"],h9={class:"preset-label"},m9={class:"filter"},g9={class:"name"},E9={__name:"ElementFilter",setup(e){const{t}=_e(),n=[{label:t("FILTERS.BLUR"),key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:t("FILTERS.BRIGHTNESS"),key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:t("FILTERS.CONTRAST"),key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:t("FILTERS.GRAYSCALE"),key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:t("FILTERS.SATURATION"),key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:t("FILTERS.HUE"),key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:t("FILTERS.SEPIA"),key:"sepia",default:0,value:0,unit:"%",max:100,step:5},{label:t("FILTERS.INVERT"),key:"invert",default:0,value:0,unit:"%",max:100,step:5},{label:t("FILTERS.OPACITY"),key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],o=[{label:t("FILTERS.PRESET_BW"),values:{grayscale:"100%"}},{label:t("FILTERS.PRESET_RETRO"),values:{sepia:"50%",contrast:"110%",brightness:"90%"}},{label:t("FILTERS.PRESET_SHARPEN"),values:{contrast:"150%"}},{label:t("FILTERS.PRESET_SOFT"),values:{brightness:"110%",contrast:"90%"}},{label:t("FILTERS.PRESET_WARM"),values:{sepia:"30%",saturate:"135%"}},{label:t("FILTERS.PRESET_BRIGHT"),values:{brightness:"110%",contrast:"110%"}},{label:t("FILTERS.PRESET_VIVID"),values:{saturate:"200%"}},{label:t("FILTERS.PRESET_BLUR"),values:{blur:"2px"}},{label:t("FILTERS.PRESET_INVERT"),values:{invert:"100%"}}],a=pe(),{handleElement:i,handleElementId:l}=ne.storeToRefs(fe()),s=i,c=r.ref(JSON.parse(JSON.stringify(n))),u=r.ref(!1),{addHistorySnapshot:d}=be();r.watch(i,()=>{if(!i.value||i.value.type!=="image")return;const m=i.value.filters;m?(c.value=n.map(g=>{const E=m[g.key];return E?{...g,value:parseInt(E)}:g}),u.value=!0):(c.value=JSON.parse(JSON.stringify(n)),u.value=!1)},{deep:!0,immediate:!0});const f=m=>{let g="";const E=Object.keys(m);for(const y of E)g+=`${y}(${m[y]}) `;return g},v=(m,g)=>{const _={...i.value.filters||{},[m.key]:`${g}${m.unit}`};a.updateElement({id:l.value,props:{filters:_}}),d()},p=m=>{i.value&&(m?a.updateElement({id:i.value.id,props:{filters:{}}}):a.removeElementProps({id:i.value.id,propName:"filters"}),d())},h=m=>{a.updateElement({id:l.value,props:{filters:m}}),d()};return(m,g)=>(r.openBlock(),r.createElementBlock("div",s9,[r.createElementVNode("div",c9,[r.createElementVNode("div",u9,r.toDisplayString(r.unref(t)("STYLE_PARTS.FILTER_ENABLE")),1),r.createElementVNode("div",d9,[r.createVNode(Sn,{value:u.value,"onUpdate:value":g[0]||(g[0]=E=>p(E))},null,8,["value"])])]),u.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",f9,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(o,(E,y)=>r.createElementVNode("div",{class:"preset-item",key:y,onClick:_=>h(E.values)},[r.createElementVNode("img",{src:r.unref(s).src,alt:"",style:r.normalizeStyle({filter:f(E.values)})},null,12,v9),r.createElementVNode("span",h9,r.toDisplayString(E.label),1)],8,p9)),64))]),r.createElementVNode("div",m9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,E=>(r.openBlock(),r.createElementBlock("div",{class:"filter-item",key:E.key},[r.createElementVNode("div",g9,r.toDisplayString(E.label),1),r.createVNode(Wt,{class:"filter-slider",max:E.max,min:0,step:E.step,value:E.value,"onUpdate:value":y=>v(E,y)},null,8,["max","step","value","onUpdate:value"])]))),128))])],64)):r.createCommentVNode("",!0)]))}},y9=ie(E9,[["__scopeId","data-v-f48d8616"]]),_9={class:"element-color-mask"},T9={class:"row"},S9={style:{width:"45%"}},I9={class:"switch-wrapper",style:{width:"60%"}},A9={key:0,class:"row",style:{"margin-top":"15px"}},N9={style:{width:"45%"}},L9={__name:"ElementColorMask",setup(e){const t=pe(),{handleElement:n,handleElementId:o}=ne.storeToRefs(fe()),{theme:a}=ne.storeToRefs(t),{t:i}=_e(),{addHistorySnapshot:l}=be(),s=r.computed(()=>{const v=a.value.themeColors[0];return we(v).setAlpha(.5).toRgbString()}),c=r.ref(""),u=r.ref(!1);r.watch(n,()=>{!n.value||n.value.type!=="image"||(n.value.colorMask?(c.value=n.value.colorMask,u.value=!0):u.value=!1)},{deep:!0,immediate:!0});const d=v=>{n.value&&(v?t.updateElement({id:n.value.id,props:{colorMask:s.value}}):t.removeElementProps({id:n.value.id,propName:"colorMask"}),l())},f=v=>{t.updateElement({id:o.value,props:{colorMask:v}}),l()};return(v,p)=>(r.openBlock(),r.createElementBlock("div",_9,[r.createElementVNode("div",T9,[r.createElementVNode("div",S9,r.toDisplayString(r.unref(i)("STYLE_PARTS.COLOR_MASK")),1),r.createElementVNode("div",I9,[r.createVNode(Sn,{value:u.value,"onUpdate:value":p[0]||(p[0]=h=>d(h))},null,8,["value"])])]),u.value?(r.openBlock(),r.createElementBlock("div",A9,[r.createElementVNode("div",N9,r.toDisplayString(r.unref(i)("STYLE_PARTS.MASK_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:c.value,"onUpdate:modelValue":p[1]||(p[1]=h=>f(h))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:c.value},null,8,["color"])]),_:1})])):r.createCommentVNode("",!0)]))}},C9=ie(L9,[["__scopeId","data-v-b47cc90b"]]),x9={class:"image-style-panel"},b9={class:"clip"},w9={class:"title"},O9={class:"shape-clip"},R9=["onClick"],k9={key:0,class:"title"},D9={class:"row"},P9={style:{width:"45%"}},M9={__name:"ImageStylePanel",setup(e){const t=Fd,n=fe(),o=pe(),{handleElement:a,handleElementId:i}=ne.storeToRefs(n),{currentSlide:l}=ne.storeToRefs(o),s=a,c=r.ref(!1),{addHistorySnapshot:u}=be(),{t:d}=_e(),f=r.computed(()=>[{label:d("IMAGE_STYLE.RATIO_SQUARE"),children:[{key:"1:1",ratio:1/1}]},{label:d("IMAGE_STYLE.RATIO_PORTRAIT"),children:[{key:"2:3",ratio:3/2},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:d("IMAGE_STYLE.RATIO_LANDSCAPE"),children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:3/5},{key:"5:4",ratio:4/5}]},{label:"",children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:10/16}]}]),v=()=>{n.setClipingImageElementId(i.value),c.value=!1},p=()=>{const _=a.value,S=_.width,I=_.height,A=_.left,x=_.top,N=_.clip?_.clip.range:[[0,0],[100,100]],T=S/((N[1][0]-N[0][0])/100),L=I/((N[1][1]-N[0][1])/100),b=A-T*(N[0][0]/100),O=x-L*(N[0][1]/100);return{originClipRange:N,originWidth:T,originHeight:L,originLeft:b,originTop:O}},h=_=>{a.value&&(o.updateElement({id:i.value,props:_}),u())},m=(_,S=0)=>{const I=a.value,{originClipRange:A,originWidth:x,originHeight:N,originLeft:T,originTop:L}=p();if(S){const b=N/x,O=0,w=100;let C;if(b>S){const P=(1-S/b)/2*100;C=[[O,P],[w,w-P]]}else{const P=(1-b/S)/2*100;C=[[P,O],[w-P,w]]}h({clip:{...I.clip,shape:_,range:C},left:T+x*(C[0][0]/100),top:L+N*(C[0][1]/100),width:x*(C[1][0]-C[0][0])/100,height:N*(C[1][1]-C[0][1])/100})}else{const b={...I.clip,shape:_,range:A};let O={clip:b};_==="rect"&&(O={clip:b,radius:0}),h(O)}v()},g=_=>{const S=_[0];S&&Xr(S).then(I=>{const A=s.value.width,x=s.value.height,N=s.value.left,T=s.value.top,L=N+A/2,b=T+x/2;K1(I).then(({width:O,height:w})=>{const C=x,P=O*(x/w),k=L-P/2,B=b-C/2;o.removeElementProps({id:i.value,propName:"clip"}),h({src:I,width:P,height:C,left:k,top:B})})})},E=()=>{if(a.value.clip){const{originWidth:S,originHeight:I,originLeft:A,originTop:x}=p();h({left:A,top:x,width:S,height:I})}o.removeElementProps({id:i.value,propName:["clip","outline","flip","shadow","filters","colorMask","radius"]}),u()},y=()=>{const _=a.value,S={...l.value.background,type:"image",image:{src:_.src,size:"cover"}};o.updateSlide({background:S}),u()};return(_,S)=>{const I=r.resolveComponent("AiPptTailoring"),A=r.resolveComponent("AiPptDown"),x=r.resolveComponent("AiPptTransform"),N=r.resolveComponent("AiPptUndo"),T=r.resolveComponent("AiPptTheme");return r.openBlock(),r.createElementBlock("div",x9,[r.createElementVNode("div",{class:"origin-image",style:r.normalizeStyle({backgroundImage:`url(${r.unref(s).src})`})},null,4),r.createVNode(L_),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(ue,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:S[0]||(S[0]=L=>v())},{default:r.withCtx(()=>[r.createVNode(I),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.CROP_IMAGE")),1)]),_:1}),r.createVNode(Se,{trigger:"click",value:c.value,"onUpdate:value":S[1]||(S[1]=L=>c.value=L),style:{width:"calc(100% / 6)"}},{content:r.withCtx(()=>[r.createElementVNode("div",b9,[r.createElementVNode("div",w9,r.toDisplayString(r.unref(d)("IMAGE_STYLE.CLIP_BY_SHAPE")),1),r.createElementVNode("div",O9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(t),(L,b)=>(r.openBlock(),r.createElementBlock("div",{class:"shape-clip-item",key:b,onClick:O=>m(b)},[r.createElementVNode("div",{class:"shape",style:r.normalizeStyle({clipPath:L.style})},null,4)],8,R9))),128))]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,L=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:L.label},[L.label?(r.openBlock(),r.createElementBlock("div",k9,r.toDisplayString(r.unref(d)("IMAGE_STYLE.CLIP_BY",{label:L.label})),1)):r.createCommentVNode("",!0),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(L.children,b=>(r.openBlock(),r.createBlock(ue,{style:{flex:"1"},key:b.key,onClick:O=>m("rect",b.ratio)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(b.key),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)],64))),128))])]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn",style:{width:"100%"}},{default:r.withCtx(()=>[r.createVNode(A)]),_:1})]),_:1},8,["value"])]),_:1}),r.createElementVNode("div",D9,[r.createElementVNode("div",P9,r.toDisplayString(r.unref(d)("IMAGE_STYLE.RADIUS")),1),r.createVNode(Xt,{value:r.unref(s).radius||0,"onUpdate:value":S[2]||(S[2]=L=>h({radius:L})),style:{width:"60%"}},null,8,["value"])]),r.createVNode(Oe),r.createVNode(C9),r.createVNode(Oe),r.createVNode(y9),r.createVNode(Oe),r.createVNode(Ll),r.createVNode(Oe),r.createVNode(Qc),r.createVNode(Oe),r.createVNode(El,{onChange:S[3]||(S[3]=L=>g(L))},{default:r.withCtx(()=>[r.createVNode(ue,{class:"full-width-btn"},{default:r.withCtx(()=>[r.createVNode(x),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.REPLACE_IMAGE")),1)]),_:1})]),_:1}),r.createVNode(ue,{class:"full-width-btn",onClick:S[4]||(S[4]=L=>E())},{default:r.withCtx(()=>[r.createVNode(N),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.RESET_STYLE")),1)]),_:1}),r.createVNode(ue,{class:"full-width-btn",onClick:S[5]||(S[5]=L=>y())},{default:r.withCtx(()=>[r.createVNode(T),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.SET_BACKGROUND")),1)]),_:1})])}}},B9=ie(M9,[["__scopeId","data-v-cfa145e5"]]),V9=()=>{const e=fe(),{shapeFormatPainter:t,handleElement:n}=ne.storeToRefs(e);return{toggleShapeFormatPainter:(a=!1)=>{const i=n.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:i.fill,gradient:i.gradient,outline:i.outline,opacity:i.opacity,shadow:i.shadow})}}},$9={class:"gradient-bar"},F9=["onMousedown","onContextmenu"],H9={__name:"GradientBar",props:{value:{type:Array,required:!0},index:{type:Number,required:!0}},emits:["update:value","update:index"],setup(e,{emit:t}){const n=e,o=t,a=r.ref([]),i=r.useTemplateRef("barRef");r.watchEffect(()=>{a.value=n.value,n.index>n.value.length-1&&o("update:index",0)});const l=r.computed(()=>`linear-gradient(to right, ${a.value.map(f=>`${f.color} ${f.pos}%`).join(",")})`),s=d=>{if(n.value.length<=2)return;let f=0;d===n.index?f=d-1<0?0:d-1:n.index===n.value.length-1&&(f=n.value.length-2);const v=n.value.filter((p,h)=>h!==d);o("update:index",f),o("update:value",v)},c=d=>{let f=!0;document.onmousemove=v=>{if(!f||!i.value)return;let p=Math.round((v.clientX-i.value.getBoundingClientRect().left)/i.value.clientWidth*100);p>100&&(p=100),p<0&&(p=0),a.value=a.value.map((h,m)=>m===d?{...h,pos:p}:h)},document.onmouseup=()=>{f=!1;const v=a.value[d],p=[...a.value];p.splice(d,1);let h=0;for(let m=0;m<p.length;m++)v.pos>p[m].pos&&(h=m+1);p.splice(h,0,v),o("update:index",h),o("update:value",p),document.onmousemove=null,document.onmouseup=null}},u=d=>{if(n.value.length>=6||!i.value)return;const f=Math.round((d.clientX-i.value.getBoundingClientRect().left)/i.value.clientWidth*100);let v=0;for(let m=0;m<n.value.length;m++)f>n.value[m].pos&&(v=m+1);const p=n.value[v-1]?n.value[v-1].color:n.value[v].color,h=[...n.value];h.splice(v,0,{pos:f,color:p}),o("update:index",v),o("update:value",h)};return(d,f)=>(r.openBlock(),r.createElementBlock("div",$9,[r.createElementVNode("div",{class:"bar",ref_key:"barRef",ref:i,style:r.normalizeStyle({backgroundImage:l.value}),onClick:f[0]||(f[0]=v=>u(v))},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(v,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["point",{active:e.index===p}]),key:v.pos+"-"+p,style:r.normalizeStyle({backgroundColor:v.color,left:`calc(${v.pos}% - 5px)`}),onMousedown:r.withModifiers(h=>c(p),["left"]),onContextmenu:r.withModifiers(h=>s(p),["right"])},null,46,F9))),128))]))}},C_=ie(H9,[["__scopeId","data-v-e509e87f"]]),U9={class:"shape-style-panel"},G9={class:"title"},z9={class:"shape-pool"},Y9={class:"shape-list"},X9={class:"row"},W9={key:0,style:{width:"10px"}},K9={class:"row"},q9={class:"row"},Z9={style:{width:"45%"}},j9={key:0,class:"row"},J9={style:{width:"45%"}},Q9={key:1,class:"pattern-image-wrapper"},eB={class:"pattern-image"},tB={class:"row"},nB={__name:"ShapeStylePanel",setup(e){const t=fe(),n=pe(),{handleElement:o,handleElementId:a,shapeFormatPainter:i}=ne.storeToRefs(t),l=o,s=r.ref("#000"),c=r.ref(""),u=r.ref({type:"linear",rotate:0,colors:[{pos:0,color:"#fff"},{pos:100,color:"#fff"}]}),d=r.ref("fill"),f=r.ref("middle"),v=r.ref(0),{t:p}=_e();r.watch(o,()=>{var N,T,L;if(!o.value||o.value.type!=="shape")return;s.value=o.value.fill||"#fff";const b=[{pos:0,color:s.value},{pos:100,color:"#fff"}];u.value=o.value.gradient||{type:"linear",rotate:0,colors:b},c.value=o.value.pattern||"",d.value=o.value.pattern!==void 0?"pattern":o.value.gradient?"gradient":"fill",f.value=((T=(N=o.value)===null||N===void 0?void 0:N.text)===null||T===void 0?void 0:T.align)||"middle",!((L=o.value.text)===null||L===void 0)&&L.content&&bt.emit(Et.SYNC_RICH_TEXT_ATTRS_TO_STORE)},{deep:!0,immediate:!0}),r.watch(a,()=>{v.value=0});const{addHistorySnapshot:h}=be(),{toggleShapeFormatPainter:m}=V9(),g=N=>{n.updateElement({id:a.value,props:N}),h()},E=N=>{N==="fill"?(n.removeElementProps({id:a.value,propName:["gradient","pattern"]}),h()):N==="gradient"?(v.value=0,n.removeElementProps({id:a.value,propName:"pattern"}),g({gradient:u.value})):N==="pattern"&&(n.removeElementProps({id:a.value,propName:"gradient"}),g({pattern:""}))},y=N=>{if(!u.value)return;const T={...u.value,...N};g({gradient:T})},_=N=>{const T=u.value.colors.map((L,b)=>b===v.value?{...L,color:N}:L);y({colors:T})},S=N=>{const T=N[0];T&&Xr(T).then(L=>{c.value=L,g({pattern:L})})},I=N=>{g({fill:N})},A=N=>{const{width:T,height:L}=o.value,b={viewBox:N.viewBox,path:N.path,special:N.special};if(N.pathFormula){b.pathFormula=N.pathFormula,b.viewBox=[T,L];const O=$o[N.pathFormula];"editable"in O?(b.path=O.formula(T,L,O.defaultValue),b.keypoints=O.defaultValue):b.path=O.formula(T,L)}else b.pathFormula=void 0,b.keypoints=void 0;g(b)},x=N=>{const T=o.value,L={content:"",defaultFontName:"",defaultColor:"#000",align:"middle"},b=T.text||L;g({text:{...b,align:N}})};return(N,T)=>{const L=r.resolveComponent("AiPptDown"),b=r.resolveComponent("AiPptPlus"),O=r.resolveComponent("AiPptAlignTextTopOne"),w=r.resolveComponent("AiPptAlignTextMiddleOne"),C=r.resolveComponent("AiPptAlignTextBottomOne"),P=r.resolveComponent("AiPptFormatBrush"),k=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",U9,[r.createElementVNode("div",G9,[r.createElementVNode("span",null,r.toDisplayString(r.unref(p)("SHAPE_STYLE.REPLACE_SHAPE")),1),r.createVNode(L)]),r.createElementVNode("div",z9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(op),B=>(r.openBlock(),r.createElementBlock("div",{class:"category",key:B.type},[r.createElementVNode("div",Y9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(B.children,(H,U)=>(r.openBlock(),r.createBlock(S_,{class:"shape-item",key:U,shape:H,onClick:$=>A(H)},null,8,["shape","onClick"]))),128))])]))),128))]),r.createElementVNode("div",X9,[r.createVNode(st,{style:{flex:"1"},value:d.value,"onUpdate:value":T[0]||(T[0]=B=>E(B)),options:[{label:r.unref(p)("SHAPE_STYLE.FILL_SOLID"),value:"fill"},{label:r.unref(p)("SHAPE_STYLE.FILL_GRADIENT"),value:"gradient"},{label:r.unref(p)("SHAPE_STYLE.FILL_IMAGE"),value:"pattern"}]},null,8,["value","options"]),d.value!=="pattern"?(r.openBlock(),r.createElementBlock("div",W9)):r.createCommentVNode("",!0),d.value==="fill"?(r.openBlock(),r.createBlock(Se,{key:1,trigger:"click",style:{flex:"1"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:s.value,"onUpdate:modelValue":T[1]||(T[1]=B=>I(B))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:s.value},null,8,["color"])]),_:1})):d.value==="gradient"?(r.openBlock(),r.createBlock(st,{key:2,style:{flex:"1"},value:u.value.type,"onUpdate:value":T[2]||(T[2]=B=>y({type:B})),options:[{label:r.unref(p)("SHAPE_STYLE.GRADIENT_LINEAR"),value:"linear"},{label:r.unref(p)("SHAPE_STYLE.GRADIENT_RADIAL"),value:"radial"}]},null,8,["value","options"])):r.createCommentVNode("",!0)]),d.value==="gradient"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",K9,[r.createVNode(C_,{value:u.value.colors,index:v.value,"onUpdate:value":T[3]||(T[3]=B=>y({colors:B})),"onUpdate:index":T[4]||(T[4]=B=>v.value=B)},null,8,["value","index"])]),r.createElementVNode("div",q9,[r.createElementVNode("div",Z9,r.toDisplayString(r.unref(p)("SHAPE_STYLE.CURRENT_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value.colors[v.value].color,"onUpdate:modelValue":T[5]||(T[5]=B=>_(B))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:u.value.colors[v.value].color},null,8,["color"])]),_:1})]),u.value.type==="linear"?(r.openBlock(),r.createElementBlock("div",j9,[r.createElementVNode("div",J9,r.toDisplayString(r.unref(p)("SHAPE_STYLE.GRADIENT_ANGLE")),1),r.createVNode(Wt,{style:{width:"60%"},min:0,max:360,step:15,value:u.value.rotate,"onUpdate:value":T[6]||(T[6]=B=>y({rotate:B}))},null,8,["value"])])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),d.value==="pattern"?(r.openBlock(),r.createElementBlock("div",Q9,[r.createVNode(El,{onChange:T[7]||(T[7]=B=>S(B))},{default:r.withCtx(()=>[r.createElementVNode("div",eB,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundImage:`url(${c.value})`})},[r.createVNode(b)],4)])]),_:1})])):r.createCommentVNode("",!0),r.createVNode(L_),r.createVNode(Oe),r.unref(l).text?.content?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(N_),r.createVNode(Oe),r.createVNode(lr,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":T[8]||(T[8]=B=>x(B))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"top",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(O)]),_:1})),[[k,r.unref(p)("SHAPE_STYLE.ALIGN_TOP")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"middle",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(w)]),_:1})),[[k,r.unref(p)("SHAPE_STYLE.ALIGN_MIDDLE")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"bottom",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(C)]),_:1})),[[k,r.unref(p)("SHAPE_STYLE.ALIGN_BOTTOM")]])]),_:1},8,["value"]),r.createVNode(Oe)],64)):r.createCommentVNode("",!0),r.createVNode(Ll),r.createVNode(Oe),r.createVNode(Qc),r.createVNode(Oe),r.createVNode(A_),r.createVNode(Oe),r.createElementVNode("div",tB,[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:!!r.unref(i),onClick:T[9]||(T[9]=B=>r.unref(m)()),onDblclick:T[10]||(T[10]=B=>r.unref(m)(!0))},{default:r.withCtx(()=>[r.createVNode(P),r.createTextVNode(" "+r.toDisplayString(r.unref(p)("SHAPE_STYLE.FORMAT_PAINTER")),1)]),_:1},8,["checked"])),[[k,r.unref(p)("COMMON.FORMAT_PAINTER_TIP")]])])])}}},rB=ie(nB,[["__scopeId","data-v-0e4f2e5c"]]),oB={class:"line-style-panel"},aB={class:"row"},iB={style:{width:"45%"}},lB=["onClick"],sB={class:"row"},cB={style:{width:"45%"}},uB={class:"row"},dB={style:{width:"45%"}},fB={class:"row"},pB={style:{width:"45%"}},vB=["onClick"],hB={class:"row"},mB={style:{width:"45%"}},gB=["onClick"],EB={class:"row"},yB={__name:"LineStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),{t:o}=_e(),a=n,{addHistorySnapshot:i}=be(),l=r.ref(["solid","dashed","dotted"]),s=r.ref(["","arrow","dot"]),c=u=>{n.value&&(t.updateElement({id:n.value.id,props:u}),i())};return(u,d)=>{const f=r.resolveComponent("AiPptSwitch");return r.openBlock(),r.createElementBlock("div",oB,[r.createElementVNode("div",aB,[r.createElementVNode("div",iB,r.toDisplayString(r.unref(o)("LINE_STYLE.STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,v=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:v,onClick:p=>c({style:v})},[r.createVNode(En,{type:v},null,8,["type"])],8,lB))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:r.unref(a).style},null,8,["type"])]),_:1})]),r.createElementVNode("div",sB,[r.createElementVNode("div",cB,r.toDisplayString(r.unref(o)("LINE_STYLE.COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(a).color,"onUpdate:modelValue":d[0]||(d[0]=v=>c({color:v}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(a).color},null,8,["color"])]),_:1})]),r.createElementVNode("div",uB,[r.createElementVNode("div",dB,r.toDisplayString(r.unref(o)("LINE_STYLE.WIDTH")),1),r.createVNode(Xt,{value:r.unref(a).width,"onUpdate:value":d[1]||(d[1]=v=>c({width:v})),style:{width:"60%"}},null,8,["value"])]),r.createElementVNode("div",fB,[r.createElementVNode("div",pB,r.toDisplayString(r.unref(o)("LINE_STYLE.START")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,v=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:v,onClick:p=>c({points:[v,r.unref(a).points[1]]})},[r.createVNode(En,{padding:5,markers:[v,""]},null,8,["markers"])],8,vB))),128))]),label:r.withCtx(()=>[r.createVNode(En,{padding:5,markers:[r.unref(a).points[0],""]},null,8,["markers"])]),_:1})]),r.createElementVNode("div",hB,[r.createElementVNode("div",mB,r.toDisplayString(r.unref(o)("LINE_STYLE.END")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,v=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:v,onClick:p=>c({points:[r.unref(a).points[0],v]})},[r.createVNode(En,{padding:5,markers:["",v]},null,8,["markers"])],8,gB))),128))]),label:r.withCtx(()=>[r.createVNode(En,{padding:5,markers:["",r.unref(a).points[1]]},null,8,["markers"])]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",EB,[r.createVNode(ue,{style:{flex:"1"},onClick:d[2]||(d[2]=v=>c({start:r.unref(a).end,end:r.unref(a).start}))},{default:r.withCtx(()=>[r.createVNode(f),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("LINE_STYLE.SWAP")),1)]),_:1})]),r.createVNode(Oe),r.createVNode(Qc)])}}},_B=ie(yB,[["__scopeId","data-v-8b08a23e"]]),TB={class:"chart-data-editor"},SB={class:"editor-content"},IB={class:"handler"},AB={class:"col-header"},NB={class:"col-key"},LB={class:"row-header"},CB={class:"row-key"},xB={class:"range-box"},bB=["id","onFocus","onPaste"],wB={class:"btns"},OB={class:"left"},RB={class:"change"},kB={class:"right"},DB="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Sr=100,Ir=32,PB={__name:"ChartDataEditor",props:{type:{type:String,required:!0},data:{type:Object,required:!0}},emits:["save","close"],setup(e,{emit:t}){const n=e,o=t,a=["bar","column","line","area","scatter","pie","ring","radar"],i=r.ref(!1),l=r.ref([0,0]),s=r.ref({width:0,height:0}),c=r.ref(null),u=r.ref("bar"),{t:d}=_e(),f=r.computed(()=>{const A=l.value[0]*Sr,x=l.value[1]*Ir;return[{type:"t",style:{width:A+"px"}},{type:"b",style:{top:x+"px",width:A+"px"}},{type:"l",style:{height:x+"px"}},{type:"r",style:{left:A+"px",height:x+"px"}}]}),v=r.computed(()=>{const A=l.value[0]*Sr,x=l.value[1]*Ir;return{left:A+"px",top:x+"px"}}),p=()=>{u.value=n.type;const A=[],{labels:x,legends:N,series:T}=n.data,L=x.length,b=T.length;A.push(["",...N]);for(let O=0;O<L;O++){const w=[x[O]];for(let C=0;C<b;C++)w.push(T[C][O]+"");A.push(w)}for(let O=0;O<L+1;O++)for(let w=0;w<b+1;w++){const C=document.querySelector(`#cell-${O}-${w}`);C&&(C.value=A[O][w]+"")}l.value=[b+1,L+1]};r.onMounted(p);const h=()=>{if(!c.value)return;const[A,x]=c.value,N=document.querySelector(`#cell-${A+1}-${x}`);N&&N.focus()},m=A=>{A.key.toUpperCase()===Ee.ENTER&&h()};r.onMounted(()=>{document.addEventListener("keydown",m)}),r.onUnmounted(()=>{document.removeEventListener("keydown",m)});const g=()=>{const[A,x]=l.value,N=[];let T=[],L=[];for(let b=1;b<x;b++){let O=d("CHART_DATA_EDITOR.DEFAULT_CATEGORY",{index:b});const w=document.querySelector(`#cell-${b}-0`);w&&w.value&&(O=w.value),N.push(O)}for(let b=1;b<A;b++){let O=d("CHART_DATA_EDITOR.DEFAULT_SERIES",{index:b});const w=document.querySelector(`#cell-0-${b}`);w&&w.value&&(O=w.value),T.push(O)}for(let b=1;b<A;b++){const O=[];for(let w=1;w<x;w++){const C=document.querySelector(`#cell-${w}-${b}`);let P=0;C&&C.value&&+C.value&&(P=+C.value),O.push(P)}L.push(O)}u.value==="scatter"&&(T.length>2&&(T=T.slice(0,2),L=L.slice(0,2)),T.length<2&&(T.push("Y"),L.push(L[0]))),(u.value==="ring"||u.value==="pie")&&T.length>1&&(T=T.slice(0,1),L=L.slice(0,1)),o("save",{data:{labels:N,legends:T,series:L},type:u.value})},E=()=>{for(let A=1;A<31;A++)for(let x=1;x<7;x++){const N=document.querySelector(`#cell-${A}-${x}`);N&&(N.value="")}},y=(A,x,N)=>{const T=x+A.length,L=N+A[0].length;for(let b=x;b<T;b++)for(let O=N;O<L;O++){const w=document.querySelector(`#cell-${b}-${O}`);w&&(w.value=A[b-x][O-N])}},_=(A,x,N)=>{if(A.preventDefault(),!A.clipboardData)return;const T=A.clipboardData.items[0];T&&T.kind==="string"&&(T.type==="text/plain"?T.getAsString(L=>{if(typeof rp(L)=="object")return;const O=X1(L);if(O){y(O,x,N);return}document.execCommand("insertText",!1,L)}):T.type==="text/html"&&T.getAsString(L=>{const b=W1(L);b&&y(b,x,N)}))},S=()=>o("close"),I=A=>{let x=!0;const N=A.pageX,T=A.pageY,L=l.value[0]*Sr,b=l.value[1]*Ir;document.onmousemove=O=>{if(!x)return;const w=O.pageX,C=O.pageY,P=w-N,k=C-T,B=L+P,H=b+k;s.value={width:B,height:H}},document.onmouseup=O=>{x=!1,document.onmousemove=null,document.onmouseup=null;const w=O.pageX,C=O.pageY;if(N===w&&T===C)return;let P=s.value.width,k=s.value.height;P%Sr>Sr*.5&&(P=P+(Sr-P%Sr)),k%Ir>Ir*.5&&(k=k+(Ir-k%Ir));let B=Math.round(k/Ir),H=Math.round(P/Sr);B<3&&(B=3),H<2&&(H=2),l.value=[H,B],s.value={width:0,height:0}}};return(A,x)=>(r.openBlock(),r.createElementBlock("div",TB,[r.createElementVNode("div",SB,[r.createElementVNode("div",IB,[r.createElementVNode("div",AB,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(7,N=>r.createElementVNode("div",{class:"col-header-item",key:N},[r.createElementVNode("div",NB,r.toDisplayString(DB[N-1]),1)])),64))]),r.createElementVNode("div",LB,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(31,N=>r.createElementVNode("div",{class:"row-header-item",key:N},[r.createElementVNode("div",CB,r.toDisplayString(N),1)])),64))]),x[5]||(x[5]=r.createElementVNode("div",{class:"all-header"},[r.createElementVNode("svg",{class:"triangle",width:"8",height:"8",viewBox:"0 0 8 8",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M8,0 L8,8 L0,8 L8,0",fill:"#ccc"})])],-1))]),r.createElementVNode("div",xB,[r.createElementVNode("div",{class:"temp-range",style:r.normalizeStyle({width:s.value.width+"px",height:s.value.height+"px"})},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,N=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["range-line",N.type]),key:N.type,style:r.normalizeStyle(N.style)},null,6))),128)),r.createElementVNode("div",{class:"resizable",style:r.normalizeStyle(v.value),onMousedown:x[0]||(x[0]=r.withModifiers(N=>I(N),["stop"]))},null,36)]),r.createElementVNode("table",null,[r.createElementVNode("tbody",null,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(31,N=>r.createElementVNode("tr",{key:N},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(7,T=>r.createElementVNode("td",{key:T,class:r.normalizeClass({head:T===1&&N<=l.value[1]||N===1&&T<=l.value[0]})},[N===1&&T===1?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("input",{key:0,class:r.normalizeClass(["item",{selected:N<=l.value[1]&&T<=l.value[0]}]),id:`cell-${N-1}-${T-1}`,autocomplete:"off",onFocus:L=>c.value=[N-1,T-1],onPaste:L=>_(L,N-1,T-1)},null,42,bB))],2)),64))])),64))])])]),r.createElementVNode("div",wB,[r.createElementVNode("div",OB,[r.createTextVNode(r.toDisplayString(r.unref(d)("CHART_DATA_EDITOR.TYPE_LABEL"))+r.toDisplayString(r.unref(d)(r.unref(va)[u.value].labelKey||r.unref(va)[u.value].label))+" ",1),r.createVNode(Se,{trigger:"click",placement:"top",value:i.value,"onUpdate:value":x[1]||(x[1]=N=>i.value=N)},{content:r.withCtx(()=>[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(a,N=>r.createVNode(dt,{center:"",key:N,onClick:()=>{u.value=N,i.value=!1}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)(r.unref(va)[N].labelKey||r.unref(va)[N].label)),1)]),_:2},1032,["onClick"])),64))]),default:r.withCtx(()=>[r.createElementVNode("span",RB,r.toDisplayString(r.unref(d)("CHART_DATA_EDITOR.CHANGE_TYPE")),1)]),_:1},8,["value"])]),r.createElementVNode("div",kB,[r.createVNode(ue,{class:"btn",onClick:x[2]||(x[2]=N=>S())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{class:"btn",onClick:x[3]||(x[3]=N=>E())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)("CHART_DATA_EDITOR.CLEAR_DATA")),1)]),_:1}),r.createVNode(ue,{type:"primary",class:"btn",onClick:x[4]||(x[4]=N=>g())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)("COMMON.CONFIRM")),1)]),_:1})])])]))}},MB=ie(PB,[["__scopeId","data-v-65c728d6"]]),BB={class:"theme-colors-setting"},VB={class:"title"},$B={class:"list"},FB={class:"label",style:{width:"40%"}},HB={class:"color-btn-wrap",style:{width:"100%"}},UB=["onClick"],GB={__name:"ThemeColorsSetting",props:{colors:{type:Array,required:!0}},emits:["update"],setup(e,{emit:t}){const n=e,o=t,a=r.ref([]),{t:i}=_e();r.onMounted(()=>{a.value=[...n.colors]});const l=()=>{o("update",a.value)},s=()=>{const u=[...a.value,"#00000000"];a.value=u},c=u=>{const d=a.value.filter((f,v)=>v!==u);a.value=d};return(u,d)=>{const f=r.resolveComponent("AiPptCloseSmall"),v=r.resolveComponent("AiPptPlus"),p=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",BB,[r.createElementVNode("div",VB,r.toDisplayString(r.unref(i)("CHART_THEME_COLORS.TITLE")),1),r.createElementVNode("div",$B,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{class:"row",key:m},[r.createElementVNode("div",FB,r.toDisplayString(r.unref(i)("CHART_THEME_COLORS.ITEM",{index:m+1})),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:h,"onUpdate:modelValue":g=>a.value[m]=g},null,8,["modelValue","onUpdate:modelValue"])]),default:r.withCtx(()=>[r.createElementVNode("div",HB,[r.createVNode(lt,{color:h},null,8,["color"]),m!==0?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,class:"delete-color-btn",onClick:r.withModifiers(g=>c(m),["stop"])},[r.createVNode(f)],8,UB)),[[p,r.unref(i)("COMMON.DELETE")]]):r.createCommentVNode("",!0)])]),_:2},1024)]))),128)),r.createVNode(ue,{style:{width:"100%"},disabled:a.value.length>=10,onClick:d[0]||(d[0]=h=>s())},{default:r.withCtx(()=>[r.createVNode(v),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("CHART_THEME_COLORS.ADD")),1)]),_:1},8,["disabled"])]),r.createVNode(ue,{class:"btn",type:"primary",onClick:d[1]||(d[1]=h=>l())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)("COMMON.CONFIRM")),1)]),_:1})])}}},zB=ie(GB,[["__scopeId","data-v-f88dc5c8"]]),YB={class:"blocks"},XB={__name:"ColorListButton",props:{colors:{type:Array,required:!0}},setup(e){const t=e,n=r.computed(()=>t.colors?t.colors.length>12?t.colors.slice(0,12):t.colors:[]);return(o,a)=>{const i=r.resolveComponent("AiPptPlatte");return r.openBlock(),r.createBlock(ue,{class:"color-btn"},{default:r.withCtx(()=>[r.createElementVNode("div",YB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"color-block",key:s},[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundColor:l})},null,4)]))),128))]),r.createVNode(i,{class:"color-btn-icon"})]),_:1})}}},x_=ie(XB,[["__scopeId","data-v-2824ae02"]]),WB=["checked"],KB={class:"checkbox-label"},qB={__name:"Checkbox",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=i=>{n.disabled||o("update:value",i.target.checked)};return(i,l)=>(r.openBlock(),r.createElementBlock("label",{class:r.normalizeClass(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:l[0]||(l[0]=s=>a(s))},[l[1]||(l[1]=r.createElementVNode("span",{class:"checkbox-input"},null,-1)),r.createElementVNode("input",{class:"checkbox-original",type:"checkbox",checked:e.value},null,8,WB),r.createElementVNode("span",KB,[r.renderSlot(i.$slots,"default",{},void 0,!0)])],34))}},_a=ie(qB,[["__scopeId","data-v-2e326045"]]),ZB={class:"chart-style-panel"},jB={class:"row"},JB={class:"row"},QB={style:{width:"45%"}},eV={class:"row"},tV={style:{width:"45%"}},nV={class:"row"},rV={style:{width:"45%"}},oV={class:"row"},aV={style:{width:"45%"}},iV={class:"themes"},lV={class:"label"},sV={class:"preset-themes"},cV=["onClick"],uV={class:"label"},dV={class:"preset-themes",style:{marginBottom:"-10px"}},fV={__name:"index",setup(e){const t=fe(),n=pe(),{handleElement:o,handleElementId:a}=ne.storeToRefs(t),{theme:i}=ne.storeToRefs(n),l=o,s=r.ref(!1),c=r.ref(!1),u=r.ref(!1),{addHistorySnapshot:d}=be(),f=r.ref("#000"),v=r.ref([]),p=r.ref(""),h=r.ref(""),m=r.ref(!1),g=r.ref(!1),{t:E}=_e();r.watch(o,()=>{if(!(!o.value||o.value.type!=="chart")){if(f.value=o.value.fill||"#fff",m.value=!1,g.value=!1,o.value.options){const{lineSmooth:x,stack:N}=o.value.options;x!==void 0&&(m.value=x),N!==void 0&&(g.value=N)}v.value=o.value.themeColors,p.value=o.value.textColor||"#333",h.value=o.value.lineColor||"#e8ecf4"}},{deep:!0,immediate:!0});const y=x=>{n.updateElement({id:a.value,props:x}),d()},_=x=>{s.value=!1,y({data:x.data,chartType:x.type})},S=x=>{const T={...o.value.options,...x};y({options:T})},I=x=>{y({themeColors:x}),c.value=!1,u.value=!1},A=()=>s.value=!0;return bt.on(Et.OPEN_CHART_DATA_EDITOR,A),r.onUnmounted(()=>{bt.off(Et.OPEN_CHART_DATA_EDITOR,A)}),(x,N)=>{const T=r.resolveComponent("AiPptEdit");return r.openBlock(),r.createElementBlock("div",ZB,[r.createVNode(ue,{class:"full-width-btn",onClick:N[0]||(N[0]=L=>s.value=!0)},{default:r.withCtx(()=>[r.createVNode(T),r.createTextVNode(" "+r.toDisplayString(r.unref(E)("CHART_STYLE.EDIT_CHART")),1)]),_:1}),r.createVNode(Oe),["bar","column","area","line"].includes(r.unref(l).chartType)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",jB,[r.createVNode(_a,{"onUpdate:value":N[1]||(N[1]=L=>S({stack:L})),value:g.value,style:{flex:"2"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(E)("CHART_STYLE.STACKED")),1)]),_:1},8,["value"]),r.unref(l).chartType==="line"?(r.openBlock(),r.createBlock(_a,{key:0,"onUpdate:value":N[2]||(N[2]=L=>S({lineSmooth:L})),value:m.value,style:{flex:"3"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(E)("CHART_STYLE.SMOOTH_LINE")),1)]),_:1},8,["value"])):r.createCommentVNode("",!0)]),r.createVNode(Oe)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",JB,[r.createElementVNode("div",QB,r.toDisplayString(r.unref(E)("CHART_STYLE.BACKGROUND_FILL")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:f.value,"onUpdate:modelValue":N[3]||(N[3]=L=>y({fill:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:f.value},null,8,["color"])]),_:1})]),r.createElementVNode("div",eV,[r.createElementVNode("div",tV,r.toDisplayString(r.unref(E)("CHART_STYLE.AXIS_TEXT")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:p.value,"onUpdate:modelValue":N[4]||(N[4]=L=>y({textColor:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:p.value},null,8,["color"])]),_:1})]),r.createElementVNode("div",nV,[r.createElementVNode("div",rV,r.toDisplayString(r.unref(E)("CHART_STYLE.GRID_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:h.value,"onUpdate:modelValue":N[5]||(N[5]=L=>y({lineColor:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:h.value},null,8,["color"])]),_:1})]),r.createElementVNode("div",oV,[r.createElementVNode("div",aV,r.toDisplayString(r.unref(E)("CHART_STYLE.THEME_COLORS")),1),r.createVNode(Se,{trigger:"click",value:c.value,"onUpdate:value":N[8]||(N[8]=L=>c.value=L),style:{width:"60%"}},{content:r.withCtx(()=>[r.createElementVNode("div",iV,[r.createElementVNode("div",lV,r.toDisplayString(r.unref(E)("CHART_STYLE.PRESET_THEMES")),1),r.createElementVNode("div",sV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(BT),(L,b)=>(r.openBlock(),r.createElementBlock("div",{class:"preset-theme",key:b,onClick:O=>I(L)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(L,O=>(r.openBlock(),r.createElementBlock("div",{class:"preset-theme-color",key:O,style:r.normalizeStyle({backgroundColor:O})},null,4))),128))],8,cV))),128))]),r.createElementVNode("div",uV,r.toDisplayString(r.unref(E)("CHART_STYLE.SLIDE_THEME")),1),r.createElementVNode("div",dV,[r.createElementVNode("div",{class:"preset-theme",onClick:N[6]||(N[6]=L=>I(r.unref(i).themeColors))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).themeColors,L=>(r.openBlock(),r.createElementBlock("div",{class:"preset-theme-color",key:L,style:r.normalizeStyle({backgroundColor:L})},null,4))),128))])]),r.createVNode(Oe,{margin:10}),r.createVNode(ue,{class:"full-width-btn",onClick:N[7]||(N[7]=()=>{c.value=!1,u.value=!0})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(E)("CHART_STYLE.CUSTOM_THEME")),1)]),_:1})])]),default:r.withCtx(()=>[r.createVNode(x_,{colors:v.value},null,8,["colors"])]),_:1},8,["value"])]),r.createVNode(Oe),r.createVNode(Ll),r.createVNode(Yr,{visible:s.value,"onUpdate:visible":N[11]||(N[11]=L=>s.value=L),width:640},{default:r.withCtx(()=>[r.createVNode(MB,{type:r.unref(l).chartType,data:r.unref(l).data,onClose:N[9]||(N[9]=L=>s.value=!1),onSave:N[10]||(N[10]=L=>_(L))},null,8,["type","data"])]),_:1},8,["visible"]),r.createVNode(Yr,{visible:u.value,"onUpdate:visible":N[13]||(N[13]=L=>u.value=L),width:310,onClosed:N[14]||(N[14]=L=>u.value=!1)},{default:r.withCtx(()=>[r.createVNode(zB,{colors:v.value,onUpdate:N[12]||(N[12]=L=>I(L))},null,8,["colors"])]),_:1},8,["visible"])])}}},pV=ie(fV,[["__scopeId","data-v-3fe69925"]]),vV={class:"table-style-panel"},hV={class:"row"},mV={style:{width:"45%"}},gV={class:"set-count",style:{width:"60%"}},EV={class:"count-text"},yV={class:"row"},_V={style:{width:"45%"}},TV={class:"set-count",style:{width:"60%"}},SV={class:"count-text"},IV={class:"row theme-switch"},AV={style:{width:"45%"}},NV={class:"switch-wrapper",style:{width:"60%"}},LV={class:"row"},CV={class:"row"},xV={class:"row"},bV={style:{width:"45%"}},wV={__name:"TableStylePanel",setup(e){const t=pe(),{handleElement:n,handleElementId:o,selectedTableCells:a}=ne.storeToRefs(fe()),i=r.computed(()=>t.theme.themeColors[0]),l=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],s=r.ref({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"",align:"left"}),c=r.ref(),u=r.ref(!1),d=r.ref(0),f=r.ref(0),v=r.ref(0),p=r.ref(0),{t:h}=_e(),m=r.computed(()=>Cl(h));r.watch(n,()=>{!n.value||n.value.type!=="table"||(c.value=n.value.theme,u.value=!!c.value,d.value=n.value.data.length,f.value=n.value.data[0].length,v.value=n.value.data.length,p.value=n.value.data[0].length)},{deep:!0,immediate:!0});const{addHistorySnapshot:g}=be(),E=()=>{if(!n.value||n.value.type!=="table")return;let N=0,T=0;if(a.value.length){const b=a.value[0];N=+b.split("_")[0],T=+b.split("_")[1]}const L=n.value.data[N][T].style;L?s.value={bold:!!L.bold,em:!!L.em,underline:!!L.underline,strikethrough:!!L.strikethrough,color:L.color||"#000",backcolor:L.backcolor||"",fontsize:L.fontsize||"12px",fontname:L.fontname||"",align:L.align||"left"}:s.value={bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"",align:"left"}};r.onMounted(()=>{a.value.length&&E()}),r.watch(a,E);const y=N=>{t.updateElement({id:o.value,props:N}),g()},_=N=>{const T=n.value,L=JSON.parse(JSON.stringify(T.data));for(let b=0;b<L.length;b++)for(let O=0;O<L[b].length;O++)if(!a.value.length||a.value.includes(`${b}_${O}`)){const w=L[b][O].style||{};L[b][O].style={...w,...N}}y({data:L}),E()},S=N=>{if(!c.value)return;const T={...c.value,...N};y({theme:T})},I=N=>{if(N){const T={theme:{color:i.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};y(T)}else t.removeElementProps({id:o.value,propName:"theme"}),g()},A=N=>{const T=n.value,L=T.data.length;if(N>L){const b=new Array(f.value).fill({id:Ne.nanoid(10),colspan:1,rowspan:1,text:""}),O=new Array(N-L).fill(b),w=JSON.parse(JSON.stringify(T.data));w.push(...O),y({data:w})}else{const b=T.data.slice(0,N);y({data:b})}},x=N=>{const T=n.value,L=T.data[0].length;let b=T.data,O=T.colWidths.map(k=>k*T.width);if(N>L){b=b.map(B=>{const H=new Array(N-L).fill({id:Ne.nanoid(10),colspan:1,rowspan:1,text:""});return B.push(...H),B});const k=new Array(N-L).fill(100);O.push(...k)}else b=b.map(k=>k.slice(0,N)),O=O.slice(0,N);const w=O.reduce((k,B)=>k+B),C=O.map(k=>k/w);y({width:w,data:b,colWidths:C})};return(N,T)=>{const L=r.resolveComponent("AiPptFontSize"),b=r.resolveComponent("AiPptAddText"),O=r.resolveComponent("AiPptText"),w=r.resolveComponent("AiPptFill"),C=r.resolveComponent("AiPptTextBold"),P=r.resolveComponent("AiPptTextItalic"),k=r.resolveComponent("AiPptTextUnderline"),B=r.resolveComponent("AiPptStrikethrough"),H=r.resolveComponent("AiPptAlignTextLeft"),U=r.resolveComponent("AiPptAlignTextCenter"),$=r.resolveComponent("AiPptAlignTextRight"),V=r.resolveComponent("AiPptAlignTextBoth"),z=r.resolveComponent("AiPptMinus"),D=r.resolveComponent("AiPptPlus"),Y=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",vV,[r.createVNode(gv,{class:"row"},{default:r.withCtx(()=>[r.createVNode(st,{style:{width:"50%"},value:s.value.fontname,search:"",searchLabel:r.unref(h)("COMMON.SEARCH_FONT"),"onUpdate:value":T[0]||(T[0]=K=>_({fontname:K})),options:m.value},{icon:r.withCtx(()=>[r.createVNode(L)]),_:1},8,["value","searchLabel","options"]),r.createVNode(st,{style:{width:"50%"},value:s.value.fontsize,search:"",searchLabel:r.unref(h)("COMMON.SEARCH_FONT_SIZE"),"onUpdate:value":T[1]||(T[1]=K=>_({fontsize:K})),options:l.map(K=>({label:K,value:K}))},{icon:r.withCtx(()=>[r.createVNode(b)]),_:1},8,["value","searchLabel","options"])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",style:{width:"50%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:s.value.color,"onUpdate:modelValue":T[2]||(T[2]=K=>_({color:K}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{first:"",color:s.value.color},{default:r.withCtx(()=>[r.createVNode(O)]),_:1},8,["color"])),[[Y,r.unref(h)("RICH_TEXT.TEXT_COLOR")]])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"50%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:s.value.backcolor,"onUpdate:modelValue":T[3]||(T[3]=K=>_({backcolor:K}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{last:"",color:s.value.backcolor},{default:r.withCtx(()=>[r.createVNode(w)]),_:1},8,["color"])),[[Y,r.unref(h)("TABLE_STYLE.CELL_FILL")]])]),_:1})]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.bold,onClick:T[4]||(T[4]=K=>_({bold:!s.value.bold}))},{default:r.withCtx(()=>[r.createVNode(C)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.BOLD")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.em,onClick:T[5]||(T[5]=K=>_({em:!s.value.em}))},{default:r.withCtx(()=>[r.createVNode(P)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.ITALIC")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.underline,onClick:T[6]||(T[6]=K=>_({underline:!s.value.underline}))},{default:r.withCtx(()=>[r.createVNode(k)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.UNDERLINE")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.strikethrough,onClick:T[7]||(T[7]=K=>_({strikethrough:!s.value.strikethrough}))},{default:r.withCtx(()=>[r.createVNode(B)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.STRIKETHROUGH")]])]),_:1}),r.createVNode(lr,{class:"row","button-style":"solid",value:s.value.align,"onUpdate:value":T[8]||(T[8]=K=>_({align:K}))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"left",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(H)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"center",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(U)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_CENTER")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"right",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode($)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_RIGHT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"justify",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(V)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_JUSTIFY")]])]),_:1},8,["value"]),r.createVNode(Oe),r.createVNode(Ll,{fixed:!0}),r.createVNode(Oe),r.createElementVNode("div",hV,[r.createElementVNode("div",mV,r.toDisplayString(r.unref(h)("TABLE_STYLE.ROW_COUNT")),1),r.createElementVNode("div",gV,[r.createVNode(ue,{class:"btn",disabled:d.value<=1,onClick:T[9]||(T[9]=K=>A(d.value-1))},{default:r.withCtx(()=>[r.createVNode(z)]),_:1},8,["disabled"]),r.createElementVNode("div",EV,r.toDisplayString(d.value),1),r.createVNode(ue,{class:"btn",disabled:d.value>=30,onClick:T[10]||(T[10]=K=>A(d.value+1))},{default:r.withCtx(()=>[r.createVNode(D)]),_:1},8,["disabled"])])]),r.createElementVNode("div",yV,[r.createElementVNode("div",_V,r.toDisplayString(r.unref(h)("TABLE_STYLE.COL_COUNT")),1),r.createElementVNode("div",TV,[r.createVNode(ue,{class:"btn",disabled:f.value<=1,onClick:T[11]||(T[11]=K=>x(f.value-1))},{default:r.withCtx(()=>[r.createVNode(z)]),_:1},8,["disabled"]),r.createElementVNode("div",SV,r.toDisplayString(f.value),1),r.createVNode(ue,{class:"btn",disabled:f.value>=30,onClick:T[12]||(T[12]=K=>x(f.value+1))},{default:r.withCtx(()=>[r.createVNode(D)]),_:1},8,["disabled"])])]),r.createVNode(Oe),r.createElementVNode("div",IV,[r.createElementVNode("div",AV,r.toDisplayString(r.unref(h)("TABLE_STYLE.ENABLE_THEME")),1),r.createElementVNode("div",NV,[r.createVNode(Sn,{value:u.value,"onUpdate:value":T[13]||(T[13]=K=>I(K))},null,8,["value"])])]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",LV,[r.createVNode(_a,{"onUpdate:value":T[14]||(T[14]=K=>S({rowHeader:K})),value:c.value.rowHeader,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.HEADER_ROW")),1)]),_:1},8,["value"]),r.createVNode(_a,{"onUpdate:value":T[15]||(T[15]=K=>S({rowFooter:K})),value:c.value.rowFooter,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.FOOTER_ROW")),1)]),_:1},8,["value"])]),r.createElementVNode("div",CV,[r.createVNode(_a,{"onUpdate:value":T[16]||(T[16]=K=>S({colHeader:K})),value:c.value.colHeader,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.FIRST_COL")),1)]),_:1},8,["value"]),r.createVNode(_a,{"onUpdate:value":T[17]||(T[17]=K=>S({colFooter:K})),value:c.value.colFooter,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.LAST_COL")),1)]),_:1},8,["value"])]),r.createElementVNode("div",xV,[r.createElementVNode("div",bV,r.toDisplayString(r.unref(h)("TABLE_STYLE.THEME_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:c.value.color,"onUpdate:modelValue":T[18]||(T[18]=K=>S({color:K}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:c.value.color},null,8,["color"])]),_:1})])],64)):r.createCommentVNode("",!0)])}}},OV=ie(wV,[["__scopeId","data-v-0f6bcf63"]]),RV={class:"latex-style-panel"},kV={class:"row"},DV={class:"row"},PV={style:{width:"45%"}},MV={class:"row"},BV={style:{width:"45%"}},VV={__name:"LatexStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),o=n,a=r.ref(!1),{addHistorySnapshot:i}=be(),{t:l}=_e(),s=d=>{n.value&&(t.updateElement({id:n.value.id,props:d}),i())},c=d=>{s({path:d.path,latex:d.latex,width:d.w,height:d.h,viewBox:[d.w,d.h]})},u=()=>a.value=!0;return bt.on(Et.OPEN_LATEX_EDITOR,u),r.onUnmounted(()=>{bt.off(Et.OPEN_LATEX_EDITOR,u)}),(d,f)=>{const v=r.resolveComponent("AiPptEdit");return r.openBlock(),r.createElementBlock("div",RV,[r.createElementVNode("div",kV,[r.createVNode(ue,{style:{flex:"1"},onClick:f[0]||(f[0]=p=>a.value=!0)},{default:r.withCtx(()=>[r.createVNode(v),r.createTextVNode(" "+r.toDisplayString(r.unref(l)("LATEX_STYLE.EDIT")),1)]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",DV,[r.createElementVNode("div",PV,r.toDisplayString(r.unref(l)("LATEX_STYLE.COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).color,"onUpdate:modelValue":f[1]||(f[1]=p=>s({color:p}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(o).color},null,8,["color"])]),_:1})]),r.createElementVNode("div",MV,[r.createElementVNode("div",BV,r.toDisplayString(r.unref(l)("LATEX_STYLE.STROKE_WIDTH")),1),r.createVNode(Xt,{min:1,max:3,value:r.unref(o).strokeWidth,"onUpdate:value":f[2]||(f[2]=p=>s({strokeWidth:p})),style:{width:"60%"}},null,8,["value"])]),r.createVNode(Yr,{visible:a.value,"onUpdate:visible":f[5]||(f[5]=p=>a.value=p),width:880},{default:r.withCtx(()=>[r.createVNode(I_,{value:r.unref(o).latex,onClose:f[3]||(f[3]=p=>a.value=!1),onUpdate:f[4]||(f[4]=p=>{c(p),a.value=!1})},null,8,["value"])]),_:1},8,["visible"])])}}},$V=ie(VV,[["__scopeId","data-v-162e32ef"]]),FV={class:"video-style-panel"},HV={class:"title"},UV={class:"background-image-wrapper"},GV={class:"background-image"},zV={class:"row"},YV={class:"row switch-row"},XV={style:{width:"45%"}},WV={class:"switch-wrapper",style:{width:"60%"}},KV={__name:"VideoStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),o=n,{addHistorySnapshot:a}=be(),{t:i}=_e(),l=c=>{n.value&&(t.updateElement({id:n.value.id,props:c}),a())},s=c=>{const u=c[0];u&&Xr(u).then(d=>l({poster:d}))};return(c,u)=>{const d=r.resolveComponent("AiPptPlus"),f=r.resolveComponent("AiPptUndo");return r.openBlock(),r.createElementBlock("div",FV,[r.createElementVNode("div",HV,r.toDisplayString(r.unref(i)("VIDEO_STYLE.PREVIEW_COVER")),1),r.createElementVNode("div",UV,[r.createVNode(El,{onChange:u[0]||(u[0]=v=>s(v))},{default:r.withCtx(()=>[r.createElementVNode("div",GV,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundImage:r.unref(o).poster?`url(${r.unref(o).poster})`:""})},[r.createVNode(d)],4)])]),_:1})]),r.createElementVNode("div",zV,[r.createVNode(ue,{style:{flex:"1"},onClick:u[1]||(u[1]=v=>l({poster:""}))},{default:r.withCtx(()=>[r.createVNode(f),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("VIDEO_STYLE.RESET_COVER")),1)]),_:1})]),r.createElementVNode("div",YV,[r.createElementVNode("div",XV,r.toDisplayString(r.unref(i)("VIDEO_STYLE.AUTOPLAY")),1),r.createElementVNode("div",WV,[r.createVNode(Sn,{value:r.unref(o).autoplay,"onUpdate:value":u[2]||(u[2]=v=>l({autoplay:v}))},null,8,["value"])])])])}}},qV=ie(KV,[["__scopeId","data-v-a2c372b6"]]),ZV={class:"audio-style-panel"},jV={class:"row"},JV={style:{width:"45%"}},QV={class:"row switch-row"},e$={style:{width:"45%"}},t$={class:"switch-wrapper",style:{width:"60%"}},n$={class:"row switch-row"},r$={style:{width:"45%"}},o$={class:"switch-wrapper",style:{width:"60%"}},a$={__name:"AudioStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),o=n,{addHistorySnapshot:a}=be(),{t:i}=_e(),l=s=>{n.value&&(t.updateElement({id:n.value.id,props:s}),a())};return(s,c)=>(r.openBlock(),r.createElementBlock("div",ZV,[r.createElementVNode("div",jV,[r.createElementVNode("div",JV,r.toDisplayString(r.unref(i)("AUDIO_STYLE.ICON_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).color,"onUpdate:modelValue":c[0]||(c[0]=u=>l({color:u}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(o).color},null,8,["color"])]),_:1})]),r.createElementVNode("div",QV,[r.createElementVNode("div",e$,r.toDisplayString(r.unref(i)("AUDIO_STYLE.AUTOPLAY")),1),r.createElementVNode("div",t$,[r.createVNode(Sn,{value:r.unref(o).autoplay,"onUpdate:value":c[1]||(c[1]=u=>l({autoplay:u}))},null,8,["value"])])]),r.createElementVNode("div",n$,[r.createElementVNode("div",r$,r.toDisplayString(r.unref(i)("AUDIO_STYLE.LOOP")),1),r.createElementVNode("div",o$,[r.createVNode(Sn,{value:r.unref(o).loop,"onUpdate:value":c[2]||(c[2]=u=>l({loop:u}))},null,8,["value"])])])]))}},i$=ie(a$,[["__scopeId","data-v-635bc0af"]]),l$={class:"element-style-panel"},s$={__name:"index",setup(e){const t={[Ze.TEXT]:a9,[Ze.IMAGE]:B9,[Ze.SHAPE]:rB,[Ze.LINE]:_B,[Ze.CHART]:pV,[Ze.TABLE]:OV,[Ze.LATEX]:$V,[Ze.VIDEO]:qV,[Ze.AUDIO]:i$},{handleElement:n}=ne.storeToRefs(fe()),o=r.computed(()=>n.value&&t[n.value.type]||null);return(a,i)=>(r.openBlock(),r.createElementBlock("div",l$,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value)))]))}},c$={class:"element-positopn-panel"},u$={class:"title"},d$={class:"title"},f$={class:"row"},p$={key:0,class:"row"},v$={key:1,style:{width:"10%"}},h$={class:"row"},m$={__name:"ElementPositionPanel",setup(e){const t=pe(),{t:n}=_e(),{handleElement:o,handleElementId:a}=ne.storeToRefs(fe()),i=r.ref(0),l=r.ref(0),s=r.ref(0),c=r.ref(0),u=r.ref(0),d=r.ref(!1),f=r.computed(()=>o.value&&ig[o.value.type]||20),v=r.computed(()=>{var T;return((T=o.value)===null||T===void 0?void 0:T.type)==="text"&&!o.value.vertical}),p=r.computed(()=>{var T;return((T=o.value)===null||T===void 0?void 0:T.type)==="text"&&o.value.vertical});r.watch(o,()=>{o.value&&(i.value=Xe.round(o.value.left,1),l.value=Xe.round(o.value.top,1),d.value="fixedRatio"in o.value&&!!o.value.fixedRatio,o.value.type!=="line"&&(s.value=Xe.round(o.value.width,1),c.value=Xe.round(o.value.height,1),u.value="rotate"in o.value&&o.value.rotate!==void 0?Xe.round(o.value.rotate,1):0))},{deep:!0,immediate:!0});const{orderElement:h}=vc(),{alignElementToCanvas:m}=cp(),{addHistorySnapshot:g}=be(),E=T=>{const L={left:T};t.updateElement({id:a.value,props:L}),g()},y=T=>{const L={top:T};t.updateElement({id:a.value,props:L}),g()},_=(T,L)=>{if(o.value&&o.value.type==="shape"&&"pathFormula"in o.value&&o.value.pathFormula){const b=$o[o.value.pathFormula];let O="";return"editable"in b&&b.editable?O=b.formula(T,L,o.value.keypoints):O=b.formula(T,L),{viewBox:[T,L],path:O}}return null},S=T=>{if(!o.value||o.value.type==="line"||p.value)return;let L=c.value;if(d.value){const w=s.value/c.value;L=T/w<f.value?f.value:T/w}let b={width:T,height:L};const O=_(T,L);O&&(b={width:T,height:L,...O}),t.updateElement({id:a.value,props:b}),g()},I=T=>{if(!o.value||o.value.type==="line"||o.value.type==="table"||v.value)return;let L=s.value;if(d.value){const w=s.value/c.value;L=T*w<f.value?f.value:T*w}let b={width:L,height:T};const O=_(L,T);O&&(b={width:L,height:T,...O}),t.updateElement({id:a.value,props:b}),g()},A=T=>{const L={rotate:T};t.updateElement({id:a.value,props:L}),g()},x=T=>{const L={fixedRatio:T};t.updateElement({id:a.value,props:L}),g()},N=T=>{let L=Math.floor(u.value/45)*45;T==="+"?L=L+45:T==="-"&&(L=L-45),L<-180&&(L=-180),L>180&&(L=180);const b={rotate:L};t.updateElement({id:a.value,props:b}),g()};return(T,L)=>{const b=r.resolveComponent("AiPptSendToBack"),O=r.resolveComponent("AiPptBringToFrontOne"),w=r.resolveComponent("AiPptBringToFront"),C=r.resolveComponent("AiPptSentToBack"),P=r.resolveComponent("AiPptAlignLeft"),k=r.resolveComponent("AiPptAlignVertically"),B=r.resolveComponent("AiPptAlignRight"),H=r.resolveComponent("AiPptAlignTop"),U=r.resolveComponent("AiPptAlignHorizontally"),$=r.resolveComponent("AiPptAlignBottom"),V=r.resolveComponent("AiPptLock"),z=r.resolveComponent("AiPptUnlock"),D=r.resolveComponent("AiPptRotate"),Y=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",c$,[r.createElementVNode("div",u$,r.toDisplayString(r.unref(n)("POSITION_PANEL.LAYER")),1),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{style:{flex:"1"},onClick:L[0]||(L[0]=K=>r.unref(h)(r.unref(o),r.unref(ft).TOP))},{default:r.withCtx(()=>[r.createVNode(b),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.BRING_TO_FRONT")),1)]),_:1}),r.createVNode(ue,{style:{flex:"1"},onClick:L[1]||(L[1]=K=>r.unref(h)(r.unref(o),r.unref(ft).BOTTOM))},{default:r.withCtx(()=>[r.createVNode(O),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.SEND_TO_BACK")),1)]),_:1})]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{style:{flex:"1"},onClick:L[2]||(L[2]=K=>r.unref(h)(r.unref(o),r.unref(ft).UP))},{default:r.withCtx(()=>[r.createVNode(w),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.MOVE_UP")),1)]),_:1}),r.createVNode(ue,{style:{flex:"1"},onClick:L[3]||(L[3]=K=>r.unref(h)(r.unref(o),r.unref(ft).DOWN))},{default:r.withCtx(()=>[r.createVNode(C),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.MOVE_DOWN")),1)]),_:1})]),_:1}),r.createVNode(Oe),r.createElementVNode("div",d$,r.toDisplayString(r.unref(n)("POSITION_PANEL.ALIGN")),1),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[4]||(L[4]=K=>r.unref(m)(r.unref(Ve).LEFT))},{default:r.withCtx(()=>[r.createVNode(P)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[5]||(L[5]=K=>r.unref(m)(r.unref(Ve).HORIZONTAL))},{default:r.withCtx(()=>[r.createVNode(k)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_CENTER_HORIZONTAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[6]||(L[6]=K=>r.unref(m)(r.unref(Ve).RIGHT))},{default:r.withCtx(()=>[r.createVNode(B)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_RIGHT")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[7]||(L[7]=K=>r.unref(m)(r.unref(Ve).TOP))},{default:r.withCtx(()=>[r.createVNode(H)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_TOP")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[8]||(L[8]=K=>r.unref(m)(r.unref(Ve).VERTICAL))},{default:r.withCtx(()=>[r.createVNode(U)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_CENTER_VERTICAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[9]||(L[9]=K=>r.unref(m)(r.unref(Ve).BOTTOM))},{default:r.withCtx(()=>[r.createVNode($)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_BOTTOM")]])]),_:1}),r.createVNode(Oe),r.createElementVNode("div",f$,[r.createVNode(Xt,{min:-1e3,step:5,value:i.value,"onUpdate:value":L[10]||(L[10]=K=>E(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.HORIZONTAL")),1)]),_:1},8,["value"]),L[19]||(L[19]=r.createElementVNode("div",{style:{width:"10%"}},null,-1)),r.createVNode(Xt,{min:-1e3,step:5,value:l.value,"onUpdate:value":L[11]||(L[11]=K=>y(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.VERTICAL")),1)]),_:1},8,["value"])]),r.unref(o)?.type!=="line"?(r.openBlock(),r.createElementBlock("div",p$,[r.createVNode(Xt,{min:f.value,max:1500,step:5,disabled:p.value,value:s.value,"onUpdate:value":L[12]||(L[12]=K=>S(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.WIDTH")),1)]),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes(r.unref(o)?.type)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[d.value?r.withDirectives((r.openBlock(),r.createBlock(V,{key:0,style:{width:"10%"},class:"icon-btn active",onClick:L[13]||(L[13]=K=>x(!1))},null,512)),[[Y,r.unref(n)("POSITION_PANEL.UNLOCK_RATIO")]]):r.withDirectives((r.openBlock(),r.createBlock(z,{key:1,style:{width:"10%"},class:"icon-btn",onClick:L[14]||(L[14]=K=>x(!0))},null,512)),[[Y,r.unref(n)("POSITION_PANEL.LOCK_RATIO")]])],64)):(r.openBlock(),r.createElementBlock("div",v$)),r.createVNode(Xt,{min:f.value,max:800,step:5,disabled:v.value||r.unref(o)?.type==="table",value:c.value,"onUpdate:value":L[15]||(L[15]=K=>I(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.HEIGHT")),1)]),_:1},8,["min","disabled","value"])])):r.createCommentVNode("",!0),["line","video","audio"].includes(r.unref(o)?.type)?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Oe),r.createElementVNode("div",h$,[r.createVNode(Xt,{min:-180,max:180,step:5,value:u.value,"onUpdate:value":L[16]||(L[16]=K=>A(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.ROTATE")),1)]),_:1},8,["value"]),L[22]||(L[22]=r.createElementVNode("div",{style:{width:"7%"}},null,-1)),r.createElementVNode("div",{class:"text-btn",onClick:L[17]||(L[17]=K=>N("-")),style:{width:"24%"}},[r.createVNode(D),L[20]||(L[20]=r.createTextVNode(" -45° ",-1))]),r.createElementVNode("div",{class:"text-btn",onClick:L[18]||(L[18]=K=>N("+")),style:{width:"24%"}},[r.createVNode(D,{style:{transform:"rotateY(180deg)"}}),L[21]||(L[21]=r.createTextVNode(" +45° ",-1))])])],64))])}}},g$=ie(m$,[["__scopeId","data-v-74cd5bc0"]]),Nd=1e3,E$="click",la="animate__",E1=[{type:"bounce",name:"弹跳",nameKey:"ANIMATION.ENTER.BOUNCE",children:[{name:"弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN",value:"bounceIn"},{name:"向右弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_LEFT",value:"bounceInLeft"},{name:"向左弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_RIGHT",value:"bounceInRight"},{name:"向上弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_UP",value:"bounceInUp"},{name:"向下弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_DOWN",value:"bounceInDown"}]},{type:"fade",name:"浮现",nameKey:"ANIMATION.ENTER.FADE",children:[{name:"浮入",nameKey:"ANIMATION.ENTER.FADE_IN",value:"fadeIn"},{name:"向下浮入",nameKey:"ANIMATION.ENTER.FADE_IN_DOWN",value:"fadeInDown"},{name:"向下长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_DOWN_BIG",value:"fadeInDownBig"},{name:"向右浮入",nameKey:"ANIMATION.ENTER.FADE_IN_LEFT",value:"fadeInLeft"},{name:"向右长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_LEFT_BIG",value:"fadeInLeftBig"},{name:"向左浮入",nameKey:"ANIMATION.ENTER.FADE_IN_RIGHT",value:"fadeInRight"},{name:"向左长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_RIGHT_BIG",value:"fadeInRightBig"},{name:"向上浮入",nameKey:"ANIMATION.ENTER.FADE_IN_UP",value:"fadeInUp"},{name:"向上长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_UP_BIG",value:"fadeInUpBig"},{name:"从左上浮入",nameKey:"ANIMATION.ENTER.FADE_IN_TOP_LEFT",value:"fadeInTopLeft"},{name:"从右上浮入",nameKey:"ANIMATION.ENTER.FADE_IN_TOP_RIGHT",value:"fadeInTopRight"},{name:"从左下浮入",nameKey:"ANIMATION.ENTER.FADE_IN_BOTTOM_LEFT",value:"fadeInBottomLeft"},{name:"从右下浮入",nameKey:"ANIMATION.ENTER.FADE_IN_BOTTOM_RIGHT",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",nameKey:"ANIMATION.ENTER.ROTATE",children:[{name:"旋转进入",nameKey:"ANIMATION.ENTER.ROTATE_IN",value:"rotateIn"},{name:"绕左下进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_DOWN_LEFT",value:"rotateInDownLeft"},{name:"绕右下进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_DOWN_RIGHT",value:"rotateInDownRight"},{name:"绕左上进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_UP_LEFT",value:"rotateInUpLeft"},{name:"绕右上进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_UP_RIGHT",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",nameKey:"ANIMATION.ENTER.ZOOM",children:[{name:"放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN",value:"zoomIn"},{name:"向下放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_DOWN",value:"zoomInDown"},{name:"从左放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_LEFT",value:"zoomInLeft"},{name:"从右放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_RIGHT",value:"zoomInRight"},{name:"向上放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_UP",value:"zoomInUp"}]},{type:"slide",name:"滑入",nameKey:"ANIMATION.ENTER.SLIDE",children:[{name:"向下滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_DOWN",value:"slideInDown"},{name:"从右滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_LEFT",value:"slideInLeft"},{name:"从左滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_RIGHT",value:"slideInRight"},{name:"向上滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_UP",value:"slideInUp"}]},{type:"flip",name:"翻转",nameKey:"ANIMATION.ENTER.FLIP",children:[{name:"X轴翻转进入",nameKey:"ANIMATION.ENTER.FLIP_IN_X",value:"flipInX"},{name:"Y轴翻转进入",nameKey:"ANIMATION.ENTER.FLIP_IN_Y",value:"flipInY"}]},{type:"back",name:"放大滑入",nameKey:"ANIMATION.ENTER.BACK",children:[{name:"向下放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_DOWN",value:"backInDown"},{name:"从左放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_LEFT",value:"backInLeft"},{name:"从右放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_RIGHT",value:"backInRight"},{name:"向上放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_UP",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",nameKey:"ANIMATION.ENTER.LIGHT_SPEED",children:[{name:"从右飞入",nameKey:"ANIMATION.ENTER.LIGHT_SPEED_IN_RIGHT",value:"lightSpeedInRight"},{name:"从左飞入",nameKey:"ANIMATION.ENTER.LIGHT_SPEED_IN_LEFT",value:"lightSpeedInLeft"}]}],y1=[{type:"bounce",name:"弹跳",nameKey:"ANIMATION.EXIT.BOUNCE",children:[{name:"弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT",value:"bounceOut"},{name:"向左弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_LEFT",value:"bounceOutLeft"},{name:"向右弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_RIGHT",value:"bounceOutRight"},{name:"向上弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_UP",value:"bounceOutUp"},{name:"向下弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_DOWN",value:"bounceOutDown"}]},{type:"fade",name:"浮现",nameKey:"ANIMATION.EXIT.FADE",children:[{name:"浮出",nameKey:"ANIMATION.EXIT.FADE_OUT",value:"fadeOut"},{name:"向下浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_DOWN",value:"fadeOutDown"},{name:"向下长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_DOWN_BIG",value:"fadeOutDownBig"},{name:"向左浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_LEFT",value:"fadeOutLeft"},{name:"向左长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_LEFT_BIG",value:"fadeOutLeftBig"},{name:"向右浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_RIGHT",value:"fadeOutRight"},{name:"向右长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_RIGHT_BIG",value:"fadeOutRightBig"},{name:"向上浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_UP",value:"fadeOutUp"},{name:"向上长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_UP_BIG",value:"fadeOutUpBig"},{name:"从左上浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_TOP_LEFT",value:"fadeOutTopLeft"},{name:"从右上浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_TOP_RIGHT",value:"fadeOutTopRight"},{name:"从左下浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_BOTTOM_LEFT",value:"fadeOutBottomLeft"},{name:"从右下浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_BOTTOM_RIGHT",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",nameKey:"ANIMATION.EXIT.ROTATE",children:[{name:"旋转退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT",value:"rotateOut"},{name:"绕左下退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_DOWN_LEFT",value:"rotateOutDownLeft"},{name:"绕右下退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_DOWN_RIGHT",value:"rotateOutDownRight"},{name:"绕左上退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_UP_LEFT",value:"rotateOutUpLeft"},{name:"绕右上退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_UP_RIGHT",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",nameKey:"ANIMATION.EXIT.ZOOM",children:[{name:"缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT",value:"zoomOut"},{name:"向下缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_DOWN",value:"zoomOutDown"},{name:"从左缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_LEFT",value:"zoomOutLeft"},{name:"从右缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_RIGHT",value:"zoomOutRight"},{name:"向上缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_UP",value:"zoomOutUp"}]},{type:"slide",name:"滑出",nameKey:"ANIMATION.EXIT.SLIDE",children:[{name:"向下滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_DOWN",value:"slideOutDown"},{name:"从左滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_LEFT",value:"slideOutLeft"},{name:"从右滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_RIGHT",value:"slideOutRight"},{name:"向上滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_UP",value:"slideOutUp"}]},{type:"flip",name:"翻转",nameKey:"ANIMATION.EXIT.FLIP",children:[{name:"X轴翻转退出",nameKey:"ANIMATION.EXIT.FLIP_OUT_X",value:"flipOutX"},{name:"Y轴翻转退出",nameKey:"ANIMATION.EXIT.FLIP_OUT_Y",value:"flipOutY"}]},{type:"back",name:"缩小滑出",nameKey:"ANIMATION.EXIT.BACK",children:[{name:"向下缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_DOWN",value:"backOutDown"},{name:"从左缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_LEFT",value:"backOutLeft"},{name:"从右缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_RIGHT",value:"backOutRight"},{name:"向上缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_UP",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",nameKey:"ANIMATION.EXIT.LIGHT_SPEED",children:[{name:"从右飞出",nameKey:"ANIMATION.EXIT.LIGHT_SPEED_OUT_RIGHT",value:"lightSpeedOutRight"},{name:"从左飞出",nameKey:"ANIMATION.EXIT.LIGHT_SPEED_OUT_LEFT",value:"lightSpeedOutLeft"}]}],_1=[{type:"shake",name:"晃动",nameKey:"ANIMATION.ATTENTION.SHAKE",children:[{name:"左右摇晃",nameKey:"ANIMATION.ATTENTION.SHAKE_X",value:"shakeX"},{name:"上下摇晃",nameKey:"ANIMATION.ATTENTION.SHAKE_Y",value:"shakeY"},{name:"摇头",nameKey:"ANIMATION.ATTENTION.HEAD_SHAKE",value:"headShake"},{name:"摆动",nameKey:"ANIMATION.ATTENTION.SWING",value:"swing"},{name:"晃动",nameKey:"ANIMATION.ATTENTION.WOBBLE",value:"wobble"},{name:"惊恐",nameKey:"ANIMATION.ATTENTION.TADA",value:"tada"},{name:"果冻",nameKey:"ANIMATION.ATTENTION.JELLO",value:"jello"}]},{type:"other",name:"其他",nameKey:"ANIMATION.ATTENTION.OTHER",children:[{name:"弹跳",nameKey:"ANIMATION.ATTENTION.BOUNCE",value:"bounce"},{name:"闪烁",nameKey:"ANIMATION.ATTENTION.FLASH",value:"flash"},{name:"脉搏",nameKey:"ANIMATION.ATTENTION.PULSE",value:"pulse"},{name:"橡皮筋",nameKey:"ANIMATION.ATTENTION.RUBBER_BAND",value:"rubberBand"},{name:"心跳(快)",nameKey:"ANIMATION.ATTENTION.HEART_BEAT",value:"heartBeat"}]}],y$=[{label:"无",labelKey:"ANIMATION.SLIDE.NO",value:"no"},{label:"随机",labelKey:"ANIMATION.SLIDE.RANDOM",value:"random"},{label:"左右推移",labelKey:"ANIMATION.SLIDE.SLIDE_X",value:"slideX"},{label:"上下推移",labelKey:"ANIMATION.SLIDE.SLIDE_Y",value:"slideY"},{label:"左右推移(3D)",labelKey:"ANIMATION.SLIDE.SLIDE_X_3D",value:"slideX3D"},{label:"上下推移(3D)",labelKey:"ANIMATION.SLIDE.SLIDE_Y_3D",value:"slideY3D"},{label:"淡入淡出",labelKey:"ANIMATION.SLIDE.FADE",value:"fade"},{label:"旋转",labelKey:"ANIMATION.SLIDE.ROTATE",value:"rotate"},{label:"上下展开",labelKey:"ANIMATION.SLIDE.SCALE_Y",value:"scaleY"},{label:"左右展开",labelKey:"ANIMATION.SLIDE.SCALE_X",value:"scaleX"},{label:"放大",labelKey:"ANIMATION.SLIDE.SCALE",value:"scale"},{label:"缩小",labelKey:"ANIMATION.SLIDE.SCALE_REVERSE",value:"scaleReverse"}],_$={class:"element-animation-panel"},T$={key:0,class:"element-animation"},S$={class:"type-title"},I$={class:"pool-item-wrapper"},A$=["onMouseenter","onClick"],N$={key:0,class:"mask"},L$={key:1,class:"tip"},C$={class:"sequence-content"},x$={class:"index"},b$={class:"text"},w$={class:"handler"},O$={key:0,class:"configs"},R$={class:"config-item"},k$={style:{width:"35%"}},D$={class:"config-item"},P$={style:{width:"35%"}},M$={class:"config-item"},B$={__name:"ElementAnimationPanel",setup(e){const t=["in","out","attention"],n=pe(),{handleElement:o,handleElementId:a}=ne.storeToRefs(fe()),{currentSlide:i,formatedAnimations:l,currentSlideAnimations:s}=ne.storeToRefs(n),{t:c}=_e(),u=k=>c(k.nameKey||k.name),d={};for(const k of E1)for(const B of k.children)d[B.value]=u(B);for(const k of y1)for(const B of k.children)d[B.value]=u(B);for(const k of _1)for(const B of k.children)d[B.value]=u(B);const f=[{key:"in",label:c("ELEMENT_ANIMATION.TAB_IN"),color:"#68a490"},{key:"out",label:c("ELEMENT_ANIMATION.TAB_OUT"),color:"#d86344"},{key:"attention",label:c("ELEMENT_ANIMATION.TAB_ATTENTION"),color:"#e8b76a"}],v=r.ref("in"),p=r.ref(!1);r.watch(()=>a.value,()=>{m.value=!1});const h=r.ref(""),m=r.ref(!1),{addHistorySnapshot:g}=be(),E=r.computed(()=>{const k=[];for(let B=0;B<l.value.length;B++){const H=l.value[B];for(let U=0;U<H.animations.length;U++){const $=H.animations[U],V=i.value.elements.find(Y=>Y.id===$.elId);if(!V)continue;const z=Li(c,V.type),D=d[$.effect];k.push({...$,index:U===0?B+1:"",elType:z,animationEffect:D})}}return k}),y=r.computed(()=>s.value.filter(H=>H.elId===a.value)||[]),_=k=>{const B=s.value.filter(H=>H.id!==k);n.updateSlide({animations:B}),g()},S=k=>{const{newIndex:B,oldIndex:H}=k;if(B===void 0||H===void 0||B===H)return;const U=JSON.parse(JSON.stringify(s.value)),$=U[H];U.splice(H,1),U.splice(B,0,$),n.updateSlide({animations:U}),g()},I=(k,B,H)=>{const U=document.querySelector(`#editable-element-${k} [class^=editable-element-]`);if(U){const $=`${la}${B}`;document.documentElement.style.setProperty("--animate-duration",`${H}ms`),U.classList.add(`${la}animated`,$);const V=()=>{document.documentElement.style.removeProperty("--animate-duration"),U.classList.remove(`${la}animated`,$)};U.addEventListener("animationend",V,{once:!0})}},A=async()=>{p.value=!p.value;for(let k=0;k<E.value.length&&p.value;k++){const B=E.value[k];B.index!==1&&B.trigger!=="meantime"&&await new Promise(H=>setTimeout(H,B.duration+100)),I(B.elId,B.effect,B.duration),k>=E.value.length-1&&(p.value=!1)}},x=(k,B)=>{if(B<100||B>5e3)return;const H=s.value.map(U=>U.id===k?{...U,duration:B}:U);n.updateSlide({animations:H}),g()},N=(k,B)=>{const H=s.value.map(U=>U.id===k?{...U,trigger:B}:U);n.updateSlide({animations:H}),g()},T=(k,B)=>{const H=s.value.map(V=>V.id===L.value?{...V,type:k,effect:B}:V);n.updateSlide({animations:H}),m.value=!1,g();const U=s.value.find(V=>V.elId===a.value),$=U?.duration||Nd;setTimeout(()=>{I(a.value,B,$)},0)},L=r.ref(""),b=(k,B)=>{if(L.value){T(k,B);return}const H=JSON.parse(JSON.stringify(s.value));H.push({id:Ne.nanoid(10),elId:a.value,type:k,effect:B,duration:Nd,trigger:E$}),n.updateSlide({animations:H}),m.value=!1,g(),setTimeout(()=>{I(a.value,B,Nd)},0)},O=r.ref(!1),w=k=>{k?setTimeout(()=>O.value=!0,600):O.value=!1},C=k=>{m.value=!0,L.value=k,w(!0)},P={in:E1,out:y1,attention:_1};return(k,B)=>{const H=r.resolveComponent("AiPptEffects"),U=r.resolveComponent("AiPptClick"),$=r.resolveComponent("AiPptPlayOne"),V=r.resolveComponent("AiPptCloseSmall"),z=r.resolveComponent("AiPptSwitch"),D=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",_$,[r.unref(o)?(r.openBlock(),r.createElementBlock("div",T$,[r.createVNode(Se,{trigger:"click",value:m.value,"onUpdate:value":[B[3]||(B[3]=Y=>m.value=Y),B[4]||(B[4]=Y=>w(Y))],style:{width:"100%"}},{content:r.withCtx(()=>[r.createVNode(qn,{tabs:f,value:v.value,"onUpdate:value":B[0]||(B[0]=Y=>v.value=Y),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(t,Y=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[v.value===Y?(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["animation-pool",Y]),key:Y},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(P[Y],K=>(r.openBlock(),r.createElementBlock("div",{class:"pool-type",key:K.name},[r.createElementVNode("div",S$,r.toDisplayString(u(K))+":",1),r.createElementVNode("div",I$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(K.children,Z=>(r.openBlock(),r.createElementBlock("div",{class:"pool-item",key:Z.name,onMouseenter:oe=>h.value=Z.value,onMouseleave:B[1]||(B[1]=oe=>h.value=""),onClick:oe=>b(Y,Z.value)},[r.createElementVNode("div",{class:r.normalizeClass(["animation-box",[`${r.unref(la)}animated`,`${r.unref(la)}fast`,h.value===Z.value&&`${r.unref(la)}${Z.value}`]])},r.toDisplayString(u(Z)),3)],40,A$))),128))])]))),128)),O.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",N$))],2)):r.createCommentVNode("",!0)],64))),64))]),default:r.withCtx(()=>[r.createVNode(ue,{class:"element-animation-btn",onClick:B[2]||(B[2]=Y=>L.value="")},{default:r.withCtx(()=>[r.createVNode(H),r.createTextVNode(" "+r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.ADD")),1)]),_:1})]),_:1},8,["value"])])):(r.openBlock(),r.createElementBlock("div",L$,[r.createVNode(U,{style:{"margin-right":"5px"}}),r.createTextVNode(" "+r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.TIP_SELECT")),1)])),r.createVNode(Oe),r.createVNode(r.unref(Jf),{class:"animation-sequence",modelValue:E.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:S},{item:r.withCtx(({element:Y})=>[r.createElementVNode("div",{class:r.normalizeClass(["sequence-item",[Y.type,{active:r.unref(o)?.id===Y.elId}]])},[r.createElementVNode("div",C$,[r.createElementVNode("div",x$,r.toDisplayString(Y.index),1),r.createElementVNode("div",b$,"【"+r.toDisplayString(Y.elType)+"】"+r.toDisplayString(Y.animationEffect),1),r.createElementVNode("div",w$,[r.withDirectives(r.createVNode($,{class:"handler-btn",onClick:K=>I(Y.elId,Y.effect,Y.duration)},null,8,["onClick"]),[[D,r.unref(c)("COMMON.PREVIEW")]]),r.withDirectives(r.createVNode(V,{class:"handler-btn",onClick:K=>_(Y.id)},null,8,["onClick"]),[[D,r.unref(c)("COMMON.DELETE")]])])]),y.value[0]?.elId===Y.elId?(r.openBlock(),r.createElementBlock("div",O$,[r.createVNode(Oe,{margin:16}),r.createElementVNode("div",R$,[r.createElementVNode("div",k$,r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.DURATION")),1),r.createVNode(Xt,{min:500,max:3e3,step:500,value:Y.duration,"onUpdate:value":K=>x(Y.id,K),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),r.createElementVNode("div",D$,[r.createElementVNode("div",P$,r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.TRIGGER")),1),r.createVNode(st,{value:Y.trigger,"onUpdate:value":K=>N(Y.id,K),style:{width:"65%"},options:[{label:r.unref(c)("ELEMENT_ANIMATION.TRIGGER_CLICK"),value:"click"},{label:r.unref(c)("ELEMENT_ANIMATION.TRIGGER_WITH_PREVIOUS"),value:"meantime"},{label:r.unref(c)("ELEMENT_ANIMATION.TRIGGER_AFTER_PREVIOUS"),value:"auto"}]},null,8,["value","onUpdate:value","options"])]),r.createElementVNode("div",M$,[r.createVNode(ue,{style:{width:"100%"},onClick:K=>C(Y.id)},{default:r.withCtx(()=>[r.createVNode(z),r.createTextVNode(" "+r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.CHANGE")),1)]),_:1},8,["onClick"])])])):r.createCommentVNode("",!0)],2)]),_:1},8,["modelValue"]),E.value.length>=2?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(Oe),r.createVNode(ue,{onClick:B[5]||(B[5]=Y=>A())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p.value?r.unref(c)("ELEMENT_ANIMATION.STOP_PREVIEW"):r.unref(c)("ELEMENT_ANIMATION.PREVIEW_ALL")),1)]),_:1})],64)):r.createCommentVNode("",!0)])}}},V$=ie(B$,[["__scopeId","data-v-25a63f5c"]]),$$=[{background:"#ffffff",fontColor:"#333333",borderColor:"#41719c",fontname:"",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#5f6f1c",fontname:"",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#a75f0a",fontname:"",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#7c91a8",fontname:"",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#688e19",fontname:"",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#4495b0",fontname:"",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",borderColor:"#782009",fontname:"",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",borderColor:"#800c0b",fontname:"",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",borderColor:"#830949",fontname:"",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",borderColor:"#032e45",fontname:"",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",borderColor:"#2d7f8a",fontname:"",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",borderColor:"#7d2b8d",fontname:"",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",borderColor:"#b68317",fontname:"",colors:["#a5644e","#b58b80","#c3986d","#a19574","#c17529","#826277"]},{background:"#333333",fontColor:"#ffffff",borderColor:"#7c91a8",fontname:"",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#2b2b2d",fontColor:"#ffffff",borderColor:"#893011",fontname:"",colors:["#bc451b","#d3ba68","#bb8640","#ad9277","#a55a43","#ad9d7b"]},{background:"#171b1e",fontColor:"#ffffff",borderColor:"#505050",fontname:"",colors:["#6f6f6f","#bfbfa5","#dbd084","#e7bf5f","#e9a039","#cf7133"]}],b_=()=>{const e=pe(),{slides:t,theme:n}=ne.storeToRefs(e),{addHistorySnapshot:o}=be(),a=d=>{var f,v,p,h,m,g,E,y,_;const S=Array.isArray(d)?d:[d],I=[],A=[],x=[],N=[];for(const w of S){if(w.background)if(w.background.type==="solid"&&w.background.color)I.push({area:1,value:w.background.color});else if(w.background.type==="gradient"&&w.background.gradient){const C=w.background.gradient.colors.length;I.push(...w.background.gradient.colors.map(P=>({area:1/C,value:P.color})))}else I.push({area:1,value:n.value.backgroundColor});for(const C of w.elements){const P=C.width;let k=0;if(C.type==="line"){const[H,U]=C.start,[$,V]=C.end;k=Math.sqrt(Math.pow(Math.abs(H-$),2)+Math.pow(Math.abs(U-V),2))}else k=C.height;const B=P*k;if(C.type==="shape"||C.type==="text"){if(C.fill&&A.push({area:B,value:C.fill}),C.type==="shape"&&C.gradient){const Y=C.gradient.colors.length;A.push(...C.gradient.colors.map(K=>({area:1/Y*B,value:K.color})))}const H=(C.type==="shape"?(f=C.text)===null||f===void 0?void 0:f.content:C.content)||"";if(!H)continue;const U=H.replace(/<[^>]+>/g,"").replace(/\s*/g,""),$=H.match(/<[^>]+color: .+?<\/.+?>/g),V=H.match(/<[^>]+font-family: .+?<\/.+?>/g);let z=1,D=1;if($)for(const Y of $){const K=Y.match(/color: (.+?);/);if(!K)continue;const Z=Y.replace(/<[^>]+>/g,"").replace(/\s*/g,""),oe=K[1],Q=Z.length/U.length;z=z-Q,x.push({area:B*Q,value:oe})}if(V)for(const Y of V){const K=Y.match(/font-family: (.+?);/);if(!K)continue;const Z=Y.replace(/<[^>]+>/g,"").replace(/\s*/g,""),oe=K[1],Q=Z.length/U.length;D=D-Q,N.push({area:B*Q,value:oe})}if(z){const K=(C.type==="shape"?(v=C.text)===null||v===void 0?void 0:v.defaultColor:C.defaultColor)||n.value.fontColor;x.push({area:B*z,value:K})}if(D){const K=(C.type==="shape"?(p=C.text)===null||p===void 0?void 0:p.defaultFontName:C.defaultFontName)||n.value.fontName;N.push({area:B*D,value:K})}}else if(C.type==="table"){const H=C.data.length*C.data[0].length;let U=0;for(const $ of C.data)for(const V of $)if(!((h=V.style)===null||h===void 0)&&h.backcolor&&(U+=1,A.push({area:B/H,value:(m=V.style)===null||m===void 0?void 0:m.backcolor})),V.text){const z=V.text.length>=10?1:V.text.length/10;!((g=V.style)===null||g===void 0)&&g.color&&x.push({area:B/H*z,value:(E=V.style)===null||E===void 0?void 0:E.color}),!((y=V.style)===null||y===void 0)&&y.fontname&&x.push({area:B/H*z,value:(_=V.style)===null||_===void 0?void 0:_.fontname})}if(C.theme){const $=1-U/H;A.push({area:B*$,value:C.theme.color})}}else if(C.type==="chart"){C.fill&&A.push({area:B*.6,value:C.fill}),C.themeColors[0]&&A.push({area:B*.3,value:C.themeColors[0]});for(const H of C.themeColors)we(H).getAlpha()!==0&&A.push({area:B/C.themeColors.length*.1,value:H})}else C.type==="line"?A.push({area:B,value:C.color}):C.type==="audio"?A.push({area:B,value:C.color}):C.type==="latex"&&x.push({area:B,value:C.color})}}const T={};for(const w of I){const C=we(w.value).toRgbString();C!=="rgba(0, 0, 0, 0)"&&(T[C]?T[C]+=w.area:T[C]=w.area)}const L={};for(const w of A){const C=we(w.value).toRgbString();C!=="rgba(0, 0, 0, 0)"&&(L[C]?L[C]+=w.area:L[C]=w.area)}const b={};for(const w of x){const C=we(w.value).toRgbString();C!=="rgba(0, 0, 0, 0)"&&(b[C]?b[C]+=w.area:b[C]=w.area)}const O={};for(const w of N)O[w.value]?O[w.value]+=w.area:O[w.value]=w.area;return{backgroundColors:Object.keys(T).sort((w,C)=>T[C]-T[w]),themeColors:Object.keys(L).sort((w,C)=>L[C]-L[w]),fontColors:Object.keys(b).sort((w,C)=>b[C]-b[w]),fontNames:Object.keys(O).sort((w,C)=>O[C]-O[w])}},i=d=>{const f={},v=(h,m)=>{const g=we(h).setAlpha(1).toRgbString();f[g]?f[g]=f[g]+m:f[g]=m};for(const h of d.elements){const m=h.width,g=h.type==="line"?xT(h):h.height,E=m*g;if(h.type==="shape"&&we(h.fill).getAlpha()!==0&&v(h.fill,E),h.type==="text"&&h.fill&&we(h.fill).getAlpha()!==0&&v(h.fill,E),h.type==="image"&&h.colorMask&&we(h.colorMask).getAlpha()!==0&&v(h.colorMask,E),h.type==="table"&&h.theme&&we(h.theme.color).getAlpha()!==0&&v(h.theme.color,E),h.type==="chart"){for(const y of h.themeColors)we(y).getAlpha()!==0&&v(y,E/h.themeColors.length*.1);h.themeColors[0]&&we(h.themeColors[0]).getAlpha()!==0&&v(h.themeColors[0],E*.3),h.fill&&we(h.fill).getAlpha()!==0&&v(h.fill,E*.6)}h.type==="line"&&we(h.color).getAlpha()!==0&&v(h.color,E),h.type==="audio"&&we(h.color).getAlpha()!==0&&v(h.color,E)}return Object.keys(f).sort((h,m)=>f[m]-f[h])},l=(d,f)=>{const v=[...f],p=i(d),h={};if(p.length>v.length){const g=we(v[0]).analogous(p.length-v.length+10).map(E=>E.toHexString()).slice(1);v.push(...g)}for(let m=0;m<p.length;m++)h[p[m]]=v[m];return h},s=(d,f)=>{const v=l(d,f.colors),p=h=>{const m=we(h).getAlpha(),g=v[we(h).setAlpha(1).toRgbString()];return g?we(g).setAlpha(m).toRgbString():h};(!d.background||d.background.type!=="image")&&(d.background={type:"solid",color:f.background});for(const h of d.elements){if(h.type==="shape"&&(h.fill&&(h.fill=p(h.fill)),h.gradient&&delete h.gradient,h.text&&(h.text.defaultColor=f.fontColor,h.text.defaultFontName=f.fontname,h.text.content&&(h.text.content=h.text.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,"")))),h.type==="text"&&(h.fill&&(h.fill=p(h.fill)),h.defaultColor=f.fontColor,h.defaultFontName=f.fontname,h.content&&(h.content=h.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,""))),h.type==="image"&&h.colorMask&&(h.colorMask=p(h.colorMask)),h.type==="table"){h.theme&&(h.theme.color=p(h.theme.color));for(const m of h.data)for(const g of m)g.style&&(g.style.color=f.fontColor,g.style.fontname=f.fontname)}h.type==="chart"&&(h.themeColors=[...f.colors],h.textColor=f.fontColor),h.type==="line"&&(h.color=p(h.color)),h.type==="audio"&&(h.color=p(h.color)),h.type==="latex"&&(h.color=f.fontColor),"outline"in h&&h.outline&&(f.outline&&(h.outline={...f.outline}),f.borderColor&&(h.outline.color=f.borderColor)),"shadow"in h&&h.shadow&&f.shadow&&(h.shadow=f.shadow)}};return{getSlidesThemeStyles:a,applyPresetTheme:(d,f=!1)=>{if(e.setTheme({backgroundColor:d.background,themeColors:d.colors,fontColor:d.fontColor,outline:{width:2,style:"solid",color:d.borderColor},fontName:d.fontname}),f){const v=JSON.parse(JSON.stringify(t.value));for(const p of v)s(p,d);e.setSlides(v),o()}},applyThemeToAllSlides:(d=!1)=>{const f=JSON.parse(JSON.stringify(t.value)),v={background:n.value.backgroundColor,fontColor:n.value.fontColor,borderColor:d?n.value.outline.color:void 0,fontname:n.value.fontName,colors:n.value.themeColors,outline:d?n.value.outline:void 0,shadow:d?n.value.shadow:void 0};for(const p of f)s(p,v);e.setSlides(f),o()}}},F$={class:"theme-styles-extract"},H$={class:"content"},U$={key:0,class:"config-item"},G$={class:"label"},z$={class:"values"},Y$={class:"handler"},X$=["onClick"],W$=["onClick"],K$={key:1,class:"config-item"},q$={class:"label"},Z$={class:"values"},j$={class:"handler"},J$=["onClick"],Q$=["onClick"],eF={key:2,class:"config-item"},tF={class:"label"},nF={class:"values"},rF={class:"handler"},oF=["onClick"],aF=["onClick"],iF={key:3,class:"config-item"},lF={class:"label"},sF={class:"tip"},cF={class:"values inline"},uF=["onClick"],dF={class:"btns"},fF={__name:"ThemeStylesExtract",emits:["close"],setup(e,{emit:t}){const n=t,o=pe(),{slides:a,currentSlide:i}=ne.storeToRefs(o),{getSlidesThemeStyles:l}=b_(),{t:s}=_e(),c=r.computed(()=>[{key:"single",label:s("THEME_EXTRACT.FROM_CURRENT")},{key:"all",label:s("THEME_EXTRACT.FROM_ALL")}]),u=r.ref("single"),d=r.computed(()=>{const y={};for(const _ of Cl(s))y[_.value]=_.label;return y}),f=r.ref({backgroundColors:[],themeColors:[],fontColors:[],fontNames:[]}),v=r.ref({backgroundColor:0,themeColors:[0],fontColor:0,fontName:0});r.watch(u,()=>{u.value==="single"?f.value=l(i.value):f.value=l(a.value);const y=[];for(let _=0;_<Math.min(f.value.themeColors.length);_++)y.push(_);v.value={backgroundColor:0,fontColor:0,fontName:0,themeColors:y}},{immediate:!0});const p=y=>{o.setTheme(y)},h=()=>{let y=f.value.themeColors.filter((x,N)=>v.value.themeColors.includes(N));y.length>6&&(y=y.slice(0,6),Ae.warning(s("THEME_EXTRACT.THEME_COLOR_LIMIT")));const _=f.value.backgroundColors[v.value.backgroundColor],S=f.value.fontColors[v.value.fontColor],I=f.value.fontNames[v.value.fontName],A={};_&&(A.backgroundColor=_),S&&(A.fontColor=S),I&&(A.fontName=I),y.length&&(A.themeColors=y),o.setTheme(A),n("close")},m=y=>{v.value.themeColors.includes(y)?v.value.themeColors=v.value.themeColors.filter(_=>_!==y):v.value.themeColors.push(y)},g=y=>{const _=["#000","#fff"];return we.mostReadable(y,_,{includeFallbackColors:!0}).toRgbString()},E=y=>{const _=we(y);return _.getAlpha()<1?_.toHex8String().toUpperCase():_.toHexString().toUpperCase()};return(y,_)=>{const S=r.resolveComponent("AiPptCheck");return r.openBlock(),r.createElementBlock("div",F$,[r.createVNode(qn,{tabs:c.value,value:u.value,"onUpdate:value":_[0]||(_[0]=I=>u.value=I),tabsStyle:{marginBottom:"12px"},tabStyle:{padding:"8px 12px"}},null,8,["tabs","value"]),r.createElementVNode("div",H$,[f.value.fontNames.length?(r.openBlock(),r.createElementBlock("div",U$,[r.createElementVNode("div",G$,r.toDisplayString(r.unref(s)("THEME_EXTRACT.FONT")),1),r.createElementVNode("div",z$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.fontNames,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["value-wrap",{"is-selected":v.value.fontName===A}]),key:I},[r.createElementVNode("div",{class:"value",style:r.normalizeStyle({fontFamily:I})},r.toDisplayString(d.value[I]||I),5),r.createElementVNode("div",Y$,[r.createElementVNode("div",{class:r.normalizeClass(["state",{active:v.value.fontName===A}])},[r.createVNode(S)],2),r.createElementVNode("div",{class:"config-btn",onClick:x=>v.value.fontName=A},r.toDisplayString(r.unref(s)("THEME_EXTRACT.SELECT")),9,X$),r.createElementVNode("div",{class:"config-btn",onClick:()=>{p({fontName:I}),v.value.fontName=A}},r.toDisplayString(r.unref(s)("THEME_EXTRACT.APPLY_TO_THEME")),9,W$)])],2))),128))])])):r.createCommentVNode("",!0),f.value.fontColors.length?(r.openBlock(),r.createElementBlock("div",K$,[r.createElementVNode("div",q$,r.toDisplayString(r.unref(s)("THEME_EXTRACT.FONT_COLOR")),1),r.createElementVNode("div",Z$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.fontColors,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["value-wrap",{"is-selected":v.value.fontColor===A}]),key:I},[r.createElementVNode("div",{class:"value",style:r.normalizeStyle({backgroundColor:I,color:g(I)})},r.toDisplayString(E(I)),5),r.createElementVNode("div",j$,[r.createElementVNode("div",{class:r.normalizeClass(["state",{active:v.value.fontColor===A}])},[r.createVNode(S)],2),r.createElementVNode("div",{class:"config-btn",onClick:x=>v.value.fontColor=A},r.toDisplayString(r.unref(s)("THEME_EXTRACT.SELECT")),9,J$),r.createElementVNode("div",{class:"config-btn",onClick:()=>{p({fontColor:I}),v.value.fontColor=A}},r.toDisplayString(r.unref(s)("THEME_EXTRACT.APPLY_TO_THEME")),9,Q$)])],2))),128))])])):r.createCommentVNode("",!0),f.value.backgroundColors.length?(r.openBlock(),r.createElementBlock("div",eF,[r.createElementVNode("div",tF,r.toDisplayString(r.unref(s)("THEME_EXTRACT.BACKGROUND_COLOR")),1),r.createElementVNode("div",nF,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.backgroundColors,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["value-wrap",{"is-selected":v.value.backgroundColor===A}]),key:I},[r.createElementVNode("div",{class:"value",style:r.normalizeStyle({backgroundColor:I,color:g(I)})},r.toDisplayString(E(I)),5),r.createElementVNode("div",rF,[r.createElementVNode("div",{class:r.normalizeClass(["state",{active:v.value.backgroundColor===A}])},[r.createVNode(S)],2),r.createElementVNode("div",{class:"config-btn",onClick:x=>v.value.backgroundColor=A},r.toDisplayString(r.unref(s)("THEME_EXTRACT.SELECT")),9,oF),r.createElementVNode("div",{class:"config-btn",onClick:()=>{p({backgroundColor:I}),v.value.backgroundColor=A}},r.toDisplayString(r.unref(s)("THEME_EXTRACT.APPLY_TO_THEME")),9,aF)])],2))),128))])])):r.createCommentVNode("",!0),f.value.themeColors.length?(r.openBlock(),r.createElementBlock("div",iF,[r.createElementVNode("div",lF,[r.createTextVNode(r.toDisplayString(r.unref(s)("THEME_EXTRACT.THEME_COLORS")),1),r.createElementVNode("span",sF,r.toDisplayString(r.unref(s)("THEME_EXTRACT.TIP")),1)]),r.createElementVNode("div",cF,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.themeColors,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:"value-wrap",key:I,onClick:x=>m(A)},[r.createElementVNode("div",{class:r.normalizeClass(["value",{disabled:!v.value.themeColors.includes(A)}]),style:r.normalizeStyle({backgroundColor:I})},null,6)],8,uF))),128))])])):r.createCommentVNode("",!0)]),r.createElementVNode("div",dF,[r.createVNode(ue,{class:"btn",type:"primary",onClick:_[1]||(_[1]=I=>h())},{default:r.withCtx(()=>[r.createVNode(S),r.createTextVNode(" "+r.toDisplayString(r.unref(s)("THEME_EXTRACT.SAVE_SELECTED")),1)]),_:1})])])}}},pF=ie(fF,[["__scopeId","data-v-df17dee2"]]),vF={class:"theme-colors-setting"},hF={class:"title"},mF={class:"row"},gF={class:"label",style:{width:"40%"}},EF={__name:"ThemeColorsSetting",emits:["close"],setup(e,{emit:t}){const n=t,o=pe(),{theme:a}=ne.storeToRefs(o),i=r.ref([]),{t:l}=_e();r.onMounted(()=>{const u=[...a.value.themeColors];for(;u.length<6;)u.push("#00000000");i.value=[...u]});const s=()=>{let u=i.value.filter(d=>d!=="#00000000");u.length||(u=["#00000000"]),o.setTheme({themeColors:u}),n("close")},c=u=>{const{newIndex:d,oldIndex:f}=u;if(d===void 0||f===void 0||d===f)return;const v=i.value[f];i.value.splice(f,1),i.value.splice(d,0,v)};return(u,d)=>(r.openBlock(),r.createElementBlock("div",vF,[r.createElementVNode("div",hF,r.toDisplayString(r.unref(l)("SLIDE_THEME_COLORS.TITLE")),1),r.createVNode(r.unref(Jf),{class:"list",modelValue:i.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".label",onEnd:c,itemKey:"id"},{item:r.withCtx(({element:f,index:v})=>[r.createElementVNode("div",mF,[r.createElementVNode("div",gF,r.toDisplayString(r.unref(l)("SLIDE_THEME_COLORS.ITEM",{index:v+1})),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:f,"onUpdate:modelValue":p=>i.value[v]=p},null,8,["modelValue","onUpdate:modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:f},null,8,["color"])]),_:2},1024)])]),_:1},8,["modelValue"]),r.createVNode(ue,{class:"btn",type:"primary",onClick:d[0]||(d[0]=f=>s())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("COMMON.CONFIRM")),1)]),_:1})]))}},yF=ie(EF,[["__scopeId","data-v-16f12b4c"]]),_F={class:"slide-design-panel"},TF={class:"title"},SF={class:"row"},IF={key:0,class:"background-image-wrapper"},AF={class:"background-image"},NF={key:1,class:"background-gradient-wrapper"},LF={class:"row"},CF={class:"row"},xF={style:{width:"45%"}},bF={key:0,class:"row"},wF={style:{width:"45%"}},OF={class:"row"},RF={class:"row"},kF={class:"row"},DF={class:"canvas-size"},PF={class:"title"},MF={class:"text"},BF={class:"row"},VF={style:{width:"45%"}},$F={class:"row"},FF={style:{width:"45%"}},HF={class:"row"},UF={style:{width:"45%"}},GF={class:"row"},zF={style:{width:"45%"}},YF={class:"row"},XF={style:{width:"45%"}},WF=["onClick"],KF={class:"row"},qF={style:{width:"45%"}},ZF={class:"row"},jF={style:{width:"45%"}},JF={class:"row",style:{height:"30px"}},QF={style:{width:"45%"}},eH={class:"row",style:{height:"30px"}},tH={style:{width:"45%"}},nH={class:"row",style:{height:"30px"}},rH={style:{width:"45%"}},oH={class:"row"},aH={style:{width:"45%"}},iH={class:"row"},lH={class:"row"},sH={class:"title"},cH={class:"theme-list"},uH={class:"colors"},dH={class:"btns"},fH={__name:"index",setup(e){const t=pe(),{slides:n,currentSlide:o,slideIndex:a,viewportRatio:i,viewportSize:l,theme:s}=ne.storeToRefs(t),c=r.ref(!1),u=r.ref(!1),d=r.ref(!1),f=r.ref(0),{t:v}=_e(),p=r.computed(()=>Cl(v)),h=r.ref(["solid","dashed","dotted"]),m=r.computed(()=>o.value.background?o.value.background:{type:"solid",value:"#fff"}),{addHistorySnapshot:g}=be(),{applyPresetTheme:E,applyThemeToAllSlides:y}=b_();r.watch(a,()=>{f.value=0});const _=w=>{if(w==="solid"){const C={...m.value,type:"solid",color:m.value.color||"#fff"};t.updateSlide({background:C})}else if(w==="image"){const C={...m.value,type:"image",image:m.value.image||{src:"",size:"cover"}};t.updateSlide({background:C})}else{const C={...m.value,type:"gradient",gradient:m.value.gradient||{type:"linear",colors:[{pos:0,color:"#fff"},{pos:100,color:"#fff"}],rotate:0}};f.value=0,t.updateSlide({background:C})}g()},S=w=>{t.updateSlide({background:{...m.value,...w}}),g()},I=w=>{S({gradient:{...m.value.gradient,...w}})},A=w=>{const C=m.value.gradient.colors.map((P,k)=>k===f.value?{...P,color:w}:P);I({colors:C})},x=w=>{S({image:{...m.value.image,...w}})},N=w=>{const C=w[0];C&&Xr(C).then(P=>x({src:P}))},T=()=>{const w=n.value.map(C=>({...C,background:o.value.background}));t.setSlides(w),g()},L=w=>{t.setTheme(w)},b=w=>{t.setViewportRatio(w)},O=w=>w%1!==0?parseFloat(w.toFixed(1)):Math.floor(w);return(w,C)=>{const P=r.resolveComponent("AiPptPlus"),k=r.resolveComponent("AiPptCheck"),B=r.resolveComponent("AiPptDown"),H=r.resolveComponent("AiPptRight"),U=r.resolveComponent("AiPptPlatte");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",_F,[r.createElementVNode("div",TF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.BACKGROUND_FILL")),1),r.createElementVNode("div",SF,[r.createVNode(st,{style:{flex:"1"},value:m.value.type,"onUpdate:value":C[0]||(C[0]=$=>_($)),options:[{label:r.unref(v)("SLIDE_DESIGN.FILL_SOLID"),value:"solid"},{label:r.unref(v)("SLIDE_DESIGN.FILL_IMAGE"),value:"image"},{label:r.unref(v)("SLIDE_DESIGN.FILL_GRADIENT"),value:"gradient"}]},null,8,["value","options"]),C[30]||(C[30]=r.createElementVNode("div",{style:{width:"10px"}},null,-1)),m.value.type==="solid"?(r.openBlock(),r.createBlock(Se,{key:0,trigger:"click",style:{flex:"1"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:m.value.color,"onUpdate:modelValue":C[1]||(C[1]=$=>S({color:$}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:m.value.color||"#fff"},null,8,["color"])]),_:1})):m.value.type==="image"?(r.openBlock(),r.createBlock(st,{key:1,style:{flex:"1"},value:m.value.image?.size||"cover","onUpdate:value":C[2]||(C[2]=$=>x({size:$})),options:[{label:r.unref(v)("SLIDE_DESIGN.IMAGE_CONTAIN"),value:"contain"},{label:r.unref(v)("SLIDE_DESIGN.IMAGE_REPEAT"),value:"repeat"},{label:r.unref(v)("SLIDE_DESIGN.IMAGE_COVER"),value:"cover"}]},null,8,["value","options"])):(r.openBlock(),r.createBlock(st,{key:2,style:{flex:"1"},value:m.value.gradient?.type||"","onUpdate:value":C[3]||(C[3]=$=>I({type:$})),options:[{label:r.unref(v)("SLIDE_DESIGN.GRADIENT_LINEAR"),value:"linear"},{label:r.unref(v)("SLIDE_DESIGN.GRADIENT_RADIAL"),value:"radial"}]},null,8,["value","options"]))]),m.value.type==="image"?(r.openBlock(),r.createElementBlock("div",IF,[r.createVNode(El,{onChange:C[4]||(C[4]=$=>N($))},{default:r.withCtx(()=>[r.createElementVNode("div",AF,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundImage:`url(${m.value.image?.src})`})},[r.createVNode(P)],4)])]),_:1})])):r.createCommentVNode("",!0),m.value.type==="gradient"?(r.openBlock(),r.createElementBlock("div",NF,[r.createElementVNode("div",LF,[r.createVNode(C_,{value:m.value.gradient?.colors||[],index:f.value,"onUpdate:value":C[5]||(C[5]=$=>I({colors:$})),"onUpdate:index":C[6]||(C[6]=$=>f.value=$)},null,8,["value","index"])]),r.createElementVNode("div",CF,[r.createElementVNode("div",xF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.CURRENT_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:m.value.gradient?.colors[f.value].color,"onUpdate:modelValue":C[7]||(C[7]=$=>A($))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:m.value.gradient?.colors[f.value].color},null,8,["color"])]),_:1})]),m.value.gradient?.type==="linear"?(r.openBlock(),r.createElementBlock("div",bF,[r.createElementVNode("div",wF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.GRADIENT_ANGLE")),1),r.createVNode(Wt,{min:0,max:360,step:15,value:m.value.gradient.rotate||0,"onUpdate:value":C[8]||(C[8]=$=>I({rotate:$})),style:{width:"60%"}},null,8,["value"])])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",OF,[r.createVNode(ue,{style:{flex:"1"},onClick:C[9]||(C[9]=$=>T())},{default:r.withCtx(()=>[r.createVNode(k),r.createTextVNode(" "+r.toDisplayString(r.unref(v)("SLIDE_DESIGN.APPLY_BACKGROUND_ALL")),1)]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",RF,[r.createVNode(st,{style:{width:"100%"},value:r.unref(i),"onUpdate:value":C[10]||(C[10]=$=>b($)),options:[{label:r.unref(v)("SLIDE_DESIGN.RATIO_WIDE_16_9"),value:.5625},{label:r.unref(v)("SLIDE_DESIGN.RATIO_WIDE_16_10"),value:.625},{label:r.unref(v)("SLIDE_DESIGN.RATIO_STANDARD_4_3"),value:.75},{label:r.unref(v)("SLIDE_DESIGN.RATIO_PAPER_A3_A4"),value:.70710678},{label:r.unref(v)("SLIDE_DESIGN.RATIO_PORTRAIT_A3_A4"),value:1.41421356}]},null,8,["value","options"])]),r.createElementVNode("div",kF,[r.createElementVNode("div",DF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.CANVAS_SIZE",{width:r.unref(l),height:O(r.unref(l)*r.unref(i))})),1)]),r.createVNode(Oe),r.createElementVNode("div",PF,[r.createElementVNode("span",null,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.GLOBAL_THEME")),1),r.createElementVNode("span",{class:"more",onClick:C[11]||(C[11]=$=>c.value=!c.value)},[r.createElementVNode("span",MF,r.toDisplayString(r.unref(v)("COMMON.MORE")),1),c.value?(r.openBlock(),r.createBlock(B,{key:0})):(r.openBlock(),r.createBlock(H,{key:1}))])]),r.createElementVNode("div",BF,[r.createElementVNode("div",VF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.FONT")),1),r.createVNode(st,{style:{width:"60%"},value:r.unref(s).fontName,search:"",searchLabel:r.unref(v)("COMMON.SEARCH_FONT"),"onUpdate:value":C[12]||(C[12]=$=>L({fontName:$})),options:p.value},null,8,["value","searchLabel","options"])]),r.createElementVNode("div",$F,[r.createElementVNode("div",FF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.FONT_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).fontColor,"onUpdate:modelValue":C[13]||(C[13]=$=>L({fontColor:$}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).fontColor},null,8,["color"])]),_:1})]),r.createElementVNode("div",HF,[r.createElementVNode("div",UF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.BACKGROUND_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).backgroundColor,"onUpdate:modelValue":C[14]||(C[14]=$=>L({backgroundColor:$}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).backgroundColor},null,8,["color"])]),_:1})]),r.createElementVNode("div",GF,[r.createElementVNode("div",zF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.THEME_COLORS")),1),r.createVNode(x_,{style:{width:"60%"},colors:r.unref(s).themeColors,onClick:C[15]||(C[15]=$=>d.value=!0)},null,8,["colors"])]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createElementVNode("div",YF,[r.createElementVNode("div",XF,r.toDisplayString(r.unref(v)("STYLE_PARTS.OUTLINE_STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.value,$=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:$,onClick:V=>L({outline:{...r.unref(s).outline,style:$}})},[r.createVNode(En,{type:$},null,8,["type"])],8,WF))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:r.unref(s).outline.style},null,8,["type"])]),_:1})]),r.createElementVNode("div",KF,[r.createElementVNode("div",qF,r.toDisplayString(r.unref(v)("STYLE_PARTS.OUTLINE_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).outline.color,"onUpdate:modelValue":C[16]||(C[16]=$=>L({outline:{...r.unref(s).outline,color:$}}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).outline.color||"#000"},null,8,["color"])]),_:1})]),r.createElementVNode("div",ZF,[r.createElementVNode("div",jF,r.toDisplayString(r.unref(v)("STYLE_PARTS.OUTLINE_WIDTH")),1),r.createVNode(Xt,{value:r.unref(s).outline.width||0,"onUpdate:value":C[17]||(C[17]=$=>L({outline:{...r.unref(s).outline,width:$}})),style:{width:"60%"}},null,8,["value"])]),r.createElementVNode("div",JF,[r.createElementVNode("div",QF,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_X")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:r.unref(s).shadow.h,"onUpdate:value":C[18]||(C[18]=$=>L({shadow:{...r.unref(s).shadow,h:$}}))},null,8,["value"])]),r.createElementVNode("div",eH,[r.createElementVNode("div",tH,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_Y")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:r.unref(s).shadow.v,"onUpdate:value":C[19]||(C[19]=$=>L({shadow:{...r.unref(s).shadow,v:$}}))},null,8,["value"])]),r.createElementVNode("div",nH,[r.createElementVNode("div",rH,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_BLUR")),1),r.createVNode(Wt,{style:{width:"60%"},min:1,max:20,step:1,value:r.unref(s).shadow.blur,"onUpdate:value":C[20]||(C[20]=$=>L({shadow:{...r.unref(s).shadow,blur:$}}))},null,8,["value"])]),r.createElementVNode("div",oH,[r.createElementVNode("div",aH,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).shadow.color,"onUpdate:modelValue":C[21]||(C[21]=$=>L({shadow:{...r.unref(s).shadow,color:$}}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).shadow.color},null,8,["color"])]),_:1})])],64)):r.createCommentVNode("",!0),r.createElementVNode("div",iH,[r.createVNode(ue,{style:{flex:"1"},onClick:C[22]||(C[22]=$=>r.unref(y)(c.value))},{default:r.withCtx(()=>[r.createVNode(k),r.createTextVNode(" "+r.toDisplayString(r.unref(v)("SLIDE_DESIGN.APPLY_THEME_ALL")),1)]),_:1})]),r.createElementVNode("div",lH,[r.createVNode(ue,{style:{flex:"1"},onClick:C[23]||(C[23]=$=>u.value=!0)},{default:r.withCtx(()=>[r.createVNode(U),r.createTextVNode(" "+r.toDisplayString(r.unref(v)("SLIDE_DESIGN.EXTRACT_THEME")),1)]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",sH,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.PRESET_THEMES")),1),r.createElementVNode("div",cH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref($$),($,V)=>(r.openBlock(),r.createElementBlock("div",{class:"theme-item",key:V,style:r.normalizeStyle({backgroundColor:$.background,fontFamily:$.fontname})},[r.createElementVNode("div",{class:"theme-item-content",style:r.normalizeStyle({backgroundColor:$.background})},[r.createElementVNode("div",{class:"text",style:r.normalizeStyle({color:$.fontColor})},r.toDisplayString(r.unref(v)("SLIDE_DESIGN.TEXT_SAMPLE")),5),r.createElementVNode("div",uH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList($.colors,(z,D)=>(r.openBlock(),r.createElementBlock("div",{class:"color-block",key:D,style:r.normalizeStyle({backgroundColor:z})},null,4))),128))]),r.createElementVNode("div",dH,[r.createVNode(ue,{type:"primary",size:"small",onClick:z=>r.unref(E)($)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)("COMMON.SET")),1)]),_:1},8,["onClick"]),r.createVNode(ue,{type:"primary",size:"small",style:{"margin-top":"3px"},onClick:z=>r.unref(E)($,!0)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)("SLIDE_DESIGN.SET_AND_APPLY")),1)]),_:1},8,["onClick"])])],4)],4))),128))])]),r.createVNode(Yr,{visible:u.value,"onUpdate:visible":C[25]||(C[25]=$=>u.value=$),width:520,closeButton:"",onClosed:C[26]||(C[26]=$=>u.value=!1)},{default:r.withCtx(()=>[r.createVNode(pF,{onClose:C[24]||(C[24]=$=>u.value=!1)})]),_:1},8,["visible"]),r.createVNode(Yr,{visible:d.value,"onUpdate:visible":C[28]||(C[28]=$=>d.value=$),width:310,onClosed:C[29]||(C[29]=$=>d.value=!1)},{default:r.withCtx(()=>[r.createVNode(yF,{onClose:C[27]||(C[27]=$=>d.value=!1)})]),_:1},8,["visible"])],64)}}},pH=ie(fH,[["__scopeId","data-v-7d1c0109"]]),vH={class:"slide-animation-panel"},hH={class:"animation-pool"},mH=["onClick"],gH={class:"animation-text"},EH={__name:"SlideAnimationPanel",setup(e){const t=pe(),{slides:n,currentSlide:o}=ne.storeToRefs(t),{t:a}=_e(),i=r.computed(()=>o.value.turningMode||"slideY"),l=y$,{addHistorySnapshot:s}=be(),c=d=>{d!==i.value&&(t.updateSlide({turningMode:d}),s())},u=()=>{const d=n.value.map(f=>({...f,turningMode:o.value.turningMode}));t.setSlides(d),Ae.success(a("SLIDE_ANIMATION.APPLIED_ALL")),s()};return(d,f)=>{const v=r.resolveComponent("AiPptCheck");return r.openBlock(),r.createElementBlock("div",vH,[r.createElementVNode("div",hH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),p=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["animation-item",{active:i.value===p.value}]),key:p.label,onClick:h=>c(p.value)},[r.createElementVNode("div",{class:r.normalizeClass(["animation-block",p.value])},"P",2),r.createElementVNode("div",gH,r.toDisplayString(r.unref(a)(p.labelKey||p.label)),1)],10,mH))),128))]),r.createVNode(ue,{style:{width:"100%"},onClick:f[0]||(f[0]=p=>u())},{default:r.withCtx(()=>[r.createVNode(v),r.createTextVNode(" "+r.toDisplayString(r.unref(a)("SLIDE_ANIMATION.APPLY_ALL")),1)]),_:1})])}}},yH=ie(EH,[["__scopeId","data-v-d3f33550"]]),_H=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=ne.storeToRefs(fe()),{currentSlide:o}=ne.storeToRefs(e),{addHistorySnapshot:a}=be();return{alignActiveElement:l=>{const{minX:s,maxX:c,minY:u,maxY:d}=tr(n.value),f=JSON.parse(JSON.stringify(o.value.elements)),v={};for(const p of n.value)if(p.groupId&&!v[p.groupId]){const h=n.value.filter(m=>m.groupId===p.groupId);v[p.groupId]=tr(h)}if(l===Ve.LEFT)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].minX-s;p.left=p.left-m}else if("rotate"in p&&p.rotate){const{offsetX:h}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.left=s-h}else p.left=s});else if(l===Ve.RIGHT)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].maxX-c;p.left=p.left-m}else{const h=p.type==="line"?Math.max(p.start[0],p.end[0]):p.width;if("rotate"in p&&p.rotate){const{offsetX:m}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.left=c-h+m}else p.left=c-h}});else if(l===Ve.TOP)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].minY-u;p.top=p.top-m}else if("rotate"in p&&p.rotate){const{offsetY:h}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.top=u-h}else p.top=u});else if(l===Ve.BOTTOM)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].maxY-d;p.top=p.top-m}else{const h=p.type==="line"?Math.max(p.start[1],p.end[1]):p.height;if("rotate"in p&&p.rotate){const{offsetY:m}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.top=d-h+m}else p.top=d-h}});else if(l===Ve.HORIZONTAL){const p=(s+c)/2;f.forEach(h=>{if(t.value.includes(h.id))if(h.groupId){const m=v[h.groupId],E=(m.maxX+m.minX)/2-p;h.left=h.left-E}else{const m=h.type==="line"?Math.max(h.start[0],h.end[0]):h.width;h.left=p-m/2}})}else if(l===Ve.VERTICAL){const p=(u+d)/2;f.forEach(h=>{if(t.value.includes(h.id))if(h.groupId){const m=v[h.groupId],E=(m.maxY+m.minY)/2-p;h.top=h.top-E}else{const m=h.type==="line"?Math.max(h.start[1],h.end[1]):h.height;h.top=p-m/2}})}e.updateSlide({elements:f}),a()}}},TH=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=ne.storeToRefs(fe()),{currentSlide:o}=ne.storeToRefs(e),{addHistorySnapshot:a}=be();return{displayItemCount:r.computed(()=>{let c=0;const u=[];for(const d of n.value)d.groupId?u.includes(d.groupId)||(u.push(d.groupId),c+=1):c+=1;return c}),uniformHorizontalDisplay:()=>{const{minX:c,maxX:u}=tr(n.value),d=JSON.parse(JSON.stringify(n.value)),f=JSON.parse(JSON.stringify(o.value.elements)),v=[];let p=[];for(const I of d)if(I.groupId)p.find(x=>x.groupId===I.groupId)?p=p.map(x=>x.groupId===I.groupId?{...x,els:[...x.els,I]}:x):p.push({groupId:I.groupId,els:[I]});else{const{minX:A,maxX:x}=vn(I);v.push({min:A,max:x,el:I})}const h=[];for(const I of p){const{minX:A,maxX:x}=tr(I.els);h.push({min:A,max:x,els:I.els})}const m=[...v,...h];m.sort((I,A)=>I.min-A.min);let g=0;for(const I of m){const A=I.max-I.min;g+=A}const E=(u-c-g)/(m.length-1),y=[],_=m[0];let S={min:_.min,max:_.max};if("el"in _)y.push({pos:_.min,el:_.el});else for(const I of _.els){const{minX:A}=vn(I);y.push({pos:A,el:I})}for(let I=1;I<m.length;I++){const A=m[I],x=S.max-S.min,N=S.min+x+E,T=A.max-A.min;if(S={min:N,max:N+T},"el"in A)y.push({pos:N,el:A.el});else for(const L of A.els){const{minX:b}=vn(L),O=b-A.min;y.push({pos:N+O,el:L})}}for(const I of f)if(t.value.includes(I.id)){for(const A of y)if(A.el.id===I.id)if("rotate"in I&&I.rotate){const{offsetX:x}=pa({left:I.left,top:I.top,width:I.width,height:I.height,rotate:I.rotate});I.left=A.pos-x}else I.left=A.pos}e.updateSlide({elements:f}),a()},uniformVerticalDisplay:()=>{const{minY:c,maxY:u}=tr(n.value),d=JSON.parse(JSON.stringify(n.value)),f=JSON.parse(JSON.stringify(o.value.elements)),v=[];let p=[];for(const I of d)if(I.groupId)p.find(x=>x.groupId===I.groupId)?p=p.map(x=>x.groupId===I.groupId?{...x,els:[...x.els,I]}:x):p.push({groupId:I.groupId,els:[I]});else{const{minY:A,maxY:x}=vn(I);v.push({min:A,max:x,el:I})}const h=[];for(const I of p){const{minY:A,maxY:x}=tr(I.els);h.push({min:A,max:x,els:I.els})}const m=[...v,...h];m.sort((I,A)=>I.min-A.min);let g=0;for(const I of m){const A=I.max-I.min;g+=A}const E=(u-c-g)/(m.length-1),y=[],_=m[0];let S={min:_.min,max:_.max};if("el"in _)y.push({pos:_.min,el:_.el});else for(const I of _.els){const{minY:A}=vn(I);y.push({pos:A,el:I})}for(let I=1;I<m.length;I++){const A=m[I],x=S.max-S.min,N=S.min+x+E,T=A.max-A.min;if(S={min:N,max:N+T},"el"in A)y.push({pos:N,el:A.el});else for(const L of A.els){const{minY:b}=vn(L),O=b-A.min;y.push({pos:N+O,el:L})}}for(const I of f)if(t.value.includes(I.id)){for(const A of y)if(A.el.id===I.id)if("rotate"in I&&I.rotate){const{offsetY:x}=pa({left:I.left,top:I.top,width:I.width,height:I.height,rotate:I.rotate});I.top=A.pos-x}else I.top=A.pos}e.updateSlide({elements:f}),a()}}},SH={class:"multi-position-panel"},IH={__name:"MultiPositionPanel",setup(e){const{t}=_e(),{canCombine:n,combineElements:o,uncombineElements:a}=ip(),{alignActiveElement:i}=_H(),{alignElementToCanvas:l}=cp(),{displayItemCount:s,uniformHorizontalDisplay:c,uniformVerticalDisplay:u}=TH(),d=f=>{n.value?i(f):l(f)};return(f,v)=>{const p=r.resolveComponent("AiPptAlignLeft"),h=r.resolveComponent("AiPptAlignHorizontally"),m=r.resolveComponent("AiPptAlignRight"),g=r.resolveComponent("AiPptAlignTop"),E=r.resolveComponent("AiPptAlignVertically"),y=r.resolveComponent("AiPptAlignBottom"),_=r.resolveComponent("AiPptGroup"),S=r.resolveComponent("AiPptUngroup"),I=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",SH,[r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[0]||(v[0]=A=>d(r.unref(Ve).LEFT))},{default:r.withCtx(()=>[r.createVNode(p)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[1]||(v[1]=A=>d(r.unref(Ve).HORIZONTAL))},{default:r.withCtx(()=>[r.createVNode(h)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_CENTER_HORIZONTAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[2]||(v[2]=A=>d(r.unref(Ve).RIGHT))},{default:r.withCtx(()=>[r.createVNode(m)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_RIGHT")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[3]||(v[3]=A=>d(r.unref(Ve).TOP))},{default:r.withCtx(()=>[r.createVNode(g)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_TOP")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[4]||(v[4]=A=>d(r.unref(Ve).VERTICAL))},{default:r.withCtx(()=>[r.createVNode(E)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_CENTER_VERTICAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[5]||(v[5]=A=>d(r.unref(Ve).BOTTOM))},{default:r.withCtx(()=>[r.createVNode(y)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_BOTTOM")]])]),_:1}),r.unref(s)>2?(r.openBlock(),r.createBlock(it,{key:0,class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{style:{flex:"1"},onClick:v[6]||(v[6]=A=>r.unref(c)())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(t)("MULTI_POSITION.HORIZONTAL_DISTRIBUTE")),1)]),_:1}),r.createVNode(ue,{style:{flex:"1"},onClick:v[7]||(v[7]=A=>r.unref(u)())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(t)("MULTI_POSITION.VERTICAL_DISTRIBUTE")),1)]),_:1})]),_:1})):r.createCommentVNode("",!0),r.createVNode(Oe),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{disabled:!r.unref(n),onClick:v[8]||(v[8]=A=>r.unref(o)()),style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(_,{style:{"margin-right":"3px"}}),r.createTextVNode(r.toDisplayString(r.unref(t)("EDITABLE_ELEMENT.GROUP")),1)]),_:1},8,["disabled"]),r.createVNode(ue,{disabled:r.unref(n),onClick:v[9]||(v[9]=A=>r.unref(a)()),style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(S,{style:{"margin-right":"3px"}}),r.createTextVNode(r.toDisplayString(r.unref(t)("EDITABLE_ELEMENT.UNGROUP")),1)]),_:1},8,["disabled"])]),_:1})])}}},AH=ie(IH,[["__scopeId","data-v-80bdf1ab"]]),NH={class:"multi-style-panel"},LH={class:"row"},CH={style:{width:"45%"}},xH={class:"row"},bH={style:{width:"45%"}},wH=["onClick"],OH={class:"row"},RH={style:{width:"45%"}},kH={class:"row"},DH={style:{width:"45%"}},PH={__name:"MultiStylePanel",setup(e){const t=pe(),{richTextAttrs:n,activeElementList:o}=ne.storeToRefs(fe()),{t:a}=_e(),i=r.computed(()=>Cl(a)),{addHistorySnapshot:l}=be(),s=(m,g)=>{t.updateElement({id:m,props:g}),l()},c=r.ref(["solid","dashed","dotted"]),u=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=r.ref("#fff"),f=r.ref({width:0,color:"#fff",style:"solid"}),v=m=>{for(const g of o.value){if((g.type==="text"||g.type==="shape"||g.type==="chart")&&s(g.id,{fill:m}),g.type==="table"){const E=JSON.parse(JSON.stringify(g.data));for(let y=0;y<E.length;y++)for(let _=0;_<E[y].length;_++){const S=E[y][_].style||{};E[y][_].style={...S,backcolor:m}}s(g.id,{data:E})}g.type==="audio"&&s(g.id,{color:m})}d.value=m},p=m=>{for(const g of o.value){if(g.type==="text"||g.type==="image"||g.type==="shape"||g.type==="table"||g.type==="chart"){const y={outline:{...g.outline||{width:2,color:"#000",style:"solid"},...m}};s(g.id,y)}g.type==="line"&&s(g.id,m)}f.value={...f.value,...m}},h=(m,g)=>{var E;for(const y of o.value){if((y.type==="text"||y.type==="shape"&&(!((E=y.text)===null||E===void 0)&&E.content))&&bt.emit(Et.RICH_TEXT_COMMAND,{target:y.id,action:{command:m,value:g}}),y.type==="table"){const _=JSON.parse(JSON.stringify(y.data));for(let S=0;S<_.length;S++)for(let I=0;I<_[S].length;I++){const A=_[S][I].style||{};_[S][I].style={...A,[m]:g}}s(y.id,{data:_})}y.type==="latex"&&m==="color"&&s(y.id,{color:g})}};return(m,g)=>{const E=r.resolveComponent("AiPptFontSize"),y=r.resolveComponent("AiPptAddText"),_=r.resolveComponent("AiPptText"),S=r.resolveComponent("AiPptHighLight"),I=r.resolveComponent("AiPptAlignTextLeft"),A=r.resolveComponent("AiPptAlignTextCenter"),x=r.resolveComponent("AiPptAlignTextRight"),N=r.resolveComponent("AiPptAlignTextBoth"),T=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",NH,[r.createElementVNode("div",LH,[r.createElementVNode("div",CH,r.toDisplayString(r.unref(a)("MULTI_STYLE.FILL_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=L=>v(L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:d.value},null,8,["color"])]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",xH,[r.createElementVNode("div",bH,r.toDisplayString(r.unref(a)("MULTI_STYLE.OUTLINE_STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,L=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:L,onClick:b=>p({style:L})},[r.createVNode(En,{type:L},null,8,["type"])],8,wH))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:f.value.style},null,8,["type"])]),_:1})]),r.createElementVNode("div",OH,[r.createElementVNode("div",RH,r.toDisplayString(r.unref(a)("MULTI_STYLE.OUTLINE_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:f.value.color,"onUpdate:modelValue":g[1]||(g[1]=L=>p({color:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:f.value.color||"#000"},null,8,["color"])]),_:1})]),r.createElementVNode("div",kH,[r.createElementVNode("div",DH,r.toDisplayString(r.unref(a)("MULTI_STYLE.OUTLINE_WIDTH")),1),r.createVNode(Xt,{value:f.value.width||0,"onUpdate:value":g[2]||(g[2]=L=>p({width:L})),style:{width:"60%"}},null,8,["value"])]),r.createVNode(Oe),r.createVNode(gv,{class:"row"},{default:r.withCtx(()=>[r.createVNode(st,{style:{width:"60%"},value:r.unref(n).fontname,search:"",searchLabel:r.unref(a)("COMMON.SEARCH_FONT"),"onUpdate:value":g[3]||(g[3]=L=>h("fontname",L)),options:i.value},{icon:r.withCtx(()=>[r.createVNode(E)]),_:1},8,["value","searchLabel","options"]),r.createVNode(st,{style:{width:"40%"},value:r.unref(n).fontsize,search:"",searchLabel:r.unref(a)("COMMON.SEARCH_FONT_SIZE"),"onUpdate:value":g[4]||(g[4]=L=>h("fontsize",L)),options:u.map(L=>({label:L,value:L}))},{icon:r.withCtx(()=>[r.createVNode(y)]),_:1},8,["value","searchLabel","options"])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(n).color,"onUpdate:modelValue":g[5]||(g[5]=L=>h("color",L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{first:"",color:r.unref(n).color},{default:r.withCtx(()=>[r.createVNode(_)]),_:1},8,["color"])),[[T,r.unref(a)("RICH_TEXT.TEXT_COLOR")]])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(n).backcolor,"onUpdate:modelValue":g[6]||(g[6]=L=>h("backcolor",L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{color:r.unref(n).backcolor},{default:r.withCtx(()=>[r.createVNode(S)]),_:1},8,["color"])),[[T,r.unref(a)("RICH_TEXT.TEXT_HIGHLIGHT")]])]),_:1}),r.withDirectives((r.openBlock(),r.createBlock(ue,{class:"font-size-btn",style:{width:"20%"},onClick:g[7]||(g[7]=L=>h("fontsize-add","2"))},{default:r.withCtx(()=>[r.createVNode(E),g[10]||(g[10]=r.createTextVNode("+ ",-1))]),_:1})),[[T,r.unref(a)("RICH_TEXT.FONT_SIZE_INCREASE")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:g[8]||(g[8]=L=>h("fontsize-reduce","2"))},{default:r.withCtx(()=>[r.createVNode(E),g[11]||(g[11]=r.createTextVNode("- ",-1))]),_:1})),[[T,r.unref(a)("RICH_TEXT.FONT_SIZE_DECREASE")]])]),_:1}),r.createVNode(lr,{class:"row","button-style":"solid",value:r.unref(n).align,"onUpdate:value":g[9]||(g[9]=L=>h("align",L))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"left",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(I)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"center",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(A)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_CENTER")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"right",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(x)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_RIGHT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"justify",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(N)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_JUSTIFY")]])]),_:1},8,["value"])])}}},MH=ie(PH,[["__scopeId","data-v-61ceb85a"]]),BH={class:"toolbar"},VH={class:"content"},$H={__name:"index",setup(e){const t=fe(),{activeElementIdList:n,activeElementList:o,activeGroupElementId:a,toolbarState:i}=ne.storeToRefs(t),{t:l}=_e(),s=[{label:l("TOOLBAR.TAB_STYLE"),key:Tt.EL_STYLE},{label:l("TOOLBAR.TAB_POSITION"),key:Tt.EL_POSITION},{label:l("TOOLBAR.TAB_ANIMATION"),key:Tt.EL_ANIMATION}],c=[{label:l("TOOLBAR.TAB_DESIGN"),key:Tt.SLIDE_DESIGN},{label:l("TOOLBAR.TAB_TRANSITION"),key:Tt.SLIDE_ANIMATION},{label:l("TOOLBAR.TAB_ANIMATION"),key:Tt.EL_ANIMATION}],u=[{label:l("TOOLBAR.TAB_STYLE_MULTI"),key:Tt.MULTI_STYLE},{label:l("TOOLBAR.TAB_POSITION_MULTI"),key:Tt.MULTI_POSITION}],d=p=>{t.setToolbarState(p)},f=r.computed(()=>{if(n.value.length){if(n.value.length>1)return a.value&&o.value.find(h=>h.id===a.value)?s:u}else return c;return s});r.watch(f,()=>{const p=f.value.map(h=>h.key);p.includes(i.value)||t.setToolbarState(p[0])});const v=r.computed(()=>({[Tt.EL_STYLE]:s$,[Tt.EL_POSITION]:g$,[Tt.EL_ANIMATION]:V$,[Tt.SLIDE_DESIGN]:pH,[Tt.SLIDE_ANIMATION]:yH,[Tt.MULTI_STYLE]:MH,[Tt.MULTI_POSITION]:AH})[i.value]||null);return(p,h)=>(r.openBlock(),r.createElementBlock("div",BH,[r.createVNode(qn,{tabs:f.value,value:r.unref(i),card:"","onUpdate:value":h[0]||(h[0]=m=>d(m))},null,8,["tabs","value"]),r.createElementVNode("div",VH,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(v.value)))])]))}},FH=ie($H,[["__scopeId","data-v-c3d39bce"]]),HH={class:"editor"},UH={__name:"Editor",props:{value:{type:String,required:!0}},emits:["update"],setup(e,{expose:t,emit:n}){const o=e,a=n,i=fe(),{t:l}=_e(),s=r.useTemplateRef("editorViewRef");let c;const u=r.ref(),d=r.ref(),f=r.useTemplateRef("menuRef"),v=()=>{d.value&&d.value.hide()},p=Xe.debounce(function(){a("update",c.dom.innerHTML)},300,{trailing:!0}),h=()=>{i.setDisableHotkeysState(!0)},m=()=>{i.setDisableHotkeysState(!1)};t({updateTextContent:()=>{if(!c)return;const{doc:_,tr:S}=c.state;c.dispatch(S.replaceRangeWith(0,_.content.size,dp(o.value)))}});const E=()=>{const _=window.getSelection();if(!_||!_.anchorNode||!_.focusNode||_.isCollapsed||_.type==="Caret"||_.type==="None")return;const S=_.getRangeAt(0);if(d.value){u.value=Od(c);const{x:I,y:A,left:x,top:N}=S.getBoundingClientRect();d.value.setProps({getReferenceClientRect:()=>({x:I,y:A,left:x,top:N,height:0,width:0,right:x,bottom:N})}),d.value.show()}},y=(_,S)=>{if(_==="color"&&S){const I=c.state.schema.marks.forecolor.create({color:S});ht(c),$n(c,I)}else if(_==="backcolor"&&S){const I=c.state.schema.marks.backcolor.create({backcolor:S});ht(c),$n(c,I)}else if(_==="bold")ht(c),Ge.toggleMark(c.state.schema.marks.strong)(c.state,c.dispatch);else if(_==="em")ht(c),Ge.toggleMark(c.state.schema.marks.em)(c.state,c.dispatch);else if(_==="underline")ht(c),Ge.toggleMark(c.state.schema.marks.underline)(c.state,c.dispatch);else if(_==="strikethrough")ht(c),Ge.toggleMark(c.state.schema.marks.strikethrough)(c.state,c.dispatch);else if(_==="bulletList"){const{bullet_list:I,list_item:A}=c.state.schema.nodes;Ms(I,A,"")(c.state,c.dispatch)}else if(_==="orderedList"){const{ordered_list:I,list_item:A}=c.state.schema.nodes;Ms(I,A,"")(c.state,c.dispatch)}else if(_==="clear"){ht(c);const{$from:I,$to:A}=c.state.selection;c.dispatch(c.state.tr.removeMark(I.pos,A.pos))}c.focus(),p(),u.value=Od(c)};return r.onMounted(()=>{c=ug(s.value,o.value,{handleDOMEvents:{focus:h,blur:m,mouseup:E,mousedown:()=>{var _;(_=window.getSelection())===null||_===void 0||_.removeAllRanges(),v()},keydown:v,input:p}},{placeholder:l("COMMENT_PANEL.PLACEHOLDER")}),d.value=Zf(s.value,{duration:0,content:f.value,interactive:!0,trigger:"manual",placement:"top-start",hideOnClick:"toggle",offset:[0,6]})}),r.onUnmounted(()=>{c&&c.destroy()}),(_,S)=>{const I=r.resolveComponent("AiPptTextBold"),A=r.resolveComponent("AiPptTextItalic"),x=r.resolveComponent("AiPptTextUnderline"),N=r.resolveComponent("AiPptStrikethrough"),T=r.resolveComponent("AiPptText"),L=r.resolveComponent("AiPptHighLight"),b=r.resolveComponent("AiPptList"),O=r.resolveComponent("AiPptOrderedList"),w=r.resolveComponent("AiPptFormat"),C=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",HH,[r.createElementVNode("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:s},null,512),r.createElementVNode("div",{class:"menu",ref_key:"menuRef",ref:f},[r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.bold}),onClick:S[0]||(S[0]=P=>y("bold"))},[r.createVNode(I)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.em}),onClick:S[1]||(S[1]=P=>y("em"))},[r.createVNode(A)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.underline}),onClick:S[2]||(S[2]=P=>y("underline"))},[r.createVNode(x)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.strikethrough}),onClick:S[3]||(S[3]=P=>y("strikethrough"))},[r.createVNode(N)],2),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value?.color,"onUpdate:modelValue":S[4]||(S[4]=P=>y("color",P))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createElementVNode("button",null,[r.createVNode(T)])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value?.backcolor,"onUpdate:modelValue":S[5]||(S[5]=P=>y("backcolor",P))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createElementVNode("button",null,[r.createVNode(L)])]),_:1}),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.bulletList}),onClick:S[6]||(S[6]=P=>y("bulletList"))},[r.createVNode(b)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.orderedList}),onClick:S[7]||(S[7]=P=>y("orderedList"))},[r.createVNode(O)],2),r.createElementVNode("button",{onClick:S[8]||(S[8]=P=>y("clear"))},[r.createVNode(w)])],512)])),[[C,v]])}}},GH=ie(UH,[["__scopeId","data-v-7ce68079"]]),zH={class:"remark"},YH={__name:"index",props:{height:{type:Number,required:!0}},emits:["update:height"],setup(e,{emit:t}){const n=e,o=t,a=pe(),{currentSlide:i}=ne.storeToRefs(a),l=r.useTemplateRef("editorRef");r.watch(()=>{var d;return(d=i.value)===null||d===void 0?void 0:d.id},()=>{r.nextTick(()=>{l.value&&i.value&&l.value.updateTextContent()})},{immediate:!0});const s=r.computed(()=>{var d;return((d=i.value)===null||d===void 0?void 0:d.remark)||""}),c=d=>{a.updateSlide({remark:d})},u=d=>{let f=!0;const v=d.pageY,p=n.height;document.onmousemove=h=>{if(!f)return;let E=-(h.pageY-v)+p;E<40&&(E=40),E>360&&(E=360),o("update:height",E)},document.onmouseup=()=>{f=!1,document.onmousemove=null,document.onmouseup=null}};return(d,f)=>(r.openBlock(),r.createElementBlock("div",zH,[r.createElementVNode("div",{class:"resize-handler",onMousedown:f[0]||(f[0]=v=>u(v))},null,32),r.createVNode(GH,{value:s.value,ref_key:"editorRef",ref:l,onUpdate:f[1]||(f[1]=v=>c(v))},null,8,["value"])]))}},XH=ie(YH,[["__scopeId","data-v-8309accf"]]),WH={class:"export-img-dialog"},KH={class:"thumbnails-view"},qH={class:"configs"},ZH={class:"row"},jH={class:"title"},JH={class:"row"},QH={class:"title"},eU={key:0,class:"row"},tU=["data-range"],nU={class:"row"},rU={class:"title"},oU={class:"row"},aU={class:"title"},iU={class:"config-item"},lU={class:"btns"},sU={__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),{slides:a,currentSlide:i}=ne.storeToRefs(pe()),l=r.useTemplateRef("imageThumbnailsRef"),s=r.ref("all"),c=r.ref([1,a.value.length]),u=r.ref("jpeg"),d=r.ref(1),f=r.ref(!1),v=r.computed(()=>s.value==="all"?a.value:s.value==="current"?[i.value]:a.value.filter((g,E)=>{const[y,_]=c.value;return E>=y-1&&E<=_-1})),{exportImage:p,exporting:h}=Ha(),m=()=>{l.value&&p(l.value,u.value,d.value,f.value)};return(g,E)=>{const y=r.resolveComponent("AiPptDownload"),_=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",WH,[r.createElementVNode("div",KH,[r.createElementVNode("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:l},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,S=>(r.openBlock(),r.createBlock($a,{class:"thumbnail",key:S.id,slide:S,size:1600},null,8,["slide"]))),128))],512)]),r.createElementVNode("div",qH,[r.createElementVNode("div",ZH,[r.createElementVNode("div",jH,r.toDisplayString(r.unref(o)("EXPORT.FORMAT")),1),r.createVNode(lr,{class:"config-item",value:u.value,"onUpdate:value":E[0]||(E[0]=S=>u.value=S)},{default:r.withCtx(()=>[r.createVNode(je,{style:{width:"50%"},value:"jpeg"},{default:r.withCtx(()=>[...E[7]||(E[7]=[r.createTextVNode("JPEG",-1)])]),_:1}),r.createVNode(je,{style:{width:"50%"},value:"png"},{default:r.withCtx(()=>[...E[8]||(E[8]=[r.createTextVNode("PNG",-1)])]),_:1})]),_:1},8,["value"])]),r.createElementVNode("div",JH,[r.createElementVNode("div",QH,r.toDisplayString(r.unref(o)("EXPORT.RANGE")),1),r.createVNode(lr,{class:"config-item",value:s.value,"onUpdate:value":E[1]||(E[1]=S=>s.value=S)},{default:r.withCtx(()=>[r.createVNode(je,{style:{width:"33.33%"},value:"all"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.ALL")),1)]),_:1}),r.createVNode(je,{style:{width:"33.33%"},value:"current"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CURRENT")),1)]),_:1}),r.createVNode(je,{style:{width:"33.33%"},value:"custom"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CUSTOM")),1)]),_:1})]),_:1},8,["value"])]),s.value==="custom"?(r.openBlock(),r.createElementBlock("div",eU,[r.createElementVNode("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},r.toDisplayString(r.unref(o)("EXPORT.CUSTOM_RANGE")),9,tU),r.createVNode(Wt,{class:"config-item",range:"",min:1,max:r.unref(a).length,step:1,value:c.value,"onUpdate:value":E[2]||(E[2]=S=>c.value=S)},null,8,["max","value"])])):r.createCommentVNode("",!0),r.createElementVNode("div",nU,[r.createElementVNode("div",rU,r.toDisplayString(r.unref(o)("EXPORT.IMAGE_QUALITY")),1),r.createVNode(Wt,{class:"config-item",min:0,max:1,step:.1,value:d.value,"onUpdate:value":E[3]||(E[3]=S=>d.value=S)},null,8,["value"])]),r.createElementVNode("div",oU,[r.createElementVNode("div",aU,r.toDisplayString(r.unref(o)("EXPORT.IGNORE_WEBFONT")),1),r.createElementVNode("div",iU,[r.withDirectives(r.createVNode(Sn,{value:f.value,"onUpdate:value":E[4]||(E[4]=S=>f.value=S)},null,8,["value"]),[[_,r.unref(o)("EXPORT.TIP_WEBFONT")]])])])]),r.createElementVNode("div",lU,[r.createVNode(ue,{class:"btn export",type:"primary",onClick:E[5]||(E[5]=S=>m())},{default:r.withCtx(()=>[r.createVNode(y),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("EXPORT.BTN_IMAGE")),1)]),_:1}),r.createVNode(ue,{class:"btn close",onClick:E[6]||(E[6]=S=>n("close"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CLOSE")),1)]),_:1})]),r.createVNode(Vi,{loading:r.unref(h),tip:r.unref(o)("EXPORT.EXPORTING")},null,8,["loading","tip"])])}}},cU=ie(sU,[["__scopeId","data-v-38bf3be4"]]),uU={class:"export-json-dialog"},dU={class:"preview"},fU={class:"btns"},pU={__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),{slides:a,viewportRatio:i,title:l,viewportSize:s,theme:c}=ne.storeToRefs(pe()),{exportJSON:u}=Ha(),d=r.computed(()=>({title:l.value,width:s.value,height:s.value*i.value,theme:c.value,slides:a.value}));return(f,v)=>{const p=r.resolveComponent("AiPptDownload");return r.openBlock(),r.createElementBlock("div",uU,[r.createElementVNode("div",dU,[r.createElementVNode("pre",null,r.toDisplayString(d.value),1)]),r.createElementVNode("div",fU,[r.createVNode(ue,{class:"btn export",type:"primary",onClick:v[0]||(v[0]=h=>r.unref(u)())},{default:r.withCtx(()=>[r.createVNode(p),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("EXPORT.BTN_JSON")),1)]),_:1}),r.createVNode(ue,{class:"btn close",onClick:v[1]||(v[1]=h=>n("close"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CLOSE")),1)]),_:1})])])}}},vU=ie(pU,[["__scopeId","data-v-b50d9ddc"]]),hU=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},mU=(e,t,n)=>{const o="<!DOCTYPE html>";let a="";const i=document.styleSheets;if(i){for(const f of i)if(f.cssRules)for(const v of f.cssRules)a+=v.cssText}const{width:l,height:s,margin:c}=n,u=`
36
+ `:"",a=" {"+o,i=o+"}",l=ye(Ue(e),function(c){return c+a+ye(Ue(e[c]),function(u){return u+":"+e[c][u]+";"}).join(o)+i}).join(o),s=ye(Ue(t),function(c){return"@keyframes "+c+a+ye(Ue(t[c]),function(u){return u+a+ye(Ue(t[c][u]),function(d){var f=t[c][u][d];return d==="d"&&(f='path("'+f+'")'),d+":"+f+";"}).join(o)+i}).join(o)+i}).join(o);return!l&&!s?"":["<![CDATA[",l,s,"]]>"].join(o)}function Xf(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function r1(e,t,n,o){return yt("svg","root",{width:e,height:t,xmlns:n_,"xmlns:xlink":r_,version:"1.1",baseProfile:"full",viewBox:o?"0 0 "+e+" "+t:!1},n)}var X8=0;function a_(){return X8++}var o1={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ao="transform-origin";function W8(e,t,n){var o=de({},e.shape);de(o,t),e.buildPath(n,o);var a=new t_;return a.reset(Fg(e)),n.rebuildPath(a,1),a.generateStr(),a.getStr()}function K8(e,t){var n=t.originX,o=t.originY;(n||o)&&(e[Ao]=n+"px "+o+"px")}var q8={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function i_(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Z8(e,t,n){var o=e.shape.paths,a={},i,l;if(J(o,function(c){var u=Xf(n.zrId);u.animation=!0,Jc(c,{},u,!0);var d=u.cssAnims,f=u.cssNodes,v=Ue(d),p=v.length;if(p){l=v[p-1];var h=d[l];for(var m in h){var g=h[m];a[m]=a[m]||{d:""},a[m].d+=g.d||""}for(var E in f){var y=f[E].animation;y.indexOf(l)>=0&&(i=y)}}}),!!i){t.d=!1;var s=i_(a,n);return i.replace(l,s)}}function a1(e){return Le(e)?o1[e]?"cubic-bezier("+o1[e]+")":_p(e)?e:"":""}function Jc(e,t,n,o){var a=e.animators,i=a.length,l=[];if(e instanceof wE){var s=Z8(e,t,n);if(s)l.push(s);else if(!i)return}else if(!i)return;for(var c={},u=0;u<i;u++){var d=a[u],f=[d.getMaxTime()/1e3+"s"],v=a1(d.getClip().easing),p=d.getDelay();v?f.push(v):f.push("linear"),p&&f.push(p/1e3+"s"),d.getLoop()&&f.push("infinite");var h=f.join(" ");c[h]=c[h]||[h,[]],c[h][1].push(d)}function m(y){var _=y[1],S=_.length,I={},A={},x={},N="animation-timing-function";function T(Q,q,re){for(var G=Q.getTracks(),M=Q.getMaxTime(),R=0;R<G.length;R++){var X=G[R];if(X.needsAnimate()){var W=X.keyframes,te=X.propName;if(re&&(te=re(te)),te)for(var ee=0;ee<W.length;ee++){var ce=W[ee],se=Math.round(ce.time/M*100)+"%",F=a1(ce.easing),j=ce.rawValue;(Le(j)||tt(j))&&(q[se]=q[se]||{},q[se][te]=ce.rawValue,F&&(q[se][N]=F))}}}}for(var L=0;L<S;L++){var b=_[L],O=b.targetName;O?O==="shape"&&T(b,A):!o&&T(b,I)}for(var w in I){var C={};Yg(C,e),de(C,I[w]);var P=Hg(C),k=I[w][N];x[w]=P?{transform:P}:{},K8(x[w],C),k&&(x[w][N]=k)}var B,H=!0;for(var w in A){x[w]=x[w]||{};var U=!B,k=A[w][N];U&&(B=new Hr);var $=B.len();B.reset(),x[w].d=W8(e,A[w],B);var V=B.len();if(!U&&$!==V){H=!1;break}k&&(x[w][N]=k)}if(!H)for(var w in x)delete x[w].d;if(!o)for(var L=0;L<S;L++){var b=_[L],O=b.targetName;O==="style"&&T(b,x,function(G){return q8[G]})}for(var z=Ue(x),D=!0,Y,L=1;L<z.length;L++){var K=z[L-1],Z=z[L];if(x[K][Ao]!==x[Z][Ao]){D=!1;break}Y=x[K][Ao]}if(D&&Y){for(var w in x)x[w][Ao]&&delete x[w][Ao];t[Ao]=Y}if(St(z,function(Q){return Ue(x[Q]).length>0}).length){var oe=i_(x,n);return oe+" "+y[0]+" both"}}for(var g in c){var s=m(c[g]);s&&l.push(s)}if(l.length){var E=n.zrId+"-cls-"+a_();n.cssNodes["."+E]={animation:l.join(",")},t.class=E}}function j8(e,t,n){if(!e.ignore)if(e.isSilent()){var o={"pointer-events":"none"};i1(o,t,n)}else{var a=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=a.fill;if(!i){var l=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf("select")>=0&&s||l;c&&(i=Zd(c))}var u=a.lineWidth;if(u){var d=!a.strokeNoScale&&e.transform?e.transform[0]:1;u=u/d}var o={cursor:"pointer"};i&&(o.fill=i),a.stroke&&(o.stroke=a.stroke),u&&(o["stroke-width"]=u),i1(o,t,n)}}function i1(e,t,n,o){var a=JSON.stringify(e),i=n.cssStyleCache[a];i||(i=n.zrId+"-cls-"+a_(),n.cssStyleCache[a]=i,n.cssNodes["."+i+":hover"]=e),t.class=t.class?t.class+" "+i:i}var hl=Math.round;function l_(e){return e&&Le(e.src)}function s_(e){return e&&De(e.toDataURL)}function fv(e,t,n,o){F8(function(a,i){var l=a==="fill"||a==="stroke";l&&$g(i)?u_(t,e,a,o):l&&Tp(i)?d_(n,e,a,o):e[a]=i,l&&o.ssr&&i==="none"&&(e["pointer-events"]="visible")},t,n,!1),o6(n,e,o)}function pv(e,t){var n=xL(t);n&&(n.each(function(o,a){o!=null&&(e[(n1+a).toLowerCase()]=o+"")}),t.isSilent()&&(e[n1+"silent"]="true"))}function l1(e){return xr(e[0]-1)&&xr(e[1])&&xr(e[2])&&xr(e[3]-1)}function J8(e){return xr(e[4])&&xr(e[5])}function vv(e,t,n){if(t&&!(J8(t)&&l1(t))){var o=1e4;e.transform=l1(t)?"translate("+hl(t[4]*o)/o+" "+hl(t[5]*o)/o+")":jN(t)}}function s1(e,t,n){for(var o=e.points,a=[],i=0;i<o.length;i++)a.push(hl(o[i][0]*n)/n),a.push(hl(o[i][1]*n)/n);t.points=a.join(" ")}function c1(e){return!e.smooth}function Q8(e){var t=ye(e,function(n){return typeof n=="string"?[n,n]:n});return function(n,o,a){for(var i=0;i<t.length;i++){var l=t[i],s=n[l[0]];s!=null&&(o[l[1]]=hl(s*a)/a)}}}var e6={circle:[Q8(["cx","cy","r"])],polyline:[s1,c1],polygon:[s1,c1]};function t6(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName==="shape")return!0;return!1}function c_(e,t){var n=e.style,o=e.shape,a=e6[e.type],i={},l=t.animation,s="path",c=e.style.strokePercent,u=t.compress&&Fg(e)||4;if(a&&!t.willUpdate&&!(a[1]&&!a[1](o))&&!(l&&t6(e))&&!(c<1)){s=e.type;var d=Math.pow(10,u);a[0](o,i,d)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var v=e.path;f&&(v.beginPath(),e.buildPath(v,e.shape),e.pathUpdated());var p=v.getVersion(),h=e,m=h.__svgPathBuilder;(h.__svgPathVersion!==p||!m||c!==h.__svgPathStrokePercent)&&(m||(m=h.__svgPathBuilder=new t_),m.reset(u),v.rebuildPath(m,c),m.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=c),i.d=m.getStr()}return vv(i,e.transform),fv(i,n,e,t),pv(i,e),t.animation&&Jc(e,i,t),t.emphasis&&j8(e,i,t),yt(s,e.id+"",i)}function n6(e,t){var n=e.style,o=n.image;if(o&&!Le(o)&&(l_(o)?o=o.src:s_(o)&&(o=o.toDataURL())),!!o){var a=n.x||0,i=n.y||0,l=n.width,s=n.height,c={href:o,width:l,height:s};return a&&(c.x=a),i&&(c.y=i),vv(c,e.transform),fv(c,n,e,t),pv(c,e),t.animation&&Jc(e,c,t),yt("image",e.id+"",c)}}function r6(e,t){var n=e.style,o=n.text;if(o!=null&&(o+=""),!(!o||isNaN(n.x)||isNaN(n.y))){var a=n.font||Br,i=n.x||0,l=QN(n.y||0,Sc(a),n.textBaseline),s=JN[n.textAlign]||n.textAlign,c={"dominant-baseline":"central","text-anchor":s};if(vE(n)){var u="",d=n.fontStyle,f=pE(n.fontSize);if(!parseFloat(f))return;var v=n.fontFamily||mg,p=n.fontWeight;u+="font-size:"+f+";font-family:"+v+";",d&&d!=="normal"&&(u+="font-style:"+d+";"),p&&p!=="normal"&&(u+="font-weight:"+p+";"),c.style=u}else c.style="font: "+a;return o.match(/\s/)&&(c["xml:space"]="preserve"),i&&(c.x=i),l&&(c.y=l),vv(c,e.transform),fv(c,n,e,t),pv(c,e),t.animation&&Jc(e,c,t),yt("text",e.id+"",c,void 0,o)}}function u1(e,t){if(e instanceof We)return c_(e,t);if(e instanceof On)return n6(e,t);if(e instanceof ol)return r6(e,t)}function o6(e,t,n){var o=e.style;if(eL(o)){var a=tL(e),i=n.shadowCache,l=i[a];if(!l){var s=e.getGlobalScale(),c=s[0],u=s[1];if(!c||!u)return;var d=o.shadowOffsetX||0,f=o.shadowOffsetY||0,v=o.shadowBlur,p=tl(o.shadowColor),h=p.opacity,m=p.color,g=v/2/c,E=v/2/u,y=g+" "+E;l=n.zrId+"-s"+n.shadowIdx++,n.defs[l]=yt("filter",l,{id:l,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yt("feDropShadow","",{dx:d/c,dy:f/u,stdDeviation:y,"flood-color":m,"flood-opacity":h})]),i[a]=l}t.filter=Tc(l)}}function u_(e,t,n,o){var a=e[n],i,l={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(Bg(a))i="linearGradient",l.x1=a.x,l.y1=a.y,l.x2=a.x2,l.y2=a.y2;else if(Vg(a))i="radialGradient",l.cx=Ce(a.x,.5),l.cy=Ce(a.y,.5),l.r=Ce(a.r,.5);else{process.env.NODE_ENV!=="production"&&ba("Illegal gradient type.");return}for(var s=a.colorStops,c=[],u=0,d=s.length;u<d;++u){var f=jd(s[u].offset)*100+"%",v=s[u].color,p=tl(v),h=p.color,m=p.opacity,g={offset:f};g["stop-color"]=h,m<1&&(g["stop-opacity"]=m),c.push(yt("stop",u+"",g))}var E=yt(i,"",l,c),y=dv(E),_=o.gradientCache,S=_[y];S||(S=o.zrId+"-g"+o.gradientIdx++,_[y]=S,l.id=S,o.defs[S]=yt(i,S,l,c)),t[n]=Tc(S)}function d_(e,t,n,o){var a=e.style[n],i=e.getBoundingRect(),l={},s=a.repeat,c=s==="no-repeat",u=s==="repeat-x",d=s==="repeat-y",f;if(Mg(a)){var v=a.imageWidth,p=a.imageHeight,h=void 0,m=a.image;if(Le(m)?h=m:l_(m)?h=m.src:s_(m)&&(h=m.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Be(v,g),Be(p,g)}else if(v==null||p==null){var E=function(L,b){if(L){var O=L.elm,w=v||b.width,C=p||b.height;L.tag==="pattern"&&(u?(C=1,w/=i.width):d&&(w=1,C/=i.height)),L.attrs.width=w,L.attrs.height=C,O&&(O.setAttribute("width",w),O.setAttribute("height",C))}},y=Lp(h,null,e,function(L){c||E(A,L),E(f,L)});y&&y.width&&y.height&&(v=v||y.width,p=p||y.height)}f=yt("image","img",{href:h,width:v,height:p}),l.width=v,l.height=p}else a.svgElement&&(f=He(a.svgElement),l.width=a.svgWidth,l.height=a.svgHeight);if(f){var _,S;c?_=S=1:u?(S=1,_=l.width/i.width):d?(_=1,S=l.height/i.height):l.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(l.width=_),S!=null&&!isNaN(S)&&(l.height=S);var I=Hg(a);I&&(l.patternTransform=I);var A=yt("pattern","",l,[f]),x=dv(A),N=o.patternCache,T=N[x];T||(T=o.zrId+"-p"+o.patternIdx++,N[x]=T,l.id=T,A=o.defs[T]=yt("pattern",T,l,[f])),t[n]=Tc(T)}}function a6(e,t,n){var o=n.clipPathCache,a=n.defs,i=o[e.id];if(!i){i=n.zrId+"-c"+n.clipPathIdx++;var l={id:i};o[e.id]=i,a[i]=yt("clipPath",i,l,[c_(e,n)])}t["clip-path"]=Tc(i)}function d1(e){return document.createTextNode(e)}function No(e,t,n){e.insertBefore(t,n)}function f1(e,t){e.removeChild(t)}function p1(e,t){e.appendChild(t)}function f_(e){return e.parentNode}function p_(e){return e.nextSibling}function Id(e,t){e.textContent=t}var v1=58,i6=120,l6=yt("","");function Wf(e){return e===void 0}function Fn(e){return e!==void 0}function s6(e,t,n){for(var o={},a=t;a<=n;++a){var i=e[a].key;i!==void 0&&(process.env.NODE_ENV!=="production"&&o[i]!=null&&console.error("Duplicate key "+i),o[i]=a)}return o}function Pi(e,t){var n=e.key===t.key,o=e.tag===t.tag;return o&&n}function ml(e){var t,n=e.children,o=e.tag;if(Fn(o)){var a=e.elm=o_(o);if(hv(l6,e),Te(n))for(t=0;t<n.length;++t){var i=n[t];i!=null&&p1(a,ml(i))}else Fn(e.text)&&!xe(e.text)&&p1(a,d1(e.text))}else e.elm=d1(e.text);return e.elm}function v_(e,t,n,o,a){for(;o<=a;++o){var i=n[o];i!=null&&No(e,ml(i),t)}}function dc(e,t,n,o){for(;n<=o;++n){var a=t[n];if(a!=null)if(Fn(a.tag)){var i=f_(a.elm);f1(i,a.elm)}else f1(e,a.elm)}}function hv(e,t){var n,o=t.elm,a=e&&e.attrs||{},i=t.attrs||{};if(a!==i){for(n in i){var l=i[n],s=a[n];s!==l&&(l===!0?o.setAttribute(n,""):l===!1?o.removeAttribute(n):n==="style"?o.style.cssText=l:n.charCodeAt(0)!==i6?o.setAttribute(n,l):n==="xmlns:xlink"||n==="xmlns"?o.setAttributeNS(H8,n,l):n.charCodeAt(3)===v1?o.setAttributeNS(U8,n,l):n.charCodeAt(5)===v1?o.setAttributeNS(r_,n,l):o.setAttribute(n,l))}for(n in a)n in i||o.removeAttribute(n)}}function c6(e,t,n){for(var o=0,a=0,i=t.length-1,l=t[0],s=t[i],c=n.length-1,u=n[0],d=n[c],f,v,p,h;o<=i&&a<=c;)l==null?l=t[++o]:s==null?s=t[--i]:u==null?u=n[++a]:d==null?d=n[--c]:Pi(l,u)?(da(l,u),l=t[++o],u=n[++a]):Pi(s,d)?(da(s,d),s=t[--i],d=n[--c]):Pi(l,d)?(da(l,d),No(e,l.elm,p_(s.elm)),l=t[++o],d=n[--c]):Pi(s,u)?(da(s,u),No(e,s.elm,l.elm),s=t[--i],u=n[++a]):(Wf(f)&&(f=s6(t,o,i)),v=f[u.key],Wf(v)?No(e,ml(u),l.elm):(p=t[v],p.tag!==u.tag?No(e,ml(u),l.elm):(da(p,u),t[v]=void 0,No(e,p.elm,l.elm))),u=n[++a]);(o<=i||a<=c)&&(o>i?(h=n[c+1]==null?null:n[c+1].elm,v_(e,h,n,a,c)):dc(e,t,o,i))}function da(e,t){var n=t.elm=e.elm,o=e.children,a=t.children;e!==t&&(hv(e,t),Wf(t.text)?Fn(o)&&Fn(a)?o!==a&&c6(n,o,a):Fn(a)?(Fn(e.text)&&Id(n,""),v_(n,null,a,0,a.length-1)):Fn(o)?dc(n,o,0,o.length-1):Fn(e.text)&&Id(n,""):e.text!==t.text&&(Fn(o)&&dc(n,o,0,o.length-1),Id(n,t.text)))}function u6(e,t){if(Pi(e,t))da(e,t);else{var n=e.elm,o=f_(n);ml(t),o!==null&&(No(o,t.elm,p_(n)),dc(o,[e],0,0))}return t}var d6=0,f6=(function(){function e(t,n,o){if(this.type="svg",this.refreshHover=h1("refreshHover"),this.configLayer=h1("configLayer"),this.storage=n,this._opts=o=de({},o),this.root=t,this._id="zr"+d6++,this._oldVNode=r1(o.width,o.height),t&&!o.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=o_("svg");hv(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(o.width,o.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",u6(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return u1(t,Xf(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var n=this.storage.getDisplayList(!0),o=this._width,a=this._height,i=Xf(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var l=[],s=this._bgVNode=p6(o,a,this._backgroundColor,i);s&&l.push(s);var c=t.compress?null:this._mainVNode=yt("g","main",{},[]);this._paintList(n,i,c?c.children:l),c&&l.push(c);var u=ye(Ue(i.defs),function(v){return i.defs[v]});if(u.length&&l.push(yt("defs","defs",{},u)),t.animation){var d=Y8(i.cssNodes,i.cssAnims,{newline:!0});if(d){var f=yt("style","stl",{},[],d);l.push(f)}}return r1(o,a,l,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},dv(this.renderToVNode({animation:Ce(t.cssAnimation,!0),emphasis:Ce(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ce(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,n,o){for(var a=t.length,i=[],l=0,s,c,u=0,d=0;d<a;d++){var f=t[d];if(!f.invisible){var v=f.__clipPaths,p=v&&v.length||0,h=c&&c.length||0,m=void 0;for(m=Math.max(p-1,h-1);m>=0&&!(v&&c&&v[m]===c[m]);m--);for(var g=h-1;g>m;g--)l--,s=i[l-1];for(var E=m+1;E<p;E++){var y={};a6(v[E],y,n);var _=yt("g","clip-g-"+u++,y,[]);(s?s.children:o).push(_),i[l++]=_,s=_}c=v;var S=u1(f,n);S&&(s?s.children:o).push(S)}}},e.prototype.resize=function(t,n){var o=this._opts,a=this.root,i=this._viewport;if(t!=null&&(o.width=t),n!=null&&(o.height=n),a&&i&&(i.style.display="none",t=H0(a,0,o),n=H0(a,1,o),i.style.display=""),this._width!==t||this._height!==n){if(this._width=t,this._height=n,i){var l=i.style;l.width=t+"px",l.height=n+"px"}if(Tp(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",n));var c=this._bgVNode&&this._bgVNode.elm;c&&(c.setAttribute("width",t),c.setAttribute("height",n))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var n=this.renderToString(),o="data:image/svg+xml;";return t?(n=rL(n),n&&o+"base64,"+n):o+"charset=UTF-8,"+encodeURIComponent(n)},e})();function h1(e){return function(){process.env.NODE_ENV!=="production"&&ba('In SVG mode painter not support method "'+e+'"')}}function p6(e,t,n,o){var a;if(n&&n!=="none")if(a=yt("rect","bg",{width:e,height:t,x:"0",y:"0"}),$g(n))u_({fill:n},a.attrs,"fill",o);else if(Tp(n))d_({style:{fill:n},dirty:nn,getBoundingRect:function(){return{width:e,height:t}}},a.attrs,"fill",o);else{var i=tl(n),l=i.color,s=i.opacity;a.attrs.fill=l,s<1&&(a.attrs["fill-opacity"]=s)}return a}function v6(e){e.registerPainter("svg",f6)}const h6={__name:"Chart",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},type:{type:[Object,String],required:!0},data:{type:Object,required:!0},themeColors:{type:Array,required:!0},textColor:{type:String},lineColor:{type:String},options:{type:Object}},setup(e){Vo([TO,iO,OO,f8,I8,D8,v6]);const t=e;let n=null;const o=r.useTemplateRef("chartRef"),a=r.computed(()=>{let l=[];if(t.themeColors.length>=10)l=t.themeColors;else if(t.themeColors.length===1)l=we(t.themeColors[0]).analogous(10).map(s=>s.toRgbString());else{const s=t.themeColors.length,c=we(t.themeColors[s-1]).analogous(11-s).map(u=>u.toRgbString());l=[...t.themeColors.slice(0,s-1),...c]}return l}),i=()=>{var l,s;const c=HA({type:t.type,data:t.data,themeColors:a.value,textColor:t.textColor,lineColor:t.lineColor,lineSmooth:((l=t.options)===null||l===void 0?void 0:l.lineSmooth)||!1,stack:((s=t.options)===null||s===void 0?void 0:s.stack)||!1});c&&n.setOption(c,!0)};return r.onMounted(()=>{n=lb(o.value,null,{renderer:"svg"}),i();const l=()=>n.resize();new ResizeObserver(l).observe(o.value)}),r.watch(()=>t.type,i),r.watch(()=>t.data,i),r.watch(()=>t.themeColors,i),r.watch(()=>t.textColor,i),(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"chart",ref_key:"chartRef",ref:o},null,512))}},h_=ie(h6,[["__scopeId","data-v-9bffff48"]]),m6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=a=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo))},o=()=>{bt.emit(Et.OPEN_CHART_DATA_EDITOR)};return(a,i)=>{const l=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-chart",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",style:r.normalizeStyle({backgroundColor:e.elementInfo.fill}),onMousedown:i[0]||(i[0]=s=>n(s)),onTouchstart:i[1]||(i[1]=s=>n(s)),onDblclick:i[2]||(i[2]=s=>o())},[r.createVNode(gc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),r.createVNode(h_,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,lineColor:e.elementInfo.lineColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","lineColor","options"])],36)),[[l,e.contextmenus]])],4)],6)}}},g6=ie(m6,[["__scopeId","data-v-72eb0bdc"]]),m_=e=>({hideCells:r.computed(()=>{const n=[];for(let o=0;o<e.value.length;o++){const a=e.value[o];for(let i=0;i<a.length;i++){const l=a[i];if(l.colspan>1||l.rowspan>1)for(let s=o;s<o+l.rowspan;s++)for(let c=s===o?i+1:i;c<i+l.colspan;c++)n.push(`${s}_${c}`)}}return n})}),g_=e=>{const t=r.ref(["",""]);return r.watch(()=>e.value,()=>{e.value&&(t.value=H1(e.value.color))},{immediate:!0}),{subThemeColor:t}},E6=["innerHTML"],y6={__name:"CustomTextarea",props:{value:{type:String,default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const n=e,o=t,a=r.useTemplateRef("textareaRef"),i=r.ref(""),l=r.ref(!1);r.watch(()=>n.value,()=>{l.value||(i.value=n.value,a.value&&(a.value.innerHTML=n.value))},{immediate:!0});const s=()=>{if(!a.value)return;const d=a.value.innerHTML;o("updateValue",d)},c=()=>{l.value=!0,a.value&&(a.value.onpaste=d=>{if(d.preventDefault(),!d.clipboardData)return;const f=d.clipboardData.items[0];f&&f.kind==="string"&&(f.type==="text/plain"?f.getAsString(v=>{if(typeof rp(v)=="object")return;const h=X1(v);if(h){o("insertExcelData",h),a.value&&(a.value.innerHTML=h[0][0]);return}document.execCommand("insertText",!1,v)}):f.type==="text/html"&&f.getAsString(v=>{const p=W1(v);p&&(o("insertExcelData",p),a.value&&(a.value.innerHTML=p[0][0]))}))})},u=()=>{l.value=!1,a.value&&(a.value.onpaste=null)};return r.onBeforeUnmount(()=>{a.value&&(a.value.onpaste=null)}),(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:"custom-textarea",ref_key:"textareaRef",ref:a,contenteditable:!0,onFocus:f[0]||(f[0]=v=>c()),onBlur:f[1]||(f[1]=v=>u()),onInput:f[2]||(f[2]=v=>s()),innerHTML:i.value},null,40,E6))}},_6=ie(y6,[["__scopeId","data-v-b6560cf9"]]),E_=e=>{if(!e)return{};const{bold:t,em:n,underline:o,strikethrough:a,color:i,backcolor:l,fontsize:s,fontname:c,align:u}=e;let d=`${o?"underline":""} ${a?"line-through":""}`;return d===" "&&(d="none"),{fontWeight:t?"bold":"normal",fontStyle:n?"italic":"normal",textDecoration:d,color:i||"#000",backgroundColor:l||"",fontSize:s||"14px",fontFamily:c||"",textAlign:u||"left"}},y_=e=>e.replace(/\n/g,"</br>").replace(/ /g,"&nbsp;"),T6={key:0,class:"handler"},S6=["onMousedown"],I6=["width"],A6=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],N6=["innerHTML"],L6={__name:"EditableTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const n=e,{t:o}=_e(),a=t,{canvasScale:i}=ne.storeToRefs(fe()),l=r.ref(!1),s=r.ref([]),c=r.ref([]),u=r.computed({get(){return n.data},set(G){a("change",G)}}),d=r.computed(()=>n.theme),{subThemeColor:f}=g_(d),v=r.ref([]),p=r.computed(()=>v.value.reduce((G,M)=>G+M));r.watch([()=>n.colWidths,()=>n.width],()=>{v.value=n.colWidths.map(G=>G*n.width)},{immediate:!0});const h=()=>{s.value=[],c.value=[]};r.watch(()=>n.editable,()=>{n.editable||h()});const m=r.computed(()=>{const G=[];for(let M=1;M<v.value.length+1;M++){const R=v.value.slice(0,M).reduce((X,W)=>X+W);G.push(R)}return G}),g=r.computed(()=>n.data),{hideCells:E}=m_(g),y=r.computed(()=>{if(!s.value.length)return[];const[G,M]=s.value;if(!c.value.length)return[`${G}_${M}`];const[R,X]=c.value;if(G===R&&M===X)return[`${G}_${M}`];const W=[],te=Math.min(G,R),ee=Math.min(M,X),ce=Math.max(G,R),se=Math.max(M,X);for(let F=0;F<u.value.length;F++){const j=u.value[F];for(let le=0;le<j.length;le++)F>=te&&F<=ce&&le>=ee&&le<=se&&W.push(`${F}_${le}`)}return W});r.watch(y,(G,M)=>{Xe.isEqual(G,M)||a("changeSelectedCells",y.value)});const _=r.computed(()=>y.value.length>1?null:y.value[0]),S=()=>l.value=!1,I=(G,M,R)=>{G.button===0&&(c.value=[],l.value=!0,s.value=[M,R])},A=(G,M)=>{l.value&&(c.value=[G,M])};r.onMounted(()=>{document.addEventListener("mouseup",S)}),r.onUnmounted(()=>{document.removeEventListener("mouseup",S)});const x=(G,M)=>E.value.includes(`${G}_${M}`),N=G=>{const M=u.value.length-1;s.value=[0,G],c.value=[M,G]},T=G=>{const M=u.value[G].length-1;s.value=[G,0],c.value=[G,M]},L=()=>{const G=u.value.length-1,M=u.value[G].length-1;s.value=[0,0],c.value=[G,M]},b=G=>{const M=JSON.parse(JSON.stringify(u.value)),R=u.value[G],X=[];for(let W=0;W<R.length;W++)x(G,W)&&X.push(W);for(const W of X)for(let te=G;te>=0;te--)if(!x(te,W)){M[te][W].rowspan=M[te][W].rowspan-1;break}M.splice(G,1),u.value=M},O=G=>{const M=JSON.parse(JSON.stringify(u.value)),R=[];for(let X=0;X<u.value.length;X++)x(X,G)&&R.push(X);for(const X of R)for(let W=G;W>=0;W--)if(!x(X,W)){M[X][W].colspan=M[X][W].colspan-1;break}u.value=M.map(X=>(X.splice(G,1),X)),v.value.splice(G,1),a("changeColWidths",v.value)},w=G=>{const M=JSON.parse(JSON.stringify(u.value)),R=[];for(let X=0;X<M[0].length;X++)R.push({colspan:1,rowspan:1,text:"",id:Ne.nanoid(10)});M.splice(G,0,R),u.value=M},C=G=>{u.value=u.value.map(M=>{const R={colspan:1,rowspan:1,text:"",id:Ne.nanoid(10)};return M.splice(G,0,R),M}),v.value.splice(G,0,100),a("changeColWidths",v.value)},P=(G,M)=>{let R=JSON.parse(JSON.stringify(u.value));const X={colspan:1,rowspan:1,text:""};if(G){const W=[];for(let te=0;te<G;te++){const ee=[];for(let ce=0;ce<R[0].length;ce++)ee.push({...X,id:Ne.nanoid(10)});W.push(ee)}R=[...R,...W]}M&&(R=R.map(W=>{const te=[];for(let ee=0;ee<M;ee++){const ce={...X,id:Ne.nanoid(10)};te.push(ce)}return[...W,...te]}),v.value=[...v.value,...new Array(M).fill(100)],a("changeColWidths",v.value)),u.value=R},k=()=>{const[G,M]=s.value,[R,X]=c.value,W=Math.min(G,R),te=Math.min(M,X),ee=Math.max(G,R),ce=Math.max(M,X),se=JSON.parse(JSON.stringify(u.value));se[W][te].rowspan=ee-W+1,se[W][te].colspan=ce-te+1,u.value=se,h()},B=(G,M)=>{const R=JSON.parse(JSON.stringify(u.value));R[G][M].rowspan=1,R[G][M].colspan=1,u.value=R,h()},H=(G,M)=>{h();let R=!0;const X=v.value[M],W=G.pageX,te=50;document.onmousemove=ee=>{if(!R)return;const ce=(ee.pageX-W)/i.value,se=X+ce<te?te:Math.round(X+ce);v.value[M]=se},document.onmouseup=()=>{R=!1,document.onmousemove=null,document.onmouseup=null,a("changeColWidths",v.value)}},U=()=>{const G=JSON.parse(JSON.stringify(u.value));for(let M=0;M<G.length;M++)for(let R=0;R<G[M].length;R++)y.value.includes(`${M}_${R}`)&&(G[M][R].text="");u.value=G},$=()=>{r.nextTick(()=>{const G=document.querySelector(".cell-text.active");G&&G.focus()})},V=()=>{const G=(W,te)=>u.value[W]?u.value[W][te]?x(W,te)?G(W,te+1):[W,te]:G(W+1,0):null;c.value=[];const M=s.value[0],R=s.value[1]+1,X=G(M,R);X?s.value=X:(w(M+1),s.value=[M+1,0]),$()},z=G=>{const M=+y.value[0].split("_")[0],R=+y.value[0].split("_")[1],X=u.value.length,W=u.value[0].length,te=ee=>{if(ee[0]<0||ee[1]<0||ee[0]>X-1||ee[1]>W-1)return[0,0];const ce=`${ee[0]}_${ee[1]}`;return E.value.includes(ce)?G==="UP"?te([ee[0],ee[1]-1]):G==="DOWN"?te([ee[0],ee[1]-1]):G==="LEFT"?te([ee[0]-1,ee[1]]):G==="RIGHT"?te([ee[0]-1,ee[1]]):[0,0]:ee};if(G==="UP"){const ee=M-1;if(ee<0)return;c.value=[],s.value=te([ee,R])}else if(G==="DOWN"){const ee=M+1;if(ee>X-1)return;c.value=[],s.value=te([ee,R])}else if(G==="LEFT"){const ee=R-1;if(ee<0)return;c.value=[],s.value=te([M,ee])}else if(G==="RIGHT"){const ee=R+1;if(ee>W-1)return;c.value=[],s.value=te([M,ee])}$()},D=G=>{var M;const R=window.getSelection();if(R&&R.rangeCount>0){const X=R.getRangeAt(0),W=X.cloneRange();W.selectNodeContents(G),W.setEnd(X.startContainer,X.startOffset);const te=W.toString().length;W.setEnd(X.endContainer,X.endOffset);const ee=W.toString().length,ce=((M=G.textContent)===null||M===void 0?void 0:M.length)||0;return{start:te,end:ee,len:ce}}return null},Y=G=>{if(!n.editable||!y.value.length)return;const M=G.key.toUpperCase();if(y.value.length<2){if(M===Ee.TAB)G.preventDefault(),V();else if(G.ctrlKey&&M===Ee.UP){G.preventDefault();const R=+y.value[0].split("_")[0];w(R)}else if(G.ctrlKey&&M===Ee.DOWN){G.preventDefault();const R=+y.value[0].split("_")[0];w(R+1)}else if(G.ctrlKey&&M===Ee.LEFT){G.preventDefault();const R=+y.value[0].split("_")[1];C(R)}else if(G.ctrlKey&&M===Ee.RIGHT){G.preventDefault();const R=+y.value[0].split("_")[1];C(R+1)}else if(M===Ee.UP){const R=D(G.target);R&&R.start===R.end&&R.start===0&&z("UP")}else if(M===Ee.DOWN){const R=D(G.target);R&&R.start===R.end&&R.start===R.len&&z("DOWN")}else if(M===Ee.LEFT){const R=D(G.target);R&&R.start===R.end&&R.start===0&&z("LEFT")}else if(M===Ee.RIGHT){const R=D(G.target);R&&R.start===R.end&&R.start===R.len&&z("RIGHT")}}else M===Ee.DELETE&&U()};r.onMounted(()=>{document.addEventListener("keydown",Y)}),r.onUnmounted(()=>{document.removeEventListener("keydown",Y)});const K=Xe.debounce(function(G,M,R){u.value[M][R].text=G,a("change",u.value)},300,{trailing:!0}),Z=(G,M,R)=>{const X=G.length,W=G[0].length;let te=0,ee=0;M+X>u.value.length&&(te=M+X-u.value.length),R+W>u.value[0].length&&(ee=R+W-u.value[0].length),(te||ee)&&P(te,ee),r.nextTick(()=>{for(let ce=0;ce<X;ce++)for(let se=0;se<W;se++)u.value[M+ce][R+se]&&(u.value[M+ce][R+se].text=G[ce][se]);a("change",u.value)})},oe=()=>{const G=[];for(let M=0;M<u.value.length;M++){const R=u.value[M],X=[];for(let W=0;W<R.length;W++)x(M,W)||X.push(R[W]);X.length&&G.push(X)}return G},Q=()=>{const G=oe(),M=G.length>1,R=G[0].length>1;return{canDeleteRow:M,canDeleteCol:R}},q=(G,M)=>{const R=y.value.length>1,X=u.value[G][M],W=R,te=!R&&(X.rowspan>1||X.colspan>1);return{canMerge:W,canSplit:te}},re=G=>{const M=G.dataset.cellIndex,R=+M.split("_")[0],X=+M.split("_")[1];y.value.includes(`${R}_${X}`)||(s.value=[R,X],c.value=[]);const{canMerge:W,canSplit:te}=q(R,X),{canDeleteRow:ee,canDeleteCol:ce}=Q();return[{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_COL"),children:[{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_COL_LEFT"),handler:()=>C(X)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_COL_RIGHT"),handler:()=>C(X+1)}]},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_ROW"),children:[{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_ROW_TOP"),handler:()=>w(R)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.INSERT_ROW_BOTTOM"),handler:()=>w(R+1)}]},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.DELETE_COL"),disable:!ce,handler:()=>O(X)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.DELETE_ROW"),disable:!ee,handler:()=>b(R)},{divider:!0},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.MERGE_CELLS"),disable:!W,handler:k},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SPLIT_CELLS"),disable:!te,handler:()=>B(R,X)},{divider:!0},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SELECT_COL"),handler:()=>N(X)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SELECT_ROW"),handler:()=>T(R)},{text:o("PPT_COMPONENTS.TABLE_CONTEXT.SELECT_ALL"),handler:L}]};return(G,M)=>{const R=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:"editable-table",style:r.normalizeStyle({width:p.value+"px"})},[e.editable?(r.openBlock(),r.createElementBlock("div",T6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(X,W)=>(r.openBlock(),r.createElementBlock("div",{class:"drag-line",key:W,style:r.normalizeStyle({left:X+"px"}),onMousedown:te=>H(te,W)},null,44,S6))),128))])):r.createCommentVNode("",!0),r.createElementVNode("table",{class:r.normalizeClass({theme:d.value,"row-header":d.value?.rowHeader,"row-footer":d.value?.rowFooter,"col-header":d.value?.colHeader,"col-footer":d.value?.colFooter}),style:r.normalizeStyle(`--themeColor: ${d.value?.color}; --subThemeColor1: ${r.unref(f)[0]}; --subThemeColor2: ${r.unref(f)[1]}`)},[r.createElementVNode("colgroup",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,(X,W)=>(r.openBlock(),r.createElementBlock("col",{span:"1",key:W,width:X},null,8,I6))),128))]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,(X,W)=>(r.openBlock(),r.createElementBlock("tr",{key:W,style:r.normalizeStyle({height:e.cellMinHeight+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(X,(te,ee)=>r.withDirectives((r.openBlock(),r.createElementBlock("td",{class:r.normalizeClass(["cell",{selected:y.value.includes(`${W}_${ee}`)&&y.value.length>1,active:_.value===`${W}_${ee}`}]),style:r.normalizeStyle({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...r.unref(E_)(te.style)}),key:te.id,rowspan:te.rowspan,colspan:te.colspan,"data-cell-index":`${W}_${ee}`,onMousedown:ce=>I(ce,W,ee),onMouseenter:ce=>A(W,ee)},[_.value===`${W}_${ee}`?(r.openBlock(),r.createBlock(_6,{key:0,class:r.normalizeClass(["cell-text",{active:_.value===`${W}_${ee}`}]),style:r.normalizeStyle({minHeight:e.cellMinHeight-4+"px"}),value:te.text,onUpdateValue:ce=>r.unref(K)(ce,W,ee),onInsertExcelData:ce=>Z(ce,W,ee)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):(r.openBlock(),r.createElementBlock("div",{key:1,class:"cell-text",style:r.normalizeStyle({minHeight:e.cellMinHeight-4+"px"}),innerHTML:r.unref(y_)(te.text)},null,12,N6))],46,A6)),[[r.vShow,!r.unref(E).includes(`${W}_${ee}`)],[R,ce=>re(ce)]])),128))],4))),128))])],6)],4)}}},C6=ie(L6,[["__scopeId","data-v-ac64b07f"]]),x6={class:"element-content"},b6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=fe(),o=pe(),{t:a}=_e(),{canvasScale:i,handleElementId:l,isScaling:s}=ne.storeToRefs(n),c=r.useTemplateRef("elementRef"),{addHistorySnapshot:u}=be(),d=_=>{t.elementInfo.lock||(_.stopPropagation(),t.selectElement(_,t.elementInfo))},f=r.ref(!1);r.watch(l,()=>{l.value!==t.elementInfo.id&&(f.value=!1)}),r.watch(f,()=>{n.setDisableHotkeysState(f.value)});const v=()=>{t.elementInfo.lock||(f.value=!0)},p=r.ref(-1);r.watch(s,()=>{l.value===t.elementInfo.id&&(s.value&&(f.value=!1),!s.value&&p.value!==-1&&(o.updateElement({id:t.elementInfo.id,props:{height:p.value}}),p.value=-1))});const h=_=>{const S=_[0].contentRect;if(!c.value)return;const I=S.height;t.elementInfo.height!==I&&(s.value?p.value=I:o.updateElement({id:t.elementInfo.id,props:{height:I}}))},m=new ResizeObserver(h);r.onMounted(()=>{c.value&&m.observe(c.value)}),r.onUnmounted(()=>{c.value&&m.unobserve(c.value)});const g=_=>{o.updateElement({id:t.elementInfo.id,props:{data:_}}),u()},E=_=>{const S=_.reduce((A,x)=>A+x),I=_.map(A=>A/S);o.updateElement({id:t.elementInfo.id,props:{width:S,colWidths:I}}),u()},y=_=>{r.nextTick(()=>n.setSelectedTableCells(_))};return(_,S)=>{const I=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:c,style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",x6,[r.createVNode(C6,{onMousedown:S[0]||(S[0]=r.withModifiers(()=>{},["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:f.value,onChange:S[1]||(S[1]=A=>g(A)),onChangeColWidths:S[2]||(S[2]=A=>E(A)),onChangeSelectedCells:S[3]||(S[3]=A=>y(A))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!f.value||e.elementInfo.lock?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:S[4]||(S[4]=A=>v()),onMousedown:S[5]||(S[5]=A=>d(A)),onTouchstart:S[6]||(S[6]=A=>d(A))},[r.unref(l)===e.elementInfo.id?(r.openBlock(),r.createElementBlock("div",{key:0,class:"mask-tip",style:r.normalizeStyle({transform:`scale(${1/r.unref(i)})`})},r.toDisplayString(r.unref(a)("PPT_COMPONENTS.TABLE_DBLCLICK_EDIT")),5)):r.createCommentVNode("",!0)],34)):r.createCommentVNode("",!0)])),[[I,e.contextmenus]])],4)],6)}}},w6=ie(b6,[["__scopeId","data-v-a259991f"]]),O6=["width","height","stroke","stroke-width"],R6=["transform"],k6=["d"],D6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=a=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo))},o=()=>{bt.emit(Et.OPEN_LATEX_EDITOR)};return(a,i)=>{const l=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-latex",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",onMousedown:i[0]||(i[0]=s=>n(s)),onTouchstart:i[1]||(i[1]=s=>n(s)),onDblclick:i[2]||(i[2]=s=>o())},[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{d:e.elementInfo.path},null,8,k6)],8,R6)],8,O6))],32)),[[l,e.contextmenus]])],4)],6)}}},P6=ie(D6,[["__scopeId","data-v-3b9080fc"]]),M6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=(a,i=!0)=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo,i))};return(a,i)=>{const l=r.resolveComponent("VideoPlayer"),s=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-video",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",onMousedown:i[2]||(i[2]=c=>o(c,!1)),onTouchstart:i[3]||(i[3]=c=>o(c,!1))},[r.createVNode(l,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:r.unref(n)},null,8,["width","height","src","poster","scale"]),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(["t","b","l","r"],c=>r.createElementVNode("div",{class:r.normalizeClass(["handler-border",c]),key:c,onMousedown:i[0]||(i[0]=u=>o(u)),onTouchstart:i[1]||(i[1]=u=>o(u))},null,34)),64))],32)),[[s,e.contextmenus]])],4)],6)}}},B6=ie(M6,[["__scopeId","data-v-60bb0bc4"]]),V6={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,handleElementId:o}=ne.storeToRefs(fe()),{viewportRatio:a,viewportSize:i}=ne.storeToRefs(pe()),l=r.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),s=r.computed(()=>{const u=i.value,d=i.value*a.value,f=280/n.value,v=50/n.value,p=t.elementInfo.width,h=t.elementInfo.height,m=t.elementInfo.left,g=t.elementInfo.top;let E=0,y=h;return m+f>=u&&(E=p-f),g+h+v>=d&&(y=-v),{left:E+"px",top:y+"px"}}),c=u=>{t.elementInfo.lock||(u.stopPropagation(),t.selectElement(u,t.elementInfo))};return(u,d)=>{const f=r.resolveComponent("AiPptVolumeNotice"),v=r.resolveComponent("AudioPlayer"),p=r.resolveDirective("contextmenu");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["editable-element-audio",{lock:e.elementInfo.lock}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"element-content",onMousedown:d[1]||(d[1]=h=>c(h)),onTouchstart:d[2]||(d[2]=h=>c(h))},[r.createVNode(f,{class:"audio-icon",style:r.normalizeStyle({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"]),r.unref(o)===e.elementInfo.id?(r.openBlock(),r.createBlock(v,{key:0,class:"audio-player",style:r.normalizeStyle({...s.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:r.unref(n),onMousedown:d[0]||(d[0]=r.withModifiers(()=>{},["stop"]))},null,8,["style","src","loop","scale"])):r.createCommentVNode("",!0)],32)),[[p,e.contextmenus]])],4)],6)}}},$6=ie(V6,[["__scopeId","data-v-498b91e9"]]),F6=["id"],H6={__name:"EditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{t:n}=_e(),o=r.computed(()=>({[Ze.IMAGE]:wI,[Ze.TEXT]:SA,[Ze.SHAPE]:kA,[Ze.LINE]:FA,[Ze.CHART]:g6,[Ze.TABLE]:w6,[Ze.LATEX]:P6,[Ze.VIDEO]:B6,[Ze.AUDIO]:$6})[t.elementInfo.type]||null),{orderElement:a}=vc(),{alignElementToCanvas:i}=cp(),{combineElements:l,uncombineElements:s}=ip(),{deleteElement:c}=fc(),{lockElement:u,unlockElement:d}=j1(),{copyElement:f,pasteElement:v,cutElement:p}=lp(),{selectAllElements:h}=pc(),m=()=>t.elementInfo.lock?[{text:n("EDITABLE_ELEMENT.UNLOCK"),handler:()=>d(t.elementInfo)}]:[{text:n("COMMON.CUT"),subText:"Ctrl + X",handler:p},{text:n("COMMON.COPY"),subText:"Ctrl + C",handler:f},{text:n("COMMON.PASTE"),subText:"Ctrl + V",handler:v},{divider:!0},{text:n("EDITABLE_ELEMENT.ALIGN_HORIZONTAL"),handler:()=>i(Ve.HORIZONTAL),children:[{text:n("EDITABLE_ELEMENT.ALIGN_CENTER_BOTH"),handler:()=>i(Ve.CENTER)},{text:n("EDITABLE_ELEMENT.ALIGN_HORIZONTAL"),handler:()=>i(Ve.HORIZONTAL)},{text:n("EDITABLE_ELEMENT.ALIGN_LEFT"),handler:()=>i(Ve.LEFT)},{text:n("EDITABLE_ELEMENT.ALIGN_RIGHT"),handler:()=>i(Ve.RIGHT)}]},{text:n("EDITABLE_ELEMENT.ALIGN_VERTICAL"),handler:()=>i(Ve.VERTICAL),children:[{text:n("EDITABLE_ELEMENT.ALIGN_CENTER_BOTH"),handler:()=>i(Ve.CENTER)},{text:n("EDITABLE_ELEMENT.ALIGN_VERTICAL"),handler:()=>i(Ve.VERTICAL)},{text:n("EDITABLE_ELEMENT.ALIGN_TOP"),handler:()=>i(Ve.TOP)},{text:n("EDITABLE_ELEMENT.ALIGN_BOTTOM"),handler:()=>i(Ve.BOTTOM)}]},{divider:!0},{text:n("EDITABLE_ELEMENT.BRING_TO_FRONT"),disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,ft.TOP),children:[{text:n("EDITABLE_ELEMENT.BRING_TO_FRONT"),handler:()=>a(t.elementInfo,ft.TOP)},{text:n("EDITABLE_ELEMENT.MOVE_UP"),handler:()=>a(t.elementInfo,ft.UP)}]},{text:n("EDITABLE_ELEMENT.SEND_TO_BACK"),disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,ft.BOTTOM),children:[{text:n("EDITABLE_ELEMENT.SEND_TO_BACK"),handler:()=>a(t.elementInfo,ft.BOTTOM)},{text:n("EDITABLE_ELEMENT.MOVE_DOWN"),handler:()=>a(t.elementInfo,ft.DOWN)}]},{divider:!0},{text:n("EDITABLE_ELEMENT.SET_LINK"),handler:t.openLinkDialog},{text:t.elementInfo.groupId?n("EDITABLE_ELEMENT.UNGROUP"):n("EDITABLE_ELEMENT.GROUP"),subText:"Ctrl + G",handler:t.elementInfo.groupId?s:l,hide:!t.isMultiSelect},{text:n("COMMON.SELECT_ALL"),subText:"Ctrl + A",handler:h},{text:n("EDITABLE_ELEMENT.LOCK"),subText:"Ctrl + L",handler:u},{text:n("COMMON.DELETE"),subText:"Delete",handler:c}];return(g,E)=>(r.openBlock(),r.createElementBlock("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:r.normalizeStyle({zIndex:e.elementIndex})},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:m},null,8,["elementInfo","selectElement"]))],12,F6))}},U6={__name:"MouseSelection",props:{top:{type:Number,required:!0},left:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},quadrant:{type:Number,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`mouse-selection quadrant-${e.quadrant}`),style:r.normalizeStyle({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}},G6=ie(U6,[["__scopeId","data-v-9373e579"]]),z6={class:"grid-lines"},Y6=["d","stroke"],X6={__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:n}=ne.storeToRefs(fe()),{currentSlide:o,viewportRatio:a,viewportSize:i}=ne.storeToRefs(pe()),l=r.computed(()=>{var u;return(u=o.value)===null||u===void 0?void 0:u.background}),s=r.computed(()=>{var u;const d=((u=l.value)===null||u===void 0?void 0:u.color)||"#fff",f=["#000","#fff"];return we.mostReadable(d,f,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()}),c=r.computed(()=>{const u=i.value,d=i.value*a.value;let f="";for(let v=0;v<=Math.floor(d/n.value);v++)f+=`M0 ${v*n.value} L${u} ${v*n.value} `;for(let v=0;v<=Math.floor(u/n.value);v++)f+=`M${v*n.value} 0 L${v*n.value} ${d} `;return f});return(u,d)=>(r.openBlock(),r.createElementBlock("svg",z6,[r.createElementVNode("path",{style:r.normalizeStyle({transform:`scale(${r.unref(t)})`}),d:c.value,fill:"none",stroke:s.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,Y6)]))}},W6=ie(X6,[["__scopeId","data-v-6ecd6c64"]]),__=e=>({backgroundStyle:r.computed(()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:n,color:o,image:a,gradient:i}=e.value;if(n==="solid")return{backgroundColor:o};if(n==="image"&&a){const{src:l,size:s}=a;return l?s==="repeat"?{backgroundImage:`url(${l}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${l}`,backgroundRepeat:"no-repeat",backgroundSize:s||"cover"}:{backgroundColor:"#fff"}}else if(n==="gradient"&&i){const{type:l,colors:s,rotate:c}=i,u=s.map(d=>`${d.color} ${d.pos}%`);return l==="radial"?{backgroundImage:`radial-gradient(${u.join(",")}`}:{backgroundImage:`linear-gradient(${c}deg, ${u.join(",")}`}}return{backgroundColor:"#fff"}})}),K6={__name:"ViewportBackground",setup(e){const{gridLineSize:t}=ne.storeToRefs(fe()),{currentSlide:n}=ne.storeToRefs(pe()),o=r.computed(()=>{var i;return(i=n.value)===null||i===void 0?void 0:i.background}),{backgroundStyle:a}=__(o);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:"viewport-background",style:r.normalizeStyle(r.unref(a))},[r.unref(t)?(r.openBlock(),r.createBlock(W6,{key:0})):r.createCommentVNode("",!0)],4))}},q6=ie(K6,[["__scopeId","data-v-6be5d55c"]]),Z6={__name:"AlignmentLine",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0},canvasScale:{type:Number,required:!0}},setup(e){const t=e,n=r.computed(()=>t.axis.x*t.canvasScale+"px"),o=r.computed(()=>t.axis.y*t.canvasScale+"px"),a=r.computed(()=>t.type==="vertical"?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:"alignment-line",style:r.normalizeStyle({left:n.value,top:o.value})},[r.createElementVNode("div",{class:r.normalizeClass(["line",e.type]),style:r.normalizeStyle(a.value)},null,6)],4))}},j6=ie(Z6,[["__scopeId","data-v-1e3607b1"]]),J6={class:"ruler"},Q6={key:0},eR={key:0},tR={__name:"Ruler",props:{viewportStyles:{type:Object,required:!0},elementList:{type:Array,required:!0}},setup(e){const t=e,{canvasScale:n,activeElementIdList:o}=ne.storeToRefs(fe()),{viewportRatio:a,viewportSize:i}=ne.storeToRefs(pe()),l=r.ref(null);r.watchEffect(()=>{const c=t.elementList.filter(u=>o.value.includes(u.id));if(!c.length)return l.value=null;l.value=tr(c)});const s=r.computed(()=>t.viewportStyles.width*n.value/(i.value/100));return(c,u)=>(r.openBlock(),r.createElementBlock("div",J6,[r.createElementVNode("div",{class:"h",style:r.normalizeStyle({width:e.viewportStyles.width*r.unref(n)+"px",left:e.viewportStyles.left+"px"})},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(20,d=>r.createElementVNode("div",{class:r.normalizeClass(["ruler-marker-100",{hide:s.value<36,omit:s.value<72}]),key:`h-marker-100-${d}`,style:r.normalizeStyle({width:s.value+"px"})},[d*100<=r.unref(i)?(r.openBlock(),r.createElementBlock("span",Q6,r.toDisplayString(d*100),1)):r.createCommentVNode("",!0)],6)),64)),l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"range",style:r.normalizeStyle({left:l.value.minX*r.unref(n)+"px",width:(l.value.maxX-l.value.minX)*r.unref(n)+"px"})},null,4)):r.createCommentVNode("",!0)],4),r.createElementVNode("div",{class:"v",style:r.normalizeStyle({height:e.viewportStyles.height*r.unref(n)+"px",top:e.viewportStyles.top+"px"})},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(20,d=>r.createElementVNode("div",{class:r.normalizeClass(["ruler-marker-100",{hide:s.value<36,omit:s.value<72}]),key:`v-marker-100-${d}`,style:r.normalizeStyle({height:s.value+"px"})},[d*100<=r.unref(i)*r.unref(a)?(r.openBlock(),r.createElementBlock("span",eR,r.toDisplayString(d*100),1)):r.createCommentVNode("",!0)],6)),64)),l.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"range",style:r.normalizeStyle({top:l.value.minY*r.unref(n)+"px",height:(l.value.maxY-l.value.minY)*r.unref(n)+"px"})},null,4)):r.createCommentVNode("",!0)],4)]))}},nR=ie(tR,[["__scopeId","data-v-91d8b4f2"]]),rR=["width","height"],oR=["d"],aR={__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const n=t,o=fe(),{creatingElement:a}=ne.storeToRefs(o),{ctrlOrShiftKeyActive:i}=ne.storeToRefs(ln()),l=r.ref(),s=r.ref(),c=r.useTemplateRef("selectionRef"),u=r.ref({x:0,y:0});r.onMounted(()=>{if(!c.value)return;const{x:p,y:h}=c.value.getBoundingClientRect();u.value={x:p,y:h}});const d=p=>{let h=!0;const m=p.pageX,g=p.pageY;l.value=[m,g],document.onmousemove=E=>{if(!a.value||!h)return;let y=E.pageX,_=E.pageY;if(i.value){const S=y-m,I=_-g,A=Math.abs(S),x=Math.abs(I);if(a.value.type==="shape"){const N=I>0&&S<0||I<0&&S>0;A>x?_=N?g-S:g+S:y=N?m-I:m+I}else a.value.type==="line"&&(A>x?_=g:y=m)}s.value=[y,_]},document.onmouseup=E=>{var y,_;if(document.onmousemove=null,document.onmouseup=null,E.button===2){setTimeout(()=>o.setCreatingElement(null),0);return}h=!1;const S=E.pageX,I=E.pageY,A=30;if(((y=a.value)===null||y===void 0?void 0:y.type)==="line"&&(Math.abs(S-m)>=A||Math.abs(I-g)>=A))n("created",{start:l.value,end:s.value});else if(((_=a.value)===null||_===void 0?void 0:_.type)!=="line"&&Math.abs(S-m)>=A&&Math.abs(I-g)>=A)n("created",{start:l.value,end:s.value});else{const N=Math.min(S,m),T=Math.min(I,g),L=Math.max(S,m),b=Math.max(I,g),O=L-N>=A?L-N:200,w=b-T>=A?b-T:200;n("created",{start:[N,T],end:[N+O,T+w]})}}},f=r.computed(()=>{if(!l.value||!s.value||!a.value||a.value.type!=="line")return null;const[p,h]=l.value,[m,g]=s.value,E=Math.min(p,m),y=Math.max(p,m),_=Math.min(h,g),S=Math.max(h,g),I=y-E>=24?y-E:24,A=S-_>=24?S-_:24,x=p===E?0:y-E,N=h===_?0:S-_,T=m===E?0:y-E,L=g===_?0:S-_,b=`M${x}, ${N} L${T}, ${L}`;return{svgWidth:I,svgHeight:A,startX:x,startY:N,endX:T,endY:L,path:b}}),v=r.computed(()=>{if(!l.value||!s.value)return{};const[p,h]=l.value,[m,g]=s.value,E=Math.min(p,m),y=Math.max(p,m),_=Math.min(h,g),S=Math.max(h,g),I=y-E,A=S-_;return{left:E-u.value.x+"px",top:_-u.value.y+"px",width:I+"px",height:A+"px"}});return(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:"element-create-selection",ref_key:"selectionRef",ref:c,onMousedown:h[0]||(h[0]=r.withModifiers(m=>d(m),["stop"])),onContextmenu:h[1]||(h[1]=r.withModifiers(()=>{},["stop","prevent"]))},[l.value&&s.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["selection",r.unref(a)?.type]),style:r.normalizeStyle(v.value)},[r.unref(a)?.type==="line"&&f.value?(r.openBlock(),r.createElementBlock("svg",{key:0,overflow:"visible",width:f.value.svgWidth,height:f.value.svgHeight},[r.createElementVNode("path",{d:f.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,oR)],8,rR)):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)],544))}},iR=ie(aR,[["__scopeId","data-v-42856106"]]),lR={overflow:"visible"},sR=["d","fill"],cR={__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const n=t,o=fe(),{ctrlOrShiftKeyActive:a}=ne.storeToRefs(ln()),{theme:i}=ne.storeToRefs(pe()),l=r.useTemplateRef("shapeCanvasRef"),s=r.ref(!1),c=r.ref({x:0,y:0});r.onMounted(()=>{if(!l.value)return;const{x:I,y:A}=l.value.getBoundingClientRect();c.value={x:I,y:A}});const u=r.ref(null),d=r.ref([]),f=r.ref(!1),{t:v}=_e(),p=(I,A=!1)=>{let x=I.pageX-c.value.x,N=I.pageY-c.value.y;if(A)return{pageX:x,pageY:N};if(a.value&&d.value.length){const[T,L]=d.value[d.value.length-1];Math.abs(T-x)-Math.abs(L-N)>0?N=L:x=T}return{pageX:x,pageY:N}},h=I=>{if(s.value){const{pageX:N,pageY:T}=p(I,!0);d.value.push([N,T]),u.value=null;return}const{pageX:A,pageY:x}=p(I);if(u.value=[A,x],d.value.length>=2){const[N,T]=d.value[0];Math.abs(N-A)<5&&Math.abs(T-x)<5?f.value=!0:f.value=!1}else f.value=!1},m=r.computed(()=>{let I="";for(let A=0;A<d.value.length;A++){const x=d.value[A];A===0?I+=`M ${x[0]} ${x[1]} `:I+=`L ${x[0]} ${x[1]} `}return d.value.length&&u.value&&(I+=`L ${u.value[0]} ${u.value[1]}`),I}),g=(I=!0)=>{const A=d.value.map(B=>B[0]),x=d.value.map(B=>B[1]),N=Math.min(...A),T=Math.min(...x),L=Math.max(...A),b=Math.max(...x),O=d.value.map(B=>[B[0]-N,B[1]-T]);let w="";for(let B=0;B<O.length;B++){const H=O[B];B===0?w+=`M ${H[0]} ${H[1]} `:w+=`L ${H[0]} ${H[1]} `}I&&(w+="Z");const C=[N+c.value.x,T+c.value.y],P=[L+c.value.x,b+c.value.y],k=[L-N,b-T];return{start:C,end:P,path:w,viewBox:k}},E=I=>{const{pageX:A,pageY:x}=p(I);s.value=!0,f.value?n("created",g()):d.value.push([A,x]),document.onmouseup=()=>{s.value=!1}},y=()=>{o.setCreatingCustomShapeState(!1)},_=()=>{n("created",{...g(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:i.value.themeColors[0],style:"solid"}}),y()},S=I=>{const A=I.key.toUpperCase();A===Ee.ESC&&y(),A===Ee.ENTER&&_()};return r.onMounted(()=>{Ae.success(v("CANVAS.CREATE_SHAPE_TIP"),{duration:0}),document.addEventListener("keydown",S)}),r.onUnmounted(()=>{document.removeEventListener("keydown",S),Ae.closeAll()}),(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:l,onMousedown:A[0]||(A[0]=r.withModifiers(x=>E(x),["stop"])),onMousemove:A[1]||(A[1]=x=>h(x)),onContextmenu:A[2]||(A[2]=r.withModifiers(x=>y(),["stop","prevent"]))},[(r.openBlock(),r.createElementBlock("svg",lR,[r.createElementVNode("path",{d:m.value,stroke:"#d14424",fill:f.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,sR)]))],544))}},uR=ie(cR,[["__scopeId","data-v-22fbde12"]]),Za=(e,t)=>{const n=r.computed(()=>[{direction:me.LEFT_TOP,style:{}},{direction:me.TOP,style:{left:e.value/2+"px"}},{direction:me.RIGHT_TOP,style:{left:e.value+"px"}},{direction:me.LEFT,style:{top:t.value/2+"px"}},{direction:me.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:me.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:me.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:me.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}]),o=r.computed(()=>[{direction:me.LEFT,style:{top:t.value/2+"px"}},{direction:me.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}]),a=r.computed(()=>[{direction:me.TOP,style:{left:e.value/2+"px"}},{direction:me.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}]),i=r.computed(()=>[{type:ha.T,style:{width:e.value+"px"}},{type:ha.B,style:{top:t.value+"px",width:e.value+"px"}},{type:ha.L,style:{height:t.value+"px"}},{type:ha.R,style:{left:e.value+"px",height:t.value+"px"}}]);return{resizeHandlers:n,textElementResizeHandlers:o,verticalTextElementResizeHandlers:a,borderLines:i}},dR={__name:"ResizeHandler",props:{type:{type:String},rotate:{type:Number,default:0}},setup(e){const t=e,n=r.computed(()=>{const o="rotate-",a=t.rotate;return a>-22.5&&a<=22.5?o+0:a>22.5&&a<=67.5?o+45:a>67.5&&a<=112.5?o+90:a>112.5&&a<=157.5?o+135:a>157.5||a<=-157.5?o+0:a>-157.5&&a<=-112.5?o+45:a>-112.5&&a<=-67.5?o+90:a>-67.5&&a<=-22.5?o+135:o+0});return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["resize-handler",n.value,e.type])},null,2))}},zo=ie(dR,[["__scopeId","data-v-75ba5f8e"]]),fR={__name:"BorderLine",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-line",e.type,{wide:e.isWide}])},null,2))}},ja=ie(fR,[["__scopeId","data-v-ec5612b2"]]),pR={__name:"MultiSelectOperate",props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup(e){const t=e,{activeElementIdList:n,canvasScale:o}=ne.storeToRefs(fe()),a=r.computed(()=>t.elementList.filter(v=>n.value.includes(v.id))),i=r.ref({minX:0,maxX:0,minY:0,maxY:0}),l=r.computed(()=>(i.value.maxX-i.value.minX)*o.value),s=r.computed(()=>(i.value.maxY-i.value.minY)*o.value),{resizeHandlers:c,borderLines:u}=Za(l,s),d=()=>{const{minX:v,maxX:p,minY:h,maxY:m}=tr(a.value);i.value={minX:v,maxX:p,minY:h,maxY:m}};r.watchEffect(d);const f=r.computed(()=>a.value.some(v=>!((v.type==="image"||v.type==="shape")&&!v.rotate)));return(v,p)=>(r.openBlock(),r.createElementBlock("div",{class:"multi-select-operate",style:r.normalizeStyle({left:i.value.minX*r.unref(o)+"px",top:i.value.minY*r.unref(o)+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u),h=>(r.openBlock(),r.createBlock(ja,{key:h.type,type:h.type,style:r.normalizeStyle(h.style)},null,8,["type","style"]))),128)),f.value?r.createCommentVNode("",!0):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(c),h=>(r.openBlock(),r.createBlock(zo,{key:h.direction,type:h.direction,style:r.normalizeStyle(h.style),onMousedown:r.withModifiers(m=>e.scaleMultiElement(m,i.value,h.direction),["stop"])},null,8,["type","style","onMousedown"]))),128))],4))}},vR=ie(pR,[["__scopeId","data-v-dd904583"]]),hR={},mR={class:"rotate-handler"};function gR(e,t){return r.openBlock(),r.createElementBlock("div",mR)}const Nl=ie(hR,[["render",gR],["__scopeId","data-v-b399a3d2"]]),ER={inheritAttrs:!1},yR=Object.assign(ER,{__name:"ImageElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,clipingImageElementId:o}=ne.storeToRefs(fe()),a=r.computed(()=>o.value===t.elementInfo.id),i=r.computed(()=>t.elementInfo.width*n.value),l=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:s,borderLines:c}=Za(i,l);return(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["image-element-operate",{cliping:a.value}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),f=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:f.type,type:f.type,style:r.normalizeStyle(f.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s),f=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:f.direction,type:f.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(f.style),onMousedown:r.withModifiers(v=>e.scaleElement(v,e.elementInfo,f.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:i.value/2+"px"}),onMousedown:d[0]||(d[0]=r.withModifiers(f=>e.rotateElement(f,e.elementInfo),["stop"]))},null,8,["style"])],64)):r.createCommentVNode("",!0)],2))}}),_R=ie(yR,[["__scopeId","data-v-c89993da"]]),TR={class:"text-element-operate"},SR={inheritAttrs:!1},IR=Object.assign(SR,{__name:"TextElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.width*n.value),a=r.computed(()=>t.elementInfo.height*n.value),{textElementResizeHandlers:i,verticalTextElementResizeHandlers:l,borderLines:s}=Za(o,a),c=r.computed(()=>t.elementInfo.vertical?l.value:i.value);return(u,d)=>(r.openBlock(),r.createElementBlock("div",TR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s),f=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:f.type,type:f.type,style:r.normalizeStyle(f.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,f=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:f.direction,type:f.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(f.style),onMousedown:r.withModifiers(v=>e.scaleElement(v,e.elementInfo,f.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:o.value/2+"px"}),onMousedown:d[0]||(d[0]=r.withModifiers(f=>e.rotateElement(f,e.elementInfo),["stop"]))},null,8,["style"])],64)):r.createCommentVNode("",!0)]))}}),AR={class:"shape-element-operate"},NR=["onMousedown"],LR={inheritAttrs:!1},CR=Object.assign(LR,{__name:"ShapeElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.width*n.value),a=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:i,borderLines:l}=Za(o,a),s=r.computed(()=>{if(!t.elementInfo.pathFormula||t.elementInfo.keypoints===void 0)return[];const c=$o[t.elementInfo.pathFormula];return t.elementInfo.keypoints.map((u,d)=>{const f=c.getBaseSize[d],v=c.relative[d],p=f(t.elementInfo.width,t.elementInfo.height)*u;let h={};return v==="left"?h={left:p*n.value+"px"}:v==="right"?h={left:(t.elementInfo.width-p)*n.value+"px"}:v==="center"?h={left:(t.elementInfo.width-p)/2*n.value+"px"}:v==="top"?h={top:p*n.value+"px"}:v==="bottom"?h={top:(t.elementInfo.height-p)*n.value+"px"}:v==="left_bottom"?h={left:p*n.value+"px",top:t.elementInfo.height*n.value+"px"}:v==="right_bottom"?h={left:(t.elementInfo.width-p)*n.value+"px",top:t.elementInfo.height*n.value+"px"}:v==="top_right"?h={left:t.elementInfo.width*n.value+"px",top:p*n.value+"px"}:v==="bottom_right"&&(h={left:t.elementInfo.width*n.value+"px",top:(t.elementInfo.height-p)*n.value+"px"}),{keypoint:u,styles:h}})});return(c,u)=>(r.openBlock(),r.createElementBlock("div",AR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),d=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:d.type,type:d.type,style:r.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),d=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(d.style),onMousedown:r.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:o.value/2+"px"}),onMousedown:u[0]||(u[0]=r.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:"operate-keypoint-handler",key:f,style:r.normalizeStyle(d.styles),onMousedown:r.withModifiers(v=>e.moveShapeKeypoint(v,e.elementInfo,f),["stop"])},null,44,NR))),128))],64)):r.createCommentVNode("",!0)]))}}),xR=ie(CR,[["__scopeId","data-v-5d1f3238"]]),bR={class:"line-element-operate"},wR=["width","height","stroke"],OR={key:0},RR=["x1","y1","x2","y2"],kR=["x1","y1","x2","y2"],DR=["x1","y1","x2","y2"],PR=["x1","y1","x2","y2"],MR={inheritAttrs:!1},BR=Object.assign(MR,{__name:"LineElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0])),a=r.computed(()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1])),i=r.computed(()=>{const l=[{handler:Bt.START,style:{left:t.elementInfo.start[0]*n.value+"px",top:t.elementInfo.start[1]*n.value+"px"}},{handler:Bt.END,style:{left:t.elementInfo.end[0]*n.value+"px",top:t.elementInfo.end[1]*n.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken||t.elementInfo.broken2){const s=t.elementInfo.curve||t.elementInfo.broken||t.elementInfo.broken2;l.push({handler:Bt.C,style:{left:s[0]*n.value+"px",top:s[1]*n.value+"px"}})}else if(t.elementInfo.cubic){const[s,c]=t.elementInfo.cubic;l.push({handler:Bt.C1,style:{left:s[0]*n.value+"px",top:s[1]*n.value+"px"}}),l.push({handler:Bt.C2,style:{left:c[0]*n.value+"px",top:c[1]*n.value+"px"}})}return l});return(l,s)=>(r.openBlock(),r.createElementBlock("div",bR,[e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:c.handler,style:r.normalizeStyle(c.style),onMousedown:r.withModifiers(u=>e.dragLineElement(u,e.elementInfo,c.handler),["stop"])},null,8,["style","onMousedown"]))),128)),(r.openBlock(),r.createElementBlock("svg",{width:o.value||1,height:a.value||1,stroke:e.elementInfo.color,overflow:"visible",style:r.normalizeStyle({transform:`scale(${r.unref(n)})`})},[e.elementInfo.curve?(r.openBlock(),r.createElementBlock("g",OR,[r.createElementVNode("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,RR),r.createElementVNode("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,kR)])):r.createCommentVNode("",!0),e.elementInfo.cubic?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(e.elementInfo.cubic,(c,u)=>(r.openBlock(),r.createElementBlock("g",{key:u},[u===0?(r.openBlock(),r.createElementBlock("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:c[0],y2:c[1]},null,8,DR)):r.createCommentVNode("",!0),u===1?(r.openBlock(),r.createElementBlock("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:c[0],y2:c[1]},null,8,PR)):r.createCommentVNode("",!0)]))),128)):r.createCommentVNode("",!0)],12,wR))],64)):r.createCommentVNode("",!0)]))}}),VR=ie(BR,[["__scopeId","data-v-74abd926"]]),$R={class:"table-element-operate"},FR={inheritAttrs:!1},HR=Object.assign(FR,{__name:"TableElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.outline.width||1),a=r.computed(()=>(t.elementInfo.width+o.value)*n.value),i=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:l,borderLines:s}=Za(a,i);return(c,u)=>(r.openBlock(),r.createElementBlock("div",$R,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s),d=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:d.type,type:d.type,style:r.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),d=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(d.style),onMousedown:r.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),r.createVNode(Nl,{class:"operate-rotate-handler",style:r.normalizeStyle({left:a.value/2+"px"}),onMousedown:u[0]||(u[0]=r.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"])],64)):r.createCommentVNode("",!0)]))}}),UR={class:"common-element-operate"},GR={inheritAttrs:!1},gs=Object.assign(GR,{__name:"CommonElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=ne.storeToRefs(fe()),o=r.computed(()=>t.elementInfo.width*n.value),a=r.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:i,borderLines:l}=Za(o,a),s=r.computed(()=>["chart","video","audio"].includes(t.elementInfo.type));return(c,u)=>(r.openBlock(),r.createElementBlock("div",UR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),d=>(r.openBlock(),r.createBlock(ja,{class:"operate-border-line",key:d.type,type:d.type,style:r.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),d=>(r.openBlock(),r.createBlock(zo,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:r.normalizeStyle(d.style),onMousedown:r.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),s.value?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Nl,{key:0,class:"operate-rotate-handler",style:r.normalizeStyle({left:o.value/2+"px"}),onMousedown:u[0]||(u[0]=r.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"]))],64)):r.createCommentVNode("",!0)]))}}),T_=()=>{const e=pe(),{addHistorySnapshot:t}=be(),{t:n}=_e();return{setLink:(i,l)=>{const s=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(l.type==="web"&&!s.test(l.target))return Ae.error(n("RICH_TEXT.INVALID_LINK")),!1;if(l.type==="slide"&&!l.target)return Ae.error(n("LINK_DIALOG.SELECT_TARGET")),!1;const c={link:l};return e.updateElement({id:i.id,props:c}),t(),!0},removeLink:i=>{e.removeElementProps({id:i.id,propName:"link"}),t()}}},zR=["href"],YR={class:"btns"},XR={__name:"LinkHandler",props:{elementInfo:{type:Object,required:!0},link:{type:Object,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,n=fe(),o=pe(),{canvasScale:a}=ne.storeToRefs(n),{slides:i}=ne.storeToRefs(o),{t:l}=_e(),{removeLink:s}=T_(),c=r.computed(()=>t.elementInfo.type==="line"?0:t.elementInfo.height),u=d=>{const f=i.value.findIndex(v=>v.id===d);f!==-1&&(n.setActiveElementIdList([]),o.updateSlideIndex(f))};return(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:"link-handler",style:r.normalizeStyle({top:c.value*r.unref(a)+10+"px"})},[e.link.type==="web"?(r.openBlock(),r.createElementBlock("a",{key:0,class:"link",href:e.link.target,target:"_blank"},r.toDisplayString(e.link.target),9,zR)):(r.openBlock(),r.createElementBlock("a",{key:1,class:"link",onClick:f[0]||(f[0]=v=>u(e.link.target))},r.toDisplayString(r.unref(l)("LINK_HANDLER.SLIDE_PAGE"))+" "+r.toDisplayString(e.link.target),1)),r.createElementVNode("div",YR,[r.createElementVNode("div",{class:"btn",onClick:f[1]||(f[1]=v=>e.openLinkDialog())},r.toDisplayString(r.unref(l)("LINK_HANDLER.CHANGE")),1),r.createVNode(Oe,{type:"vertical"}),r.createElementVNode("div",{class:"btn",onClick:f[2]||(f[2]=v=>r.unref(s)(e.elementInfo))},r.toDisplayString(r.unref(l)("COMMON.REMOVE")),1)])],4))}},WR=ie(XR,[["__scopeId","data-v-786316db"]]),KR={key:1,class:"animation-index"},qR={__name:"index",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},isActive:{type:Boolean,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},dragLineElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,toolbarState:o}=ne.storeToRefs(fe()),{formatedAnimations:a}=ne.storeToRefs(pe()),i=r.computed(()=>({[Ze.IMAGE]:_R,[Ze.TEXT]:IR,[Ze.SHAPE]:xR,[Ze.LINE]:VR,[Ze.TABLE]:HR,[Ze.CHART]:gs,[Ze.LATEX]:gs,[Ze.VIDEO]:gs,[Ze.AUDIO]:gs})[t.elementInfo.type]||null),l=r.computed(()=>{const u=[];for(let d=0;d<a.value.length;d++)a.value[d].animations.map(v=>v.elId).includes(t.elementInfo.id)&&u.push(d);return u}),s=r.computed(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),c=r.computed(()=>"height"in t.elementInfo?t.elementInfo.height:0);return(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:r.normalizeStyle({top:e.elementInfo.top*r.unref(n)+"px",left:e.elementInfo.left*r.unref(n)+"px",transform:`rotate(${s.value}deg)`,transformOrigin:`${e.elementInfo.width*r.unref(n)/2}px ${c.value*r.unref(n)/2}px`})},[e.isSelected?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):r.createCommentVNode("",!0),r.unref(o)==="elAnimation"&&l.value.length?(r.openBlock(),r.createElementBlock("div",KR,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,f=>(r.openBlock(),r.createElementBlock("div",{class:"index-item",key:f},r.toDisplayString(f+1),1))),128))])):r.createCommentVNode("",!0),e.isActive&&e.elementInfo.link?(r.openBlock(),r.createBlock(WR,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:d[0]||(d[0]=r.withModifiers(()=>{},["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):r.createCommentVNode("",!0)],6))}},ZR=ie(qR,[["__scopeId","data-v-f954715b"]]),jR={class:"element-content"},JR={__name:"BaseAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px");return(o,a)=>{const i=r.resolveComponent("AiPptVolumeNotice");return r.openBlock(),r.createElementBlock("div",{class:"base-element-audio",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",jR,[r.createVNode(i,{class:"audio-icon",style:r.normalizeStyle({fontSize:n.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}},QR=ie(JR,[["__scopeId","data-v-7d586ad8"]]),ek={__name:"BaseChartElement",props:{elementInfo:{type:Object,required:!0},target:{type:String}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["base-element-chart",{"is-thumbnail":e.target==="thumbnail"}]),style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({backgroundColor:e.elementInfo.fill})},[r.createVNode(gc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),r.createVNode(h_,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,lineColor:e.elementInfo.lineColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","lineColor","options"])],4)],4)],6))}},tk=ie(ek,[["__scopeId","data-v-4c4f517d"]]),nk=["src"],rk={__name:"BaseImageElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>t.elementInfo.shadow),{shadowStyle:o}=Wr(n),a=r.computed(()=>t.elementInfo.flipH),i=r.computed(()=>t.elementInfo.flipV),{flipStyle:l}=mc(a,i),s=r.computed(()=>t.elementInfo),{clipShape:c,imgPosition:u}=up(s),d=r.computed(()=>t.elementInfo.filters),{filter:f}=lg(d);return(v,p)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-image",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({filter:r.unref(o)?`drop-shadow(${r.unref(o)})`:"",transform:r.unref(l)})},[r.createVNode(sg,{elementInfo:e.elementInfo},null,8,["elementInfo"]),r.createElementVNode("div",{class:"image-content",style:r.normalizeStyle({clipPath:r.unref(c).style})},[r.createElementVNode("img",{src:e.elementInfo.src,draggable:!1,style:r.normalizeStyle({top:r.unref(u).top,left:r.unref(u).left,width:r.unref(u).width,height:r.unref(u).height,filter:r.unref(f)}),alt:""},null,12,nk),e.elementInfo.colorMask?(r.openBlock(),r.createElementBlock("div",{key:0,class:"color-mask",style:r.normalizeStyle({backgroundColor:e.elementInfo.colorMask})},null,4)):r.createCommentVNode("",!0)],4)],4)],4)],4))}},ok=ie(rk,[["__scopeId","data-v-e6e907c1"]]),ak={class:"element-content"},ik=["width","height","stroke","stroke-width"],lk=["transform"],sk=["d"],ck={__name:"BaseLatexElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-latex",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",ak,[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{d:e.elementInfo.path},null,8,sk)],8,lk)],8,ik))])],4)],4))}},uk=ie(ck,[["__scopeId","data-v-d300c419"]]),dk=["width","height"],fk=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],pk={__name:"BaseLineElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=r.computed(()=>t.elementInfo.shadow),{shadowStyle:o}=Wr(n),a=r.computed(()=>{const c=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return c<24?24:c}),i=r.computed(()=>{const c=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return c<24?24:c}),l=r.computed(()=>{const c=t.elementInfo.width;return t.elementInfo.style==="dashed"?c<=8?`${c*5} ${c*2.5}`:`${c*5} ${c*1.5}`:t.elementInfo.style==="dotted"?c<=8?`${c*1.8} ${c*1.6}`:`${c*1.5} ${c*1.2}`:"0 0"}),s=r.computed(()=>tp(t.elementInfo));return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-line",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({filter:r.unref(o)?`drop-shadow(${r.unref(o)})`:""})},[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:a.value,height:i.value},[r.createElementVNode("defs",null,[e.elementInfo.points[0]?(r.openBlock(),r.createBlock(Mr,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0),e.elementInfo.points[1]?(r.openBlock(),r.createBlock(Mr,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0)]),r.createElementVNode("path",{d:s.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":l.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,fk)],8,dk))],4)],4))}},vk=ie(pk,[["__scopeId","data-v-c82e8794"]]),hk=["width","height"],mk=["transform"],gk=["d","fill","stroke","stroke-width","stroke-dasharray"],Ek=["innerHTML"],yk={__name:"BaseShapeElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,{theme:n}=ne.storeToRefs(pe()),o=r.computed(()=>t.elementInfo),{fill:a}=pg(o,"base"),i=r.computed(()=>t.elementInfo.outline),{outlineWidth:l,outlineColor:s,strokeDashArray:c}=Ua(i),u=r.computed(()=>t.elementInfo.shadow),{shadowStyle:d}=Wr(u),f=r.computed(()=>t.elementInfo.flipH),v=r.computed(()=>t.elementInfo.flipV),{flipStyle:p}=mc(f,v),h=r.computed(()=>{const m={content:"",align:"middle",defaultFontName:n.value.fontName,defaultColor:n.value.fontColor};return t.elementInfo.text?t.elementInfo.text:m});return(m,g)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-shape",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({opacity:e.elementInfo.opacity,filter:r.unref(d)?`drop-shadow(${r.unref(d)})`:"",transform:r.unref(p),color:h.value.defaultColor,fontFamily:h.value.defaultFontName})},[(r.openBlock(),r.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[r.createElementVNode("defs",null,[e.elementInfo.pattern?(r.openBlock(),r.createBlock(vg,{key:0,id:`base-pattern-${e.elementInfo.id}`,src:e.elementInfo.pattern},null,8,["id","src"])):e.elementInfo.gradient?(r.openBlock(),r.createBlock(hg,{key:1,id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,colors:e.elementInfo.gradient.colors,rotate:e.elementInfo.gradient.rotate},null,8,["id","type","colors","rotate"])):r.createCommentVNode("",!0)]),r.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:r.unref(a),stroke:r.unref(s),"stroke-width":r.unref(l),"stroke-dasharray":r.unref(c)},null,8,gk)],8,mk)],8,hk)),r.createElementVNode("div",{class:r.normalizeClass(["shape-text",h.value.align])},[r.createElementVNode("div",{class:"ProseMirror-static",innerHTML:h.value.content},null,8,Ek)],2)],4)],4)],4))}},_k=ie(yk,[["__scopeId","data-v-371d3741"]]),Tk=["width"],Sk=["rowspan","colspan"],Ik=["innerHTML"],Ak={__name:"StaticTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},setup(e){const t=e,n=r.ref([]),o=r.computed(()=>n.value.reduce((c,u)=>c+u));r.watch([()=>t.colWidths,()=>t.width],()=>{n.value=t.colWidths.map(c=>c*t.width)},{immediate:!0});const a=r.computed(()=>t.data),{hideCells:i}=m_(a),l=r.computed(()=>t.theme),{subThemeColor:s}=g_(l);return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:"static-table",style:r.normalizeStyle({width:o.value+"px"})},[r.createElementVNode("table",{class:r.normalizeClass({theme:l.value,"row-header":l.value?.rowHeader,"row-footer":l.value?.rowFooter,"col-header":l.value?.colHeader,"col-footer":l.value?.colFooter}),style:r.normalizeStyle(`--themeColor: ${l.value?.color}; --subThemeColor1: ${r.unref(s)[0]}; --subThemeColor2: ${r.unref(s)[1]}`)},[r.createElementVNode("colgroup",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(d,f)=>(r.openBlock(),r.createElementBlock("col",{span:"1",key:f,width:d},null,8,Tk))),128))]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.data,(d,f)=>(r.openBlock(),r.createElementBlock("tr",{key:f,style:r.normalizeStyle({height:e.cellMinHeight+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d,(v,p)=>r.withDirectives((r.openBlock(),r.createElementBlock("td",{class:"cell",style:r.normalizeStyle({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...r.unref(E_)(v.style)}),key:v.id,rowspan:v.rowspan,colspan:v.colspan},[r.createElementVNode("div",{class:"cell-text",style:r.normalizeStyle({minHeight:e.cellMinHeight-4+"px"}),innerHTML:r.unref(y_)(v.text)},null,12,Ik)],12,Sk)),[[r.vShow,!r.unref(i).includes(`${f}_${p}`)]])),128))],4))),128))])],6)],4))}},Nk=ie(Ak,[["__scopeId","data-v-fb0b4043"]]),Lk={class:"element-content"},Ck={__name:"BaseTableElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-table",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",Lk,[r.createVNode(Nk,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}},xk=ie(Ck,[["__scopeId","data-v-0bf953d4"]]),bk=["innerHTML"],wk={__name:"BaseTextElement",props:{elementInfo:{type:Object,required:!0},target:{type:String}},setup(e){const t=e,n=r.computed(()=>t.elementInfo.shadow),{shadowStyle:o}=Wr(n);return(a,i)=>(r.openBlock(),r.createElementBlock("div",{class:"base-element-text",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:r.unref(o),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[r.createVNode(gc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),r.createElementVNode("div",{class:r.normalizeClass(["text ProseMirror-static",{thumbnail:e.target==="thumbnail"}]),style:r.normalizeStyle({"--paragraphSpace":`${e.elementInfo.paragraphSpace===void 0?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,14,bk)],4)],4)],4))}},Ok=ie(wk,[["__scopeId","data-v-663c1273"]]),Rk={__name:"BaseVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>{const o=r.resolveComponent("AiPptPlayOne");return r.openBlock(),r.createElementBlock("div",{class:"base-element-video",style:r.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[r.createElementVNode("div",{class:"rotate-wrapper",style:r.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[r.createElementVNode("div",{class:"element-content",style:r.normalizeStyle({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[r.createVNode(o,{class:"icon"})],4)],4)],4)}}},kk=ie(Rk,[["__scopeId","data-v-42b264d2"]]),Dk={__name:"ThumbnailElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n={audio:QR,chart:tk,image:ok,latex:uk,line:vk,shape:_k,table:xk,text:Ok,video:kk},o=r.computed(()=>n[t.elementInfo.type]),a=r.computed(()=>t.elementInfo.type==="text"||t.elementInfo.type==="chart"?{target:"thumbnail"}:{});return(i,l)=>o.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value),r.mergeProps({key:0,elementInfo:e.elementInfo},a.value),null,16,["elementInfo"])):r.createCommentVNode("",!0)}},Pk={key:1,class:"placeholder"},Mk={__name:"index",props:{slide:{type:Object,required:!0},size:{type:Number,required:!0},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:n,viewportSize:o}=ne.storeToRefs(pe()),{t:a}=_e(),i=r.computed(()=>t.slide.background),{backgroundStyle:l}=__(i),s=r.computed(()=>t.size/o.value);return r.provide(rg,s),(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:"thumbnail-slide",style:r.normalizeStyle({width:e.size+"px",height:e.size*r.unref(n)+"px"})},[e.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"elements",style:r.normalizeStyle({width:r.unref(o)+"px",height:r.unref(o)*r.unref(n)+"px",transform:`scale(${s.value})`})},[r.createElementVNode("div",{class:"background",style:r.normalizeStyle(r.unref(l))},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.slide.elements,(d,f)=>(r.openBlock(),r.createBlock(Dk,{key:d.id,elementInfo:d,elementIndex:f+1},null,8,["elementInfo","elementIndex"]))),128))],4)):(r.openBlock(),r.createElementBlock("div",Pk,r.toDisplayString(r.unref(a)("PPT_COMPONENTS.THUMBNAIL_LOADING")),1))],4))}},$a=ie(Mk,[["__scopeId","data-v-1b313304"]]),Bk=["onClick"],Vk={__name:"Tabs",props:{value:{type:String,required:!0},tabs:{type:Array,required:!0},card:{type:Boolean,default:!1},tabsStyle:{type:Object},tabStyle:{type:Object},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=t;return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:r.normalizeStyle(e.tabsStyle||{})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.tabs,i=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["tab",{active:i.key===e.value}]),key:i.key,style:r.normalizeStyle({...e.tabStyle||{},"--color":i.color}),onClick:l=>n("update:value",i.key)},r.toDisplayString(i.label),15,Bk))),128))],6))}},qn=ie(Vk,[["__scopeId","data-v-06264902"]]),$k={__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,a=()=>{n.disabled||o("click")};return(i,l)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&e.type==="default",primary:!e.disabled&&e.type==="primary",checkbox:!e.disabled&&e.type==="checkbox",radio:!e.disabled&&e.type==="radio",small:e.size==="small",first:e.first,last:e.last}]),onClick:l[0]||(l[0]=s=>a())},[r.renderSlot(i.$slots,"default",{},void 0,!0)],2))}},ue=ie($k,[["__scopeId","data-v-2acfea0c"]]),Fk={key:0,class:"select-wrap"},Hk={class:"selector"},Uk={class:"icon"},Gk=["onClick"],zk={class:"selector"},Yk={class:"icon"},Xk={__name:"Select",props:{value:{type:[String,Number,Object],required:!0},options:{type:Array,required:!0},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{type:String,default:"搜索"}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(!1),i=r.ref(0),l=r.ref(""),s=r.useTemplateRef("selectRef"),c=r.useTemplateRef("searchInputRef"),u=r.computed(()=>{var h;return((h=n.options.find(m=>m.value===n.value))===null||h===void 0?void 0:h.label)||n.value}),d=r.computed(()=>{if(!n.search||!l.value.trim())return n.options;const h=n.options.filter(m=>m.label.toLowerCase().indexOf(l.value.toLowerCase())!==-1);return h.length?h:n.options});r.watch(a,()=>{a.value?r.nextTick(()=>{c.value&&c.value.focus()}):l.value=""}),r.onBeforeUnmount(()=>{l.value=""});const f=()=>{s.value&&(i.value=s.value.clientWidth)},v=new ResizeObserver(f);r.onMounted(()=>{s.value&&v.observe(s.value)}),r.onUnmounted(()=>{s.value&&v.unobserve(s.value)});const p=h=>{h.disabled||(o("update:value",h.value),a.value=!1)};return(h,m)=>{const g=r.resolveComponent("AiPptDown");return e.disabled?(r.openBlock(),r.createElementBlock("div",Fk,[r.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:s},[r.createElementVNode("div",Hk,r.toDisplayString(e.value),1),r.createElementVNode("div",Uk,[r.renderSlot(h.$slots,"icon",{},()=>[r.createVNode(g,{size:14})],!0)])],512)])):(r.openBlock(),r.createBlock(Se,{key:1,class:"select-wrap",trigger:"click",value:a.value,"onUpdate:value":m[1]||(m[1]=E=>a.value=E),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:r.withCtx(()=>[e.search?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(Pr,{ref_key:"searchInputRef",ref:c,simple:"",placeholder:e.searchLabel,value:l.value,"onUpdate:value":m[0]||(m[0]=E=>l.value=E),style:r.normalizeStyle({width:i.value+2+"px"})},null,8,["placeholder","value","style"]),r.createVNode(Oe,{margin:0})],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"options",style:r.normalizeStyle({width:i.value+2+"px"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.value,E=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["option",{disabled:E.disabled,selected:E.value===e.value}]),key:E.value,onClick:y=>p(E)},r.toDisplayString(E.label),11,Gk))),128))],4)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:"select",ref_key:"selectRef",ref:s},[r.createElementVNode("div",zk,r.toDisplayString(u.value),1),r.createElementVNode("div",Yk,[r.renderSlot(h.$slots,"icon",{},()=>[r.createVNode(g,{size:14})],!0)])],512)]),_:3},8,["value"]))}}},st=ie(Xk,[["__scopeId","data-v-e2a00fda"]]),Wk={class:"link-dialog"},Kk={key:2,class:"preview"},qk={class:"btns"},Zk={__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){var n;const o=t,a=fe(),{handleElement:i}=ne.storeToRefs(a),{slides:l,currentSlide:s}=ne.storeToRefs(pe()),{t:c}=_e(),u=r.ref("web"),d=r.ref(""),f=r.ref(""),v=r.useTemplateRef("inputRef"),p=r.computed(()=>l.value.map((y,_)=>({label:c("LINK_DIALOG.SLIDE_LABEL",{index:_+1}),value:y.id,disabled:s.value.id===y.id})));f.value=((n=l.value.find(y=>y.id!==s.value.id))===null||n===void 0?void 0:n.id)||"";const h=r.computed(()=>f.value&&l.value.find(y=>y.id===f.value)||null),m=[{key:"web",label:c("LINK_DIALOG.WEB")},{key:"slide",label:c("LINK_DIALOG.SLIDE")}],{setLink:g}=T_();r.onMounted(()=>{var y;a.setDisableHotkeysState(!0),!((y=i.value)===null||y===void 0)&&y.link&&(i.value.link.type==="web"?d.value=i.value.link.target:i.value.link.type==="slide"&&(f.value=i.value.link.target),u.value=i.value.link.type),u.value==="web"&&r.nextTick(()=>{v.value.focus()})}),r.onUnmounted(()=>{a.setDisableHotkeysState(!1)});const E=()=>{const y={type:u.value,target:u.value==="web"?d.value:f.value};i.value&&(g(i.value,y)?o("close"):d.value="")};return(y,_)=>(r.openBlock(),r.createElementBlock("div",Wk,[r.createVNode(qn,{tabs:m,value:u.value,"onUpdate:value":_[0]||(_[0]=S=>u.value=S),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),u.value==="web"?(r.openBlock(),r.createBlock(Pr,{key:0,class:"input",ref_key:"inputRef",ref:v,value:d.value,"onUpdate:value":_[1]||(_[1]=S=>d.value=S),placeholder:r.unref(c)("LINK_DIALOG.WEB_PLACEHOLDER"),onEnter:_[2]||(_[2]=S=>E())},null,8,["value","placeholder"])):r.createCommentVNode("",!0),u.value==="slide"?(r.openBlock(),r.createBlock(st,{key:1,class:"input",value:f.value,"onUpdate:value":_[3]||(_[3]=S=>f.value=S),options:p.value},null,8,["value","options"])):r.createCommentVNode("",!0),u.value==="slide"&&h.value?(r.openBlock(),r.createElementBlock("div",Kk,[r.createElementVNode("div",null,r.toDisplayString(r.unref(c)("LINK_DIALOG.PREVIEW")),1),r.createVNode($a,{class:"thumbnail",slide:h.value,size:500},null,8,["slide"])])):r.createCommentVNode("",!0),r.createElementVNode("div",qk,[r.createVNode(ue,{onClick:_[4]||(_[4]=S=>o("close")),style:{"margin-right":"10px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(c)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{type:"primary",onClick:_[5]||(_[5]=S=>E())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(c)("COMMON.CONFIRM")),1)]),_:1})])]))}},jk=ie(Zk,[["__scopeId","data-v-894855cc"]]),Jk={class:"modal-content-wrap"},Qk={__name:"Modal",props:{visible:{type:Boolean,required:!0},width:{type:Number,default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{type:Object}},emits:["update:visible","closed"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(!1),i=r.ref(null),l=r.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));r.watch(()=>n.visible,()=>{n.visible&&r.nextTick(()=>i.value.focus())});const s=()=>{o("update:visible",!1),o("closed")},c=()=>{n.visible&&n.closeOnEsc&&s()},u=()=>{n.closeOnClickMask&&s()};return(d,f)=>{const v=r.resolveComponent("AiPptClose");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"modal-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",{class:"modal",ref_key:"modalRef",ref:i,tabindex:"-1",onKeyup:f[4]||(f[4]=r.withKeys(p=>c(),["esc"]))},[r.createElementVNode("div",{class:"mask",onClick:f[0]||(f[0]=p=>u())}),r.createVNode(r.Transition,{name:"modal-zoom",onAfterLeave:f[2]||(f[2]=p=>a.value=!1),onBeforeEnter:f[3]||(f[3]=p=>a.value=!0)},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",Jk,[r.createElementVNode("div",{class:"modal-content",style:r.normalizeStyle(l.value)},[e.closeButton?(r.openBlock(),r.createElementBlock("span",{key:0,class:"close-btn",onClick:f[1]||(f[1]=p=>s())},[r.createVNode(v)])):r.createCommentVNode("",!0),a.value?r.renderSlot(d.$slots,"default",{key:1},void 0,!0):r.createCommentVNode("",!0)],4)],512),[[r.vShow,e.visible]])]),_:3})],544),[[r.vShow,e.visible]])]),_:3})])}}},Yr=ie(Qk,[["__scopeId","data-v-991069ef"]]),e7={class:"operates"},t7={key:2,class:"drag-mask"},n7={__name:"index",setup(e){const t=fe(),{activeElementIdList:n,activeGroupElementId:o,handleElementId:a,hiddenElementIdList:i,editorAreaFocus:l,gridLineSize:s,showRuler:c,creatingElement:u,creatingCustomShape:d,canvasScale:f,textFormatPainter:v}=ne.storeToRefs(t),{currentSlide:p}=ne.storeToRefs(pe()),{ctrlKeyState:h,spaceKeyState:m}=ne.storeToRefs(ln()),g=r.useTemplateRef("viewportRef"),E=r.ref([]),y=r.ref(!1),_=()=>y.value=!0;r.watch(a,()=>{t.setActiveGroupElementId("")});const S=r.ref([]),I=()=>{S.value=p.value?JSON.parse(JSON.stringify(p.value.elements)):[]};r.watchEffect(I);const A=r.useTemplateRef("canvasRef"),{dragViewport:x,viewportStyles:N}=JS(A);eI(A);const{mouseSelection:T,mouseSelectionVisible:L,mouseSelectionQuadrant:b,updateMouseSelection:O}=QS(S,g),{dragElement:w}=aI(S,E,f),{dragLineElement:C}=iI(S),{selectElement:P}=oI(S,w),{scaleElement:k,scaleMultiElement:B}=rI(S,E,f),{rotateElement:H}=nI(S,g,f),{moveShapeKeypoint:U}=lI(S,f),{selectAllElements:$}=pc(),{deleteAllElements:V}=fc(),{pasteElement:z}=lp(),{enterScreeningFromStart:D}=hc(),{updateSlideIndex:Y}=Ho(),{createTextElement:K,createShapeElement:Z}=Fo(),{t:oe}=_e();r.onMounted(()=>{n.value.length&&r.nextTick(()=>t.setActiveElementIdList([]))});const Q=F=>{n.value.length&&t.setActiveElementIdList([]),m.value?x(F):O(F),l.value||t.setEditorareaFocus(!0),v.value&&t.setTextFormatPainter(null),jS()},q=F=>{if(n.value.length||u.value||d.value||!g.value)return;const j=g.value.getBoundingClientRect(),le=(F.pageX-j.x)/f.value,ve=(F.pageY-j.y)/f.value;K({left:le,top:ve,width:200/f.value,height:0})};r.onUnmounted(()=>{v.value&&t.setTextFormatPainter(null)});const re=()=>{l.value&&t.setEditorareaFocus(!1)},{scaleCanvas:G}=sp(),M=Xe.throttle(G,100,{leading:!0,trailing:!1}),R=Xe.throttle(Y,300,{leading:!0,trailing:!1}),X=F=>{F.preventDefault(),h.value?F.deltaY>0?M("-"):F.deltaY<0&&M("+"):F.deltaY>0?R(Ee.DOWN):F.deltaY<0&&R(Ee.UP)},W=()=>{t.setRulerState(!c.value)},{insertElementFromCreateSelection:te,formatCreateSelection:ee}=sI(g),ce=F=>{const{start:j,end:le,path:ve,viewBox:he}=F,Fe=ee({start:j,end:le});if(Fe){const Re={};F.fill&&(Re.fill=F.fill),F.outline&&(Re.outline=F.outline),Z(Fe,{path:ve,viewBox:he},Re)}t.setCreatingCustomShapeState(!1)},se=()=>[{text:oe("COMMON.PASTE"),subText:"Ctrl + V",handler:z},{text:oe("COMMON.SELECT_ALL"),subText:"Ctrl + A",handler:$},{text:oe("CANVAS_MENU.RULER"),subText:c.value?"√":"",handler:W},{text:oe("CANVAS_MENU.GRID_LINES"),handler:()=>t.setGridLineSize(s.value?0:50),children:[{text:oe("CANVAS_MENU.GRID_NONE"),subText:s.value===0?"√":"",handler:()=>t.setGridLineSize(0)},{text:oe("CANVAS_MENU.GRID_SMALL"),subText:s.value===25?"√":"",handler:()=>t.setGridLineSize(25)},{text:oe("CANVAS_MENU.GRID_MEDIUM"),subText:s.value===50?"√":"",handler:()=>t.setGridLineSize(50)},{text:oe("CANVAS_MENU.GRID_LARGE"),subText:s.value===100?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:oe("CANVAS_MENU.RESET_SLIDE"),handler:V},{divider:!0},{text:oe("CANVAS_MENU.SLIDE_SHOW"),subText:"F5",handler:D}];return r.provide(rg,f),(F,j)=>{const le=r.resolveDirective("contextmenu"),ve=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"canvas",ref_key:"canvasRef",ref:A,onWheel:j[4]||(j[4]=he=>X(he)),onMousedown:j[5]||(j[5]=he=>Q(he)),onDblclick:j[6]||(j[6]=he=>q(he))},[r.unref(u)?(r.openBlock(),r.createBlock(iR,{key:0,onCreated:j[0]||(j[0]=he=>r.unref(te)(he))})):r.createCommentVNode("",!0),r.unref(d)?(r.openBlock(),r.createBlock(uR,{key:1,onCreated:j[1]||(j[1]=he=>ce(he))})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"viewport-wrapper",style:r.normalizeStyle({width:r.unref(N).width*r.unref(f)+"px",height:r.unref(N).height*r.unref(f)+"px",left:r.unref(N).left+"px",top:r.unref(N).top+"px"})},[r.createElementVNode("div",e7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.value,(he,Fe)=>(r.openBlock(),r.createBlock(j6,{key:Fe,type:he.type,axis:he.axis,length:he.length,canvasScale:r.unref(f)},null,8,["type","axis","length","canvasScale"]))),128)),r.unref(n).length>1?(r.openBlock(),r.createBlock(vR,{key:0,elementList:S.value,scaleMultiElement:r.unref(B)},null,8,["elementList","scaleMultiElement"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,he=>r.withDirectives((r.openBlock(),r.createBlock(ZR,{key:he.id,elementInfo:he,isSelected:r.unref(n).includes(he.id),isActive:r.unref(a)===he.id,isActiveGroupElement:r.unref(o)===he.id,isMultiSelect:r.unref(n).length>1,rotateElement:r.unref(H),scaleElement:r.unref(k),openLinkDialog:_,dragLineElement:r.unref(C),moveShapeKeypoint:r.unref(U)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[r.vShow,!r.unref(i).includes(he.id)]])),128)),r.createVNode(q6)]),r.createElementVNode("div",{class:"viewport",ref_key:"viewportRef",ref:g,style:r.normalizeStyle({transform:`scale(${r.unref(f)})`})},[r.unref(L)?(r.openBlock(),r.createBlock(G6,{key:0,top:r.unref(T).top,left:r.unref(T).left,width:r.unref(T).width,height:r.unref(T).height,quadrant:r.unref(b)},null,8,["top","left","width","height","quadrant"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(he,Fe)=>r.withDirectives((r.openBlock(),r.createBlock(H6,{key:he.id,elementInfo:he,elementIndex:Fe+1,isMultiSelect:r.unref(n).length>1,selectElement:r.unref(P),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[r.vShow,!r.unref(i).includes(he.id)]])),128))],4)],4),r.unref(m)?(r.openBlock(),r.createElementBlock("div",t7)):r.createCommentVNode("",!0),r.unref(c)?(r.openBlock(),r.createBlock(nR,{key:3,viewportStyles:r.unref(N),elementList:S.value},null,8,["viewportStyles","elementList"])):r.createCommentVNode("",!0),r.createVNode(Yr,{visible:y.value,"onUpdate:visible":j[3]||(j[3]=he=>y.value=he),width:540},{default:r.withCtx(()=>[r.createVNode(jk,{onClose:j[2]||(j[2]=he=>y.value=!1)})]),_:1},8,["visible"])],32)),[[le,se],[ve,re]])}}},r7=ie(n7,[["__scopeId","data-v-b0c2695e"]]),o7={class:"shape-item-thumbnail"},a7={class:"shape-content"},i7={overflow:"visible",width:"18",height:"18"},l7=["transform"],s7=["fill","stroke","d"],c7={__name:"ShapeItemThumbnail",props:{shape:{type:Object,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",o7,[r.createElementVNode("div",a7,[(r.openBlock(),r.createElementBlock("svg",i7,[r.createElementVNode("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[r.createElementVNode("path",{class:r.normalizeClass(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,s7)],8,l7)]))])]))}},S_=ie(c7,[["__scopeId","data-v-2bb4bea6"]]),u7={class:"shape-pool"},d7={class:"category-name"},f7={class:"shape-list"},p7={__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const{t:n}=_e(),o=t,a=i=>{o("select",i)};return(i,l)=>(r.openBlock(),r.createElementBlock("div",u7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(op),s=>(r.openBlock(),r.createElementBlock("div",{class:"category",key:s.type},[r.createElementVNode("div",d7,r.toDisplayString(r.unref(n)(s.typeKey||s.type)),1),r.createElementVNode("div",f7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.children,(c,u)=>(r.openBlock(),r.createBlock(S_,{class:"shape-item",key:u,shape:c,onClick:d=>a(c)},null,8,["shape","onClick"]))),128))])]))),128))]))}},v7=ie(p7,[["__scopeId","data-v-7f60f33c"]]),h7=[{type:"直线",typeKey:"LINES.STRAIGHT",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",typeKey:"LINES.POLY_CURVE",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 L 10 0 L 10 20 L 20 20",style:"solid",points:["","arrow"],isBroken2:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],m7={class:"line-pool"},g7={class:"category-name"},E7={class:"line-list"},y7=["onClick"],_7={overflow:"visible",width:"20",height:"20"},T7=["d","stroke-dasharray","marker-start","marker-end"],S7={__name:"LinePool",emits:["select"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=i=>{n("select",i)};return(i,l)=>(r.openBlock(),r.createElementBlock("div",m7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h7),(s,c)=>(r.openBlock(),r.createElementBlock("div",{class:"category",key:s.type},[r.createElementVNode("div",g7,r.toDisplayString(r.unref(o)(s.typeKey||s.type)),1),r.createElementVNode("div",E7,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.children,(u,d)=>(r.openBlock(),r.createElementBlock("div",{class:"line-item",key:d},[r.createElementVNode("div",{class:"line-content",onClick:f=>a(u)},[(r.openBlock(),r.createElementBlock("svg",_7,[r.createElementVNode("defs",null,[u.points[0]?(r.openBlock(),r.createBlock(Mr,{key:0,class:"line-marker",id:`preset-line-${c}-${d}`,position:"start",type:u.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):r.createCommentVNode("",!0),u.points[1]?(r.openBlock(),r.createBlock(Mr,{key:1,class:"line-marker",id:`preset-line-${c}-${d}`,position:"end",type:u.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):r.createCommentVNode("",!0)]),r.createElementVNode("path",{class:"line-path",d:u.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":u.style==="solid"?"0, 0":"4, 1","marker-start":u.points[0]?`url(#${`preset-line-${c}-${d}`}-${u.points[0]}-start)`:"","marker-end":u.points[1]?`url(#${`preset-line-${c}-${d}`}-${u.points[1]}-end)`:""},null,8,T7)]))],8,y7)]))),128))])]))),128))]))}},I7=ie(S7,[["__scopeId","data-v-bed8f637"]]),A7={class:"chart-pool"},N7=["onClick"],L7={class:"name"},C7={__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=["bar","column","line","area","scatter","pie","ring","radar"],i=l=>{n("select",l)};return(l,s)=>{const c=r.resolveComponent("AiPptChartLine"),u=r.resolveComponent("AiPptChartHistogram"),d=r.resolveComponent("AiPptChartPie"),f=r.resolveComponent("AiPptChartHistogramOne"),v=r.resolveComponent("AiPptChartLineArea"),p=r.resolveComponent("AiPptChartRing"),h=r.resolveComponent("AiPptChartScatter"),m=r.resolveComponent("AiPptRadarChart");return r.openBlock(),r.createElementBlock("ul",A7,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(a,(g,E)=>r.createElementVNode("li",{class:"chart-item",key:E},[r.createElementVNode("div",{class:"chart-content",onClick:y=>i(g)},[g==="line"?(r.openBlock(),r.createBlock(c,{key:0,size:"24"})):g==="bar"?(r.openBlock(),r.createBlock(u,{key:1,size:"24"})):g==="pie"?(r.openBlock(),r.createBlock(d,{key:2,size:"24"})):g==="column"?(r.openBlock(),r.createBlock(f,{key:3,size:"24"})):g==="area"?(r.openBlock(),r.createBlock(v,{key:4,size:"24"})):g==="ring"?(r.openBlock(),r.createBlock(p,{key:5,size:"24"})):g==="scatter"?(r.openBlock(),r.createBlock(h,{key:6,size:"24"})):g==="radar"?(r.openBlock(),r.createBlock(m,{key:7,size:"23"})):r.createCommentVNode("",!0),r.createElementVNode("div",L7,r.toDisplayString(r.unref(o)(r.unref(va)[g].labelKey||r.unref(va)[g].label)),1)],8,N7)])),64))])}}},x7=ie(C7,[["__scopeId","data-v-85f332f2"]]),b7={class:"prefix"},w7={class:"input-wrap"},O7=["disabled","placeholder"],R7={class:"handlers"},k7={class:"suffix"},D7={__name:"NumberInput",props:{value:{type:Number,required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:1/0},step:{type:Number,default:1}},emits:["update:value","input","change","enter","blur","focus"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(0),i=r.ref(!1);r.watch(()=>n.value,()=>{n.value!==a.value&&(a.value=n.value)},{immediate:!0}),r.watch(a,()=>{const d=+a.value;if(!isNaN(d)){{if(d>n.max)return;if(d<n.min)return}a.value=d,o("update:value",a.value)}});const l=()=>{let d=+a.value;isNaN(d)?d=n.min:d>n.max?d=n.max:d<n.min&&(d=n.min),a.value=d,o("update:value",a.value)},s=d=>{l(),o("enter",d)},c=d=>{l(),i.value=!1,o("blur",d)},u=d=>{i.value=!0,o("focus",d)};return(d,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["number-input",{disabled:e.disabled,focused:i.value}])},[r.createElementVNode("span",b7,[r.renderSlot(d.$slots,"prefix",{},void 0,!0)]),r.createElementVNode("div",w7,[r.withDirectives(r.createElementVNode("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),placeholder:e.placeholder,onInput:f[1]||(f[1]=v=>o("input",v)),onFocus:f[2]||(f[2]=v=>u(v)),onBlur:f[3]||(f[3]=v=>c(v)),onChange:f[4]||(f[4]=v=>o("change",v)),onKeydown:f[5]||(f[5]=r.withKeys(v=>s(v),["enter"]))},null,40,O7),[[r.vModelText,a.value]]),r.createElementVNode("div",R7,[r.createElementVNode("span",{class:"handler",onClick:f[6]||(f[6]=v=>a.value+=e.step)},[...f[8]||(f[8]=[r.createElementVNode("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[r.createElementVNode("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1)])]),r.createElementVNode("span",{class:"handler",onClick:f[7]||(f[7]=v=>a.value-=e.step)},[...f[9]||(f[9]=[r.createElementVNode("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[r.createElementVNode("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1)])])])]),r.createElementVNode("span",k7,[r.renderSlot(d.$slots,"suffix",{},void 0,!0)])],2))}},Xt=ie(D7,[["__scopeId","data-v-abfce75d"]]),P7={class:"table-generator"},M7={class:"title"},B7={class:"lef"},V7=["onMouseenter"],$7={key:1,class:"custom"},F7={class:"row"},H7={class:"label",style:{width:"25%"}},U7={class:"row"},G7={class:"label",style:{width:"25%"}},z7={class:"btns"},Y7={__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=r.ref([]),i=r.ref(3),l=r.ref(3),s=r.ref(!1),c=()=>{if(!a.value.length)return;const[f,v]=a.value;n("insert",{row:f,col:v})},u=()=>{if(i.value<1||i.value>20||l.value<1||l.value>20)return Ae.warning(o("TABLE_GENERATOR.COUNT_LIMIT"));n("insert",{row:i.value,col:l.value}),s.value=!1},d=()=>{n("close"),s.value=!1};return(f,v)=>(r.openBlock(),r.createElementBlock("div",P7,[r.createElementVNode("div",M7,[r.createElementVNode("div",B7,r.toDisplayString(r.unref(o)("TABLE_GENERATOR.TITLE"))+" "+r.toDisplayString(a.value.length?`${a.value[0]} x ${a.value[1]}`:""),1),r.createElementVNode("div",{class:"right",onClick:v[0]||(v[0]=p=>s.value=!s.value)},r.toDisplayString(s.value?r.unref(o)("COMMON.BACK"):r.unref(o)("TABLE_GENERATOR.CUSTOM")),1)]),s.value?(r.openBlock(),r.createElementBlock("div",$7,[r.createElementVNode("div",F7,[r.createElementVNode("div",H7,r.toDisplayString(r.unref(o)("TABLE_GENERATOR.ROW_COUNT")),1),r.createVNode(Xt,{min:1,max:20,value:i.value,"onUpdate:value":v[3]||(v[3]=p=>i.value=p),style:{width:"75%"}},null,8,["value"])]),r.createElementVNode("div",U7,[r.createElementVNode("div",G7,r.toDisplayString(r.unref(o)("TABLE_GENERATOR.COL_COUNT")),1),r.createVNode(Xt,{min:1,max:20,value:l.value,"onUpdate:value":v[4]||(v[4]=p=>l.value=p),style:{width:"75%"}},null,8,["value"])]),r.createElementVNode("div",z7,[r.createVNode(ue,{class:"btn",onClick:v[5]||(v[5]=p=>d())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{class:"btn",type:"primary",onClick:v[6]||(v[6]=p=>u())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CONFIRM")),1)]),_:1})])])):(r.openBlock(),r.createElementBlock("table",{key:0,onMouseleave:v[1]||(v[1]=p=>a.value=[]),onClick:v[2]||(v[2]=p=>c())},[r.createElementVNode("tbody",null,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(10,p=>r.createElementVNode("tr",{key:p},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(10,h=>r.createElementVNode("td",{onMouseenter:m=>a.value=[p,h],key:h},[r.createElementVNode("div",{class:r.normalizeClass(["cell",{active:a.value.length&&p<=a.value[0]&&h<=a.value[1]}])},null,2)],40,V7)),64))])),64))])],32))]))}},X7=ie(Y7,[["__scopeId","data-v-734e843c"]]),W7={class:"media-input"},K7={class:"btns"},q7={class:"btns"},Z7={__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),a=r.ref("video"),i=r.ref(""),l=r.ref(""),s=[{key:"video",label:o("MEDIA_INPUT.VIDEO")},{key:"audio",label:o("MEDIA_INPUT.AUDIO")}],c=()=>{if(!i.value)return Ae.error(o("MEDIA_INPUT.VIDEO_ERROR"));n("insertVideo",i.value)},u=()=>{if(!l.value)return Ae.error(o("MEDIA_INPUT.AUDIO_ERROR"));n("insertAudio",l.value)};return(d,f)=>(r.openBlock(),r.createElementBlock("div",W7,[r.createVNode(qn,{tabs:s,value:a.value,"onUpdate:value":f[0]||(f[0]=v=>a.value=v),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),a.value==="video"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(Pr,{value:i.value,"onUpdate:value":f[1]||(f[1]=v=>i.value=v),placeholder:r.unref(o)("MEDIA_INPUT.VIDEO_PLACEHOLDER")},null,8,["value","placeholder"]),r.createElementVNode("div",K7,[r.createVNode(ue,{onClick:f[2]||(f[2]=v=>n("close")),style:{"margin-right":"10px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{type:"primary",onClick:f[3]||(f[3]=v=>c())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CONFIRM")),1)]),_:1})])],64)):r.createCommentVNode("",!0),a.value==="audio"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Pr,{value:l.value,"onUpdate:value":f[4]||(f[4]=v=>l.value=v),placeholder:r.unref(o)("MEDIA_INPUT.AUDIO_PLACEHOLDER")},null,8,["value","placeholder"]),r.createElementVNode("div",q7,[r.createVNode(ue,{onClick:f[5]||(f[5]=v=>n("close")),style:{"margin-right":"10px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{type:"primary",onClick:f[6]||(f[6]=v=>u())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("COMMON.CONFIRM")),1)]),_:1})])],64)):r.createCommentVNode("",!0)]))}},j7=ie(Z7,[["__scopeId","data-v-5393d941"]]),J7=[{label:"高斯公式",labelKey:"FORMULA.PRESET.GAUSS",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",labelKey:"FORMULA.PRESET.FOURIER",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",labelKey:"FORMULA.PRESET.TAYLOR",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",labelKey:"FORMULA.PRESET.DEFINITE_INTEGRAL",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",labelKey:"FORMULA.PRESET.TRIG_IDENTITY_1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",labelKey:"FORMULA.PRESET.TRIG_IDENTITY_2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",labelKey:"FORMULA.PRESET.BINOMIAL",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",labelKey:"FORMULA.PRESET.EULER",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",labelKey:"FORMULA.PRESET.BERNOULLI",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",labelKey:"FORMULA.PRESET.TOTAL_DIFFERENTIAL",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",labelKey:"FORMULA.PRESET.NONHOMOGENEOUS",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",labelKey:"FORMULA.PRESET.CAUCHY",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",labelKey:"FORMULA.PRESET.LAGRANGE",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",labelKey:"FORMULA.PRESET.DERIVATIVE",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",labelKey:"FORMULA.PRESET.TRIG_INTEGRAL",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",labelKey:"FORMULA.PRESET.QUADRIC",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",labelKey:"FORMULA.PRESET.SECOND_ORDER",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",labelKey:"FORMULA.PRESET.DIRECTIONAL",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],Ad=[{type:"operators",label:"数学",labelKey:"FORMULA.SYMBOLS.MATH",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",labelKey:"FORMULA.SYMBOLS.GROUP",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",labelKey:"FORMULA.SYMBOLS.FUNCTION",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",labelKey:"FORMULA.SYMBOLS.GREEK",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Q7=["disabled","value","rows","placeholder"],eD={__name:"TextArea",props:{value:{type:String,required:!0},rows:{type:Number,default:4},padding:{type:Number},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{type:String,default:""}},emits:["update:value","focus","blur","enter"],setup(e,{expose:t,emit:n}){const o=n,a=s=>{o("update:value",s.target.value)},i=r.useTemplateRef("textareaRef");return t({focus:()=>{i.value&&i.value.focus()}}),(s,c)=>(r.openBlock(),r.createElementBlock("textarea",{class:r.normalizeClass(["textarea",{disabled:e.disabled,resizable:e.resizable}]),ref_key:"textareaRef",ref:i,disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,style:r.normalizeStyle({padding:e.padding?`${e.padding}px`:"10px"}),onInput:c[0]||(c[0]=u=>a(u)),onFocus:c[1]||(c[1]=u=>o("focus",u)),onBlur:c[2]||(c[2]=u=>o("blur",u)),onKeydown:c[3]||(c[3]=r.withKeys(u=>o("enter",u),["enter"]))},null,46,Q7))}},Kf=ie(eD,[["__scopeId","data-v-e8f93f19"]]),tD=["width","height"],nD=["transform"],rD=["d"],oD={__name:"FormulaContent",props:{latex:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(e){const t=e,n=r.ref({x:0,y:0,w:0,h:0}),o=r.ref("");r.watch(()=>t.latex,()=>{const i=new jf.hfmath(t.latex);o.value=i.pathd({}),n.value=i.box({})},{immediate:!0});const a=r.computed(()=>{const i=n.value.w+32,l=n.value.h+32;return i>t.width||l>t.height?i/l>t.width/t.height?t.width/i:t.height/l:1});return(i,l)=>(r.openBlock(),r.createElementBlock("svg",{class:"formula-content",overflow:"visible",width:n.value.w+32,height:n.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("g",{transform:`scale(${a.value}, ${a.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[r.createElementVNode("path",{d:o.value},null,8,rD)],8,nD)],8,tD))}},m1=ie(oD,[["__scopeId","data-v-cb4ab294"]]),aD=["innerHTML"],iD={__name:"SymbolContent",props:{latex:{type:String,required:!0}},setup(e){const t=e,n=r.computed(()=>new jf.hfmath(t.latex).svg({SCALE_X:10,SCALE_Y:10}));return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:"symbol-content",innerHTML:n.value},null,8,aD))}},lD={class:"latex-editor"},sD={class:"container"},cD={class:"left"},uD={class:"input-area"},dD={class:"preview"},fD={key:0,class:"placeholder"},pD={key:1,class:"preview-content"},vD={class:"right"},hD={class:"content"},mD={key:0,class:"symbol"},gD={class:"symbol-pool"},ED=["onClick"],yD={key:1,class:"formula"},_D={class:"formula-title"},TD=["onClick"],SD={class:"footer"},ID={__name:"index",props:{value:{type:String,default:""}},emits:["update","close"],setup(e,{emit:t}){const{t:n}=_e(),o=r.computed(()=>[{label:n("FORMULA_EDITOR.TAB_SYMBOLS"),key:"symbol"},{label:n("FORMULA_EDITOR.TAB_PRESETS"),key:"formula"}]),a=e,i=t,l=J7,s=r.computed(()=>Ad.map(g=>({label:n(g.labelKey||g.label),key:g.type}))),c=r.ref(""),u=r.ref("symbol"),d=r.useTemplateRef("textAreaRef"),f=r.ref(Ad[0].type),v=r.computed(()=>{const g=Ad.find(E=>E.type===f.value);return g?.children||[]}),p=g=>n(g.labelKey||g.label);r.onMounted(()=>{a.value&&(c.value=a.value)});const h=()=>{if(!c.value)return Ae.error(n("FORMULA_EDITOR.EMPTY_ERROR"));const g=new jf.hfmath(c.value),E=g.pathd({}),y=g.box({});i("update",{latex:c.value,path:E,w:y.w+32,h:y.h+32})},m=g=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,g))};return(g,E)=>(r.openBlock(),r.createElementBlock("div",lD,[r.createElementVNode("div",sD,[r.createElementVNode("div",cD,[r.createElementVNode("div",uD,[r.createVNode(Kf,{value:c.value,"onUpdate:value":E[0]||(E[0]=y=>c.value=y),placeholder:r.unref(n)("FORMULA_EDITOR.INPUT_PLACEHOLDER"),ref_key:"textAreaRef",ref:d},null,8,["value","placeholder"])]),r.createElementVNode("div",dD,[c.value?(r.openBlock(),r.createElementBlock("div",pD,[r.createVNode(m1,{width:518,height:138,latex:c.value},null,8,["latex"])])):(r.openBlock(),r.createElementBlock("div",fD,r.toDisplayString(r.unref(n)("FORMULA_EDITOR.PREVIEW_PLACEHOLDER")),1))])]),r.createElementVNode("div",vD,[r.createVNode(qn,{tabs:o.value,value:u.value,"onUpdate:value":E[1]||(E[1]=y=>u.value=y),card:""},null,8,["tabs","value"]),r.createElementVNode("div",hD,[u.value==="symbol"?(r.openBlock(),r.createElementBlock("div",mD,[r.createVNode(qn,{tabs:s.value,value:f.value,"onUpdate:value":E[2]||(E[2]=y=>f.value=y),spaceBetween:""},null,8,["tabs","value"]),r.createElementVNode("div",gD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,y=>(r.openBlock(),r.createElementBlock("div",{class:"symbol-item",key:y.latex,onClick:_=>m(y.latex)},[r.createVNode(iD,{latex:y.latex},null,8,["latex"])],8,ED))),128))])])):(r.openBlock(),r.createElementBlock("div",yD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),y=>(r.openBlock(),r.createElementBlock("div",{class:"formula-item",key:y.latex},[r.createElementVNode("div",_D,r.toDisplayString(p(y)),1),r.createElementVNode("div",{class:"formula-item-content",onClick:_=>c.value=y.latex},[r.createVNode(m1,{width:236,height:60,latex:y.latex},null,8,["latex"])],8,TD)]))),128))]))])])]),r.createElementVNode("div",SD,[r.createVNode(ue,{class:"btn",onClick:E[3]||(E[3]=y=>i("close"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{class:"btn",type:"primary",onClick:E[4]||(E[4]=y=>h())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("COMMON.CONFIRM")),1)]),_:1})])]))}},I_=ie(ID,[["__scopeId","data-v-631999a0"]]),AD={class:"canvas-tool"},ND={class:"left-handler"},LD={class:"more"},CD={class:"add-element-handler"},xD={class:"handler-item group-btn"},bD={class:"handler-item group-btn",offset:10},wD={class:"right-handler"},OD={class:"text"},RD={__name:"index",setup(e){const t=fe(),{t:n}=_e(),{creatingElement:o,creatingCustomShape:a,showSelectPanel:i,showSearchPanel:l,showNotesPanel:s,showSymbolPanel:c}=ne.storeToRefs(t),{canUndo:u,canRedo:d}=ne.storeToRefs(F1()),{redo:f,undo:v}=be(),{scaleCanvas:p,setCanvasScalePercentage:h,resetCanvas:m,canvasScalePercentage:g}=sp(),E=[200,150,125,100,75,50],y=r.ref(!1),_=Q=>{h(Q),y.value=!1},{createImageElement:S,createChartElement:I,createTableElement:A,createLatexElement:x,createVideoElement:N,createAudioElement:T}=Fo(),L=Q=>{const q=Q[0];q&&Xr(q).then(re=>S(re))},b=r.ref(!1),O=r.ref(!1),w=r.ref(!1),C=r.ref(!1),P=r.ref(!1),k=r.ref(!1),B=r.ref(!1),H=r.ref(!1),U=r.ref(!1),$=(Q=!1)=>{t.setCreatingElement({type:"text",vertical:Q})},V=Q=>{t.setCreatingElement({type:"shape",data:Q}),b.value=!1},z=()=>{t.setCreatingCustomShapeState(!0),b.value=!1},D=Q=>{t.setCreatingElement({type:"line",data:Q}),O.value=!1},Y=()=>{t.setSelectPanelState(!i.value)},K=()=>{t.setSearchPanelState(!l.value)},Z=()=>{t.setNotesPanelState(!s.value)},oe=()=>{t.setSymbolPanelState(!c.value)};return(Q,q)=>{const re=r.resolveComponent("AiPptBack"),G=r.resolveComponent("AiPptNext"),M=r.resolveComponent("AiPptMore"),R=r.resolveComponent("AiPptComment"),X=r.resolveComponent("AiPptMoveOne"),W=r.resolveComponent("AiPptSearch"),te=r.resolveComponent("AiPptFontSize"),ee=r.resolveComponent("AiPptTextRotationNone"),ce=r.resolveComponent("AiPptTextRotationDown"),se=r.resolveComponent("AiPptDown"),F=r.resolveComponent("AiPptGraphicDesign"),j=r.resolveComponent("AiPptPicture"),le=r.resolveComponent("AiPptConnection"),ve=r.resolveComponent("AiPptChartProportion"),he=r.resolveComponent("AiPptInsertTable"),Fe=r.resolveComponent("AiPptFormula"),Re=r.resolveComponent("AiPptVideoTwo"),ur=r.resolveComponent("AiPptSymbol"),dr=r.resolveComponent("AiPptMinus"),fr=r.resolveComponent("AiPptPlus"),qr=r.resolveComponent("AiPptFullScreen"),ot=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",AD,[r.createElementVNode("div",ND,[r.withDirectives(r.createVNode(re,{class:r.normalizeClass(["handler-item",{disable:!r.unref(u)}]),onClick:q[0]||(q[0]=Ie=>r.unref(v)())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.UNDO")]]),r.withDirectives(r.createVNode(G,{class:r.normalizeClass(["handler-item",{disable:!r.unref(d)}]),onClick:q[1]||(q[1]=Ie=>r.unref(f)())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.REDO")]]),r.createElementVNode("div",LD,[r.createVNode(Oe,{type:"vertical",style:{height:"20px"}}),r.createVNode(Se,{class:"more-icon",trigger:"click",value:U.value,"onUpdate:value":q[5]||(q[5]=Ie=>U.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:q[2]||(q[2]=()=>{Z(),U.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.NOTES_PANEL")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:q[3]||(q[3]=()=>{Y(),U.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.SELECTION_PANEL")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:q[4]||(q[4]=()=>{K(),U.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.SEARCH_REPLACE")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(M,{class:"handler-item"})]),_:1},8,["value"]),r.withDirectives(r.createVNode(R,{class:r.normalizeClass(["handler-item",{active:r.unref(s)}]),onClick:q[6]||(q[6]=Ie=>Z())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.NOTES_PANEL")]]),r.withDirectives(r.createVNode(X,{class:r.normalizeClass(["handler-item",{active:r.unref(i)}]),onClick:q[7]||(q[7]=Ie=>Y())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.SELECTION_PANEL")]]),r.withDirectives(r.createVNode(W,{class:r.normalizeClass(["handler-item",{active:r.unref(l)}]),onClick:q[8]||(q[8]=Ie=>K())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.SEARCH_REPLACE_TOOLTIP")]])])]),r.createElementVNode("div",CD,[r.withDirectives((r.openBlock(),r.createElementBlock("div",xD,[r.createVNode(te,{class:r.normalizeClass(["icon",{active:r.unref(o)?.type==="text"}]),onClick:q[9]||(q[9]=Ie=>$())},null,8,["class"]),r.createVNode(Se,{trigger:"click",value:B.value,"onUpdate:value":q[12]||(q[12]=Ie=>B.value=Ie),style:{height:"100%"},offset:10},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:q[10]||(q[10]=()=>{$(),B.value=!1})},{default:r.withCtx(()=>[r.createVNode(ee),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("CANVAS_TOOL.TEXT_HORIZONTAL")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:q[11]||(q[11]=()=>{$(!0),B.value=!1})},{default:r.withCtx(()=>[r.createVNode(ce),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("CANVAS_TOOL.TEXT_VERTICAL")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(se,{class:"arrow"})]),_:1},8,["value"])])),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_TEXT")]]),r.withDirectives((r.openBlock(),r.createElementBlock("div",bD,[r.createVNode(Se,{trigger:"click",style:{height:"100%"},value:b.value,"onUpdate:value":q[14]||(q[14]=Ie=>b.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(v7,{onSelect:q[13]||(q[13]=Ie=>V(Ie))})]),default:r.withCtx(()=>[r.createVNode(F,{class:r.normalizeClass(["icon",{active:r.unref(a)||r.unref(o)?.type==="shape"}])},null,8,["class"])]),_:1},8,["value"]),r.createVNode(Se,{trigger:"click",value:H.value,"onUpdate:value":q[16]||(q[16]=Ie=>H.value=Ie),style:{height:"100%"},offset:10},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:q[15]||(q[15]=()=>{z(),H.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.FREE_DRAW")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(se,{class:"arrow"})]),_:1},8,["value"])])),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_SHAPE")]]),r.createVNode(El,{onChange:q[17]||(q[17]=Ie=>L(Ie))},{default:r.withCtx(()=>[r.withDirectives(r.createVNode(j,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_IMAGE")]])]),_:1}),r.createVNode(Se,{trigger:"click",value:O.value,"onUpdate:value":q[19]||(q[19]=Ie=>O.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(I7,{onSelect:q[18]||(q[18]=Ie=>D(Ie))})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(le,{class:r.normalizeClass(["handler-item",{active:r.unref(o)?.type==="line"}])},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_LINE")]])]),_:1},8,["value"]),r.createVNode(Se,{trigger:"click",value:w.value,"onUpdate:value":q[21]||(q[21]=Ie=>w.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(x7,{onSelect:q[20]||(q[20]=Ie=>{r.unref(I)(Ie),w.value=!1})})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(ve,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_CHART")]])]),_:1},8,["value"]),r.createVNode(Se,{trigger:"click",value:C.value,"onUpdate:value":q[24]||(q[24]=Ie=>C.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(X7,{onClose:q[22]||(q[22]=Ie=>C.value=!1),onInsert:q[23]||(q[23]=({row:Ie,col:Ev})=>{r.unref(A)(Ie,Ev),C.value=!1})})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(he,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_TABLE")]])]),_:1},8,["value"]),r.withDirectives(r.createVNode(Fe,{class:"handler-item",onClick:q[25]||(q[25]=Ie=>k.value=!0)},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_FORMULA")]]),r.createVNode(Se,{trigger:"click",value:P.value,"onUpdate:value":q[29]||(q[29]=Ie=>P.value=Ie),offset:10},{content:r.withCtx(()=>[r.createVNode(j7,{onClose:q[26]||(q[26]=Ie=>P.value=!1),onInsertVideo:q[27]||(q[27]=Ie=>{r.unref(N)(Ie),P.value=!1}),onInsertAudio:q[28]||(q[28]=Ie=>{r.unref(T)(Ie),P.value=!1})})]),default:r.withCtx(()=>[r.withDirectives(r.createVNode(Re,{class:"handler-item"},null,512),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_MEDIA")]])]),_:1},8,["value"]),r.withDirectives(r.createVNode(ur,{class:r.normalizeClass(["handler-item",{active:r.unref(c)}]),onClick:q[30]||(q[30]=Ie=>oe())},null,8,["class"]),[[ot,r.unref(n)("CANVAS_TOOL.INSERT_SYMBOL")]])]),r.createElementVNode("div",wD,[r.withDirectives(r.createVNode(dr,{class:"handler-item viewport-size",onClick:q[31]||(q[31]=Ie=>r.unref(p)("-"))},null,512),[[ot,r.unref(n)("CANVAS_TOOL.SCALE_DOWN")]]),r.createVNode(Se,{trigger:"click",value:y.value,"onUpdate:value":q[33]||(q[33]=Ie=>y.value=Ie)},{content:r.withCtx(()=>[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(E,Ie=>r.createVNode(dt,{center:"",key:Ie,onClick:Ev=>_(Ie)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(Ie)+"%",1)]),_:2},1032,["onClick"])),64)),r.createVNode(dt,{center:"",onClick:q[32]||(q[32]=()=>{r.unref(m)(),y.value=!1})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("CANVAS_TOOL.FIT_SCREEN")),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",OD,r.toDisplayString(r.unref(g)),1)]),_:1},8,["value"]),r.withDirectives(r.createVNode(fr,{class:"handler-item viewport-size",onClick:q[34]||(q[34]=Ie=>r.unref(p)("+"))},null,512),[[ot,r.unref(n)("CANVAS_TOOL.SCALE_UP")]]),r.withDirectives(r.createVNode(qr,{class:"handler-item viewport-size-adaptation",onClick:q[35]||(q[35]=Ie=>r.unref(m)())},null,512),[[ot,r.unref(n)("CANVAS_TOOL.FIT_SCREEN_TOOLTIP")]])]),r.createVNode(Yr,{visible:k.value,"onUpdate:visible":q[38]||(q[38]=Ie=>k.value=Ie),width:880},{default:r.withCtx(()=>[r.createVNode(I_,{onClose:q[36]||(q[36]=Ie=>k.value=!1),onUpdate:q[37]||(q[37]=Ie=>{r.unref(x)(Ie),k.value=!1})})]),_:1},8,["visible"])])}}},kD=ie(RD,[["__scopeId","data-v-072b3f8c"]]),DD=()=>{const e=pe(),{slides:t}=ne.storeToRefs(e),{addHistorySnapshot:n}=be(),{deleteSlide:o}=Ho();return{createSection:()=>{e.updateSlide({sectionTag:{id:Ne.nanoid(6)}}),n()},removeSection:u=>{if(!u)return;const d=t.value.find(f=>{var v;return((v=f.sectionTag)===null||v===void 0?void 0:v.id)===u});e.removeSlideProps({id:d.id,propName:"sectionTag"}),n()},removeAllSection:()=>{const u=t.value.map(d=>(d.sectionTag&&delete d.sectionTag,d));e.setSlides(u),n()},removeSectionSlides:u=>{let d=0;u&&(d=t.value.findIndex(v=>{var p;return((p=v.sectionTag)===null||p===void 0?void 0:p.id)===u}));const f=[];for(let v=d;v<t.value.length;v++){const p=t.value[v];if(v!==d&&p.sectionTag)break;f.push(p.id)}o(f)},updateSectionTitle:(u,d)=>{if(d){if(u==="default")e.updateSlide({sectionTag:{id:Ne.nanoid(6),title:d}},t.value[0].id);else{const f=t.value.find(v=>{var p;return((p=v.sectionTag)===null||p===void 0?void 0:p.id)===u});if(!f)return;e.updateSlide({sectionTag:{...f.sectionTag,title:d}},f.id)}n()}}}},PD=()=>{const{slides:e}=ne.storeToRefs(pe()),t=r.ref(null),n=r.ref(50),o=()=>{e.value.length>n.value?t.value=setTimeout(()=>{n.value=n.value+20,o()},600):n.value=9999};return r.onMounted(o),r.onUnmounted(()=>{t.value&&clearTimeout(t.value)}),{slidesLoadLimit:n}},MD={class:"templates"},BD={class:"catalogs"},VD=["onClick"],$D={class:"content"},FD={class:"header"},HD={class:"types"},UD=["onClick"],GD={key:0,class:"loading-mask"},zD={class:"loading-text"},YD={key:0,class:"slide-item"},XD={class:"thumb-wrap"},WD={class:"btns"},KD={__name:"Templates",emits:["select","selectAll"],setup(e,{emit:t}){const n=t,o=pe(),{templates:a}=ne.storeToRefs(o),{t:i}=_e(),l=r.ref([]),s=r.ref(!1),c=r.useTemplateRef("listRef"),u=r.ref([{label:i("SLIDE_TEMPLATES.TYPE_ALL"),value:"all"},{label:i("SLIDE_TEMPLATES.TYPE_COVER"),value:"cover"},{label:i("SLIDE_TEMPLATES.TYPE_CONTENTS"),value:"contents"},{label:i("SLIDE_TEMPLATES.TYPE_TRANSITION"),value:"transition"},{label:i("SLIDE_TEMPLATES.TYPE_CONTENT"),value:"content"},{label:i("SLIDE_TEMPLATES.TYPE_REFERENCE"),value:"reference"},{label:i("SLIDE_TEMPLATES.TYPE_END"),value:"end"}]),d=r.ref("all"),f=r.ref(""),v=r.ref(0),p=g=>{n("select",g)},h=g=>{n("selectAll",g)},m=async g=>{const E=++v.value;f.value=g,s.value=!0;try{const y=await Ni.getTemplates(f.value);if(E!==v.value)return;l.value=y.slides,y.width&&y.height&&(o.setViewportSize(y.width),o.setViewportRatio(y.height/y.width)),c.value&&c.value.scrollTo(0,0)}finally{E===v.value&&(s.value=!1)}};return r.onMounted(()=>{m(a.value[0].id)}),(g,E)=>(r.openBlock(),r.createElementBlock("div",MD,[r.createElementVNode("div",BD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(a),y=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["catalog",{active:f.value===y.id}]),key:y.id,onClick:_=>m(y.id)},r.toDisplayString(r.unref(i)(y.nameKey||y.name)),11,VD))),128))]),r.createElementVNode("div",$D,[r.createElementVNode("div",FD,[r.createElementVNode("div",HD,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,y=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["type",{active:d.value===y.value}]),key:y.value,onClick:_=>d.value=y.value},r.toDisplayString(y.label),11,UD))),128))]),r.createElementVNode("div",{class:"insert-all",onClick:E[0]||(E[0]=y=>h(l.value))},r.toDisplayString(r.unref(i)("SLIDE_TEMPLATES.INSERT_ALL")),1)]),r.createElementVNode("div",{class:"list",ref_key:"listRef",ref:c},[s.value?(r.openBlock(),r.createElementBlock("div",GD,[E[1]||(E[1]=r.createElementVNode("div",{class:"spinner"},null,-1)),r.createElementVNode("div",zD,r.toDisplayString(r.unref(i)("PPT_COMPONENTS.THUMBNAIL_LOADING")),1)])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,y=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:y.id},[y.type===d.value||d.value==="all"?(r.openBlock(),r.createElementBlock("div",YD,[r.createElementVNode("div",XD,[r.createVNode($a,{class:"thumbnail",slide:y,size:180},null,8,["slide"]),r.createElementVNode("div",WD,[r.createVNode(ue,{class:"btn",type:"primary",size:"small",onClick:_=>p(y)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)("SLIDE_TEMPLATES.INSERT_TEMPLATE")),1)]),_:1},8,["onClick"])])])])):r.createCommentVNode("",!0)],64))),128))],512)])]))}},qD=ie(KD,[["__scopeId","data-v-730180fd"]]),ZD={class:"add-slide"},jD={class:"select-btn"},JD={class:"thumbnail-container"},QD=["data-section-id","onDblclick"],eP=["id","value","placeholder"],tP={key:1,class:"text"},nP={class:"text-content"},rP=["onMousedown"],oP={class:"page-number"},aP={__name:"index",setup(e){const t=fe(),n=pe(),o=ln(),{t:a}=_e(),{selectedSlidesIndex:i,thumbnailsFocus:l}=ne.storeToRefs(t),{slides:s,slideIndex:c,currentSlide:u}=ne.storeToRefs(n),{ctrlKeyState:d,shiftKeyState:f}=ne.storeToRefs(o),{slidesLoadLimit:v}=PD(),p=r.computed(()=>[...i.value,c.value]),h=r.ref(!1),m=r.computed(()=>s.value.some(G=>G.sectionTag)),{addSlidesFromData:g}=gl(),{copySlide:E,pasteSlide:y,createSlide:_,createSlideByTemplate:S,copyAndPasteSlide:I,deleteSlide:A,cutSlide:x,selectAllSlide:N,sortSlides:T,isEmptySlide:L}=Ho(),{createSection:b,removeSection:O,removeAllSection:w,removeSectionSlides:C,updateSectionTitle:P}=DD(),k=r.useTemplateRef("thumbnailsRef");r.watch(()=>c.value,()=>{p.value.length&&t.updateSelectedSlidesIndex([]),r.nextTick(()=>{var G,M;const R=(M=(G=k.value)===null||G===void 0?void 0:G.$el)===null||M===void 0?void 0:M.querySelector(".thumbnail-item.active");k.value&&R&&!bT(R,k.value.$el)&&setTimeout(()=>{R.scrollIntoView({behavior:"smooth"})},100)})},{immediate:!0});const B=G=>{t.setActiveElementIdList([]),c.value!==G&&n.updateSlideIndex(G)},H=(G,M)=>{if(z.value)return;const R=p.value.length>1;if(!(R&&p.value.includes(M)&&G.button!==0))if(d.value)if(c.value===M){if(!R)return;const X=p.value.filter(W=>W!==M);t.updateSelectedSlidesIndex(X),B(p.value[0])}else if(p.value.includes(M)){const X=p.value.filter(W=>W!==M);t.updateSelectedSlidesIndex(X)}else{const X=[...p.value,M];t.updateSelectedSlidesIndex(X)}else if(f.value){if(c.value===M&&!R)return;let X=Math.min(...p.value),W=M;M<X&&(W=Math.max(...p.value),X=M);const te=[];for(let ee=X;ee<=W;ee++)te.push(ee);t.updateSelectedSlidesIndex(te)}else t.updateSelectedSlidesIndex([]),B(M)},U=G=>{l.value!==G&&(t.setThumbnailsFocus(G),G||t.updateSelectedSlidesIndex([]))},$=G=>{const{newIndex:M,oldIndex:R}=G;M===void 0||R===void 0||M===R||T(M,R)},V=()=>{t.setNotesPanelState(!0)},z=r.ref(""),D=G=>{t.setDisableHotkeysState(!0),z.value=G||"default",r.nextTick(()=>{document.querySelector(`#section-title-input-${G||"default"}`).focus()})},Y=G=>{const M=G.target.value;P(z.value,M),z.value="",t.setDisableHotkeysState(!1)},K=G=>{L.value?n.setSlides(G):g(G)},Z=G=>{const M=G.dataset.sectionId;return[{text:a("SLIDE_THUMBS.SECTION_DELETE"),handler:()=>O(M)},{text:a("SLIDE_THUMBS.SECTION_DELETE_WITH_SLIDES"),handler:()=>{t.setActiveElementIdList([]),C(M)}},{text:a("SLIDE_THUMBS.SECTION_DELETE_ALL"),handler:w},{text:a("SLIDE_THUMBS.SECTION_RENAME"),handler:()=>D(M)}]},{enterScreening:oe,enterScreeningFromStart:Q}=hc(),q=()=>[{text:a("SLIDE_THUMBS.PASTE"),subText:"Ctrl + V",handler:y},{text:a("SLIDE_THUMBS.SELECT_ALL"),subText:"Ctrl + A",handler:N},{text:a("SLIDE_THUMBS.NEW_SLIDE"),subText:"Enter",handler:_},{text:a("SLIDE_THUMBS.SLIDE_SHOW"),subText:"F5",handler:Q}],re=()=>[{text:a("SLIDE_THUMBS.CUT"),subText:"Ctrl + X",handler:x},{text:a("SLIDE_THUMBS.COPY"),subText:"Ctrl + C",handler:E},{text:a("SLIDE_THUMBS.PASTE"),subText:"Ctrl + V",handler:y},{text:a("SLIDE_THUMBS.SELECT_ALL"),subText:"Ctrl + A",handler:N},{divider:!0},{text:a("SLIDE_THUMBS.NEW_SLIDE"),subText:"Enter",handler:_},{text:a("SLIDE_THUMBS.DUPLICATE_SLIDE"),subText:"Ctrl + D",handler:I},{text:a("SLIDE_THUMBS.DELETE_SLIDE"),subText:"Delete",handler:()=>A()},{text:a("SLIDE_THUMBS.SECTION_ADD"),handler:b,disable:!!u.value.sectionTag},{divider:!0},{text:a("SLIDE_THUMBS.SLIDE_SHOW_FROM_CURRENT"),subText:"Shift + F5",handler:oe}];return(G,M)=>{const R=r.resolveComponent("AiPptPlus"),X=r.resolveComponent("AiPptDown"),W=r.resolveDirective("contextmenu"),te=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"thumbnails",onMousedown:M[8]||(M[8]=()=>U(!0))},[r.createElementVNode("div",ZD,[r.createElementVNode("div",{class:"btn",onClick:M[0]||(M[0]=ee=>r.unref(_)())},[r.createVNode(R,{class:"icon"}),r.createTextVNode(r.toDisplayString(r.unref(a)("SLIDE_THUMBS.ADD_SLIDE")),1)]),r.createVNode(Se,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":M[3]||(M[3]=ee=>h.value=ee),center:""},{content:r.withCtx(()=>[r.createVNode(qD,{onSelect:M[1]||(M[1]=ee=>{r.unref(S)(ee),h.value=!1}),onSelectAll:M[2]||(M[2]=ee=>{K(ee),h.value=!1})})]),default:r.withCtx(()=>[r.createElementVNode("div",jD,[r.createVNode(X)])]),_:1},8,["value"])]),r.createVNode(r.unref(Jf),{class:"thumbnail-list",ref_key:"thumbnailsRef",ref:k,modelValue:r.unref(s),animation:200,scroll:!0,scrollSensitivity:50,disabled:z.value,onEnd:$,itemKey:"id"},{item:r.withCtx(({element:ee,index:ce})=>[r.createElementVNode("div",JD,[ee.sectionTag||m.value&&ce===0?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,class:"section-title","data-section-id":ee?.sectionTag?.id||"",onDblclick:()=>D(ee?.sectionTag?.id||"")},[z.value===ee?.sectionTag?.id||ce===0&&z.value==="default"?(r.openBlock(),r.createElementBlock("input",{key:0,id:`section-title-input-${ee?.sectionTag?.id||"default"}`,type:"text",value:ee?.sectionTag?.title||"",placeholder:r.unref(a)("SLIDE_THUMBS.SECTION_PLACEHOLDER"),onBlur:M[4]||(M[4]=se=>Y(se)),onKeydown:M[5]||(M[5]=r.withKeys(r.withModifiers(se=>Y(se),["stop"]),["enter"]))},null,40,eP)):(r.openBlock(),r.createElementBlock("span",tP,[r.createElementVNode("div",nP,r.toDisplayString(ee?.sectionTag?ee?.sectionTag?.title||r.unref(a)("SLIDE_THUMBS.SECTION_UNTITLED"):r.unref(a)("SLIDE_THUMBS.SECTION_DEFAULT")),1)]))],40,QD)),[[W,Z]]):r.createCommentVNode("",!0),r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["thumbnail-item",{active:r.unref(c)===ce,selected:p.value.includes(ce)}]),onMousedown:se=>H(se,ce),onDblclick:M[7]||(M[7]=se=>r.unref(oe)())},[r.createElementVNode("div",{class:r.normalizeClass(["label",{"offset-left":ce>=99}])},r.toDisplayString(r.unref(rT)(ce+1,2)),3),r.createVNode($a,{class:"thumbnail",slide:ee,size:120,visible:ce<r.unref(v)},null,8,["slide","visible"]),ee.notes&&ee.notes.length?(r.openBlock(),r.createElementBlock("div",{key:0,class:"note-flag",onClick:M[6]||(M[6]=se=>V())},r.toDisplayString(ee.notes.length),1)):r.createCommentVNode("",!0)],42,rP)),[[W,re]])])]),_:1},8,["modelValue","disabled"]),r.createElementVNode("div",oP,r.toDisplayString(r.unref(a)("SLIDE_THUMBS.PAGE_NUMBER",{current:r.unref(c)+1,total:r.unref(s).length})),1)],32)),[[te,()=>U(!1)],[W,q]])}}},iP=ie(aP,[["__scopeId","data-v-c29273ca"]]),lP={class:"bar"},sP=["data-tooltip"],cP=["data-tooltip"],uP=["data-tooltip"],dP={__name:"Slider",props:{value:{type:Number,default:0},disabled:{type:Boolean,default:!1},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=S=>S.getBoundingClientRect().left,o=e,a=t,i=r.useTemplateRef("sliderRef"),l=r.ref(0),s=r.ref(0),c=r.ref(0),u=r.ref("end"),d=S=>{let I=S/100*(o.max-o.min);if(o.step>=1)I=Math.fround(I);else{const A=o.step.toString(),x=A.match(/^[0.]*([1-9])/);if(x){const N=x[1],T=A.indexOf(N)-1;if(T>0){const L=Math.pow(10,T);I=Math.fround(I*L)/L}}}return $_.plus(I,o.min)},f=r.computed(()=>d(l.value)),v=r.computed(()=>d(s.value)),p=r.computed(()=>d(c.value));r.watch(()=>o.value,()=>{o.max!==o.min&&(typeof o.value=="number"?l.value=(o.value-o.min)/(o.max-o.min)*100:(s.value=(o.value[0]-o.min)/(o.max-o.min)*100,c.value=(o.value[1]-o.min)/(o.max-o.min)*100))},{immediate:!0});const h=S=>{if(!i.value)return 0;let A=(("clientX"in S?S.clientX:S.changedTouches[0].clientX)-n(i.value))/i.value.clientWidth;A=Math.max(A,0),A=Math.min(A,1);let x=A*100;const N=o.step/(o.max-o.min)*100,T=x%N;return T>0&&(T<=N/2?x=x-T:x=x-T+N),x},m=S=>{const I=h(S);u.value==="start"?s.value=I:c.value=I},g=S=>{E(S);const I=d(l.value),A=o.value,x=u.value==="start"?[I,A[1]]:[A[0],I];x[0]>x[1]&&([x[0],x[1]]=[x[1],x[0]]),a("update:value",x),document.removeEventListener("mousemove",m),document.removeEventListener("touchmove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},E=S=>{l.value=h(S)},y=S=>{E(S);const I=d(l.value);a("update:value",I),document.removeEventListener("mousemove",E),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",y),document.removeEventListener("touchend",y)},_=S=>{if(!o.disabled)if(o.range){const I=h(S);Math.abs(I-s.value)<Math.abs(I-c.value)?u.value="start":u.value="end",document.addEventListener("mousemove",m),document.addEventListener("touchmove",m),document.addEventListener("mouseup",g),document.addEventListener("touchend",g)}else document.addEventListener("mousemove",E),document.addEventListener("touchmove",E),document.addEventListener("mouseup",y),document.addEventListener("touchend",y)};return(S,I)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:i,onMousedown:I[0]||(I[0]=A=>_(A))},[r.createElementVNode("div",lP,[e.range?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",{class:"track",style:r.normalizeStyle({width:`${c.value-s.value}%`,left:`${s.value}%`})},null,4),r.createElementVNode("div",{class:"thumb",style:r.normalizeStyle({left:`${s.value}%`}),"data-tooltip":v.value},null,12,cP),r.createElementVNode("div",{class:"thumb",style:r.normalizeStyle({left:`${c.value}%`}),"data-tooltip":p.value},null,12,uP)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:"track",style:r.normalizeStyle({width:`${l.value}%`})},null,4),r.createElementVNode("div",{class:"thumb",style:r.normalizeStyle({left:`${l.value}%`}),"data-tooltip":f.value},null,12,sP)],64))])],34))}},Wt=ie(dP,[["__scopeId","data-v-cce60a76"]]),fP={class:"element-opacity"},pP={class:"row"},vP={style:{width:"45%"}},hP={__name:"ElementOpacity",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),{t:o}=_e(),a=r.ref(1);r.watch(n,()=>{n.value&&(a.value="opacity"in n.value&&n.value.opacity!==void 0?n.value.opacity:1)},{deep:!0,immediate:!0});const{addHistorySnapshot:i}=be(),l=s=>{if(!n.value)return;const c={opacity:s};t.updateElement({id:n.value.id,props:c}),i()};return(s,c)=>(r.openBlock(),r.createElementBlock("div",fP,[r.createElementVNode("div",pP,[r.createElementVNode("div",vP,r.toDisplayString(r.unref(o)("STYLE_PARTS.OPACITY")),1),r.createVNode(Wt,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":c[0]||(c[0]=u=>l(u)),style:{width:"60%"}},null,8,["value"])])]))}},A_=ie(hP,[["__scopeId","data-v-fa757a8e"]]),mP={width:"100%",height:"100%",viewBox:"0 0 100 10"},gP=["x1","x2","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],En={__name:"SVGLine",props:{width:{type:Number,default:2},color:{type:String,default:"#333"},markers:{type:Array},type:{type:String},padding:{type:Number,default:0}},setup(e){const t=e,n=r.ref("");r.onMounted(()=>{n.value=Ne.nanoid()});const o=r.computed(()=>{const a=t.width;return t.type==="dashed"?a<=8?`${a*5} ${a*2.5}`:`${a*5} ${a*1.5}`:t.type==="dotted"?a<=8?`${a*1.8} ${a*1.6}`:`${a*1.5} ${a*1.2}`:"0 0"});return(a,i)=>(r.openBlock(),r.createElementBlock("svg",mP,[r.createElementVNode("defs",null,[e.markers&&e.markers[0]?(r.openBlock(),r.createBlock(Mr,{key:0,id:n.value,position:"start",type:e.markers[0],color:e.color,baseSize:e.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0),e.markers&&e.markers[1]?(r.openBlock(),r.createBlock(Mr,{key:1,id:n.value,position:"end",type:e.markers[1],color:e.color,baseSize:e.width},null,8,["id","type","color","baseSize"])):r.createCommentVNode("",!0)]),r.createElementVNode("line",{x1:e.padding,y1:5,x2:100-e.padding,y2:5,stroke:e.color,"stroke-width":e.width,"stroke-dasharray":o.value,"marker-start":e.markers&&e.markers[0]?`url(#${n.value}-${e.markers[0]}-start)`:"","marker-end":e.markers&&e.markers[1]?`url(#${n.value}-${e.markers[1]}-end)`:""},null,8,gP)]))}},EP={class:"color-block"},yP={__name:"ColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,n)=>{const o=r.resolveComponent("AiPptPlatte");return r.openBlock(),r.createBlock(ue,{class:"color-btn"},{default:r.withCtx(()=>[r.createElementVNode("div",EP,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundColor:e.color})},null,4)]),r.createVNode(o,{class:"color-btn-icon"})]),_:1})}}},lt=ie(yP,[["__scopeId","data-v-2c666772"]]),_P={__name:"Saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.computed(()=>{const p=we(n.value).toHsv();return n.hue!==-1&&(p.h=n.hue),p}),i=r.computed(()=>`hsl(${a.value.h}, 100%, 50%)`),l=r.computed(()=>-(a.value.v*100)+1+100+"%"),s=r.computed(()=>a.value.s*100+"%"),c=Xe.throttle(function(p){o("colorChange",p)},20,{leading:!0,trailing:!1}),u=r.useTemplateRef("saturationRef"),d=p=>{if(p.preventDefault(),!u.value)return;const h=u.value.clientWidth,m=u.value.clientHeight,g=u.value.getBoundingClientRect().left+window.pageXOffset,E=u.value.getBoundingClientRect().top+window.pageYOffset,y=Xe.clamp(p.pageX-g,0,h),_=Xe.clamp(p.pageY-E,0,m),S=y/h,I=Xe.clamp(-(_/m)+1,0,1);c({h:a.value.h,s:S,v:I,a:a.value.a})},f=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)},v=p=>{d(p),window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)};return r.onUnmounted(f),(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:"saturation",ref_key:"saturationRef",ref:u,style:r.normalizeStyle({background:i.value}),onMousedown:h[0]||(h[0]=m=>v(m))},[h[2]||(h[2]=r.createElementVNode("div",{class:"saturation-white"},null,-1)),h[3]||(h[3]=r.createElementVNode("div",{class:"saturation-black"},null,-1)),r.createElementVNode("div",{class:"saturation-pointer",style:r.normalizeStyle({top:l.value,left:s.value})},[...h[1]||(h[1]=[r.createElementVNode("div",{class:"saturation-circle"},null,-1)])],4)],36))}},TP=ie(_P,[["__scopeId","data-v-52d747ae"]]),SP={class:"hue"},IP={__name:"Hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(0),i=r.ref(""),l=r.computed(()=>{const v=we(n.value).toHsl();return n.hue!==-1&&(v.h=n.hue),v}),s=r.computed(()=>l.value.h===0&&i.value==="right"?"100%":l.value.h*100/360+"%");r.watch(()=>n.value,()=>{const v=we(n.value).toHsl(),p=v.s===0?n.hue:v.h;p!==0&&p-a.value>0&&(i.value="right"),p!==0&&p-a.value<0&&(i.value="left"),a.value=p});const c=r.useTemplateRef("hueRef"),u=v=>{if(v.preventDefault(),!c.value)return;const p=c.value.clientWidth,h=c.value.getBoundingClientRect().left+window.pageXOffset,m=v.pageX-h;let g,E;m<0?g=0:m>p?g=360:(E=m*100/p,g=360*E/100),(n.hue===-1||l.value.h!==g)&&o("colorChange",{h:g,l:l.value.l,s:l.value.s,a:l.value.a})},d=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d)},f=v=>{u(v),window.addEventListener("mousemove",u),window.addEventListener("mouseup",d)};return r.onUnmounted(d),(v,p)=>(r.openBlock(),r.createElementBlock("div",SP,[r.createElementVNode("div",{class:"hue-container",ref_key:"hueRef",ref:c,onMousedown:p[0]||(p[0]=h=>f(h))},[r.createElementVNode("div",{class:"hue-pointer",style:r.normalizeStyle({left:s.value})},[...p[1]||(p[1]=[r.createElementVNode("div",{class:"hue-picker"},null,-1)])],4)],544)]))}},AP=ie(IP,[["__scopeId","data-v-95510d36"]]),NP={__name:"Checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},setup(e){const t=e,n={},o=(l,s,c)=>{const u=document.createElement("canvas");u.width=u.height=c*2;const d=u.getContext("2d");return d?(d.fillStyle=l,d.fillRect(0,0,u.width,u.height),d.fillStyle=s,d.fillRect(0,0,c,c),d.translate(c,c),d.fillRect(0,0,c,c),u.toDataURL()):null},a=(l,s,c)=>{const u=l+","+s+","+c;if(n[u])return n[u];const d=o(l,s,c);return n[u]=d,d},i=r.computed(()=>({backgroundImage:`url(${a(t.white,t.grey,t.size)})`}));return(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"checkerboard",style:r.normalizeStyle(i.value)},null,4))}},qf=ie(NP,[["__scopeId","data-v-c8d51d1a"]]),LP={class:"alpha"},CP={class:"alpha-checkboard-wrap"},xP={__name:"Alpha",props:{value:{type:[String,Object],default:"#000000"}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.computed(()=>n.value),i=r.computed(()=>{const d=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${d}, 0) 0%, rgba(${d}, 1) 100%)`}),l=r.useTemplateRef("alphaRef"),s=d=>{if(d.preventDefault(),!l.value)return;const f=l.value.clientWidth,v=l.value.getBoundingClientRect().left+window.pageXOffset,p=d.pageX-v;let h;p<0?h=0:p>f?h=1:h=Math.round(p*100/f)/100,a.value.a!==h&&o("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:h})},c=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)},u=d=>{s(d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",c)};return r.onUnmounted(c),(d,f)=>(r.openBlock(),r.createElementBlock("div",LP,[r.createElementVNode("div",CP,[r.createVNode(qf)]),r.createElementVNode("div",{class:"alpha-gradient",style:r.normalizeStyle({background:i.value})},null,4),r.createElementVNode("div",{class:"alpha-container",ref_key:"alphaRef",ref:l,onMousedown:f[0]||(f[0]=v=>u(v))},[r.createElementVNode("div",{class:"alpha-pointer",style:r.normalizeStyle({left:a.value.a*100+"%"})},[...f[1]||(f[1]=[r.createElementVNode("div",{class:"alpha-picker"},null,-1)])],4)],544)]))}},bP=ie(xP,[["__scopeId","data-v-03d1989d"]]),wP={class:"editable-input"},OP=["value"],RP={__name:"EditableInput",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,o=t,a=r.computed(()=>{let l="";return n.value.a<1?l=we(n.value).toHex8String().toUpperCase():l=we(n.value).toHexString().toUpperCase(),l.replace("#","")}),i=l=>{const s=l.target.value;if(s.length>=6){const c=we(s);c.isValid()&&o("colorChange",c.toRgb())}};return(l,s)=>(r.openBlock(),r.createElementBlock("div",wP,[r.createElementVNode("input",{class:"input-content",value:a.value,onInput:s[0]||(s[0]=c=>i(c))},null,40,OP)]))}},kP=ie(RP,[["__scopeId","data-v-d5fea83f"]]),DP={class:"color-picker"},PP={class:"picker-saturation-wrap"},MP={class:"picker-controls"},BP={class:"picker-color-wrap"},VP={class:"picker-sliders"},$P={class:"picker-hue-wrap"},FP={class:"picker-alpha-wrap"},HP={class:"picker-field"},UP={class:"picker-presets"},GP=["onClick"],zP={class:"picker-gradient-presets"},YP=["onClick"],XP={class:"picker-presets"},WP=["onClick"],KP={key:0,class:"recent-colors-title"},qP={class:"picker-presets"},ZP=["onClick"],g1="RECENT_COLORS",jP={__name:"index",props:{modelValue:{type:String,default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,{t:o}=_e(),a=t,i=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],l=(I,A,x)=>{const N=we(I).toRgb(),T=we(A).toRgb(),L=(T.r-N.r)/x,b=(T.g-N.g)/x,O=(T.b-N.b)/x,w=[];for(let C=0;C<x;C++){const P=we({r:N.r+L*C,g:N.g+b*C,b:N.b+O*C}).toRgbString();w.push(P)}return w},s=()=>{const I=[];for(const A of i)I.push(l(A[1],A[0],5));return I},c=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],u=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],d=r.ref(-1),f=r.ref([]),v=r.computed({get(){return we(n.modelValue).toRgb()},set(I){const A=`rgba(${[I.r,I.g,I.b,I.a].join(",")})`;a("update:modelValue",A)}}),p=s(),h=r.computed(()=>`rgba(${[v.value.r,v.value.g,v.value.b,v.value.a].join(",")})`),m=I=>{d.value=we(I).toHsl().h,a("update:modelValue",I)},g=Xe.debounce(function(){const I=we(v.value).toRgbString();if(!f.value.includes(I)){f.value=[I,...f.value];const A=10;f.value.length>A&&(f.value=f.value.slice(0,A))}},300,{trailing:!0});r.onMounted(()=>{const I=localStorage.getItem(g1);I&&(f.value=JSON.parse(I))}),r.watch(f,()=>{const I=JSON.stringify(f.value);localStorage.setItem(g1,I)});const E=I=>{"h"in I?(d.value=I.h,v.value=we(I).toRgb()):(d.value=we(I).toHsl().h,v.value=I),g()},y=()=>{"EyeDropper"in window?_():S()},_=()=>{Ae.success(o("COLOR_PICKER.EYEDROPPER_HINT"),{duration:0}),new window.EyeDropper().open().then(A=>{const x=we(A.sRGBHex);d.value=x.toHsl().h,v.value=x.toRgb(),Ae.closeAll(),g()}).catch(()=>{Ae.closeAll()})},S=()=>{const I=document.querySelector(".canvas");if(!I)return;const A=document.createElement("div");A.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(A);const x=document.createElement("div");x.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",A.appendChild(x);const{left:N,top:T,width:L,height:b}=I.getBoundingClientRect(),O=w=>!(w.tagName&&w.tagName.toUpperCase()==="FOREIGNOBJECT"||w.classList&&w.classList.contains("operate"));xd.toCanvas(I,{filter:O,fontEmbedCSS:"",width:L,height:b,canvasWidth:L,canvasHeight:b,pixelRatio:1}).then(w=>{w.style.cssText=`position: absolute; top: ${T}px; left: ${N}px; cursor: crosshair;`,A.style.cursor="default",A.appendChild(w);const C=w.getContext("2d");if(!C)return;let P="";const k=U=>{const $=U.x,V=U.y,z=$-N,D=V-T,[Y,K,Z,oe]=C.getImageData(z,D,1,1).data;P=`rgba(${Y}, ${K}, ${Z}, ${(oe/255).toFixed(2)})`,x.style.left=$+10+"px",x.style.top=V+10+"px",x.style.backgroundColor=P},B=()=>{P="",x.style.left="-100px",x.style.top="-100px",x.style.backgroundColor=""},H=U=>{if(P&&U.button===0){const $=we(P);d.value=$.toHsl().h,v.value=$.toRgb(),g()}document.body.removeChild(A),w.removeEventListener("mousemove",k),w.removeEventListener("mouseleave",B),window.removeEventListener("mousedown",H)};w.addEventListener("mousemove",k),w.addEventListener("mouseleave",B),window.addEventListener("mousedown",H)}).catch(()=>{Ae.error(o("COLOR_PICKER.EYEDROPPER_INIT_FAIL")),document.body.removeChild(A)})};return(I,A)=>{const x=r.resolveComponent("AiPptNeedle");return r.openBlock(),r.createElementBlock("div",DP,[r.createElementVNode("div",PP,[r.createVNode(TP,{value:v.value,hue:d.value,onColorChange:A[0]||(A[0]=N=>E(N))},null,8,["value","hue"])]),r.createElementVNode("div",MP,[r.createElementVNode("div",BP,[r.createElementVNode("div",{class:"picker-current-color",style:r.normalizeStyle({background:h.value})},null,4),r.createVNode(qf)]),r.createElementVNode("div",VP,[r.createElementVNode("div",$P,[r.createVNode(AP,{value:v.value,hue:d.value,onColorChange:A[1]||(A[1]=N=>E(N))},null,8,["value","hue"])]),r.createElementVNode("div",FP,[r.createVNode(bP,{value:v.value,onColorChange:A[2]||(A[2]=N=>E(N))},null,8,["value"])])])]),r.createElementVNode("div",HP,[r.createVNode(kP,{class:"input",value:v.value,onColorChange:A[3]||(A[3]=N=>E(N))},null,8,["value"]),r.createElementVNode("div",{class:"straw",onClick:A[4]||(A[4]=N=>y())},[r.createVNode(x)]),r.createElementVNode("div",{class:"transparent",onClick:A[5]||(A[5]=N=>m("#00000000"))},[r.createVNode(qf)])]),r.createElementVNode("div",UP,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(c,N=>r.createElementVNode("div",{class:"picker-presets-color",key:N,style:r.normalizeStyle({background:N}),onClick:T=>m(N)},null,12,GP)),64))]),r.createElementVNode("div",zP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(p),(N,T)=>(r.openBlock(),r.createElementBlock("div",{class:"picker-gradient-col",key:T},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N,L=>(r.openBlock(),r.createElementBlock("div",{class:"picker-gradient-color",key:L,style:r.normalizeStyle({background:L}),onClick:b=>m(L)},null,12,YP))),128))]))),128))]),r.createElementVNode("div",XP,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(u,N=>r.createElementVNode("div",{key:N,class:"picker-presets-color",style:r.normalizeStyle({background:N}),onClick:T=>m(N)},null,12,WP)),64))]),f.value.length?(r.openBlock(),r.createElementBlock("div",KP,r.toDisplayString(r.unref(o)("COLOR_PICKER.RECENT_USED")),1)):r.createCommentVNode("",!0),r.createElementVNode("div",qP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,N=>(r.openBlock(),r.createElementBlock("div",{key:N,class:"picker-presets-color alpha",onClick:T=>m(N)},[r.createElementVNode("div",{class:"picker-presets-color-content",style:r.normalizeStyle({background:N})},null,4)],8,ZP))),128))])])}}},Ye=ie(jP,[["__scopeId","data-v-f95f28d4"]]),JP={__name:"Switch",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=()=>{n.disabled||o("update:value",!n.value)};return(i,l)=>(r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(["switch",{active:e.value,disabled:e.disabled}]),onClick:l[0]||(l[0]=s=>a())},[...l[1]||(l[1]=[r.createElementVNode("span",{class:"switch-core"},null,-1)])],2))}},Sn=ie(JP,[["__scopeId","data-v-17012de8"]]),QP={key:0,class:"select-wrap"},eM={class:"selector"},tM={class:"icon"},nM={class:"selector"},rM={class:"icon"},oM={__name:"SelectCustom",props:{disabled:{type:Boolean,default:!1}},setup(e){const t=r.ref(!1),n=r.useTemplateRef("selectRef"),o=r.ref(0),a=()=>{n.value&&(o.value=n.value.clientWidth)},i=new ResizeObserver(a);return r.onMounted(()=>{n.value&&i.observe(n.value)}),r.onUnmounted(()=>{n.value&&i.unobserve(n.value)}),(l,s)=>{const c=r.resolveComponent("AiPptDown");return e.disabled?(r.openBlock(),r.createElementBlock("div",QP,[r.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:n},[r.createElementVNode("div",eM,[r.renderSlot(l.$slots,"label",{},void 0,!0)]),r.createElementVNode("div",tM,[r.renderSlot(l.$slots,"icon",{},()=>[r.createVNode(c,{size:14})],!0)])],512)])):(r.openBlock(),r.createBlock(Se,{key:1,class:"select-wrap",trigger:"click",value:t.value,"onUpdate:value":s[1]||(s[1]=u=>t.value=u),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)"}},{content:r.withCtx(()=>[r.createElementVNode("div",{class:"options",style:r.normalizeStyle({width:o.value+2+"px"}),onClick:s[0]||(s[0]=u=>t.value=!1)},[r.renderSlot(l.$slots,"options",{},void 0,!0)],4)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:"select",ref_key:"selectRef",ref:n},[r.createElementVNode("div",nM,[r.renderSlot(l.$slots,"label",{},void 0,!0)]),r.createElementVNode("div",rM,[r.renderSlot(l.$slots,"icon",{},()=>[r.createVNode(c,{size:14})],!0)])],512)]),_:3},8,["value"]))}}},xa=ie(oM,[["__scopeId","data-v-83660aa4"]]),aM={class:"element-outline"},iM={key:0,class:"row"},lM={style:{width:"45%"}},sM={class:"switch-wrapper",style:{width:"60%"}},cM={class:"row"},uM={style:{width:"45%"}},dM=["onClick"],fM={class:"row"},pM={style:{width:"45%"}},vM={class:"row"},hM={style:{width:"45%"}},mM={__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=pe(),{theme:n}=ne.storeToRefs(t),{handleElement:o}=ne.storeToRefs(fe()),{t:a}=_e(),i=r.ref(),l=r.ref(!1),s=r.ref(["solid","dashed","dotted"]);r.watch(o,()=>{o.value&&(i.value="outline"in o.value?o.value.outline:void 0,l.value=!!i.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:c}=be(),u=f=>{if(!o.value)return;const v={outline:{...i.value,...f}};t.updateElement({id:o.value.id,props:v}),c()},d=f=>{if(o.value){if(f){const v=n.value.outline;t.updateElement({id:o.value.id,props:{outline:v}})}else t.removeElementProps({id:o.value.id,propName:"outline"});c()}};return(f,v)=>(r.openBlock(),r.createElementBlock("div",aM,[e.fixed?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",iM,[r.createElementVNode("div",lM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_ENABLE")),1),r.createElementVNode("div",sM,[r.createVNode(Sn,{value:l.value,"onUpdate:value":v[0]||(v[0]=p=>d(p))},null,8,["value"])])])),l.value&&i.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("div",cM,[r.createElementVNode("div",uM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:p,onClick:h=>u({style:p})},[r.createVNode(En,{type:p},null,8,["type"])],8,dM))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:i.value.style},null,8,["type"])]),_:1})]),r.createElementVNode("div",fM,[r.createElementVNode("div",pM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:i.value.color,"onUpdate:modelValue":v[1]||(v[1]=p=>u({color:p}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:i.value.color||"#000"},null,8,["color"])]),_:1})]),r.createElementVNode("div",vM,[r.createElementVNode("div",hM,r.toDisplayString(r.unref(a)("STYLE_PARTS.OUTLINE_WIDTH")),1),r.createVNode(Xt,{value:i.value.width||0,"onUpdate:value":v[2]||(v[2]=p=>u({width:p})),style:{width:"60%"}},null,8,["value"])])],64)):r.createCommentVNode("",!0)]))}},Ll=ie(mM,[["__scopeId","data-v-3077abec"]]),gM={class:"element-shadow"},EM={class:"row"},yM={style:{width:"45%"}},_M={class:"switch-wrapper",style:{width:"60%"}},TM={class:"row"},SM={style:{width:"45%"}},IM={class:"row"},AM={style:{width:"45%"}},NM={class:"row"},LM={style:{width:"45%"}},CM={class:"row"},xM={style:{width:"45%"}},bM={__name:"ElementShadow",setup(e){const t=pe(),{theme:n}=ne.storeToRefs(t),{handleElement:o}=ne.storeToRefs(fe()),{t:a}=_e(),i=r.ref(),l=r.ref(!1);r.watch(o,()=>{o.value&&(i.value="shadow"in o.value?o.value.shadow:void 0,l.value=!!i.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:s}=be(),c=d=>{if(!o.value||!i.value)return;const f={...i.value,...d};t.updateElement({id:o.value.id,props:{shadow:f}}),s()},u=d=>{if(o.value){if(d){const f=n.value.shadow;t.updateElement({id:o.value.id,props:{shadow:f}})}else t.removeElementProps({id:o.value.id,propName:"shadow"});s()}};return(d,f)=>(r.openBlock(),r.createElementBlock("div",gM,[r.createElementVNode("div",EM,[r.createElementVNode("div",yM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_ENABLE")),1),r.createElementVNode("div",_M,[r.createVNode(Sn,{value:l.value,"onUpdate:value":f[0]||(f[0]=v=>u(v))},null,8,["value"])])]),l.value&&i.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",TM,[r.createElementVNode("div",SM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_X")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:i.value.h,"onUpdate:value":f[1]||(f[1]=v=>c({h:v}))},null,8,["value"])]),r.createElementVNode("div",IM,[r.createElementVNode("div",AM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_Y")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:i.value.v,"onUpdate:value":f[2]||(f[2]=v=>c({v}))},null,8,["value"])]),r.createElementVNode("div",NM,[r.createElementVNode("div",LM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_BLUR")),1),r.createVNode(Wt,{style:{width:"60%"},min:1,max:20,step:1,value:i.value.blur,"onUpdate:value":f[3]||(f[3]=v=>c({blur:v}))},null,8,["value"])]),r.createElementVNode("div",CM,[r.createElementVNode("div",xM,r.toDisplayString(r.unref(a)("STYLE_PARTS.SHADOW_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:i.value.color,"onUpdate:modelValue":f[4]||(f[4]=v=>c({color:v}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:i.value.color},null,8,["color"])]),_:1})])],64)):r.createCommentVNode("",!0)]))}},Qc=ie(bM,[["__scopeId","data-v-c3a7a58b"]]),mv=[{label:"默认字体",value:"",labelKey:"FONT.NAME.DEFAULT"},{label:"思源黑体",value:"SourceHanSans",labelKey:"FONT.NAME.SOURCE_HAN_SANS"},{label:"思源宋体",value:"SourceHanSerif",labelKey:"FONT.NAME.SOURCE_HAN_SERIF"},{label:"方正黑体",value:"FangZhengHeiTi",labelKey:"FONT.NAME.FZ_HEITI"},{label:"方正楷体",value:"FangZhengKaiTi",labelKey:"FONT.NAME.FZ_KAITI"},{label:"方正宋体",value:"FangZhengShuSong",labelKey:"FONT.NAME.FZ_SONG"},{label:"方正仿宋",value:"FangZhengFangSong",labelKey:"FONT.NAME.FZ_FANGSONG"},{label:"阿里巴巴普惠体",value:"AlibabaPuHuiTi",labelKey:"FONT.NAME.ALIBABA_PUHUI"},{label:"朱雀仿宋",value:"ZhuQueFangSong",labelKey:"FONT.NAME.ZHUQUE_FANGSONG"},{label:"霞鹜文楷",value:"LXGWWenKai",labelKey:"FONT.NAME.LXGW_WENKAI"},{label:"文鼎PL楷体",value:"WenDingPLKaiTi",labelKey:"FONT.NAME.WENDING_PL_KAITI"},{label:"得意黑",value:"DeYiHei",labelKey:"FONT.NAME.DEYI_HEI"},{label:"MiSans",value:"MiSans",labelKey:"FONT.NAME.MISANS"},{label:"微软雅黑",value:"Msyh",labelKey:"FONT.NAME.MICROSOFT_YAHEI"},{label:"DM Sans",value:"DM Sans",labelKey:"FONT.NAME.DM_SANS"},{label:"仓耳小丸子",value:"CangerXiaowanzi",labelKey:"FONT.NAME.CANGER_XIAOWANZI"},{label:"优设标题黑",value:"YousheTitleBlack",labelKey:"FONT.NAME.YOUSHE_TITLE_BLACK"},{label:"峰广明锐体",value:"FengguangMingrui",labelKey:"FONT.NAME.FENGGUANG_MINGRUI"},{label:"摄图摩登小方体",value:"ShetuModernSquare",labelKey:"FONT.NAME.SHETU_MODERN_SQUARE"},{label:"站酷快乐体",value:"ZcoolHappy",labelKey:"FONT.NAME.ZCOOL_HAPPY"},{label:"字制区喜脉体",value:"ZizhiQuXiMai",labelKey:"FONT.NAME.ZIZHI_QU_XIMAI"},{label:"素材集市康康体",value:"SucaiJishiKangkang",labelKey:"FONT.NAME.SUCAI_JISHI_KANGKANG"},{label:"素材集市酷方体",value:"SucaiJishiCoolSquare",labelKey:"FONT.NAME.SUCAI_JISHI_COOL_SQUARE"},{label:"途牛类圆体",value:"TuniuRounded",labelKey:"FONT.NAME.TUNIU_ROUNDED"},{label:"锐字真言体",value:"RuiziZhenyan",labelKey:"FONT.NAME.RUIZI_ZHENYAN"}],Cl=e=>mv.map(t=>({...t,label:e&&t.labelKey?e(t.labelKey):t.label})),wM=()=>{const e=fe(),{richTextAttrs:t,textFormatPainter:n}=ne.storeToRefs(e);return{toggleTextFormatPainter:(a=!1)=>{n.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})}}},OM={class:"text-color-block"},RM={__name:"TextColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,n)=>(r.openBlock(),r.createBlock(ue,{class:"text-color-btn"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{},void 0,!0),r.createElementVNode("div",OM,[r.createElementVNode("div",{class:"text-color-block-content",style:r.normalizeStyle({backgroundColor:e.color})},null,4)])]),_:3}))}},Fa=ie(RM,[["__scopeId","data-v-224eea4f"]]),mt={__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(r.openBlock(),r.createBlock(ue,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default")]),_:3},8,["checked","disabled"]))}},kM={__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["button-group",{passive:e.passive}]),ref:"groupRef"},[r.renderSlot(t.$slots,"default",{},void 0,!0)],2))}},it=ie(kM,[["__scopeId","data-v-95e7f3ee"]]),DM={},PM={class:"select-group"};function MM(e,t){return r.openBlock(),r.createElementBlock("div",PM,[r.renderSlot(e.$slots,"default",{},void 0,!0)])}const gv=ie(DM,[["render",MM],["__scopeId","data-v-842f0d1c"]]),je={__name:"RadioButton",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:n}=r.inject(og);return(o,a)=>(r.openBlock(),r.createBlock(ue,{checked:!e.disabled&&r.unref(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=i=>!e.disabled&&r.unref(n)(e.value))},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3},8,["checked","disabled"]))}},lr={__name:"RadioGroup",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=l=>{n.disabled||o("update:value",l)},i=r.computed(()=>n.value);return r.provide(og,{value:i,updateValue:a}),(l,s)=>(r.openBlock(),r.createBlock(it,{class:"radio-group"},{default:r.withCtx(()=>[r.renderSlot(l.$slots,"default")]),_:3}))}},BM={class:"rich-text-base"},VM={class:"link-popover"},$M={class:"btns"},FM={class:"row",passive:""},HM={class:"list-wrap"},UM=["onClick"],GM={class:"list-wrap"},zM=["onClick"],YM={class:"row"},XM={__name:"RichTextBase",setup(e){const{handleElement:t,handleElementId:n,richTextAttrs:o,textFormatPainter:a}=ne.storeToRefs(fe()),{toggleTextFormatPainter:i}=wM(),{t:l}=_e(),s=r.computed(()=>Cl(l)),c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],u=(N,T)=>{bt.emit(Et.RICH_TEXT_COMMAND,{action:{command:N,value:T}})},d=r.ref(!1),f=r.ref(!1),v=r.ref(!1),p=r.ref(!1),h=r.ref(["disc","circle","square"]),m=r.ref(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),g=r.ref(""),E=r.ref(!1),y=r.ref(!1),_=r.ref(!1);r.watch(o,()=>E.value=!1),r.watch(n,()=>{_.value&&(_.value=!1)});const S=()=>{g.value=o.value.link},I=N=>{if(!N||!/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/.test(N))return Ae.error(l("RICH_TEXT.INVALID_LINK"));u("link",N),E.value=!1},A=()=>{u("link"),E.value=!1},x=async N=>{Ae.error(l("RICH_TEXT.IN_DEVELOPMENT"))};return(N,T)=>{const L=r.resolveComponent("AiPptFontSize"),b=r.resolveComponent("AiPptAddText"),O=r.resolveComponent("AiPptText"),w=r.resolveComponent("AiPptHighLight"),C=r.resolveComponent("AiPptTextBold"),P=r.resolveComponent("AiPptTextItalic"),k=r.resolveComponent("AiPptTextUnderline"),B=r.resolveComponent("AiPptStrikethrough"),H=r.resolveComponent("AiPptCode"),U=r.resolveComponent("AiPptQuote"),$=r.resolveComponent("AiPptFormat"),V=r.resolveComponent("AiPptFormatBrush"),z=r.resolveComponent("AiPptLinkOne"),D=r.resolveComponent("AiPptAlignTextLeft"),Y=r.resolveComponent("AiPptAlignTextCenter"),K=r.resolveComponent("AiPptAlignTextRight"),Z=r.resolveComponent("AiPptAlignTextBoth"),oe=r.resolveComponent("AiPptList"),Q=r.resolveComponent("AiPptDown"),q=r.resolveComponent("AiPptOrderedList"),re=r.resolveComponent("AiPptIndentLeft"),G=r.resolveComponent("AiPptIndentRight"),M=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",BM,[r.createVNode(gv,{class:"row"},{default:r.withCtx(()=>[r.createVNode(st,{style:{width:"60%"},value:r.unref(o).fontname,search:"",searchLabel:r.unref(l)("COMMON.SEARCH_FONT"),"onUpdate:value":T[0]||(T[0]=R=>u("fontname",R)),options:s.value},{icon:r.withCtx(()=>[r.createVNode(L)]),_:1},8,["value","searchLabel","options"]),r.createVNode(st,{style:{width:"40%"},value:r.unref(o).fontsize,search:"",searchLabel:r.unref(l)("COMMON.SEARCH_FONT_SIZE"),"onUpdate:value":T[1]||(T[1]=R=>u("fontsize",R)),options:c.map(R=>({label:R,value:R}))},{icon:r.withCtx(()=>[r.createVNode(b)]),_:1},8,["value","searchLabel","options"])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).color,"onUpdate:modelValue":T[2]||(T[2]=R=>u("color",R))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{first:"",color:r.unref(o).color},{default:r.withCtx(()=>[r.createVNode(O)]),_:1},8,["color"])),[[M,r.unref(l)("RICH_TEXT.TEXT_COLOR")]])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).backcolor,"onUpdate:modelValue":T[3]||(T[3]=R=>u("backcolor",R))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{color:r.unref(o).backcolor},{default:r.withCtx(()=>[r.createVNode(w)]),_:1},8,["color"])),[[M,r.unref(l)("RICH_TEXT.TEXT_HIGHLIGHT")]])]),_:1}),r.withDirectives((r.openBlock(),r.createBlock(ue,{class:"font-size-btn",style:{width:"20%"},onClick:T[4]||(T[4]=R=>u("fontsize-add"))},{default:r.withCtx(()=>[r.createVNode(L),T[37]||(T[37]=r.createTextVNode("+ ",-1))]),_:1})),[[M,r.unref(l)("RICH_TEXT.FONT_SIZE_INCREASE")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:T[5]||(T[5]=R=>u("fontsize-reduce"))},{default:r.withCtx(()=>[r.createVNode(L),T[38]||(T[38]=r.createTextVNode("- ",-1))]),_:1})),[[M,r.unref(l)("RICH_TEXT.FONT_SIZE_DECREASE")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).bold,onClick:T[6]||(T[6]=R=>u("bold"))},{default:r.withCtx(()=>[r.createVNode(C)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.BOLD")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).em,onClick:T[7]||(T[7]=R=>u("em"))},{default:r.withCtx(()=>[r.createVNode(P)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.ITALIC")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).underline,onClick:T[8]||(T[8]=R=>u("underline"))},{default:r.withCtx(()=>[r.createVNode(k)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.UNDERLINE")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).strikethrough,onClick:T[9]||(T[9]=R=>u("strikethrough"))},{default:r.withCtx(()=>[r.createVNode(B)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.STRIKETHROUGH")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).superscript,onClick:T[10]||(T[10]=R=>u("superscript"))},{default:r.withCtx(()=>[...T[39]||(T[39]=[r.createTextVNode("A²",-1)])]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.SUPERSCRIPT")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).subscript,onClick:T[11]||(T[11]=R=>u("subscript"))},{default:r.withCtx(()=>[...T[40]||(T[40]=[r.createTextVNode("A₂",-1)])]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.SUBSCRIPT")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).code,onClick:T[12]||(T[12]=R=>u("code"))},{default:r.withCtx(()=>[r.createVNode(H)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.INLINE_CODE")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:r.unref(o).blockquote,onClick:T[13]||(T[13]=R=>u("blockquote"))},{default:r.withCtx(()=>[r.createVNode(U)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.BLOCKQUOTE")]])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",value:y.value,"onUpdate:value":T[17]||(T[17]=R=>y.value=R),style:{width:"25%"}},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:T[14]||(T[14]=R=>x())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.AI_POLISH")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:T[15]||(T[15]=R=>x())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.AI_EXPAND")),1)]),_:1}),r.createVNode(dt,{center:"",onClick:T[16]||(T[16]=R=>x())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.AI_CONDENSE")),1)]),_:1})]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{first:"",style:{width:"100%"}},{default:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass({"ai-loading":_.value})},r.toDisplayString(_.value?"":"AI"),3)]),_:1})),[[M,r.unref(l)("RICH_TEXT.AI_ASSIST")]])]),_:1},8,["value"]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},onClick:T[18]||(T[18]=R=>u("clear"))},{default:r.withCtx(()=>[r.createVNode($)]),_:1})),[[M,r.unref(l)("RICH_TEXT.CLEAR_FORMAT")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:!!r.unref(a),onClick:T[19]||(T[19]=R=>r.unref(i)()),onDblclick:T[20]||(T[20]=R=>r.unref(i)(!0))},{default:r.withCtx(()=>[r.createVNode(V)]),_:1},8,["checked"])),[[M,r.unref(l)("COMMON.FORMAT_PAINTER_TIP")]]),r.createVNode(Se,{placement:"bottom-end",trigger:"click",value:E.value,"onUpdate:value":T[25]||(T[25]=R=>E.value=R),style:{width:"25%"}},{content:r.withCtx(()=>[r.createElementVNode("div",VM,[r.createVNode(Pr,{value:g.value,"onUpdate:value":T[21]||(T[21]=R=>g.value=R),placeholder:r.unref(l)("RICH_TEXT.LINK_PLACEHOLDER")},null,8,["value","placeholder"]),r.createElementVNode("div",$M,[r.createVNode(ue,{size:"small",disabled:!r.unref(o).link,onClick:T[22]||(T[22]=R=>A()),style:{"margin-right":"5px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("COMMON.REMOVE")),1)]),_:1},8,["disabled"]),r.createVNode(ue,{size:"small",type:"primary",onClick:T[23]||(T[23]=R=>I(g.value))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("COMMON.CONFIRM")),1)]),_:1})])])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{last:"",style:{width:"100%"},checked:!!r.unref(o).link,onClick:T[24]||(T[24]=R=>S())},{default:r.withCtx(()=>[r.createVNode(z)]),_:1},8,["checked"])),[[M,r.unref(l)("RICH_TEXT.LINK")]])]),_:1},8,["value"])]),_:1}),r.createVNode(Oe),r.createVNode(lr,{class:"row","button-style":"solid",value:r.unref(o).align,"onUpdate:value":T[26]||(T[26]=R=>u("align",R))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"left",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(D)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"center",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(Y)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_CENTER")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"right",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(K)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_RIGHT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"justify",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(Z)]),_:1})),[[M,r.unref(l)("RICH_TEXT.ALIGN_JUSTIFY")]])]),_:1},8,["value"]),r.createElementVNode("div",FM,[r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",type:r.unref(o).bulletList?"primary":"default",style:{flex:"1"},onClick:T[27]||(T[27]=R=>u("bulletList"))},{default:r.withCtx(()=>[r.createVNode(oe)]),_:1},8,["type"])),[[M,r.unref(l)("RICH_TEXT.BULLET_LIST")]]),r.createVNode(Se,{trigger:"click",value:d.value,"onUpdate:value":T[28]||(T[28]=R=>d.value=R)},{content:r.withCtx(()=>[r.createElementVNode("div",HM,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.value,R=>(r.openBlock(),r.createElementBlock("ul",{class:"list",key:R,style:r.normalizeStyle({listStyleType:R}),onClick:X=>u("bulletList",R)},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(3,X=>r.createElementVNode("li",{class:"list-item",key:X},[...T[41]||(T[41]=[r.createElementVNode("span",null,null,-1)])])),64))],12,UM))),128))])]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1}),T[43]||(T[43]=r.createElementVNode("div",{style:{width:"10px"}},null,-1)),r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",type:r.unref(o).orderedList?"primary":"default",style:{flex:"1"},onClick:T[29]||(T[29]=R=>u("orderedList"))},{default:r.withCtx(()=>[r.createVNode(q)]),_:1},8,["type"])),[[M,r.unref(l)("RICH_TEXT.ORDERED_LIST")]]),r.createVNode(Se,{trigger:"click",value:f.value,"onUpdate:value":T[30]||(T[30]=R=>f.value=R)},{content:r.withCtx(()=>[r.createElementVNode("div",GM,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,R=>(r.openBlock(),r.createElementBlock("ul",{class:"list",key:R,style:r.normalizeStyle({listStyleType:R}),onClick:X=>u("orderedList",R)},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(3,X=>r.createElementVNode("li",{class:"list-item",key:X},[...T[42]||(T[42]=[r.createElementVNode("span",null,null,-1)])])),64))],12,zM))),128))])]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1})]),r.createElementVNode("div",YM,[r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",style:{flex:"1"},onClick:T[31]||(T[31]=R=>u("indent","-1"))},{default:r.withCtx(()=>[r.createVNode(re)]),_:1})),[[M,r.unref(l)("RICH_TEXT.INDENT_DECREASE")]]),r.createVNode(Se,{trigger:"click",value:v.value,"onUpdate:value":T[33]||(T[33]=R=>v.value=R)},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:T[32]||(T[32]=R=>u("textIndent","-1"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.TEXT_INDENT_DECREASE")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1}),T[44]||(T[44]=r.createElementVNode("div",{style:{width:"10px"}},null,-1)),r.createVNode(it,{style:{flex:"1"},passive:""},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{first:"",style:{flex:"1"},onClick:T[34]||(T[34]=R=>u("indent","+1"))},{default:r.withCtx(()=>[r.createVNode(G)]),_:1})),[[M,r.unref(l)("RICH_TEXT.INDENT_INCREASE")]]),r.createVNode(Se,{trigger:"click",value:p.value,"onUpdate:value":T[36]||(T[36]=R=>p.value=R)},{content:r.withCtx(()=>[r.createVNode(dt,{center:"",onClick:T[35]||(T[35]=R=>u("textIndent","+1"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("RICH_TEXT.TEXT_INDENT_INCREASE")),1)]),_:1})]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn"},{default:r.withCtx(()=>[r.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1})])])}}},N_=ie(XM,[["__scopeId","data-v-ea1d9249"]]),WM={class:"text-style-panel"},KM={class:"preset-style"},qM=["onClick"],ZM={class:"row"},jM={style:{width:"45%"}},JM={class:"row"},QM={style:{width:"45%"}},e9={class:"row"},t9={style:{width:"45%"}},n9={class:"row"},r9={style:{width:"45%"}},o9={__name:"TextStylePanel",setup(e){const{t}=_e(),n=[{label:t("TEXT_STYLE.PRESET_TITLE_LG"),style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:t("TEXT_STYLE.PRESET_TITLE_SM"),style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:t("TEXT_STYLE.PRESET_BODY"),style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:t("TEXT_STYLE.PRESET_BODY_SM"),style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:t("TEXT_STYLE.PRESET_NOTE_1"),style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:t("TEXT_STYLE.PRESET_NOTE_2"),style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],o=fe(),a=pe(),{handleElement:i,handleElementId:l}=ne.storeToRefs(o),{addHistorySnapshot:s}=be(),c=I=>{a.updateElement({id:l.value,props:I}),s()},u=r.ref("#000"),d=r.ref(),f=r.ref(),v=r.ref();r.watch(i,()=>{!i.value||i.value.type!=="text"||(u.value=i.value.fill||"#fff",d.value=i.value.lineHeight||1.5,f.value=i.value.wordSpace||0,v.value=i.value.paragraphSpace===void 0?5:i.value.paragraphSpace,bt.emit(Et.SYNC_RICH_TEXT_ATTRS_TO_STORE))},{deep:!0,immediate:!0});const p=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],h=[0,1,2,3,4,5,6,8,10],m=[0,5,10,15,20,25,30,40,50,80],g=I=>{c({lineHeight:I})},E=I=>{c({paragraphSpace:I})},y=I=>{c({wordSpace:I})},_=I=>{c({fill:I})},S=I=>{bt.emit(Et.RICH_TEXT_COMMAND,{action:I})};return(I,A)=>{const x=r.resolveComponent("AiPptRowHeight"),N=r.resolveComponent("AiPptVerticalSpacingBetweenItems"),T=r.resolveComponent("AiPptFullwidth");return r.openBlock(),r.createElementBlock("div",WM,[r.createElementVNode("div",KM,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(n,L=>r.createElementVNode("div",{class:"preset-style-item",key:L.label,style:r.normalizeStyle(L.style),onClick:b=>S(L.cmd)},r.toDisplayString(L.label),13,qM)),64))]),r.createVNode(Oe),r.createVNode(N_),r.createVNode(Oe),r.createElementVNode("div",ZM,[r.createElementVNode("div",jM,r.toDisplayString(r.unref(t)("TEXT_STYLE.LINE_HEIGHT")),1),r.createVNode(st,{style:{width:"60%"},value:d.value||1,"onUpdate:value":A[0]||(A[0]=L=>g(L)),options:p.map(L=>({label:r.unref(t)("TEXT_STYLE.LINE_HEIGHT_OPTION",{value:L}),value:L}))},{icon:r.withCtx(()=>[r.createVNode(x)]),_:1},8,["value","options"])]),r.createElementVNode("div",JM,[r.createElementVNode("div",QM,r.toDisplayString(r.unref(t)("TEXT_STYLE.PARAGRAPH_SPACING")),1),r.createVNode(st,{style:{width:"60%"},value:v.value||0,"onUpdate:value":A[1]||(A[1]=L=>E(L)),options:m.map(L=>({label:r.unref(t)("TEXT_STYLE.PX_OPTION",{value:L}),value:L}))},{icon:r.withCtx(()=>[r.createVNode(N)]),_:1},8,["value","options"])]),r.createElementVNode("div",e9,[r.createElementVNode("div",t9,r.toDisplayString(r.unref(t)("TEXT_STYLE.LETTER_SPACING")),1),r.createVNode(st,{style:{width:"60%"},value:f.value||0,"onUpdate:value":A[2]||(A[2]=L=>y(L)),options:h.map(L=>({label:r.unref(t)("TEXT_STYLE.PX_OPTION",{value:L}),value:L}))},{icon:r.withCtx(()=>[r.createVNode(T)]),_:1},8,["value","options"])]),r.createElementVNode("div",n9,[r.createElementVNode("div",r9,r.toDisplayString(r.unref(t)("TEXT_STYLE.BOX_FILL")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value,"onUpdate:modelValue":A[3]||(A[3]=L=>_(L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:u.value},null,8,["color"])]),_:1})]),r.createVNode(Oe),r.createVNode(Ll),r.createVNode(Oe),r.createVNode(Qc),r.createVNode(Oe),r.createVNode(A_)])}}},a9=ie(o9,[["__scopeId","data-v-a8aa2308"]]),i9={class:"element-flip"},l9={__name:"ElementFlip",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),{t:o}=_e(),a=r.ref(!1),i=r.ref(!1);r.watch(n,()=>{n.value&&(n.value.type==="image"||n.value.type==="shape")&&(a.value=!!n.value.flipH,i.value=!!n.value.flipV)},{deep:!0,immediate:!0});const{addHistorySnapshot:l}=be(),s=c=>{n.value&&(t.updateElement({id:n.value.id,props:c}),l())};return(c,u)=>{const d=r.resolveComponent("AiPptFlipVertically"),f=r.resolveComponent("AiPptFlipHorizontally");return r.openBlock(),r.createElementBlock("div",i9,[r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(mt,{style:{flex:"1"},checked:i.value,onClick:u[0]||(u[0]=v=>s({flipV:!i.value}))},{default:r.withCtx(()=>[r.createVNode(d),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("STYLE_PARTS.FLIP_VERTICAL")),1)]),_:1},8,["checked"]),r.createVNode(mt,{style:{flex:"1"},checked:a.value,onClick:u[1]||(u[1]=v=>s({flipH:!a.value}))},{default:r.withCtx(()=>[r.createVNode(f),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("STYLE_PARTS.FLIP_HORIZONTAL")),1)]),_:1},8,["checked"])]),_:1})])}}},L_=ie(l9,[["__scopeId","data-v-10e0099f"]]),s9={class:"element-filter"},c9={class:"row"},u9={style:{flex:"2"}},d9={class:"switch-wrapper",style:{flex:"3"}},f9={class:"presets"},p9=["onClick"],v9=["src"],h9={class:"preset-label"},m9={class:"filter"},g9={class:"name"},E9={__name:"ElementFilter",setup(e){const{t}=_e(),n=[{label:t("FILTERS.BLUR"),key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:t("FILTERS.BRIGHTNESS"),key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:t("FILTERS.CONTRAST"),key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:t("FILTERS.GRAYSCALE"),key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:t("FILTERS.SATURATION"),key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:t("FILTERS.HUE"),key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:t("FILTERS.SEPIA"),key:"sepia",default:0,value:0,unit:"%",max:100,step:5},{label:t("FILTERS.INVERT"),key:"invert",default:0,value:0,unit:"%",max:100,step:5},{label:t("FILTERS.OPACITY"),key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],o=[{label:t("FILTERS.PRESET_BW"),values:{grayscale:"100%"}},{label:t("FILTERS.PRESET_RETRO"),values:{sepia:"50%",contrast:"110%",brightness:"90%"}},{label:t("FILTERS.PRESET_SHARPEN"),values:{contrast:"150%"}},{label:t("FILTERS.PRESET_SOFT"),values:{brightness:"110%",contrast:"90%"}},{label:t("FILTERS.PRESET_WARM"),values:{sepia:"30%",saturate:"135%"}},{label:t("FILTERS.PRESET_BRIGHT"),values:{brightness:"110%",contrast:"110%"}},{label:t("FILTERS.PRESET_VIVID"),values:{saturate:"200%"}},{label:t("FILTERS.PRESET_BLUR"),values:{blur:"2px"}},{label:t("FILTERS.PRESET_INVERT"),values:{invert:"100%"}}],a=pe(),{handleElement:i,handleElementId:l}=ne.storeToRefs(fe()),s=i,c=r.ref(JSON.parse(JSON.stringify(n))),u=r.ref(!1),{addHistorySnapshot:d}=be();r.watch(i,()=>{if(!i.value||i.value.type!=="image")return;const m=i.value.filters;m?(c.value=n.map(g=>{const E=m[g.key];return E?{...g,value:parseInt(E)}:g}),u.value=!0):(c.value=JSON.parse(JSON.stringify(n)),u.value=!1)},{deep:!0,immediate:!0});const f=m=>{let g="";const E=Object.keys(m);for(const y of E)g+=`${y}(${m[y]}) `;return g},v=(m,g)=>{const _={...i.value.filters||{},[m.key]:`${g}${m.unit}`};a.updateElement({id:l.value,props:{filters:_}}),d()},p=m=>{i.value&&(m?a.updateElement({id:i.value.id,props:{filters:{}}}):a.removeElementProps({id:i.value.id,propName:"filters"}),d())},h=m=>{a.updateElement({id:l.value,props:{filters:m}}),d()};return(m,g)=>(r.openBlock(),r.createElementBlock("div",s9,[r.createElementVNode("div",c9,[r.createElementVNode("div",u9,r.toDisplayString(r.unref(t)("STYLE_PARTS.FILTER_ENABLE")),1),r.createElementVNode("div",d9,[r.createVNode(Sn,{value:u.value,"onUpdate:value":g[0]||(g[0]=E=>p(E))},null,8,["value"])])]),u.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",f9,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(o,(E,y)=>r.createElementVNode("div",{class:"preset-item",key:y,onClick:_=>h(E.values)},[r.createElementVNode("img",{src:r.unref(s).src,alt:"",style:r.normalizeStyle({filter:f(E.values)})},null,12,v9),r.createElementVNode("span",h9,r.toDisplayString(E.label),1)],8,p9)),64))]),r.createElementVNode("div",m9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,E=>(r.openBlock(),r.createElementBlock("div",{class:"filter-item",key:E.key},[r.createElementVNode("div",g9,r.toDisplayString(E.label),1),r.createVNode(Wt,{class:"filter-slider",max:E.max,min:0,step:E.step,value:E.value,"onUpdate:value":y=>v(E,y)},null,8,["max","step","value","onUpdate:value"])]))),128))])],64)):r.createCommentVNode("",!0)]))}},y9=ie(E9,[["__scopeId","data-v-f48d8616"]]),_9={class:"element-color-mask"},T9={class:"row"},S9={style:{width:"45%"}},I9={class:"switch-wrapper",style:{width:"60%"}},A9={key:0,class:"row",style:{"margin-top":"15px"}},N9={style:{width:"45%"}},L9={__name:"ElementColorMask",setup(e){const t=pe(),{handleElement:n,handleElementId:o}=ne.storeToRefs(fe()),{theme:a}=ne.storeToRefs(t),{t:i}=_e(),{addHistorySnapshot:l}=be(),s=r.computed(()=>{const v=a.value.themeColors[0];return we(v).setAlpha(.5).toRgbString()}),c=r.ref(""),u=r.ref(!1);r.watch(n,()=>{!n.value||n.value.type!=="image"||(n.value.colorMask?(c.value=n.value.colorMask,u.value=!0):u.value=!1)},{deep:!0,immediate:!0});const d=v=>{n.value&&(v?t.updateElement({id:n.value.id,props:{colorMask:s.value}}):t.removeElementProps({id:n.value.id,propName:"colorMask"}),l())},f=v=>{t.updateElement({id:o.value,props:{colorMask:v}}),l()};return(v,p)=>(r.openBlock(),r.createElementBlock("div",_9,[r.createElementVNode("div",T9,[r.createElementVNode("div",S9,r.toDisplayString(r.unref(i)("STYLE_PARTS.COLOR_MASK")),1),r.createElementVNode("div",I9,[r.createVNode(Sn,{value:u.value,"onUpdate:value":p[0]||(p[0]=h=>d(h))},null,8,["value"])])]),u.value?(r.openBlock(),r.createElementBlock("div",A9,[r.createElementVNode("div",N9,r.toDisplayString(r.unref(i)("STYLE_PARTS.MASK_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:c.value,"onUpdate:modelValue":p[1]||(p[1]=h=>f(h))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:c.value},null,8,["color"])]),_:1})])):r.createCommentVNode("",!0)]))}},C9=ie(L9,[["__scopeId","data-v-b47cc90b"]]),x9={class:"image-style-panel"},b9={class:"clip"},w9={class:"title"},O9={class:"shape-clip"},R9=["onClick"],k9={key:0,class:"title"},D9={class:"row"},P9={style:{width:"45%"}},M9={__name:"ImageStylePanel",setup(e){const t=Fd,n=fe(),o=pe(),{handleElement:a,handleElementId:i}=ne.storeToRefs(n),{currentSlide:l}=ne.storeToRefs(o),s=a,c=r.ref(!1),{addHistorySnapshot:u}=be(),{t:d}=_e(),f=r.computed(()=>[{label:d("IMAGE_STYLE.RATIO_SQUARE"),children:[{key:"1:1",ratio:1/1}]},{label:d("IMAGE_STYLE.RATIO_PORTRAIT"),children:[{key:"2:3",ratio:3/2},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:d("IMAGE_STYLE.RATIO_LANDSCAPE"),children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:3/5},{key:"5:4",ratio:4/5}]},{label:"",children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:10/16}]}]),v=()=>{n.setClipingImageElementId(i.value),c.value=!1},p=()=>{const _=a.value,S=_.width,I=_.height,A=_.left,x=_.top,N=_.clip?_.clip.range:[[0,0],[100,100]],T=S/((N[1][0]-N[0][0])/100),L=I/((N[1][1]-N[0][1])/100),b=A-T*(N[0][0]/100),O=x-L*(N[0][1]/100);return{originClipRange:N,originWidth:T,originHeight:L,originLeft:b,originTop:O}},h=_=>{a.value&&(o.updateElement({id:i.value,props:_}),u())},m=(_,S=0)=>{const I=a.value,{originClipRange:A,originWidth:x,originHeight:N,originLeft:T,originTop:L}=p();if(S){const b=N/x,O=0,w=100;let C;if(b>S){const P=(1-S/b)/2*100;C=[[O,P],[w,w-P]]}else{const P=(1-b/S)/2*100;C=[[P,O],[w-P,w]]}h({clip:{...I.clip,shape:_,range:C},left:T+x*(C[0][0]/100),top:L+N*(C[0][1]/100),width:x*(C[1][0]-C[0][0])/100,height:N*(C[1][1]-C[0][1])/100})}else{const b={...I.clip,shape:_,range:A};let O={clip:b};_==="rect"&&(O={clip:b,radius:0}),h(O)}v()},g=_=>{const S=_[0];S&&Xr(S).then(I=>{const A=s.value.width,x=s.value.height,N=s.value.left,T=s.value.top,L=N+A/2,b=T+x/2;K1(I).then(({width:O,height:w})=>{const C=x,P=O*(x/w),k=L-P/2,B=b-C/2;o.removeElementProps({id:i.value,propName:"clip"}),h({src:I,width:P,height:C,left:k,top:B})})})},E=()=>{if(a.value.clip){const{originWidth:S,originHeight:I,originLeft:A,originTop:x}=p();h({left:A,top:x,width:S,height:I})}o.removeElementProps({id:i.value,propName:["clip","outline","flip","shadow","filters","colorMask","radius"]}),u()},y=()=>{const _=a.value,S={...l.value.background,type:"image",image:{src:_.src,size:"cover"}};o.updateSlide({background:S}),u()};return(_,S)=>{const I=r.resolveComponent("AiPptTailoring"),A=r.resolveComponent("AiPptDown"),x=r.resolveComponent("AiPptTransform"),N=r.resolveComponent("AiPptUndo"),T=r.resolveComponent("AiPptTheme");return r.openBlock(),r.createElementBlock("div",x9,[r.createElementVNode("div",{class:"origin-image",style:r.normalizeStyle({backgroundImage:`url(${r.unref(s).src})`})},null,4),r.createVNode(L_),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(ue,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:S[0]||(S[0]=L=>v())},{default:r.withCtx(()=>[r.createVNode(I),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.CROP_IMAGE")),1)]),_:1}),r.createVNode(Se,{trigger:"click",value:c.value,"onUpdate:value":S[1]||(S[1]=L=>c.value=L),style:{width:"calc(100% / 6)"}},{content:r.withCtx(()=>[r.createElementVNode("div",b9,[r.createElementVNode("div",w9,r.toDisplayString(r.unref(d)("IMAGE_STYLE.CLIP_BY_SHAPE")),1),r.createElementVNode("div",O9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(t),(L,b)=>(r.openBlock(),r.createElementBlock("div",{class:"shape-clip-item",key:b,onClick:O=>m(b)},[r.createElementVNode("div",{class:"shape",style:r.normalizeStyle({clipPath:L.style})},null,4)],8,R9))),128))]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,L=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:L.label},[L.label?(r.openBlock(),r.createElementBlock("div",k9,r.toDisplayString(r.unref(d)("IMAGE_STYLE.CLIP_BY",{label:L.label})),1)):r.createCommentVNode("",!0),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(L.children,b=>(r.openBlock(),r.createBlock(ue,{style:{flex:"1"},key:b.key,onClick:O=>m("rect",b.ratio)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(b.key),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)],64))),128))])]),default:r.withCtx(()=>[r.createVNode(ue,{last:"",class:"popover-btn",style:{width:"100%"}},{default:r.withCtx(()=>[r.createVNode(A)]),_:1})]),_:1},8,["value"])]),_:1}),r.createElementVNode("div",D9,[r.createElementVNode("div",P9,r.toDisplayString(r.unref(d)("IMAGE_STYLE.RADIUS")),1),r.createVNode(Xt,{value:r.unref(s).radius||0,"onUpdate:value":S[2]||(S[2]=L=>h({radius:L})),style:{width:"60%"}},null,8,["value"])]),r.createVNode(Oe),r.createVNode(C9),r.createVNode(Oe),r.createVNode(y9),r.createVNode(Oe),r.createVNode(Ll),r.createVNode(Oe),r.createVNode(Qc),r.createVNode(Oe),r.createVNode(El,{onChange:S[3]||(S[3]=L=>g(L))},{default:r.withCtx(()=>[r.createVNode(ue,{class:"full-width-btn"},{default:r.withCtx(()=>[r.createVNode(x),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.REPLACE_IMAGE")),1)]),_:1})]),_:1}),r.createVNode(ue,{class:"full-width-btn",onClick:S[4]||(S[4]=L=>E())},{default:r.withCtx(()=>[r.createVNode(N),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.RESET_STYLE")),1)]),_:1}),r.createVNode(ue,{class:"full-width-btn",onClick:S[5]||(S[5]=L=>y())},{default:r.withCtx(()=>[r.createVNode(T),r.createTextVNode(" "+r.toDisplayString(r.unref(d)("IMAGE_STYLE.SET_BACKGROUND")),1)]),_:1})])}}},B9=ie(M9,[["__scopeId","data-v-cfa145e5"]]),V9=()=>{const e=fe(),{shapeFormatPainter:t,handleElement:n}=ne.storeToRefs(e);return{toggleShapeFormatPainter:(a=!1)=>{const i=n.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:i.fill,gradient:i.gradient,outline:i.outline,opacity:i.opacity,shadow:i.shadow})}}},$9={class:"gradient-bar"},F9=["onMousedown","onContextmenu"],H9={__name:"GradientBar",props:{value:{type:Array,required:!0},index:{type:Number,required:!0}},emits:["update:value","update:index"],setup(e,{emit:t}){const n=e,o=t,a=r.ref([]),i=r.useTemplateRef("barRef");r.watchEffect(()=>{a.value=n.value,n.index>n.value.length-1&&o("update:index",0)});const l=r.computed(()=>`linear-gradient(to right, ${a.value.map(f=>`${f.color} ${f.pos}%`).join(",")})`),s=d=>{if(n.value.length<=2)return;let f=0;d===n.index?f=d-1<0?0:d-1:n.index===n.value.length-1&&(f=n.value.length-2);const v=n.value.filter((p,h)=>h!==d);o("update:index",f),o("update:value",v)},c=d=>{let f=!0;document.onmousemove=v=>{if(!f||!i.value)return;let p=Math.round((v.clientX-i.value.getBoundingClientRect().left)/i.value.clientWidth*100);p>100&&(p=100),p<0&&(p=0),a.value=a.value.map((h,m)=>m===d?{...h,pos:p}:h)},document.onmouseup=()=>{f=!1;const v=a.value[d],p=[...a.value];p.splice(d,1);let h=0;for(let m=0;m<p.length;m++)v.pos>p[m].pos&&(h=m+1);p.splice(h,0,v),o("update:index",h),o("update:value",p),document.onmousemove=null,document.onmouseup=null}},u=d=>{if(n.value.length>=6||!i.value)return;const f=Math.round((d.clientX-i.value.getBoundingClientRect().left)/i.value.clientWidth*100);let v=0;for(let m=0;m<n.value.length;m++)f>n.value[m].pos&&(v=m+1);const p=n.value[v-1]?n.value[v-1].color:n.value[v].color,h=[...n.value];h.splice(v,0,{pos:f,color:p}),o("update:index",v),o("update:value",h)};return(d,f)=>(r.openBlock(),r.createElementBlock("div",$9,[r.createElementVNode("div",{class:"bar",ref_key:"barRef",ref:i,style:r.normalizeStyle({backgroundImage:l.value}),onClick:f[0]||(f[0]=v=>u(v))},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(v,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["point",{active:e.index===p}]),key:v.pos+"-"+p,style:r.normalizeStyle({backgroundColor:v.color,left:`calc(${v.pos}% - 5px)`}),onMousedown:r.withModifiers(h=>c(p),["left"]),onContextmenu:r.withModifiers(h=>s(p),["right"])},null,46,F9))),128))]))}},C_=ie(H9,[["__scopeId","data-v-e509e87f"]]),U9={class:"shape-style-panel"},G9={class:"title"},z9={class:"shape-pool"},Y9={class:"shape-list"},X9={class:"row"},W9={key:0,style:{width:"10px"}},K9={class:"row"},q9={class:"row"},Z9={style:{width:"45%"}},j9={key:0,class:"row"},J9={style:{width:"45%"}},Q9={key:1,class:"pattern-image-wrapper"},eB={class:"pattern-image"},tB={class:"row"},nB={__name:"ShapeStylePanel",setup(e){const t=fe(),n=pe(),{handleElement:o,handleElementId:a,shapeFormatPainter:i}=ne.storeToRefs(t),l=o,s=r.ref("#000"),c=r.ref(""),u=r.ref({type:"linear",rotate:0,colors:[{pos:0,color:"#fff"},{pos:100,color:"#fff"}]}),d=r.ref("fill"),f=r.ref("middle"),v=r.ref(0),{t:p}=_e();r.watch(o,()=>{var N,T,L;if(!o.value||o.value.type!=="shape")return;s.value=o.value.fill||"#fff";const b=[{pos:0,color:s.value},{pos:100,color:"#fff"}];u.value=o.value.gradient||{type:"linear",rotate:0,colors:b},c.value=o.value.pattern||"",d.value=o.value.pattern!==void 0?"pattern":o.value.gradient?"gradient":"fill",f.value=((T=(N=o.value)===null||N===void 0?void 0:N.text)===null||T===void 0?void 0:T.align)||"middle",!((L=o.value.text)===null||L===void 0)&&L.content&&bt.emit(Et.SYNC_RICH_TEXT_ATTRS_TO_STORE)},{deep:!0,immediate:!0}),r.watch(a,()=>{v.value=0});const{addHistorySnapshot:h}=be(),{toggleShapeFormatPainter:m}=V9(),g=N=>{n.updateElement({id:a.value,props:N}),h()},E=N=>{N==="fill"?(n.removeElementProps({id:a.value,propName:["gradient","pattern"]}),h()):N==="gradient"?(v.value=0,n.removeElementProps({id:a.value,propName:"pattern"}),g({gradient:u.value})):N==="pattern"&&(n.removeElementProps({id:a.value,propName:"gradient"}),g({pattern:""}))},y=N=>{if(!u.value)return;const T={...u.value,...N};g({gradient:T})},_=N=>{const T=u.value.colors.map((L,b)=>b===v.value?{...L,color:N}:L);y({colors:T})},S=N=>{const T=N[0];T&&Xr(T).then(L=>{c.value=L,g({pattern:L})})},I=N=>{g({fill:N})},A=N=>{const{width:T,height:L}=o.value,b={viewBox:N.viewBox,path:N.path,special:N.special};if(N.pathFormula){b.pathFormula=N.pathFormula,b.viewBox=[T,L];const O=$o[N.pathFormula];"editable"in O?(b.path=O.formula(T,L,O.defaultValue),b.keypoints=O.defaultValue):b.path=O.formula(T,L)}else b.pathFormula=void 0,b.keypoints=void 0;g(b)},x=N=>{const T=o.value,L={content:"",defaultFontName:"",defaultColor:"#000",align:"middle"},b=T.text||L;g({text:{...b,align:N}})};return(N,T)=>{const L=r.resolveComponent("AiPptDown"),b=r.resolveComponent("AiPptPlus"),O=r.resolveComponent("AiPptAlignTextTopOne"),w=r.resolveComponent("AiPptAlignTextMiddleOne"),C=r.resolveComponent("AiPptAlignTextBottomOne"),P=r.resolveComponent("AiPptFormatBrush"),k=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",U9,[r.createElementVNode("div",G9,[r.createElementVNode("span",null,r.toDisplayString(r.unref(p)("SHAPE_STYLE.REPLACE_SHAPE")),1),r.createVNode(L)]),r.createElementVNode("div",z9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(op),B=>(r.openBlock(),r.createElementBlock("div",{class:"category",key:B.type},[r.createElementVNode("div",Y9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(B.children,(H,U)=>(r.openBlock(),r.createBlock(S_,{class:"shape-item",key:U,shape:H,onClick:$=>A(H)},null,8,["shape","onClick"]))),128))])]))),128))]),r.createElementVNode("div",X9,[r.createVNode(st,{style:{flex:"1"},value:d.value,"onUpdate:value":T[0]||(T[0]=B=>E(B)),options:[{label:r.unref(p)("SHAPE_STYLE.FILL_SOLID"),value:"fill"},{label:r.unref(p)("SHAPE_STYLE.FILL_GRADIENT"),value:"gradient"},{label:r.unref(p)("SHAPE_STYLE.FILL_IMAGE"),value:"pattern"}]},null,8,["value","options"]),d.value!=="pattern"?(r.openBlock(),r.createElementBlock("div",W9)):r.createCommentVNode("",!0),d.value==="fill"?(r.openBlock(),r.createBlock(Se,{key:1,trigger:"click",style:{flex:"1"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:s.value,"onUpdate:modelValue":T[1]||(T[1]=B=>I(B))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:s.value},null,8,["color"])]),_:1})):d.value==="gradient"?(r.openBlock(),r.createBlock(st,{key:2,style:{flex:"1"},value:u.value.type,"onUpdate:value":T[2]||(T[2]=B=>y({type:B})),options:[{label:r.unref(p)("SHAPE_STYLE.GRADIENT_LINEAR"),value:"linear"},{label:r.unref(p)("SHAPE_STYLE.GRADIENT_RADIAL"),value:"radial"}]},null,8,["value","options"])):r.createCommentVNode("",!0)]),d.value==="gradient"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",K9,[r.createVNode(C_,{value:u.value.colors,index:v.value,"onUpdate:value":T[3]||(T[3]=B=>y({colors:B})),"onUpdate:index":T[4]||(T[4]=B=>v.value=B)},null,8,["value","index"])]),r.createElementVNode("div",q9,[r.createElementVNode("div",Z9,r.toDisplayString(r.unref(p)("SHAPE_STYLE.CURRENT_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value.colors[v.value].color,"onUpdate:modelValue":T[5]||(T[5]=B=>_(B))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:u.value.colors[v.value].color},null,8,["color"])]),_:1})]),u.value.type==="linear"?(r.openBlock(),r.createElementBlock("div",j9,[r.createElementVNode("div",J9,r.toDisplayString(r.unref(p)("SHAPE_STYLE.GRADIENT_ANGLE")),1),r.createVNode(Wt,{style:{width:"60%"},min:0,max:360,step:15,value:u.value.rotate,"onUpdate:value":T[6]||(T[6]=B=>y({rotate:B}))},null,8,["value"])])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),d.value==="pattern"?(r.openBlock(),r.createElementBlock("div",Q9,[r.createVNode(El,{onChange:T[7]||(T[7]=B=>S(B))},{default:r.withCtx(()=>[r.createElementVNode("div",eB,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundImage:`url(${c.value})`})},[r.createVNode(b)],4)])]),_:1})])):r.createCommentVNode("",!0),r.createVNode(L_),r.createVNode(Oe),r.unref(l).text?.content?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(N_),r.createVNode(Oe),r.createVNode(lr,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":T[8]||(T[8]=B=>x(B))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"top",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(O)]),_:1})),[[k,r.unref(p)("SHAPE_STYLE.ALIGN_TOP")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"middle",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(w)]),_:1})),[[k,r.unref(p)("SHAPE_STYLE.ALIGN_MIDDLE")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"bottom",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(C)]),_:1})),[[k,r.unref(p)("SHAPE_STYLE.ALIGN_BOTTOM")]])]),_:1},8,["value"]),r.createVNode(Oe)],64)):r.createCommentVNode("",!0),r.createVNode(Ll),r.createVNode(Oe),r.createVNode(Qc),r.createVNode(Oe),r.createVNode(A_),r.createVNode(Oe),r.createElementVNode("div",tB,[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:!!r.unref(i),onClick:T[9]||(T[9]=B=>r.unref(m)()),onDblclick:T[10]||(T[10]=B=>r.unref(m)(!0))},{default:r.withCtx(()=>[r.createVNode(P),r.createTextVNode(" "+r.toDisplayString(r.unref(p)("SHAPE_STYLE.FORMAT_PAINTER")),1)]),_:1},8,["checked"])),[[k,r.unref(p)("COMMON.FORMAT_PAINTER_TIP")]])])])}}},rB=ie(nB,[["__scopeId","data-v-0e4f2e5c"]]),oB={class:"line-style-panel"},aB={class:"row"},iB={style:{width:"45%"}},lB=["onClick"],sB={class:"row"},cB={style:{width:"45%"}},uB={class:"row"},dB={style:{width:"45%"}},fB={class:"row"},pB={style:{width:"45%"}},vB=["onClick"],hB={class:"row"},mB={style:{width:"45%"}},gB=["onClick"],EB={class:"row"},yB={__name:"LineStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),{t:o}=_e(),a=n,{addHistorySnapshot:i}=be(),l=r.ref(["solid","dashed","dotted"]),s=r.ref(["","arrow","dot"]),c=u=>{n.value&&(t.updateElement({id:n.value.id,props:u}),i())};return(u,d)=>{const f=r.resolveComponent("AiPptSwitch");return r.openBlock(),r.createElementBlock("div",oB,[r.createElementVNode("div",aB,[r.createElementVNode("div",iB,r.toDisplayString(r.unref(o)("LINE_STYLE.STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,v=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:v,onClick:p=>c({style:v})},[r.createVNode(En,{type:v},null,8,["type"])],8,lB))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:r.unref(a).style},null,8,["type"])]),_:1})]),r.createElementVNode("div",sB,[r.createElementVNode("div",cB,r.toDisplayString(r.unref(o)("LINE_STYLE.COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(a).color,"onUpdate:modelValue":d[0]||(d[0]=v=>c({color:v}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(a).color},null,8,["color"])]),_:1})]),r.createElementVNode("div",uB,[r.createElementVNode("div",dB,r.toDisplayString(r.unref(o)("LINE_STYLE.WIDTH")),1),r.createVNode(Xt,{value:r.unref(a).width,"onUpdate:value":d[1]||(d[1]=v=>c({width:v})),style:{width:"60%"}},null,8,["value"])]),r.createElementVNode("div",fB,[r.createElementVNode("div",pB,r.toDisplayString(r.unref(o)("LINE_STYLE.START")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,v=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:v,onClick:p=>c({points:[v,r.unref(a).points[1]]})},[r.createVNode(En,{padding:5,markers:[v,""]},null,8,["markers"])],8,vB))),128))]),label:r.withCtx(()=>[r.createVNode(En,{padding:5,markers:[r.unref(a).points[0],""]},null,8,["markers"])]),_:1})]),r.createElementVNode("div",hB,[r.createElementVNode("div",mB,r.toDisplayString(r.unref(o)("LINE_STYLE.END")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,v=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:v,onClick:p=>c({points:[r.unref(a).points[0],v]})},[r.createVNode(En,{padding:5,markers:["",v]},null,8,["markers"])],8,gB))),128))]),label:r.withCtx(()=>[r.createVNode(En,{padding:5,markers:["",r.unref(a).points[1]]},null,8,["markers"])]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",EB,[r.createVNode(ue,{style:{flex:"1"},onClick:d[2]||(d[2]=v=>c({start:r.unref(a).end,end:r.unref(a).start}))},{default:r.withCtx(()=>[r.createVNode(f),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("LINE_STYLE.SWAP")),1)]),_:1})]),r.createVNode(Oe),r.createVNode(Qc)])}}},_B=ie(yB,[["__scopeId","data-v-8b08a23e"]]),TB={class:"chart-data-editor"},SB={class:"editor-content"},IB={class:"handler"},AB={class:"col-header"},NB={class:"col-key"},LB={class:"row-header"},CB={class:"row-key"},xB={class:"range-box"},bB=["id","onFocus","onPaste"],wB={class:"btns"},OB={class:"left"},RB={class:"change"},kB={class:"right"},DB="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Sr=100,Ir=32,PB={__name:"ChartDataEditor",props:{type:{type:String,required:!0},data:{type:Object,required:!0}},emits:["save","close"],setup(e,{emit:t}){const n=e,o=t,a=["bar","column","line","area","scatter","pie","ring","radar"],i=r.ref(!1),l=r.ref([0,0]),s=r.ref({width:0,height:0}),c=r.ref(null),u=r.ref("bar"),{t:d}=_e(),f=r.computed(()=>{const A=l.value[0]*Sr,x=l.value[1]*Ir;return[{type:"t",style:{width:A+"px"}},{type:"b",style:{top:x+"px",width:A+"px"}},{type:"l",style:{height:x+"px"}},{type:"r",style:{left:A+"px",height:x+"px"}}]}),v=r.computed(()=>{const A=l.value[0]*Sr,x=l.value[1]*Ir;return{left:A+"px",top:x+"px"}}),p=()=>{u.value=n.type;const A=[],{labels:x,legends:N,series:T}=n.data,L=x.length,b=T.length;A.push(["",...N]);for(let O=0;O<L;O++){const w=[x[O]];for(let C=0;C<b;C++)w.push(T[C][O]+"");A.push(w)}for(let O=0;O<L+1;O++)for(let w=0;w<b+1;w++){const C=document.querySelector(`#cell-${O}-${w}`);C&&(C.value=A[O][w]+"")}l.value=[b+1,L+1]};r.onMounted(p);const h=()=>{if(!c.value)return;const[A,x]=c.value,N=document.querySelector(`#cell-${A+1}-${x}`);N&&N.focus()},m=A=>{A.key.toUpperCase()===Ee.ENTER&&h()};r.onMounted(()=>{document.addEventListener("keydown",m)}),r.onUnmounted(()=>{document.removeEventListener("keydown",m)});const g=()=>{const[A,x]=l.value,N=[];let T=[],L=[];for(let b=1;b<x;b++){let O=d("CHART_DATA_EDITOR.DEFAULT_CATEGORY",{index:b});const w=document.querySelector(`#cell-${b}-0`);w&&w.value&&(O=w.value),N.push(O)}for(let b=1;b<A;b++){let O=d("CHART_DATA_EDITOR.DEFAULT_SERIES",{index:b});const w=document.querySelector(`#cell-0-${b}`);w&&w.value&&(O=w.value),T.push(O)}for(let b=1;b<A;b++){const O=[];for(let w=1;w<x;w++){const C=document.querySelector(`#cell-${w}-${b}`);let P=0;C&&C.value&&+C.value&&(P=+C.value),O.push(P)}L.push(O)}u.value==="scatter"&&(T.length>2&&(T=T.slice(0,2),L=L.slice(0,2)),T.length<2&&(T.push("Y"),L.push(L[0]))),(u.value==="ring"||u.value==="pie")&&T.length>1&&(T=T.slice(0,1),L=L.slice(0,1)),o("save",{data:{labels:N,legends:T,series:L},type:u.value})},E=()=>{for(let A=1;A<31;A++)for(let x=1;x<7;x++){const N=document.querySelector(`#cell-${A}-${x}`);N&&(N.value="")}},y=(A,x,N)=>{const T=x+A.length,L=N+A[0].length;for(let b=x;b<T;b++)for(let O=N;O<L;O++){const w=document.querySelector(`#cell-${b}-${O}`);w&&(w.value=A[b-x][O-N])}},_=(A,x,N)=>{if(A.preventDefault(),!A.clipboardData)return;const T=A.clipboardData.items[0];T&&T.kind==="string"&&(T.type==="text/plain"?T.getAsString(L=>{if(typeof rp(L)=="object")return;const O=X1(L);if(O){y(O,x,N);return}document.execCommand("insertText",!1,L)}):T.type==="text/html"&&T.getAsString(L=>{const b=W1(L);b&&y(b,x,N)}))},S=()=>o("close"),I=A=>{let x=!0;const N=A.pageX,T=A.pageY,L=l.value[0]*Sr,b=l.value[1]*Ir;document.onmousemove=O=>{if(!x)return;const w=O.pageX,C=O.pageY,P=w-N,k=C-T,B=L+P,H=b+k;s.value={width:B,height:H}},document.onmouseup=O=>{x=!1,document.onmousemove=null,document.onmouseup=null;const w=O.pageX,C=O.pageY;if(N===w&&T===C)return;let P=s.value.width,k=s.value.height;P%Sr>Sr*.5&&(P=P+(Sr-P%Sr)),k%Ir>Ir*.5&&(k=k+(Ir-k%Ir));let B=Math.round(k/Ir),H=Math.round(P/Sr);B<3&&(B=3),H<2&&(H=2),l.value=[H,B],s.value={width:0,height:0}}};return(A,x)=>(r.openBlock(),r.createElementBlock("div",TB,[r.createElementVNode("div",SB,[r.createElementVNode("div",IB,[r.createElementVNode("div",AB,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(7,N=>r.createElementVNode("div",{class:"col-header-item",key:N},[r.createElementVNode("div",NB,r.toDisplayString(DB[N-1]),1)])),64))]),r.createElementVNode("div",LB,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(31,N=>r.createElementVNode("div",{class:"row-header-item",key:N},[r.createElementVNode("div",CB,r.toDisplayString(N),1)])),64))]),x[5]||(x[5]=r.createElementVNode("div",{class:"all-header"},[r.createElementVNode("svg",{class:"triangle",width:"8",height:"8",viewBox:"0 0 8 8",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M8,0 L8,8 L0,8 L8,0",fill:"#ccc"})])],-1))]),r.createElementVNode("div",xB,[r.createElementVNode("div",{class:"temp-range",style:r.normalizeStyle({width:s.value.width+"px",height:s.value.height+"px"})},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,N=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["range-line",N.type]),key:N.type,style:r.normalizeStyle(N.style)},null,6))),128)),r.createElementVNode("div",{class:"resizable",style:r.normalizeStyle(v.value),onMousedown:x[0]||(x[0]=r.withModifiers(N=>I(N),["stop"]))},null,36)]),r.createElementVNode("table",null,[r.createElementVNode("tbody",null,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(31,N=>r.createElementVNode("tr",{key:N},[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(7,T=>r.createElementVNode("td",{key:T,class:r.normalizeClass({head:T===1&&N<=l.value[1]||N===1&&T<=l.value[0]})},[N===1&&T===1?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("input",{key:0,class:r.normalizeClass(["item",{selected:N<=l.value[1]&&T<=l.value[0]}]),id:`cell-${N-1}-${T-1}`,autocomplete:"off",onFocus:L=>c.value=[N-1,T-1],onPaste:L=>_(L,N-1,T-1)},null,42,bB))],2)),64))])),64))])])]),r.createElementVNode("div",wB,[r.createElementVNode("div",OB,[r.createTextVNode(r.toDisplayString(r.unref(d)("CHART_DATA_EDITOR.TYPE_LABEL"))+r.toDisplayString(r.unref(d)(r.unref(va)[u.value].labelKey||r.unref(va)[u.value].label))+" ",1),r.createVNode(Se,{trigger:"click",placement:"top",value:i.value,"onUpdate:value":x[1]||(x[1]=N=>i.value=N)},{content:r.withCtx(()=>[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(a,N=>r.createVNode(dt,{center:"",key:N,onClick:()=>{u.value=N,i.value=!1}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)(r.unref(va)[N].labelKey||r.unref(va)[N].label)),1)]),_:2},1032,["onClick"])),64))]),default:r.withCtx(()=>[r.createElementVNode("span",RB,r.toDisplayString(r.unref(d)("CHART_DATA_EDITOR.CHANGE_TYPE")),1)]),_:1},8,["value"])]),r.createElementVNode("div",kB,[r.createVNode(ue,{class:"btn",onClick:x[2]||(x[2]=N=>S())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)("COMMON.CANCEL")),1)]),_:1}),r.createVNode(ue,{class:"btn",onClick:x[3]||(x[3]=N=>E())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)("CHART_DATA_EDITOR.CLEAR_DATA")),1)]),_:1}),r.createVNode(ue,{type:"primary",class:"btn",onClick:x[4]||(x[4]=N=>g())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)("COMMON.CONFIRM")),1)]),_:1})])])]))}},MB=ie(PB,[["__scopeId","data-v-65c728d6"]]),BB={class:"theme-colors-setting"},VB={class:"title"},$B={class:"list"},FB={class:"label",style:{width:"40%"}},HB={class:"color-btn-wrap",style:{width:"100%"}},UB=["onClick"],GB={__name:"ThemeColorsSetting",props:{colors:{type:Array,required:!0}},emits:["update"],setup(e,{emit:t}){const n=e,o=t,a=r.ref([]),{t:i}=_e();r.onMounted(()=>{a.value=[...n.colors]});const l=()=>{o("update",a.value)},s=()=>{const u=[...a.value,"#00000000"];a.value=u},c=u=>{const d=a.value.filter((f,v)=>v!==u);a.value=d};return(u,d)=>{const f=r.resolveComponent("AiPptCloseSmall"),v=r.resolveComponent("AiPptPlus"),p=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",BB,[r.createElementVNode("div",VB,r.toDisplayString(r.unref(i)("CHART_THEME_COLORS.TITLE")),1),r.createElementVNode("div",$B,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{class:"row",key:m},[r.createElementVNode("div",FB,r.toDisplayString(r.unref(i)("CHART_THEME_COLORS.ITEM",{index:m+1})),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:h,"onUpdate:modelValue":g=>a.value[m]=g},null,8,["modelValue","onUpdate:modelValue"])]),default:r.withCtx(()=>[r.createElementVNode("div",HB,[r.createVNode(lt,{color:h},null,8,["color"]),m!==0?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,class:"delete-color-btn",onClick:r.withModifiers(g=>c(m),["stop"])},[r.createVNode(f)],8,UB)),[[p,r.unref(i)("COMMON.DELETE")]]):r.createCommentVNode("",!0)])]),_:2},1024)]))),128)),r.createVNode(ue,{style:{width:"100%"},disabled:a.value.length>=10,onClick:d[0]||(d[0]=h=>s())},{default:r.withCtx(()=>[r.createVNode(v),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("CHART_THEME_COLORS.ADD")),1)]),_:1},8,["disabled"])]),r.createVNode(ue,{class:"btn",type:"primary",onClick:d[1]||(d[1]=h=>l())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)("COMMON.CONFIRM")),1)]),_:1})])}}},zB=ie(GB,[["__scopeId","data-v-f88dc5c8"]]),YB={class:"blocks"},XB={__name:"ColorListButton",props:{colors:{type:Array,required:!0}},setup(e){const t=e,n=r.computed(()=>t.colors?t.colors.length>12?t.colors.slice(0,12):t.colors:[]);return(o,a)=>{const i=r.resolveComponent("AiPptPlatte");return r.openBlock(),r.createBlock(ue,{class:"color-btn"},{default:r.withCtx(()=>[r.createElementVNode("div",YB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(l,s)=>(r.openBlock(),r.createElementBlock("div",{class:"color-block",key:s},[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundColor:l})},null,4)]))),128))]),r.createVNode(i,{class:"color-btn-icon"})]),_:1})}}},x_=ie(XB,[["__scopeId","data-v-2824ae02"]]),WB=["checked"],KB={class:"checkbox-label"},qB={__name:"Checkbox",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=t,a=i=>{n.disabled||o("update:value",i.target.checked)};return(i,l)=>(r.openBlock(),r.createElementBlock("label",{class:r.normalizeClass(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:l[0]||(l[0]=s=>a(s))},[l[1]||(l[1]=r.createElementVNode("span",{class:"checkbox-input"},null,-1)),r.createElementVNode("input",{class:"checkbox-original",type:"checkbox",checked:e.value},null,8,WB),r.createElementVNode("span",KB,[r.renderSlot(i.$slots,"default",{},void 0,!0)])],34))}},_a=ie(qB,[["__scopeId","data-v-2e326045"]]),ZB={class:"chart-style-panel"},jB={class:"row"},JB={class:"row"},QB={style:{width:"45%"}},eV={class:"row"},tV={style:{width:"45%"}},nV={class:"row"},rV={style:{width:"45%"}},oV={class:"row"},aV={style:{width:"45%"}},iV={class:"themes"},lV={class:"label"},sV={class:"preset-themes"},cV=["onClick"],uV={class:"label"},dV={class:"preset-themes",style:{marginBottom:"-10px"}},fV={__name:"index",setup(e){const t=fe(),n=pe(),{handleElement:o,handleElementId:a}=ne.storeToRefs(t),{theme:i}=ne.storeToRefs(n),l=o,s=r.ref(!1),c=r.ref(!1),u=r.ref(!1),{addHistorySnapshot:d}=be(),f=r.ref("#000"),v=r.ref([]),p=r.ref(""),h=r.ref(""),m=r.ref(!1),g=r.ref(!1),{t:E}=_e();r.watch(o,()=>{if(!(!o.value||o.value.type!=="chart")){if(f.value=o.value.fill||"#fff",m.value=!1,g.value=!1,o.value.options){const{lineSmooth:x,stack:N}=o.value.options;x!==void 0&&(m.value=x),N!==void 0&&(g.value=N)}v.value=o.value.themeColors,p.value=o.value.textColor||"#333",h.value=o.value.lineColor||"#e8ecf4"}},{deep:!0,immediate:!0});const y=x=>{n.updateElement({id:a.value,props:x}),d()},_=x=>{s.value=!1,y({data:x.data,chartType:x.type})},S=x=>{const T={...o.value.options,...x};y({options:T})},I=x=>{y({themeColors:x}),c.value=!1,u.value=!1},A=()=>s.value=!0;return bt.on(Et.OPEN_CHART_DATA_EDITOR,A),r.onUnmounted(()=>{bt.off(Et.OPEN_CHART_DATA_EDITOR,A)}),(x,N)=>{const T=r.resolveComponent("AiPptEdit");return r.openBlock(),r.createElementBlock("div",ZB,[r.createVNode(ue,{class:"full-width-btn",onClick:N[0]||(N[0]=L=>s.value=!0)},{default:r.withCtx(()=>[r.createVNode(T),r.createTextVNode(" "+r.toDisplayString(r.unref(E)("CHART_STYLE.EDIT_CHART")),1)]),_:1}),r.createVNode(Oe),["bar","column","area","line"].includes(r.unref(l).chartType)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",jB,[r.createVNode(_a,{"onUpdate:value":N[1]||(N[1]=L=>S({stack:L})),value:g.value,style:{flex:"2"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(E)("CHART_STYLE.STACKED")),1)]),_:1},8,["value"]),r.unref(l).chartType==="line"?(r.openBlock(),r.createBlock(_a,{key:0,"onUpdate:value":N[2]||(N[2]=L=>S({lineSmooth:L})),value:m.value,style:{flex:"3"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(E)("CHART_STYLE.SMOOTH_LINE")),1)]),_:1},8,["value"])):r.createCommentVNode("",!0)]),r.createVNode(Oe)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",JB,[r.createElementVNode("div",QB,r.toDisplayString(r.unref(E)("CHART_STYLE.BACKGROUND_FILL")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:f.value,"onUpdate:modelValue":N[3]||(N[3]=L=>y({fill:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:f.value},null,8,["color"])]),_:1})]),r.createElementVNode("div",eV,[r.createElementVNode("div",tV,r.toDisplayString(r.unref(E)("CHART_STYLE.AXIS_TEXT")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:p.value,"onUpdate:modelValue":N[4]||(N[4]=L=>y({textColor:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:p.value},null,8,["color"])]),_:1})]),r.createElementVNode("div",nV,[r.createElementVNode("div",rV,r.toDisplayString(r.unref(E)("CHART_STYLE.GRID_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:h.value,"onUpdate:modelValue":N[5]||(N[5]=L=>y({lineColor:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:h.value},null,8,["color"])]),_:1})]),r.createElementVNode("div",oV,[r.createElementVNode("div",aV,r.toDisplayString(r.unref(E)("CHART_STYLE.THEME_COLORS")),1),r.createVNode(Se,{trigger:"click",value:c.value,"onUpdate:value":N[8]||(N[8]=L=>c.value=L),style:{width:"60%"}},{content:r.withCtx(()=>[r.createElementVNode("div",iV,[r.createElementVNode("div",lV,r.toDisplayString(r.unref(E)("CHART_STYLE.PRESET_THEMES")),1),r.createElementVNode("div",sV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(BT),(L,b)=>(r.openBlock(),r.createElementBlock("div",{class:"preset-theme",key:b,onClick:O=>I(L)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(L,O=>(r.openBlock(),r.createElementBlock("div",{class:"preset-theme-color",key:O,style:r.normalizeStyle({backgroundColor:O})},null,4))),128))],8,cV))),128))]),r.createElementVNode("div",uV,r.toDisplayString(r.unref(E)("CHART_STYLE.SLIDE_THEME")),1),r.createElementVNode("div",dV,[r.createElementVNode("div",{class:"preset-theme",onClick:N[6]||(N[6]=L=>I(r.unref(i).themeColors))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).themeColors,L=>(r.openBlock(),r.createElementBlock("div",{class:"preset-theme-color",key:L,style:r.normalizeStyle({backgroundColor:L})},null,4))),128))])]),r.createVNode(Oe,{margin:10}),r.createVNode(ue,{class:"full-width-btn",onClick:N[7]||(N[7]=()=>{c.value=!1,u.value=!0})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(E)("CHART_STYLE.CUSTOM_THEME")),1)]),_:1})])]),default:r.withCtx(()=>[r.createVNode(x_,{colors:v.value},null,8,["colors"])]),_:1},8,["value"])]),r.createVNode(Oe),r.createVNode(Ll),r.createVNode(Yr,{visible:s.value,"onUpdate:visible":N[11]||(N[11]=L=>s.value=L),width:640},{default:r.withCtx(()=>[r.createVNode(MB,{type:r.unref(l).chartType,data:r.unref(l).data,onClose:N[9]||(N[9]=L=>s.value=!1),onSave:N[10]||(N[10]=L=>_(L))},null,8,["type","data"])]),_:1},8,["visible"]),r.createVNode(Yr,{visible:u.value,"onUpdate:visible":N[13]||(N[13]=L=>u.value=L),width:310,onClosed:N[14]||(N[14]=L=>u.value=!1)},{default:r.withCtx(()=>[r.createVNode(zB,{colors:v.value,onUpdate:N[12]||(N[12]=L=>I(L))},null,8,["colors"])]),_:1},8,["visible"])])}}},pV=ie(fV,[["__scopeId","data-v-3fe69925"]]),vV={class:"table-style-panel"},hV={class:"row"},mV={style:{width:"45%"}},gV={class:"set-count",style:{width:"60%"}},EV={class:"count-text"},yV={class:"row"},_V={style:{width:"45%"}},TV={class:"set-count",style:{width:"60%"}},SV={class:"count-text"},IV={class:"row theme-switch"},AV={style:{width:"45%"}},NV={class:"switch-wrapper",style:{width:"60%"}},LV={class:"row"},CV={class:"row"},xV={class:"row"},bV={style:{width:"45%"}},wV={__name:"TableStylePanel",setup(e){const t=pe(),{handleElement:n,handleElementId:o,selectedTableCells:a}=ne.storeToRefs(fe()),i=r.computed(()=>t.theme.themeColors[0]),l=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],s=r.ref({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"",align:"left"}),c=r.ref(),u=r.ref(!1),d=r.ref(0),f=r.ref(0),v=r.ref(0),p=r.ref(0),{t:h}=_e(),m=r.computed(()=>Cl(h));r.watch(n,()=>{!n.value||n.value.type!=="table"||(c.value=n.value.theme,u.value=!!c.value,d.value=n.value.data.length,f.value=n.value.data[0].length,v.value=n.value.data.length,p.value=n.value.data[0].length)},{deep:!0,immediate:!0});const{addHistorySnapshot:g}=be(),E=()=>{if(!n.value||n.value.type!=="table")return;let N=0,T=0;if(a.value.length){const b=a.value[0];N=+b.split("_")[0],T=+b.split("_")[1]}const L=n.value.data[N][T].style;L?s.value={bold:!!L.bold,em:!!L.em,underline:!!L.underline,strikethrough:!!L.strikethrough,color:L.color||"#000",backcolor:L.backcolor||"",fontsize:L.fontsize||"12px",fontname:L.fontname||"",align:L.align||"left"}:s.value={bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"",align:"left"}};r.onMounted(()=>{a.value.length&&E()}),r.watch(a,E);const y=N=>{t.updateElement({id:o.value,props:N}),g()},_=N=>{const T=n.value,L=JSON.parse(JSON.stringify(T.data));for(let b=0;b<L.length;b++)for(let O=0;O<L[b].length;O++)if(!a.value.length||a.value.includes(`${b}_${O}`)){const w=L[b][O].style||{};L[b][O].style={...w,...N}}y({data:L}),E()},S=N=>{if(!c.value)return;const T={...c.value,...N};y({theme:T})},I=N=>{if(N){const T={theme:{color:i.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};y(T)}else t.removeElementProps({id:o.value,propName:"theme"}),g()},A=N=>{const T=n.value,L=T.data.length;if(N>L){const b=new Array(f.value).fill({id:Ne.nanoid(10),colspan:1,rowspan:1,text:""}),O=new Array(N-L).fill(b),w=JSON.parse(JSON.stringify(T.data));w.push(...O),y({data:w})}else{const b=T.data.slice(0,N);y({data:b})}},x=N=>{const T=n.value,L=T.data[0].length;let b=T.data,O=T.colWidths.map(k=>k*T.width);if(N>L){b=b.map(B=>{const H=new Array(N-L).fill({id:Ne.nanoid(10),colspan:1,rowspan:1,text:""});return B.push(...H),B});const k=new Array(N-L).fill(100);O.push(...k)}else b=b.map(k=>k.slice(0,N)),O=O.slice(0,N);const w=O.reduce((k,B)=>k+B),C=O.map(k=>k/w);y({width:w,data:b,colWidths:C})};return(N,T)=>{const L=r.resolveComponent("AiPptFontSize"),b=r.resolveComponent("AiPptAddText"),O=r.resolveComponent("AiPptText"),w=r.resolveComponent("AiPptFill"),C=r.resolveComponent("AiPptTextBold"),P=r.resolveComponent("AiPptTextItalic"),k=r.resolveComponent("AiPptTextUnderline"),B=r.resolveComponent("AiPptStrikethrough"),H=r.resolveComponent("AiPptAlignTextLeft"),U=r.resolveComponent("AiPptAlignTextCenter"),$=r.resolveComponent("AiPptAlignTextRight"),V=r.resolveComponent("AiPptAlignTextBoth"),z=r.resolveComponent("AiPptMinus"),D=r.resolveComponent("AiPptPlus"),Y=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",vV,[r.createVNode(gv,{class:"row"},{default:r.withCtx(()=>[r.createVNode(st,{style:{width:"50%"},value:s.value.fontname,search:"",searchLabel:r.unref(h)("COMMON.SEARCH_FONT"),"onUpdate:value":T[0]||(T[0]=K=>_({fontname:K})),options:m.value},{icon:r.withCtx(()=>[r.createVNode(L)]),_:1},8,["value","searchLabel","options"]),r.createVNode(st,{style:{width:"50%"},value:s.value.fontsize,search:"",searchLabel:r.unref(h)("COMMON.SEARCH_FONT_SIZE"),"onUpdate:value":T[1]||(T[1]=K=>_({fontsize:K})),options:l.map(K=>({label:K,value:K}))},{icon:r.withCtx(()=>[r.createVNode(b)]),_:1},8,["value","searchLabel","options"])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",style:{width:"50%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:s.value.color,"onUpdate:modelValue":T[2]||(T[2]=K=>_({color:K}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{first:"",color:s.value.color},{default:r.withCtx(()=>[r.createVNode(O)]),_:1},8,["color"])),[[Y,r.unref(h)("RICH_TEXT.TEXT_COLOR")]])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"50%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:s.value.backcolor,"onUpdate:modelValue":T[3]||(T[3]=K=>_({backcolor:K}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{last:"",color:s.value.backcolor},{default:r.withCtx(()=>[r.createVNode(w)]),_:1},8,["color"])),[[Y,r.unref(h)("TABLE_STYLE.CELL_FILL")]])]),_:1})]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.bold,onClick:T[4]||(T[4]=K=>_({bold:!s.value.bold}))},{default:r.withCtx(()=>[r.createVNode(C)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.BOLD")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.em,onClick:T[5]||(T[5]=K=>_({em:!s.value.em}))},{default:r.withCtx(()=>[r.createVNode(P)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.ITALIC")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.underline,onClick:T[6]||(T[6]=K=>_({underline:!s.value.underline}))},{default:r.withCtx(()=>[r.createVNode(k)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.UNDERLINE")]]),r.withDirectives((r.openBlock(),r.createBlock(mt,{style:{flex:"1"},checked:s.value.strikethrough,onClick:T[7]||(T[7]=K=>_({strikethrough:!s.value.strikethrough}))},{default:r.withCtx(()=>[r.createVNode(B)]),_:1},8,["checked"])),[[Y,r.unref(h)("RICH_TEXT.STRIKETHROUGH")]])]),_:1}),r.createVNode(lr,{class:"row","button-style":"solid",value:s.value.align,"onUpdate:value":T[8]||(T[8]=K=>_({align:K}))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"left",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(H)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"center",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(U)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_CENTER")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"right",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode($)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_RIGHT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"justify",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(V)]),_:1})),[[Y,r.unref(h)("RICH_TEXT.ALIGN_JUSTIFY")]])]),_:1},8,["value"]),r.createVNode(Oe),r.createVNode(Ll,{fixed:!0}),r.createVNode(Oe),r.createElementVNode("div",hV,[r.createElementVNode("div",mV,r.toDisplayString(r.unref(h)("TABLE_STYLE.ROW_COUNT")),1),r.createElementVNode("div",gV,[r.createVNode(ue,{class:"btn",disabled:d.value<=1,onClick:T[9]||(T[9]=K=>A(d.value-1))},{default:r.withCtx(()=>[r.createVNode(z)]),_:1},8,["disabled"]),r.createElementVNode("div",EV,r.toDisplayString(d.value),1),r.createVNode(ue,{class:"btn",disabled:d.value>=30,onClick:T[10]||(T[10]=K=>A(d.value+1))},{default:r.withCtx(()=>[r.createVNode(D)]),_:1},8,["disabled"])])]),r.createElementVNode("div",yV,[r.createElementVNode("div",_V,r.toDisplayString(r.unref(h)("TABLE_STYLE.COL_COUNT")),1),r.createElementVNode("div",TV,[r.createVNode(ue,{class:"btn",disabled:f.value<=1,onClick:T[11]||(T[11]=K=>x(f.value-1))},{default:r.withCtx(()=>[r.createVNode(z)]),_:1},8,["disabled"]),r.createElementVNode("div",SV,r.toDisplayString(f.value),1),r.createVNode(ue,{class:"btn",disabled:f.value>=30,onClick:T[12]||(T[12]=K=>x(f.value+1))},{default:r.withCtx(()=>[r.createVNode(D)]),_:1},8,["disabled"])])]),r.createVNode(Oe),r.createElementVNode("div",IV,[r.createElementVNode("div",AV,r.toDisplayString(r.unref(h)("TABLE_STYLE.ENABLE_THEME")),1),r.createElementVNode("div",NV,[r.createVNode(Sn,{value:u.value,"onUpdate:value":T[13]||(T[13]=K=>I(K))},null,8,["value"])])]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",LV,[r.createVNode(_a,{"onUpdate:value":T[14]||(T[14]=K=>S({rowHeader:K})),value:c.value.rowHeader,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.HEADER_ROW")),1)]),_:1},8,["value"]),r.createVNode(_a,{"onUpdate:value":T[15]||(T[15]=K=>S({rowFooter:K})),value:c.value.rowFooter,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.FOOTER_ROW")),1)]),_:1},8,["value"])]),r.createElementVNode("div",CV,[r.createVNode(_a,{"onUpdate:value":T[16]||(T[16]=K=>S({colHeader:K})),value:c.value.colHeader,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.FIRST_COL")),1)]),_:1},8,["value"]),r.createVNode(_a,{"onUpdate:value":T[17]||(T[17]=K=>S({colFooter:K})),value:c.value.colFooter,style:{flex:"1"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)("TABLE_STYLE.LAST_COL")),1)]),_:1},8,["value"])]),r.createElementVNode("div",xV,[r.createElementVNode("div",bV,r.toDisplayString(r.unref(h)("TABLE_STYLE.THEME_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:c.value.color,"onUpdate:modelValue":T[18]||(T[18]=K=>S({color:K}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:c.value.color},null,8,["color"])]),_:1})])],64)):r.createCommentVNode("",!0)])}}},OV=ie(wV,[["__scopeId","data-v-0f6bcf63"]]),RV={class:"latex-style-panel"},kV={class:"row"},DV={class:"row"},PV={style:{width:"45%"}},MV={class:"row"},BV={style:{width:"45%"}},VV={__name:"LatexStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),o=n,a=r.ref(!1),{addHistorySnapshot:i}=be(),{t:l}=_e(),s=d=>{n.value&&(t.updateElement({id:n.value.id,props:d}),i())},c=d=>{s({path:d.path,latex:d.latex,width:d.w,height:d.h,viewBox:[d.w,d.h]})},u=()=>a.value=!0;return bt.on(Et.OPEN_LATEX_EDITOR,u),r.onUnmounted(()=>{bt.off(Et.OPEN_LATEX_EDITOR,u)}),(d,f)=>{const v=r.resolveComponent("AiPptEdit");return r.openBlock(),r.createElementBlock("div",RV,[r.createElementVNode("div",kV,[r.createVNode(ue,{style:{flex:"1"},onClick:f[0]||(f[0]=p=>a.value=!0)},{default:r.withCtx(()=>[r.createVNode(v),r.createTextVNode(" "+r.toDisplayString(r.unref(l)("LATEX_STYLE.EDIT")),1)]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",DV,[r.createElementVNode("div",PV,r.toDisplayString(r.unref(l)("LATEX_STYLE.COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).color,"onUpdate:modelValue":f[1]||(f[1]=p=>s({color:p}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(o).color},null,8,["color"])]),_:1})]),r.createElementVNode("div",MV,[r.createElementVNode("div",BV,r.toDisplayString(r.unref(l)("LATEX_STYLE.STROKE_WIDTH")),1),r.createVNode(Xt,{min:1,max:3,value:r.unref(o).strokeWidth,"onUpdate:value":f[2]||(f[2]=p=>s({strokeWidth:p})),style:{width:"60%"}},null,8,["value"])]),r.createVNode(Yr,{visible:a.value,"onUpdate:visible":f[5]||(f[5]=p=>a.value=p),width:880},{default:r.withCtx(()=>[r.createVNode(I_,{value:r.unref(o).latex,onClose:f[3]||(f[3]=p=>a.value=!1),onUpdate:f[4]||(f[4]=p=>{c(p),a.value=!1})},null,8,["value"])]),_:1},8,["visible"])])}}},$V=ie(VV,[["__scopeId","data-v-162e32ef"]]),FV={class:"video-style-panel"},HV={class:"title"},UV={class:"background-image-wrapper"},GV={class:"background-image"},zV={class:"row"},YV={class:"row switch-row"},XV={style:{width:"45%"}},WV={class:"switch-wrapper",style:{width:"60%"}},KV={__name:"VideoStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),o=n,{addHistorySnapshot:a}=be(),{t:i}=_e(),l=c=>{n.value&&(t.updateElement({id:n.value.id,props:c}),a())},s=c=>{const u=c[0];u&&Xr(u).then(d=>l({poster:d}))};return(c,u)=>{const d=r.resolveComponent("AiPptPlus"),f=r.resolveComponent("AiPptUndo");return r.openBlock(),r.createElementBlock("div",FV,[r.createElementVNode("div",HV,r.toDisplayString(r.unref(i)("VIDEO_STYLE.PREVIEW_COVER")),1),r.createElementVNode("div",UV,[r.createVNode(El,{onChange:u[0]||(u[0]=v=>s(v))},{default:r.withCtx(()=>[r.createElementVNode("div",GV,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundImage:r.unref(o).poster?`url(${r.unref(o).poster})`:""})},[r.createVNode(d)],4)])]),_:1})]),r.createElementVNode("div",zV,[r.createVNode(ue,{style:{flex:"1"},onClick:u[1]||(u[1]=v=>l({poster:""}))},{default:r.withCtx(()=>[r.createVNode(f),r.createTextVNode(" "+r.toDisplayString(r.unref(i)("VIDEO_STYLE.RESET_COVER")),1)]),_:1})]),r.createElementVNode("div",YV,[r.createElementVNode("div",XV,r.toDisplayString(r.unref(i)("VIDEO_STYLE.AUTOPLAY")),1),r.createElementVNode("div",WV,[r.createVNode(Sn,{value:r.unref(o).autoplay,"onUpdate:value":u[2]||(u[2]=v=>l({autoplay:v}))},null,8,["value"])])])])}}},qV=ie(KV,[["__scopeId","data-v-a2c372b6"]]),ZV={class:"audio-style-panel"},jV={class:"row"},JV={style:{width:"45%"}},QV={class:"row switch-row"},e$={style:{width:"45%"}},t$={class:"switch-wrapper",style:{width:"60%"}},n$={class:"row switch-row"},r$={style:{width:"45%"}},o$={class:"switch-wrapper",style:{width:"60%"}},a$={__name:"AudioStylePanel",setup(e){const t=pe(),{handleElement:n}=ne.storeToRefs(fe()),o=n,{addHistorySnapshot:a}=be(),{t:i}=_e(),l=s=>{n.value&&(t.updateElement({id:n.value.id,props:s}),a())};return(s,c)=>(r.openBlock(),r.createElementBlock("div",ZV,[r.createElementVNode("div",jV,[r.createElementVNode("div",JV,r.toDisplayString(r.unref(i)("AUDIO_STYLE.ICON_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(o).color,"onUpdate:modelValue":c[0]||(c[0]=u=>l({color:u}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(o).color},null,8,["color"])]),_:1})]),r.createElementVNode("div",QV,[r.createElementVNode("div",e$,r.toDisplayString(r.unref(i)("AUDIO_STYLE.AUTOPLAY")),1),r.createElementVNode("div",t$,[r.createVNode(Sn,{value:r.unref(o).autoplay,"onUpdate:value":c[1]||(c[1]=u=>l({autoplay:u}))},null,8,["value"])])]),r.createElementVNode("div",n$,[r.createElementVNode("div",r$,r.toDisplayString(r.unref(i)("AUDIO_STYLE.LOOP")),1),r.createElementVNode("div",o$,[r.createVNode(Sn,{value:r.unref(o).loop,"onUpdate:value":c[2]||(c[2]=u=>l({loop:u}))},null,8,["value"])])])]))}},i$=ie(a$,[["__scopeId","data-v-635bc0af"]]),l$={class:"element-style-panel"},s$={__name:"index",setup(e){const t={[Ze.TEXT]:a9,[Ze.IMAGE]:B9,[Ze.SHAPE]:rB,[Ze.LINE]:_B,[Ze.CHART]:pV,[Ze.TABLE]:OV,[Ze.LATEX]:$V,[Ze.VIDEO]:qV,[Ze.AUDIO]:i$},{handleElement:n}=ne.storeToRefs(fe()),o=r.computed(()=>n.value&&t[n.value.type]||null);return(a,i)=>(r.openBlock(),r.createElementBlock("div",l$,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.value)))]))}},c$={class:"element-positopn-panel"},u$={class:"title"},d$={class:"title"},f$={class:"row"},p$={key:0,class:"row"},v$={key:1,style:{width:"10%"}},h$={class:"row"},m$={__name:"ElementPositionPanel",setup(e){const t=pe(),{t:n}=_e(),{handleElement:o,handleElementId:a}=ne.storeToRefs(fe()),i=r.ref(0),l=r.ref(0),s=r.ref(0),c=r.ref(0),u=r.ref(0),d=r.ref(!1),f=r.computed(()=>o.value&&ig[o.value.type]||20),v=r.computed(()=>{var T;return((T=o.value)===null||T===void 0?void 0:T.type)==="text"&&!o.value.vertical}),p=r.computed(()=>{var T;return((T=o.value)===null||T===void 0?void 0:T.type)==="text"&&o.value.vertical});r.watch(o,()=>{o.value&&(i.value=Xe.round(o.value.left,1),l.value=Xe.round(o.value.top,1),d.value="fixedRatio"in o.value&&!!o.value.fixedRatio,o.value.type!=="line"&&(s.value=Xe.round(o.value.width,1),c.value=Xe.round(o.value.height,1),u.value="rotate"in o.value&&o.value.rotate!==void 0?Xe.round(o.value.rotate,1):0))},{deep:!0,immediate:!0});const{orderElement:h}=vc(),{alignElementToCanvas:m}=cp(),{addHistorySnapshot:g}=be(),E=T=>{const L={left:T};t.updateElement({id:a.value,props:L}),g()},y=T=>{const L={top:T};t.updateElement({id:a.value,props:L}),g()},_=(T,L)=>{if(o.value&&o.value.type==="shape"&&"pathFormula"in o.value&&o.value.pathFormula){const b=$o[o.value.pathFormula];let O="";return"editable"in b&&b.editable?O=b.formula(T,L,o.value.keypoints):O=b.formula(T,L),{viewBox:[T,L],path:O}}return null},S=T=>{if(!o.value||o.value.type==="line"||p.value)return;let L=c.value;if(d.value){const w=s.value/c.value;L=T/w<f.value?f.value:T/w}let b={width:T,height:L};const O=_(T,L);O&&(b={width:T,height:L,...O}),t.updateElement({id:a.value,props:b}),g()},I=T=>{if(!o.value||o.value.type==="line"||o.value.type==="table"||v.value)return;let L=s.value;if(d.value){const w=s.value/c.value;L=T*w<f.value?f.value:T*w}let b={width:L,height:T};const O=_(L,T);O&&(b={width:L,height:T,...O}),t.updateElement({id:a.value,props:b}),g()},A=T=>{const L={rotate:T};t.updateElement({id:a.value,props:L}),g()},x=T=>{const L={fixedRatio:T};t.updateElement({id:a.value,props:L}),g()},N=T=>{let L=Math.floor(u.value/45)*45;T==="+"?L=L+45:T==="-"&&(L=L-45),L<-180&&(L=-180),L>180&&(L=180);const b={rotate:L};t.updateElement({id:a.value,props:b}),g()};return(T,L)=>{const b=r.resolveComponent("AiPptSendToBack"),O=r.resolveComponent("AiPptBringToFrontOne"),w=r.resolveComponent("AiPptBringToFront"),C=r.resolveComponent("AiPptSentToBack"),P=r.resolveComponent("AiPptAlignLeft"),k=r.resolveComponent("AiPptAlignVertically"),B=r.resolveComponent("AiPptAlignRight"),H=r.resolveComponent("AiPptAlignTop"),U=r.resolveComponent("AiPptAlignHorizontally"),$=r.resolveComponent("AiPptAlignBottom"),V=r.resolveComponent("AiPptLock"),z=r.resolveComponent("AiPptUnlock"),D=r.resolveComponent("AiPptRotate"),Y=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",c$,[r.createElementVNode("div",u$,r.toDisplayString(r.unref(n)("POSITION_PANEL.LAYER")),1),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{style:{flex:"1"},onClick:L[0]||(L[0]=K=>r.unref(h)(r.unref(o),r.unref(ft).TOP))},{default:r.withCtx(()=>[r.createVNode(b),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.BRING_TO_FRONT")),1)]),_:1}),r.createVNode(ue,{style:{flex:"1"},onClick:L[1]||(L[1]=K=>r.unref(h)(r.unref(o),r.unref(ft).BOTTOM))},{default:r.withCtx(()=>[r.createVNode(O),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.SEND_TO_BACK")),1)]),_:1})]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{style:{flex:"1"},onClick:L[2]||(L[2]=K=>r.unref(h)(r.unref(o),r.unref(ft).UP))},{default:r.withCtx(()=>[r.createVNode(w),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.MOVE_UP")),1)]),_:1}),r.createVNode(ue,{style:{flex:"1"},onClick:L[3]||(L[3]=K=>r.unref(h)(r.unref(o),r.unref(ft).DOWN))},{default:r.withCtx(()=>[r.createVNode(C),r.createTextVNode(" "+r.toDisplayString(r.unref(n)("POSITION_PANEL.MOVE_DOWN")),1)]),_:1})]),_:1}),r.createVNode(Oe),r.createElementVNode("div",d$,r.toDisplayString(r.unref(n)("POSITION_PANEL.ALIGN")),1),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[4]||(L[4]=K=>r.unref(m)(r.unref(Ve).LEFT))},{default:r.withCtx(()=>[r.createVNode(P)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[5]||(L[5]=K=>r.unref(m)(r.unref(Ve).HORIZONTAL))},{default:r.withCtx(()=>[r.createVNode(k)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_CENTER_HORIZONTAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[6]||(L[6]=K=>r.unref(m)(r.unref(Ve).RIGHT))},{default:r.withCtx(()=>[r.createVNode(B)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_RIGHT")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[7]||(L[7]=K=>r.unref(m)(r.unref(Ve).TOP))},{default:r.withCtx(()=>[r.createVNode(H)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_TOP")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[8]||(L[8]=K=>r.unref(m)(r.unref(Ve).VERTICAL))},{default:r.withCtx(()=>[r.createVNode(U)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_CENTER_VERTICAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:L[9]||(L[9]=K=>r.unref(m)(r.unref(Ve).BOTTOM))},{default:r.withCtx(()=>[r.createVNode($)]),_:1})),[[Y,r.unref(n)("POSITION_PANEL.ALIGN_BOTTOM")]])]),_:1}),r.createVNode(Oe),r.createElementVNode("div",f$,[r.createVNode(Xt,{min:-1e3,step:5,value:i.value,"onUpdate:value":L[10]||(L[10]=K=>E(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.HORIZONTAL")),1)]),_:1},8,["value"]),L[19]||(L[19]=r.createElementVNode("div",{style:{width:"10%"}},null,-1)),r.createVNode(Xt,{min:-1e3,step:5,value:l.value,"onUpdate:value":L[11]||(L[11]=K=>y(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.VERTICAL")),1)]),_:1},8,["value"])]),r.unref(o)?.type!=="line"?(r.openBlock(),r.createElementBlock("div",p$,[r.createVNode(Xt,{min:f.value,max:1500,step:5,disabled:p.value,value:s.value,"onUpdate:value":L[12]||(L[12]=K=>S(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.WIDTH")),1)]),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes(r.unref(o)?.type)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[d.value?r.withDirectives((r.openBlock(),r.createBlock(V,{key:0,style:{width:"10%"},class:"icon-btn active",onClick:L[13]||(L[13]=K=>x(!1))},null,512)),[[Y,r.unref(n)("POSITION_PANEL.UNLOCK_RATIO")]]):r.withDirectives((r.openBlock(),r.createBlock(z,{key:1,style:{width:"10%"},class:"icon-btn",onClick:L[14]||(L[14]=K=>x(!0))},null,512)),[[Y,r.unref(n)("POSITION_PANEL.LOCK_RATIO")]])],64)):(r.openBlock(),r.createElementBlock("div",v$)),r.createVNode(Xt,{min:f.value,max:800,step:5,disabled:v.value||r.unref(o)?.type==="table",value:c.value,"onUpdate:value":L[15]||(L[15]=K=>I(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.HEIGHT")),1)]),_:1},8,["min","disabled","value"])])):r.createCommentVNode("",!0),["line","video","audio"].includes(r.unref(o)?.type)?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Oe),r.createElementVNode("div",h$,[r.createVNode(Xt,{min:-180,max:180,step:5,value:u.value,"onUpdate:value":L[16]||(L[16]=K=>A(K)),style:{width:"45%"}},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("POSITION_PANEL.ROTATE")),1)]),_:1},8,["value"]),L[22]||(L[22]=r.createElementVNode("div",{style:{width:"7%"}},null,-1)),r.createElementVNode("div",{class:"text-btn",onClick:L[17]||(L[17]=K=>N("-")),style:{width:"24%"}},[r.createVNode(D),L[20]||(L[20]=r.createTextVNode(" -45° ",-1))]),r.createElementVNode("div",{class:"text-btn",onClick:L[18]||(L[18]=K=>N("+")),style:{width:"24%"}},[r.createVNode(D,{style:{transform:"rotateY(180deg)"}}),L[21]||(L[21]=r.createTextVNode(" +45° ",-1))])])],64))])}}},g$=ie(m$,[["__scopeId","data-v-74cd5bc0"]]),Nd=1e3,E$="click",la="animate__",E1=[{type:"bounce",name:"弹跳",nameKey:"ANIMATION.ENTER.BOUNCE",children:[{name:"弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN",value:"bounceIn"},{name:"向右弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_LEFT",value:"bounceInLeft"},{name:"向左弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_RIGHT",value:"bounceInRight"},{name:"向上弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_UP",value:"bounceInUp"},{name:"向下弹入",nameKey:"ANIMATION.ENTER.BOUNCE_IN_DOWN",value:"bounceInDown"}]},{type:"fade",name:"浮现",nameKey:"ANIMATION.ENTER.FADE",children:[{name:"浮入",nameKey:"ANIMATION.ENTER.FADE_IN",value:"fadeIn"},{name:"向下浮入",nameKey:"ANIMATION.ENTER.FADE_IN_DOWN",value:"fadeInDown"},{name:"向下长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_DOWN_BIG",value:"fadeInDownBig"},{name:"向右浮入",nameKey:"ANIMATION.ENTER.FADE_IN_LEFT",value:"fadeInLeft"},{name:"向右长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_LEFT_BIG",value:"fadeInLeftBig"},{name:"向左浮入",nameKey:"ANIMATION.ENTER.FADE_IN_RIGHT",value:"fadeInRight"},{name:"向左长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_RIGHT_BIG",value:"fadeInRightBig"},{name:"向上浮入",nameKey:"ANIMATION.ENTER.FADE_IN_UP",value:"fadeInUp"},{name:"向上长距浮入",nameKey:"ANIMATION.ENTER.FADE_IN_UP_BIG",value:"fadeInUpBig"},{name:"从左上浮入",nameKey:"ANIMATION.ENTER.FADE_IN_TOP_LEFT",value:"fadeInTopLeft"},{name:"从右上浮入",nameKey:"ANIMATION.ENTER.FADE_IN_TOP_RIGHT",value:"fadeInTopRight"},{name:"从左下浮入",nameKey:"ANIMATION.ENTER.FADE_IN_BOTTOM_LEFT",value:"fadeInBottomLeft"},{name:"从右下浮入",nameKey:"ANIMATION.ENTER.FADE_IN_BOTTOM_RIGHT",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",nameKey:"ANIMATION.ENTER.ROTATE",children:[{name:"旋转进入",nameKey:"ANIMATION.ENTER.ROTATE_IN",value:"rotateIn"},{name:"绕左下进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_DOWN_LEFT",value:"rotateInDownLeft"},{name:"绕右下进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_DOWN_RIGHT",value:"rotateInDownRight"},{name:"绕左上进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_UP_LEFT",value:"rotateInUpLeft"},{name:"绕右上进入",nameKey:"ANIMATION.ENTER.ROTATE_IN_UP_RIGHT",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",nameKey:"ANIMATION.ENTER.ZOOM",children:[{name:"放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN",value:"zoomIn"},{name:"向下放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_DOWN",value:"zoomInDown"},{name:"从左放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_LEFT",value:"zoomInLeft"},{name:"从右放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_RIGHT",value:"zoomInRight"},{name:"向上放大进入",nameKey:"ANIMATION.ENTER.ZOOM_IN_UP",value:"zoomInUp"}]},{type:"slide",name:"滑入",nameKey:"ANIMATION.ENTER.SLIDE",children:[{name:"向下滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_DOWN",value:"slideInDown"},{name:"从右滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_LEFT",value:"slideInLeft"},{name:"从左滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_RIGHT",value:"slideInRight"},{name:"向上滑入",nameKey:"ANIMATION.ENTER.SLIDE_IN_UP",value:"slideInUp"}]},{type:"flip",name:"翻转",nameKey:"ANIMATION.ENTER.FLIP",children:[{name:"X轴翻转进入",nameKey:"ANIMATION.ENTER.FLIP_IN_X",value:"flipInX"},{name:"Y轴翻转进入",nameKey:"ANIMATION.ENTER.FLIP_IN_Y",value:"flipInY"}]},{type:"back",name:"放大滑入",nameKey:"ANIMATION.ENTER.BACK",children:[{name:"向下放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_DOWN",value:"backInDown"},{name:"从左放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_LEFT",value:"backInLeft"},{name:"从右放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_RIGHT",value:"backInRight"},{name:"向上放大滑入",nameKey:"ANIMATION.ENTER.BACK_IN_UP",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",nameKey:"ANIMATION.ENTER.LIGHT_SPEED",children:[{name:"从右飞入",nameKey:"ANIMATION.ENTER.LIGHT_SPEED_IN_RIGHT",value:"lightSpeedInRight"},{name:"从左飞入",nameKey:"ANIMATION.ENTER.LIGHT_SPEED_IN_LEFT",value:"lightSpeedInLeft"}]}],y1=[{type:"bounce",name:"弹跳",nameKey:"ANIMATION.EXIT.BOUNCE",children:[{name:"弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT",value:"bounceOut"},{name:"向左弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_LEFT",value:"bounceOutLeft"},{name:"向右弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_RIGHT",value:"bounceOutRight"},{name:"向上弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_UP",value:"bounceOutUp"},{name:"向下弹出",nameKey:"ANIMATION.EXIT.BOUNCE_OUT_DOWN",value:"bounceOutDown"}]},{type:"fade",name:"浮现",nameKey:"ANIMATION.EXIT.FADE",children:[{name:"浮出",nameKey:"ANIMATION.EXIT.FADE_OUT",value:"fadeOut"},{name:"向下浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_DOWN",value:"fadeOutDown"},{name:"向下长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_DOWN_BIG",value:"fadeOutDownBig"},{name:"向左浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_LEFT",value:"fadeOutLeft"},{name:"向左长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_LEFT_BIG",value:"fadeOutLeftBig"},{name:"向右浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_RIGHT",value:"fadeOutRight"},{name:"向右长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_RIGHT_BIG",value:"fadeOutRightBig"},{name:"向上浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_UP",value:"fadeOutUp"},{name:"向上长距浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_UP_BIG",value:"fadeOutUpBig"},{name:"从左上浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_TOP_LEFT",value:"fadeOutTopLeft"},{name:"从右上浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_TOP_RIGHT",value:"fadeOutTopRight"},{name:"从左下浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_BOTTOM_LEFT",value:"fadeOutBottomLeft"},{name:"从右下浮出",nameKey:"ANIMATION.EXIT.FADE_OUT_BOTTOM_RIGHT",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",nameKey:"ANIMATION.EXIT.ROTATE",children:[{name:"旋转退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT",value:"rotateOut"},{name:"绕左下退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_DOWN_LEFT",value:"rotateOutDownLeft"},{name:"绕右下退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_DOWN_RIGHT",value:"rotateOutDownRight"},{name:"绕左上退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_UP_LEFT",value:"rotateOutUpLeft"},{name:"绕右上退出",nameKey:"ANIMATION.EXIT.ROTATE_OUT_UP_RIGHT",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",nameKey:"ANIMATION.EXIT.ZOOM",children:[{name:"缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT",value:"zoomOut"},{name:"向下缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_DOWN",value:"zoomOutDown"},{name:"从左缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_LEFT",value:"zoomOutLeft"},{name:"从右缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_RIGHT",value:"zoomOutRight"},{name:"向上缩小退出",nameKey:"ANIMATION.EXIT.ZOOM_OUT_UP",value:"zoomOutUp"}]},{type:"slide",name:"滑出",nameKey:"ANIMATION.EXIT.SLIDE",children:[{name:"向下滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_DOWN",value:"slideOutDown"},{name:"从左滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_LEFT",value:"slideOutLeft"},{name:"从右滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_RIGHT",value:"slideOutRight"},{name:"向上滑出",nameKey:"ANIMATION.EXIT.SLIDE_OUT_UP",value:"slideOutUp"}]},{type:"flip",name:"翻转",nameKey:"ANIMATION.EXIT.FLIP",children:[{name:"X轴翻转退出",nameKey:"ANIMATION.EXIT.FLIP_OUT_X",value:"flipOutX"},{name:"Y轴翻转退出",nameKey:"ANIMATION.EXIT.FLIP_OUT_Y",value:"flipOutY"}]},{type:"back",name:"缩小滑出",nameKey:"ANIMATION.EXIT.BACK",children:[{name:"向下缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_DOWN",value:"backOutDown"},{name:"从左缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_LEFT",value:"backOutLeft"},{name:"从右缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_RIGHT",value:"backOutRight"},{name:"向上缩小滑出",nameKey:"ANIMATION.EXIT.BACK_OUT_UP",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",nameKey:"ANIMATION.EXIT.LIGHT_SPEED",children:[{name:"从右飞出",nameKey:"ANIMATION.EXIT.LIGHT_SPEED_OUT_RIGHT",value:"lightSpeedOutRight"},{name:"从左飞出",nameKey:"ANIMATION.EXIT.LIGHT_SPEED_OUT_LEFT",value:"lightSpeedOutLeft"}]}],_1=[{type:"shake",name:"晃动",nameKey:"ANIMATION.ATTENTION.SHAKE",children:[{name:"左右摇晃",nameKey:"ANIMATION.ATTENTION.SHAKE_X",value:"shakeX"},{name:"上下摇晃",nameKey:"ANIMATION.ATTENTION.SHAKE_Y",value:"shakeY"},{name:"摇头",nameKey:"ANIMATION.ATTENTION.HEAD_SHAKE",value:"headShake"},{name:"摆动",nameKey:"ANIMATION.ATTENTION.SWING",value:"swing"},{name:"晃动",nameKey:"ANIMATION.ATTENTION.WOBBLE",value:"wobble"},{name:"惊恐",nameKey:"ANIMATION.ATTENTION.TADA",value:"tada"},{name:"果冻",nameKey:"ANIMATION.ATTENTION.JELLO",value:"jello"}]},{type:"other",name:"其他",nameKey:"ANIMATION.ATTENTION.OTHER",children:[{name:"弹跳",nameKey:"ANIMATION.ATTENTION.BOUNCE",value:"bounce"},{name:"闪烁",nameKey:"ANIMATION.ATTENTION.FLASH",value:"flash"},{name:"脉搏",nameKey:"ANIMATION.ATTENTION.PULSE",value:"pulse"},{name:"橡皮筋",nameKey:"ANIMATION.ATTENTION.RUBBER_BAND",value:"rubberBand"},{name:"心跳(快)",nameKey:"ANIMATION.ATTENTION.HEART_BEAT",value:"heartBeat"}]}],y$=[{label:"无",labelKey:"ANIMATION.SLIDE.NO",value:"no"},{label:"随机",labelKey:"ANIMATION.SLIDE.RANDOM",value:"random"},{label:"左右推移",labelKey:"ANIMATION.SLIDE.SLIDE_X",value:"slideX"},{label:"上下推移",labelKey:"ANIMATION.SLIDE.SLIDE_Y",value:"slideY"},{label:"左右推移(3D)",labelKey:"ANIMATION.SLIDE.SLIDE_X_3D",value:"slideX3D"},{label:"上下推移(3D)",labelKey:"ANIMATION.SLIDE.SLIDE_Y_3D",value:"slideY3D"},{label:"淡入淡出",labelKey:"ANIMATION.SLIDE.FADE",value:"fade"},{label:"旋转",labelKey:"ANIMATION.SLIDE.ROTATE",value:"rotate"},{label:"上下展开",labelKey:"ANIMATION.SLIDE.SCALE_Y",value:"scaleY"},{label:"左右展开",labelKey:"ANIMATION.SLIDE.SCALE_X",value:"scaleX"},{label:"放大",labelKey:"ANIMATION.SLIDE.SCALE",value:"scale"},{label:"缩小",labelKey:"ANIMATION.SLIDE.SCALE_REVERSE",value:"scaleReverse"}],_$={class:"element-animation-panel"},T$={key:0,class:"element-animation"},S$={class:"type-title"},I$={class:"pool-item-wrapper"},A$=["onMouseenter","onClick"],N$={key:0,class:"mask"},L$={key:1,class:"tip"},C$={class:"sequence-content"},x$={class:"index"},b$={class:"text"},w$={class:"handler"},O$={key:0,class:"configs"},R$={class:"config-item"},k$={style:{width:"35%"}},D$={class:"config-item"},P$={style:{width:"35%"}},M$={class:"config-item"},B$={__name:"ElementAnimationPanel",setup(e){const t=["in","out","attention"],n=pe(),{handleElement:o,handleElementId:a}=ne.storeToRefs(fe()),{currentSlide:i,formatedAnimations:l,currentSlideAnimations:s}=ne.storeToRefs(n),{t:c}=_e(),u=k=>c(k.nameKey||k.name),d={};for(const k of E1)for(const B of k.children)d[B.value]=u(B);for(const k of y1)for(const B of k.children)d[B.value]=u(B);for(const k of _1)for(const B of k.children)d[B.value]=u(B);const f=[{key:"in",label:c("ELEMENT_ANIMATION.TAB_IN"),color:"#68a490"},{key:"out",label:c("ELEMENT_ANIMATION.TAB_OUT"),color:"#d86344"},{key:"attention",label:c("ELEMENT_ANIMATION.TAB_ATTENTION"),color:"#e8b76a"}],v=r.ref("in"),p=r.ref(!1);r.watch(()=>a.value,()=>{m.value=!1});const h=r.ref(""),m=r.ref(!1),{addHistorySnapshot:g}=be(),E=r.computed(()=>{const k=[];for(let B=0;B<l.value.length;B++){const H=l.value[B];for(let U=0;U<H.animations.length;U++){const $=H.animations[U],V=i.value.elements.find(Y=>Y.id===$.elId);if(!V)continue;const z=Li(c,V.type),D=d[$.effect];k.push({...$,index:U===0?B+1:"",elType:z,animationEffect:D})}}return k}),y=r.computed(()=>s.value.filter(H=>H.elId===a.value)||[]),_=k=>{const B=s.value.filter(H=>H.id!==k);n.updateSlide({animations:B}),g()},S=k=>{const{newIndex:B,oldIndex:H}=k;if(B===void 0||H===void 0||B===H)return;const U=JSON.parse(JSON.stringify(s.value)),$=U[H];U.splice(H,1),U.splice(B,0,$),n.updateSlide({animations:U}),g()},I=(k,B,H)=>{const U=document.querySelector(`#editable-element-${k} [class^=editable-element-]`);if(U){const $=`${la}${B}`;document.documentElement.style.setProperty("--animate-duration",`${H}ms`),U.classList.add(`${la}animated`,$);const V=()=>{document.documentElement.style.removeProperty("--animate-duration"),U.classList.remove(`${la}animated`,$)};U.addEventListener("animationend",V,{once:!0})}},A=async()=>{p.value=!p.value;for(let k=0;k<E.value.length&&p.value;k++){const B=E.value[k];B.index!==1&&B.trigger!=="meantime"&&await new Promise(H=>setTimeout(H,B.duration+100)),I(B.elId,B.effect,B.duration),k>=E.value.length-1&&(p.value=!1)}},x=(k,B)=>{if(B<100||B>5e3)return;const H=s.value.map(U=>U.id===k?{...U,duration:B}:U);n.updateSlide({animations:H}),g()},N=(k,B)=>{const H=s.value.map(U=>U.id===k?{...U,trigger:B}:U);n.updateSlide({animations:H}),g()},T=(k,B)=>{const H=s.value.map(V=>V.id===L.value?{...V,type:k,effect:B}:V);n.updateSlide({animations:H}),m.value=!1,g();const U=s.value.find(V=>V.elId===a.value),$=U?.duration||Nd;setTimeout(()=>{I(a.value,B,$)},0)},L=r.ref(""),b=(k,B)=>{if(L.value){T(k,B);return}const H=JSON.parse(JSON.stringify(s.value));H.push({id:Ne.nanoid(10),elId:a.value,type:k,effect:B,duration:Nd,trigger:E$}),n.updateSlide({animations:H}),m.value=!1,g(),setTimeout(()=>{I(a.value,B,Nd)},0)},O=r.ref(!1),w=k=>{k?setTimeout(()=>O.value=!0,600):O.value=!1},C=k=>{m.value=!0,L.value=k,w(!0)},P={in:E1,out:y1,attention:_1};return(k,B)=>{const H=r.resolveComponent("AiPptEffects"),U=r.resolveComponent("AiPptClick"),$=r.resolveComponent("AiPptPlayOne"),V=r.resolveComponent("AiPptCloseSmall"),z=r.resolveComponent("AiPptSwitch"),D=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",_$,[r.unref(o)?(r.openBlock(),r.createElementBlock("div",T$,[r.createVNode(Se,{trigger:"click",value:m.value,"onUpdate:value":[B[3]||(B[3]=Y=>m.value=Y),B[4]||(B[4]=Y=>w(Y))],style:{width:"100%"}},{content:r.withCtx(()=>[r.createVNode(qn,{tabs:f,value:v.value,"onUpdate:value":B[0]||(B[0]=Y=>v.value=Y),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(t,Y=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[v.value===Y?(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["animation-pool",Y]),key:Y},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(P[Y],K=>(r.openBlock(),r.createElementBlock("div",{class:"pool-type",key:K.name},[r.createElementVNode("div",S$,r.toDisplayString(u(K))+":",1),r.createElementVNode("div",I$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(K.children,Z=>(r.openBlock(),r.createElementBlock("div",{class:"pool-item",key:Z.name,onMouseenter:oe=>h.value=Z.value,onMouseleave:B[1]||(B[1]=oe=>h.value=""),onClick:oe=>b(Y,Z.value)},[r.createElementVNode("div",{class:r.normalizeClass(["animation-box",[`${r.unref(la)}animated`,`${r.unref(la)}fast`,h.value===Z.value&&`${r.unref(la)}${Z.value}`]])},r.toDisplayString(u(Z)),3)],40,A$))),128))])]))),128)),O.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",N$))],2)):r.createCommentVNode("",!0)],64))),64))]),default:r.withCtx(()=>[r.createVNode(ue,{class:"element-animation-btn",onClick:B[2]||(B[2]=Y=>L.value="")},{default:r.withCtx(()=>[r.createVNode(H),r.createTextVNode(" "+r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.ADD")),1)]),_:1})]),_:1},8,["value"])])):(r.openBlock(),r.createElementBlock("div",L$,[r.createVNode(U,{style:{"margin-right":"5px"}}),r.createTextVNode(" "+r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.TIP_SELECT")),1)])),r.createVNode(Oe),r.createVNode(r.unref(Jf),{class:"animation-sequence",modelValue:E.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:S},{item:r.withCtx(({element:Y})=>[r.createElementVNode("div",{class:r.normalizeClass(["sequence-item",[Y.type,{active:r.unref(o)?.id===Y.elId}]])},[r.createElementVNode("div",C$,[r.createElementVNode("div",x$,r.toDisplayString(Y.index),1),r.createElementVNode("div",b$,"【"+r.toDisplayString(Y.elType)+"】"+r.toDisplayString(Y.animationEffect),1),r.createElementVNode("div",w$,[r.withDirectives(r.createVNode($,{class:"handler-btn",onClick:K=>I(Y.elId,Y.effect,Y.duration)},null,8,["onClick"]),[[D,r.unref(c)("COMMON.PREVIEW")]]),r.withDirectives(r.createVNode(V,{class:"handler-btn",onClick:K=>_(Y.id)},null,8,["onClick"]),[[D,r.unref(c)("COMMON.DELETE")]])])]),y.value[0]?.elId===Y.elId?(r.openBlock(),r.createElementBlock("div",O$,[r.createVNode(Oe,{margin:16}),r.createElementVNode("div",R$,[r.createElementVNode("div",k$,r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.DURATION")),1),r.createVNode(Xt,{min:500,max:3e3,step:500,value:Y.duration,"onUpdate:value":K=>x(Y.id,K),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),r.createElementVNode("div",D$,[r.createElementVNode("div",P$,r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.TRIGGER")),1),r.createVNode(st,{value:Y.trigger,"onUpdate:value":K=>N(Y.id,K),style:{width:"65%"},options:[{label:r.unref(c)("ELEMENT_ANIMATION.TRIGGER_CLICK"),value:"click"},{label:r.unref(c)("ELEMENT_ANIMATION.TRIGGER_WITH_PREVIOUS"),value:"meantime"},{label:r.unref(c)("ELEMENT_ANIMATION.TRIGGER_AFTER_PREVIOUS"),value:"auto"}]},null,8,["value","onUpdate:value","options"])]),r.createElementVNode("div",M$,[r.createVNode(ue,{style:{width:"100%"},onClick:K=>C(Y.id)},{default:r.withCtx(()=>[r.createVNode(z),r.createTextVNode(" "+r.toDisplayString(r.unref(c)("ELEMENT_ANIMATION.CHANGE")),1)]),_:1},8,["onClick"])])])):r.createCommentVNode("",!0)],2)]),_:1},8,["modelValue"]),E.value.length>=2?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(Oe),r.createVNode(ue,{onClick:B[5]||(B[5]=Y=>A())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p.value?r.unref(c)("ELEMENT_ANIMATION.STOP_PREVIEW"):r.unref(c)("ELEMENT_ANIMATION.PREVIEW_ALL")),1)]),_:1})],64)):r.createCommentVNode("",!0)])}}},V$=ie(B$,[["__scopeId","data-v-25a63f5c"]]),$$=[{background:"#ffffff",fontColor:"#333333",borderColor:"#41719c",fontname:"",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#5f6f1c",fontname:"",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#a75f0a",fontname:"",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#7c91a8",fontname:"",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#688e19",fontname:"",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#4495b0",fontname:"",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",borderColor:"#782009",fontname:"",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",borderColor:"#800c0b",fontname:"",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",borderColor:"#830949",fontname:"",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",borderColor:"#032e45",fontname:"",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",borderColor:"#2d7f8a",fontname:"",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",borderColor:"#7d2b8d",fontname:"",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",borderColor:"#b68317",fontname:"",colors:["#a5644e","#b58b80","#c3986d","#a19574","#c17529","#826277"]},{background:"#333333",fontColor:"#ffffff",borderColor:"#7c91a8",fontname:"",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#2b2b2d",fontColor:"#ffffff",borderColor:"#893011",fontname:"",colors:["#bc451b","#d3ba68","#bb8640","#ad9277","#a55a43","#ad9d7b"]},{background:"#171b1e",fontColor:"#ffffff",borderColor:"#505050",fontname:"",colors:["#6f6f6f","#bfbfa5","#dbd084","#e7bf5f","#e9a039","#cf7133"]}],b_=()=>{const e=pe(),{slides:t,theme:n}=ne.storeToRefs(e),{addHistorySnapshot:o}=be(),a=d=>{var f,v,p,h,m,g,E,y,_;const S=Array.isArray(d)?d:[d],I=[],A=[],x=[],N=[];for(const w of S){if(w.background)if(w.background.type==="solid"&&w.background.color)I.push({area:1,value:w.background.color});else if(w.background.type==="gradient"&&w.background.gradient){const C=w.background.gradient.colors.length;I.push(...w.background.gradient.colors.map(P=>({area:1/C,value:P.color})))}else I.push({area:1,value:n.value.backgroundColor});for(const C of w.elements){const P=C.width;let k=0;if(C.type==="line"){const[H,U]=C.start,[$,V]=C.end;k=Math.sqrt(Math.pow(Math.abs(H-$),2)+Math.pow(Math.abs(U-V),2))}else k=C.height;const B=P*k;if(C.type==="shape"||C.type==="text"){if(C.fill&&A.push({area:B,value:C.fill}),C.type==="shape"&&C.gradient){const Y=C.gradient.colors.length;A.push(...C.gradient.colors.map(K=>({area:1/Y*B,value:K.color})))}const H=(C.type==="shape"?(f=C.text)===null||f===void 0?void 0:f.content:C.content)||"";if(!H)continue;const U=H.replace(/<[^>]+>/g,"").replace(/\s*/g,""),$=H.match(/<[^>]+color: .+?<\/.+?>/g),V=H.match(/<[^>]+font-family: .+?<\/.+?>/g);let z=1,D=1;if($)for(const Y of $){const K=Y.match(/color: (.+?);/);if(!K)continue;const Z=Y.replace(/<[^>]+>/g,"").replace(/\s*/g,""),oe=K[1],Q=Z.length/U.length;z=z-Q,x.push({area:B*Q,value:oe})}if(V)for(const Y of V){const K=Y.match(/font-family: (.+?);/);if(!K)continue;const Z=Y.replace(/<[^>]+>/g,"").replace(/\s*/g,""),oe=K[1],Q=Z.length/U.length;D=D-Q,N.push({area:B*Q,value:oe})}if(z){const K=(C.type==="shape"?(v=C.text)===null||v===void 0?void 0:v.defaultColor:C.defaultColor)||n.value.fontColor;x.push({area:B*z,value:K})}if(D){const K=(C.type==="shape"?(p=C.text)===null||p===void 0?void 0:p.defaultFontName:C.defaultFontName)||n.value.fontName;N.push({area:B*D,value:K})}}else if(C.type==="table"){const H=C.data.length*C.data[0].length;let U=0;for(const $ of C.data)for(const V of $)if(!((h=V.style)===null||h===void 0)&&h.backcolor&&(U+=1,A.push({area:B/H,value:(m=V.style)===null||m===void 0?void 0:m.backcolor})),V.text){const z=V.text.length>=10?1:V.text.length/10;!((g=V.style)===null||g===void 0)&&g.color&&x.push({area:B/H*z,value:(E=V.style)===null||E===void 0?void 0:E.color}),!((y=V.style)===null||y===void 0)&&y.fontname&&x.push({area:B/H*z,value:(_=V.style)===null||_===void 0?void 0:_.fontname})}if(C.theme){const $=1-U/H;A.push({area:B*$,value:C.theme.color})}}else if(C.type==="chart"){C.fill&&A.push({area:B*.6,value:C.fill}),C.themeColors[0]&&A.push({area:B*.3,value:C.themeColors[0]});for(const H of C.themeColors)we(H).getAlpha()!==0&&A.push({area:B/C.themeColors.length*.1,value:H})}else C.type==="line"?A.push({area:B,value:C.color}):C.type==="audio"?A.push({area:B,value:C.color}):C.type==="latex"&&x.push({area:B,value:C.color})}}const T={};for(const w of I){const C=we(w.value).toRgbString();C!=="rgba(0, 0, 0, 0)"&&(T[C]?T[C]+=w.area:T[C]=w.area)}const L={};for(const w of A){const C=we(w.value).toRgbString();C!=="rgba(0, 0, 0, 0)"&&(L[C]?L[C]+=w.area:L[C]=w.area)}const b={};for(const w of x){const C=we(w.value).toRgbString();C!=="rgba(0, 0, 0, 0)"&&(b[C]?b[C]+=w.area:b[C]=w.area)}const O={};for(const w of N)O[w.value]?O[w.value]+=w.area:O[w.value]=w.area;return{backgroundColors:Object.keys(T).sort((w,C)=>T[C]-T[w]),themeColors:Object.keys(L).sort((w,C)=>L[C]-L[w]),fontColors:Object.keys(b).sort((w,C)=>b[C]-b[w]),fontNames:Object.keys(O).sort((w,C)=>O[C]-O[w])}},i=d=>{const f={},v=(h,m)=>{const g=we(h).setAlpha(1).toRgbString();f[g]?f[g]=f[g]+m:f[g]=m};for(const h of d.elements){const m=h.width,g=h.type==="line"?xT(h):h.height,E=m*g;if(h.type==="shape"&&we(h.fill).getAlpha()!==0&&v(h.fill,E),h.type==="text"&&h.fill&&we(h.fill).getAlpha()!==0&&v(h.fill,E),h.type==="image"&&h.colorMask&&we(h.colorMask).getAlpha()!==0&&v(h.colorMask,E),h.type==="table"&&h.theme&&we(h.theme.color).getAlpha()!==0&&v(h.theme.color,E),h.type==="chart"){for(const y of h.themeColors)we(y).getAlpha()!==0&&v(y,E/h.themeColors.length*.1);h.themeColors[0]&&we(h.themeColors[0]).getAlpha()!==0&&v(h.themeColors[0],E*.3),h.fill&&we(h.fill).getAlpha()!==0&&v(h.fill,E*.6)}h.type==="line"&&we(h.color).getAlpha()!==0&&v(h.color,E),h.type==="audio"&&we(h.color).getAlpha()!==0&&v(h.color,E)}return Object.keys(f).sort((h,m)=>f[m]-f[h])},l=(d,f)=>{const v=[...f],p=i(d),h={};if(p.length>v.length){const g=we(v[0]).analogous(p.length-v.length+10).map(E=>E.toHexString()).slice(1);v.push(...g)}for(let m=0;m<p.length;m++)h[p[m]]=v[m];return h},s=(d,f)=>{const v=l(d,f.colors),p=h=>{const m=we(h).getAlpha(),g=v[we(h).setAlpha(1).toRgbString()];return g?we(g).setAlpha(m).toRgbString():h};(!d.background||d.background.type!=="image")&&(d.background={type:"solid",color:f.background});for(const h of d.elements){if(h.type==="shape"&&(h.fill&&(h.fill=p(h.fill)),h.gradient&&delete h.gradient,h.text&&(h.text.defaultColor=f.fontColor,h.text.defaultFontName=f.fontname,h.text.content&&(h.text.content=h.text.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,"")))),h.type==="text"&&(h.fill&&(h.fill=p(h.fill)),h.defaultColor=f.fontColor,h.defaultFontName=f.fontname,h.content&&(h.content=h.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,""))),h.type==="image"&&h.colorMask&&(h.colorMask=p(h.colorMask)),h.type==="table"){h.theme&&(h.theme.color=p(h.theme.color));for(const m of h.data)for(const g of m)g.style&&(g.style.color=f.fontColor,g.style.fontname=f.fontname)}h.type==="chart"&&(h.themeColors=[...f.colors],h.textColor=f.fontColor),h.type==="line"&&(h.color=p(h.color)),h.type==="audio"&&(h.color=p(h.color)),h.type==="latex"&&(h.color=f.fontColor),"outline"in h&&h.outline&&(f.outline&&(h.outline={...f.outline}),f.borderColor&&(h.outline.color=f.borderColor)),"shadow"in h&&h.shadow&&f.shadow&&(h.shadow=f.shadow)}};return{getSlidesThemeStyles:a,applyPresetTheme:(d,f=!1)=>{if(e.setTheme({backgroundColor:d.background,themeColors:d.colors,fontColor:d.fontColor,outline:{width:2,style:"solid",color:d.borderColor},fontName:d.fontname}),f){const v=JSON.parse(JSON.stringify(t.value));for(const p of v)s(p,d);e.setSlides(v),o()}},applyThemeToAllSlides:(d=!1)=>{const f=JSON.parse(JSON.stringify(t.value)),v={background:n.value.backgroundColor,fontColor:n.value.fontColor,borderColor:d?n.value.outline.color:void 0,fontname:n.value.fontName,colors:n.value.themeColors,outline:d?n.value.outline:void 0,shadow:d?n.value.shadow:void 0};for(const p of f)s(p,v);e.setSlides(f),o()}}},F$={class:"theme-styles-extract"},H$={class:"content"},U$={key:0,class:"config-item"},G$={class:"label"},z$={class:"values"},Y$={class:"handler"},X$=["onClick"],W$=["onClick"],K$={key:1,class:"config-item"},q$={class:"label"},Z$={class:"values"},j$={class:"handler"},J$=["onClick"],Q$=["onClick"],eF={key:2,class:"config-item"},tF={class:"label"},nF={class:"values"},rF={class:"handler"},oF=["onClick"],aF=["onClick"],iF={key:3,class:"config-item"},lF={class:"label"},sF={class:"tip"},cF={class:"values inline"},uF=["onClick"],dF={class:"btns"},fF={__name:"ThemeStylesExtract",emits:["close"],setup(e,{emit:t}){const n=t,o=pe(),{slides:a,currentSlide:i}=ne.storeToRefs(o),{getSlidesThemeStyles:l}=b_(),{t:s}=_e(),c=r.computed(()=>[{key:"single",label:s("THEME_EXTRACT.FROM_CURRENT")},{key:"all",label:s("THEME_EXTRACT.FROM_ALL")}]),u=r.ref("single"),d=r.computed(()=>{const y={};for(const _ of Cl(s))y[_.value]=_.label;return y}),f=r.ref({backgroundColors:[],themeColors:[],fontColors:[],fontNames:[]}),v=r.ref({backgroundColor:0,themeColors:[0],fontColor:0,fontName:0});r.watch(u,()=>{u.value==="single"?f.value=l(i.value):f.value=l(a.value);const y=[];for(let _=0;_<Math.min(f.value.themeColors.length);_++)y.push(_);v.value={backgroundColor:0,fontColor:0,fontName:0,themeColors:y}},{immediate:!0});const p=y=>{o.setTheme(y)},h=()=>{let y=f.value.themeColors.filter((x,N)=>v.value.themeColors.includes(N));y.length>6&&(y=y.slice(0,6),Ae.warning(s("THEME_EXTRACT.THEME_COLOR_LIMIT")));const _=f.value.backgroundColors[v.value.backgroundColor],S=f.value.fontColors[v.value.fontColor],I=f.value.fontNames[v.value.fontName],A={};_&&(A.backgroundColor=_),S&&(A.fontColor=S),I&&(A.fontName=I),y.length&&(A.themeColors=y),o.setTheme(A),n("close")},m=y=>{v.value.themeColors.includes(y)?v.value.themeColors=v.value.themeColors.filter(_=>_!==y):v.value.themeColors.push(y)},g=y=>{const _=["#000","#fff"];return we.mostReadable(y,_,{includeFallbackColors:!0}).toRgbString()},E=y=>{const _=we(y);return _.getAlpha()<1?_.toHex8String().toUpperCase():_.toHexString().toUpperCase()};return(y,_)=>{const S=r.resolveComponent("AiPptCheck");return r.openBlock(),r.createElementBlock("div",F$,[r.createVNode(qn,{tabs:c.value,value:u.value,"onUpdate:value":_[0]||(_[0]=I=>u.value=I),tabsStyle:{marginBottom:"12px"},tabStyle:{padding:"8px 12px"}},null,8,["tabs","value"]),r.createElementVNode("div",H$,[f.value.fontNames.length?(r.openBlock(),r.createElementBlock("div",U$,[r.createElementVNode("div",G$,r.toDisplayString(r.unref(s)("THEME_EXTRACT.FONT")),1),r.createElementVNode("div",z$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.fontNames,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["value-wrap",{"is-selected":v.value.fontName===A}]),key:I},[r.createElementVNode("div",{class:"value",style:r.normalizeStyle({fontFamily:I})},r.toDisplayString(d.value[I]||I),5),r.createElementVNode("div",Y$,[r.createElementVNode("div",{class:r.normalizeClass(["state",{active:v.value.fontName===A}])},[r.createVNode(S)],2),r.createElementVNode("div",{class:"config-btn",onClick:x=>v.value.fontName=A},r.toDisplayString(r.unref(s)("THEME_EXTRACT.SELECT")),9,X$),r.createElementVNode("div",{class:"config-btn",onClick:()=>{p({fontName:I}),v.value.fontName=A}},r.toDisplayString(r.unref(s)("THEME_EXTRACT.APPLY_TO_THEME")),9,W$)])],2))),128))])])):r.createCommentVNode("",!0),f.value.fontColors.length?(r.openBlock(),r.createElementBlock("div",K$,[r.createElementVNode("div",q$,r.toDisplayString(r.unref(s)("THEME_EXTRACT.FONT_COLOR")),1),r.createElementVNode("div",Z$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.fontColors,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["value-wrap",{"is-selected":v.value.fontColor===A}]),key:I},[r.createElementVNode("div",{class:"value",style:r.normalizeStyle({backgroundColor:I,color:g(I)})},r.toDisplayString(E(I)),5),r.createElementVNode("div",j$,[r.createElementVNode("div",{class:r.normalizeClass(["state",{active:v.value.fontColor===A}])},[r.createVNode(S)],2),r.createElementVNode("div",{class:"config-btn",onClick:x=>v.value.fontColor=A},r.toDisplayString(r.unref(s)("THEME_EXTRACT.SELECT")),9,J$),r.createElementVNode("div",{class:"config-btn",onClick:()=>{p({fontColor:I}),v.value.fontColor=A}},r.toDisplayString(r.unref(s)("THEME_EXTRACT.APPLY_TO_THEME")),9,Q$)])],2))),128))])])):r.createCommentVNode("",!0),f.value.backgroundColors.length?(r.openBlock(),r.createElementBlock("div",eF,[r.createElementVNode("div",tF,r.toDisplayString(r.unref(s)("THEME_EXTRACT.BACKGROUND_COLOR")),1),r.createElementVNode("div",nF,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.backgroundColors,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["value-wrap",{"is-selected":v.value.backgroundColor===A}]),key:I},[r.createElementVNode("div",{class:"value",style:r.normalizeStyle({backgroundColor:I,color:g(I)})},r.toDisplayString(E(I)),5),r.createElementVNode("div",rF,[r.createElementVNode("div",{class:r.normalizeClass(["state",{active:v.value.backgroundColor===A}])},[r.createVNode(S)],2),r.createElementVNode("div",{class:"config-btn",onClick:x=>v.value.backgroundColor=A},r.toDisplayString(r.unref(s)("THEME_EXTRACT.SELECT")),9,oF),r.createElementVNode("div",{class:"config-btn",onClick:()=>{p({backgroundColor:I}),v.value.backgroundColor=A}},r.toDisplayString(r.unref(s)("THEME_EXTRACT.APPLY_TO_THEME")),9,aF)])],2))),128))])])):r.createCommentVNode("",!0),f.value.themeColors.length?(r.openBlock(),r.createElementBlock("div",iF,[r.createElementVNode("div",lF,[r.createTextVNode(r.toDisplayString(r.unref(s)("THEME_EXTRACT.THEME_COLORS")),1),r.createElementVNode("span",sF,r.toDisplayString(r.unref(s)("THEME_EXTRACT.TIP")),1)]),r.createElementVNode("div",cF,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value.themeColors,(I,A)=>(r.openBlock(),r.createElementBlock("div",{class:"value-wrap",key:I,onClick:x=>m(A)},[r.createElementVNode("div",{class:r.normalizeClass(["value",{disabled:!v.value.themeColors.includes(A)}]),style:r.normalizeStyle({backgroundColor:I})},null,6)],8,uF))),128))])])):r.createCommentVNode("",!0)]),r.createElementVNode("div",dF,[r.createVNode(ue,{class:"btn",type:"primary",onClick:_[1]||(_[1]=I=>h())},{default:r.withCtx(()=>[r.createVNode(S),r.createTextVNode(" "+r.toDisplayString(r.unref(s)("THEME_EXTRACT.SAVE_SELECTED")),1)]),_:1})])])}}},pF=ie(fF,[["__scopeId","data-v-df17dee2"]]),vF={class:"theme-colors-setting"},hF={class:"title"},mF={class:"row"},gF={class:"label",style:{width:"40%"}},EF={__name:"ThemeColorsSetting",emits:["close"],setup(e,{emit:t}){const n=t,o=pe(),{theme:a}=ne.storeToRefs(o),i=r.ref([]),{t:l}=_e();r.onMounted(()=>{const u=[...a.value.themeColors];for(;u.length<6;)u.push("#00000000");i.value=[...u]});const s=()=>{let u=i.value.filter(d=>d!=="#00000000");u.length||(u=["#00000000"]),o.setTheme({themeColors:u}),n("close")},c=u=>{const{newIndex:d,oldIndex:f}=u;if(d===void 0||f===void 0||d===f)return;const v=i.value[f];i.value.splice(f,1),i.value.splice(d,0,v)};return(u,d)=>(r.openBlock(),r.createElementBlock("div",vF,[r.createElementVNode("div",hF,r.toDisplayString(r.unref(l)("SLIDE_THEME_COLORS.TITLE")),1),r.createVNode(r.unref(Jf),{class:"list",modelValue:i.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".label",onEnd:c,itemKey:"id"},{item:r.withCtx(({element:f,index:v})=>[r.createElementVNode("div",mF,[r.createElementVNode("div",gF,r.toDisplayString(r.unref(l)("SLIDE_THEME_COLORS.ITEM",{index:v+1})),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:f,"onUpdate:modelValue":p=>i.value[v]=p},null,8,["modelValue","onUpdate:modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:f},null,8,["color"])]),_:2},1024)])]),_:1},8,["modelValue"]),r.createVNode(ue,{class:"btn",type:"primary",onClick:d[0]||(d[0]=f=>s())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)("COMMON.CONFIRM")),1)]),_:1})]))}},yF=ie(EF,[["__scopeId","data-v-16f12b4c"]]),_F={class:"slide-design-panel"},TF={class:"title"},SF={class:"row"},IF={key:0,class:"background-image-wrapper"},AF={class:"background-image"},NF={key:1,class:"background-gradient-wrapper"},LF={class:"row"},CF={class:"row"},xF={style:{width:"45%"}},bF={key:0,class:"row"},wF={style:{width:"45%"}},OF={class:"row"},RF={class:"row"},kF={class:"row"},DF={class:"canvas-size"},PF={class:"title"},MF={class:"text"},BF={class:"row"},VF={style:{width:"45%"}},$F={class:"row"},FF={style:{width:"45%"}},HF={class:"row"},UF={style:{width:"45%"}},GF={class:"row"},zF={style:{width:"45%"}},YF={class:"row"},XF={style:{width:"45%"}},WF=["onClick"],KF={class:"row"},qF={style:{width:"45%"}},ZF={class:"row"},jF={style:{width:"45%"}},JF={class:"row",style:{height:"30px"}},QF={style:{width:"45%"}},eH={class:"row",style:{height:"30px"}},tH={style:{width:"45%"}},nH={class:"row",style:{height:"30px"}},rH={style:{width:"45%"}},oH={class:"row"},aH={style:{width:"45%"}},iH={class:"row"},lH={class:"row"},sH={class:"title"},cH={class:"theme-list"},uH={class:"colors"},dH={class:"btns"},fH={__name:"index",setup(e){const t=pe(),{slides:n,currentSlide:o,slideIndex:a,viewportRatio:i,viewportSize:l,theme:s}=ne.storeToRefs(t),c=r.ref(!1),u=r.ref(!1),d=r.ref(!1),f=r.ref(0),{t:v}=_e(),p=r.computed(()=>Cl(v)),h=r.ref(["solid","dashed","dotted"]),m=r.computed(()=>o.value.background?o.value.background:{type:"solid",value:"#fff"}),{addHistorySnapshot:g}=be(),{applyPresetTheme:E,applyThemeToAllSlides:y}=b_();r.watch(a,()=>{f.value=0});const _=w=>{if(w==="solid"){const C={...m.value,type:"solid",color:m.value.color||"#fff"};t.updateSlide({background:C})}else if(w==="image"){const C={...m.value,type:"image",image:m.value.image||{src:"",size:"cover"}};t.updateSlide({background:C})}else{const C={...m.value,type:"gradient",gradient:m.value.gradient||{type:"linear",colors:[{pos:0,color:"#fff"},{pos:100,color:"#fff"}],rotate:0}};f.value=0,t.updateSlide({background:C})}g()},S=w=>{t.updateSlide({background:{...m.value,...w}}),g()},I=w=>{S({gradient:{...m.value.gradient,...w}})},A=w=>{const C=m.value.gradient.colors.map((P,k)=>k===f.value?{...P,color:w}:P);I({colors:C})},x=w=>{S({image:{...m.value.image,...w}})},N=w=>{const C=w[0];C&&Xr(C).then(P=>x({src:P}))},T=()=>{const w=n.value.map(C=>({...C,background:o.value.background}));t.setSlides(w),g()},L=w=>{t.setTheme(w)},b=w=>{t.setViewportRatio(w)},O=w=>w%1!==0?parseFloat(w.toFixed(1)):Math.floor(w);return(w,C)=>{const P=r.resolveComponent("AiPptPlus"),k=r.resolveComponent("AiPptCheck"),B=r.resolveComponent("AiPptDown"),H=r.resolveComponent("AiPptRight"),U=r.resolveComponent("AiPptPlatte");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",_F,[r.createElementVNode("div",TF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.BACKGROUND_FILL")),1),r.createElementVNode("div",SF,[r.createVNode(st,{style:{flex:"1"},value:m.value.type,"onUpdate:value":C[0]||(C[0]=$=>_($)),options:[{label:r.unref(v)("SLIDE_DESIGN.FILL_SOLID"),value:"solid"},{label:r.unref(v)("SLIDE_DESIGN.FILL_IMAGE"),value:"image"},{label:r.unref(v)("SLIDE_DESIGN.FILL_GRADIENT"),value:"gradient"}]},null,8,["value","options"]),C[30]||(C[30]=r.createElementVNode("div",{style:{width:"10px"}},null,-1)),m.value.type==="solid"?(r.openBlock(),r.createBlock(Se,{key:0,trigger:"click",style:{flex:"1"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:m.value.color,"onUpdate:modelValue":C[1]||(C[1]=$=>S({color:$}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:m.value.color||"#fff"},null,8,["color"])]),_:1})):m.value.type==="image"?(r.openBlock(),r.createBlock(st,{key:1,style:{flex:"1"},value:m.value.image?.size||"cover","onUpdate:value":C[2]||(C[2]=$=>x({size:$})),options:[{label:r.unref(v)("SLIDE_DESIGN.IMAGE_CONTAIN"),value:"contain"},{label:r.unref(v)("SLIDE_DESIGN.IMAGE_REPEAT"),value:"repeat"},{label:r.unref(v)("SLIDE_DESIGN.IMAGE_COVER"),value:"cover"}]},null,8,["value","options"])):(r.openBlock(),r.createBlock(st,{key:2,style:{flex:"1"},value:m.value.gradient?.type||"","onUpdate:value":C[3]||(C[3]=$=>I({type:$})),options:[{label:r.unref(v)("SLIDE_DESIGN.GRADIENT_LINEAR"),value:"linear"},{label:r.unref(v)("SLIDE_DESIGN.GRADIENT_RADIAL"),value:"radial"}]},null,8,["value","options"]))]),m.value.type==="image"?(r.openBlock(),r.createElementBlock("div",IF,[r.createVNode(El,{onChange:C[4]||(C[4]=$=>N($))},{default:r.withCtx(()=>[r.createElementVNode("div",AF,[r.createElementVNode("div",{class:"content",style:r.normalizeStyle({backgroundImage:`url(${m.value.image?.src})`})},[r.createVNode(P)],4)])]),_:1})])):r.createCommentVNode("",!0),m.value.type==="gradient"?(r.openBlock(),r.createElementBlock("div",NF,[r.createElementVNode("div",LF,[r.createVNode(C_,{value:m.value.gradient?.colors||[],index:f.value,"onUpdate:value":C[5]||(C[5]=$=>I({colors:$})),"onUpdate:index":C[6]||(C[6]=$=>f.value=$)},null,8,["value","index"])]),r.createElementVNode("div",CF,[r.createElementVNode("div",xF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.CURRENT_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:m.value.gradient?.colors[f.value].color,"onUpdate:modelValue":C[7]||(C[7]=$=>A($))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:m.value.gradient?.colors[f.value].color},null,8,["color"])]),_:1})]),m.value.gradient?.type==="linear"?(r.openBlock(),r.createElementBlock("div",bF,[r.createElementVNode("div",wF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.GRADIENT_ANGLE")),1),r.createVNode(Wt,{min:0,max:360,step:15,value:m.value.gradient.rotate||0,"onUpdate:value":C[8]||(C[8]=$=>I({rotate:$})),style:{width:"60%"}},null,8,["value"])])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",OF,[r.createVNode(ue,{style:{flex:"1"},onClick:C[9]||(C[9]=$=>T())},{default:r.withCtx(()=>[r.createVNode(k),r.createTextVNode(" "+r.toDisplayString(r.unref(v)("SLIDE_DESIGN.APPLY_BACKGROUND_ALL")),1)]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",RF,[r.createVNode(st,{style:{width:"100%"},value:r.unref(i),"onUpdate:value":C[10]||(C[10]=$=>b($)),options:[{label:r.unref(v)("SLIDE_DESIGN.RATIO_WIDE_16_9"),value:.5625},{label:r.unref(v)("SLIDE_DESIGN.RATIO_WIDE_16_10"),value:.625},{label:r.unref(v)("SLIDE_DESIGN.RATIO_STANDARD_4_3"),value:.75},{label:r.unref(v)("SLIDE_DESIGN.RATIO_PAPER_A3_A4"),value:.70710678},{label:r.unref(v)("SLIDE_DESIGN.RATIO_PORTRAIT_A3_A4"),value:1.41421356}]},null,8,["value","options"])]),r.createElementVNode("div",kF,[r.createElementVNode("div",DF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.CANVAS_SIZE",{width:r.unref(l),height:O(r.unref(l)*r.unref(i))})),1)]),r.createVNode(Oe),r.createElementVNode("div",PF,[r.createElementVNode("span",null,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.GLOBAL_THEME")),1),r.createElementVNode("span",{class:"more",onClick:C[11]||(C[11]=$=>c.value=!c.value)},[r.createElementVNode("span",MF,r.toDisplayString(r.unref(v)("COMMON.MORE")),1),c.value?(r.openBlock(),r.createBlock(B,{key:0})):(r.openBlock(),r.createBlock(H,{key:1}))])]),r.createElementVNode("div",BF,[r.createElementVNode("div",VF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.FONT")),1),r.createVNode(st,{style:{width:"60%"},value:r.unref(s).fontName,search:"",searchLabel:r.unref(v)("COMMON.SEARCH_FONT"),"onUpdate:value":C[12]||(C[12]=$=>L({fontName:$})),options:p.value},null,8,["value","searchLabel","options"])]),r.createElementVNode("div",$F,[r.createElementVNode("div",FF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.FONT_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).fontColor,"onUpdate:modelValue":C[13]||(C[13]=$=>L({fontColor:$}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).fontColor},null,8,["color"])]),_:1})]),r.createElementVNode("div",HF,[r.createElementVNode("div",UF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.BACKGROUND_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).backgroundColor,"onUpdate:modelValue":C[14]||(C[14]=$=>L({backgroundColor:$}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).backgroundColor},null,8,["color"])]),_:1})]),r.createElementVNode("div",GF,[r.createElementVNode("div",zF,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.THEME_COLORS")),1),r.createVNode(x_,{style:{width:"60%"},colors:r.unref(s).themeColors,onClick:C[15]||(C[15]=$=>d.value=!0)},null,8,["colors"])]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createElementVNode("div",YF,[r.createElementVNode("div",XF,r.toDisplayString(r.unref(v)("STYLE_PARTS.OUTLINE_STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.value,$=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:$,onClick:V=>L({outline:{...r.unref(s).outline,style:$}})},[r.createVNode(En,{type:$},null,8,["type"])],8,WF))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:r.unref(s).outline.style},null,8,["type"])]),_:1})]),r.createElementVNode("div",KF,[r.createElementVNode("div",qF,r.toDisplayString(r.unref(v)("STYLE_PARTS.OUTLINE_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).outline.color,"onUpdate:modelValue":C[16]||(C[16]=$=>L({outline:{...r.unref(s).outline,color:$}}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).outline.color||"#000"},null,8,["color"])]),_:1})]),r.createElementVNode("div",ZF,[r.createElementVNode("div",jF,r.toDisplayString(r.unref(v)("STYLE_PARTS.OUTLINE_WIDTH")),1),r.createVNode(Xt,{value:r.unref(s).outline.width||0,"onUpdate:value":C[17]||(C[17]=$=>L({outline:{...r.unref(s).outline,width:$}})),style:{width:"60%"}},null,8,["value"])]),r.createElementVNode("div",JF,[r.createElementVNode("div",QF,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_X")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:r.unref(s).shadow.h,"onUpdate:value":C[18]||(C[18]=$=>L({shadow:{...r.unref(s).shadow,h:$}}))},null,8,["value"])]),r.createElementVNode("div",eH,[r.createElementVNode("div",tH,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_Y")),1),r.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:r.unref(s).shadow.v,"onUpdate:value":C[19]||(C[19]=$=>L({shadow:{...r.unref(s).shadow,v:$}}))},null,8,["value"])]),r.createElementVNode("div",nH,[r.createElementVNode("div",rH,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_BLUR")),1),r.createVNode(Wt,{style:{width:"60%"},min:1,max:20,step:1,value:r.unref(s).shadow.blur,"onUpdate:value":C[20]||(C[20]=$=>L({shadow:{...r.unref(s).shadow,blur:$}}))},null,8,["value"])]),r.createElementVNode("div",oH,[r.createElementVNode("div",aH,r.toDisplayString(r.unref(v)("STYLE_PARTS.SHADOW_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(s).shadow.color,"onUpdate:modelValue":C[21]||(C[21]=$=>L({shadow:{...r.unref(s).shadow,color:$}}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:r.unref(s).shadow.color},null,8,["color"])]),_:1})])],64)):r.createCommentVNode("",!0),r.createElementVNode("div",iH,[r.createVNode(ue,{style:{flex:"1"},onClick:C[22]||(C[22]=$=>r.unref(y)(c.value))},{default:r.withCtx(()=>[r.createVNode(k),r.createTextVNode(" "+r.toDisplayString(r.unref(v)("SLIDE_DESIGN.APPLY_THEME_ALL")),1)]),_:1})]),r.createElementVNode("div",lH,[r.createVNode(ue,{style:{flex:"1"},onClick:C[23]||(C[23]=$=>u.value=!0)},{default:r.withCtx(()=>[r.createVNode(U),r.createTextVNode(" "+r.toDisplayString(r.unref(v)("SLIDE_DESIGN.EXTRACT_THEME")),1)]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",sH,r.toDisplayString(r.unref(v)("SLIDE_DESIGN.PRESET_THEMES")),1),r.createElementVNode("div",cH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref($$),($,V)=>(r.openBlock(),r.createElementBlock("div",{class:"theme-item",key:V,style:r.normalizeStyle({backgroundColor:$.background,fontFamily:$.fontname})},[r.createElementVNode("div",{class:"theme-item-content",style:r.normalizeStyle({backgroundColor:$.background})},[r.createElementVNode("div",{class:"text",style:r.normalizeStyle({color:$.fontColor})},r.toDisplayString(r.unref(v)("SLIDE_DESIGN.TEXT_SAMPLE")),5),r.createElementVNode("div",uH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList($.colors,(z,D)=>(r.openBlock(),r.createElementBlock("div",{class:"color-block",key:D,style:r.normalizeStyle({backgroundColor:z})},null,4))),128))]),r.createElementVNode("div",dH,[r.createVNode(ue,{type:"primary",size:"small",onClick:z=>r.unref(E)($)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)("COMMON.SET")),1)]),_:1},8,["onClick"]),r.createVNode(ue,{type:"primary",size:"small",style:{"margin-top":"3px"},onClick:z=>r.unref(E)($,!0)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)("SLIDE_DESIGN.SET_AND_APPLY")),1)]),_:1},8,["onClick"])])],4)],4))),128))])]),r.createVNode(Yr,{visible:u.value,"onUpdate:visible":C[25]||(C[25]=$=>u.value=$),width:520,closeButton:"",onClosed:C[26]||(C[26]=$=>u.value=!1)},{default:r.withCtx(()=>[r.createVNode(pF,{onClose:C[24]||(C[24]=$=>u.value=!1)})]),_:1},8,["visible"]),r.createVNode(Yr,{visible:d.value,"onUpdate:visible":C[28]||(C[28]=$=>d.value=$),width:310,onClosed:C[29]||(C[29]=$=>d.value=!1)},{default:r.withCtx(()=>[r.createVNode(yF,{onClose:C[27]||(C[27]=$=>d.value=!1)})]),_:1},8,["visible"])],64)}}},pH=ie(fH,[["__scopeId","data-v-7d1c0109"]]),vH={class:"slide-animation-panel"},hH={class:"animation-pool"},mH=["onClick"],gH={class:"animation-text"},EH={__name:"SlideAnimationPanel",setup(e){const t=pe(),{slides:n,currentSlide:o}=ne.storeToRefs(t),{t:a}=_e(),i=r.computed(()=>o.value.turningMode||"slideY"),l=y$,{addHistorySnapshot:s}=be(),c=d=>{d!==i.value&&(t.updateSlide({turningMode:d}),s())},u=()=>{const d=n.value.map(f=>({...f,turningMode:o.value.turningMode}));t.setSlides(d),Ae.success(a("SLIDE_ANIMATION.APPLIED_ALL")),s()};return(d,f)=>{const v=r.resolveComponent("AiPptCheck");return r.openBlock(),r.createElementBlock("div",vH,[r.createElementVNode("div",hH,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),p=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["animation-item",{active:i.value===p.value}]),key:p.label,onClick:h=>c(p.value)},[r.createElementVNode("div",{class:r.normalizeClass(["animation-block",p.value])},"P",2),r.createElementVNode("div",gH,r.toDisplayString(r.unref(a)(p.labelKey||p.label)),1)],10,mH))),128))]),r.createVNode(ue,{style:{width:"100%"},onClick:f[0]||(f[0]=p=>u())},{default:r.withCtx(()=>[r.createVNode(v),r.createTextVNode(" "+r.toDisplayString(r.unref(a)("SLIDE_ANIMATION.APPLY_ALL")),1)]),_:1})])}}},yH=ie(EH,[["__scopeId","data-v-d3f33550"]]),_H=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=ne.storeToRefs(fe()),{currentSlide:o}=ne.storeToRefs(e),{addHistorySnapshot:a}=be();return{alignActiveElement:l=>{const{minX:s,maxX:c,minY:u,maxY:d}=tr(n.value),f=JSON.parse(JSON.stringify(o.value.elements)),v={};for(const p of n.value)if(p.groupId&&!v[p.groupId]){const h=n.value.filter(m=>m.groupId===p.groupId);v[p.groupId]=tr(h)}if(l===Ve.LEFT)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].minX-s;p.left=p.left-m}else if("rotate"in p&&p.rotate){const{offsetX:h}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.left=s-h}else p.left=s});else if(l===Ve.RIGHT)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].maxX-c;p.left=p.left-m}else{const h=p.type==="line"?Math.max(p.start[0],p.end[0]):p.width;if("rotate"in p&&p.rotate){const{offsetX:m}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.left=c-h+m}else p.left=c-h}});else if(l===Ve.TOP)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].minY-u;p.top=p.top-m}else if("rotate"in p&&p.rotate){const{offsetY:h}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.top=u-h}else p.top=u});else if(l===Ve.BOTTOM)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].maxY-d;p.top=p.top-m}else{const h=p.type==="line"?Math.max(p.start[1],p.end[1]):p.height;if("rotate"in p&&p.rotate){const{offsetY:m}=pa({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.top=d-h+m}else p.top=d-h}});else if(l===Ve.HORIZONTAL){const p=(s+c)/2;f.forEach(h=>{if(t.value.includes(h.id))if(h.groupId){const m=v[h.groupId],E=(m.maxX+m.minX)/2-p;h.left=h.left-E}else{const m=h.type==="line"?Math.max(h.start[0],h.end[0]):h.width;h.left=p-m/2}})}else if(l===Ve.VERTICAL){const p=(u+d)/2;f.forEach(h=>{if(t.value.includes(h.id))if(h.groupId){const m=v[h.groupId],E=(m.maxY+m.minY)/2-p;h.top=h.top-E}else{const m=h.type==="line"?Math.max(h.start[1],h.end[1]):h.height;h.top=p-m/2}})}e.updateSlide({elements:f}),a()}}},TH=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=ne.storeToRefs(fe()),{currentSlide:o}=ne.storeToRefs(e),{addHistorySnapshot:a}=be();return{displayItemCount:r.computed(()=>{let c=0;const u=[];for(const d of n.value)d.groupId?u.includes(d.groupId)||(u.push(d.groupId),c+=1):c+=1;return c}),uniformHorizontalDisplay:()=>{const{minX:c,maxX:u}=tr(n.value),d=JSON.parse(JSON.stringify(n.value)),f=JSON.parse(JSON.stringify(o.value.elements)),v=[];let p=[];for(const I of d)if(I.groupId)p.find(x=>x.groupId===I.groupId)?p=p.map(x=>x.groupId===I.groupId?{...x,els:[...x.els,I]}:x):p.push({groupId:I.groupId,els:[I]});else{const{minX:A,maxX:x}=vn(I);v.push({min:A,max:x,el:I})}const h=[];for(const I of p){const{minX:A,maxX:x}=tr(I.els);h.push({min:A,max:x,els:I.els})}const m=[...v,...h];m.sort((I,A)=>I.min-A.min);let g=0;for(const I of m){const A=I.max-I.min;g+=A}const E=(u-c-g)/(m.length-1),y=[],_=m[0];let S={min:_.min,max:_.max};if("el"in _)y.push({pos:_.min,el:_.el});else for(const I of _.els){const{minX:A}=vn(I);y.push({pos:A,el:I})}for(let I=1;I<m.length;I++){const A=m[I],x=S.max-S.min,N=S.min+x+E,T=A.max-A.min;if(S={min:N,max:N+T},"el"in A)y.push({pos:N,el:A.el});else for(const L of A.els){const{minX:b}=vn(L),O=b-A.min;y.push({pos:N+O,el:L})}}for(const I of f)if(t.value.includes(I.id)){for(const A of y)if(A.el.id===I.id)if("rotate"in I&&I.rotate){const{offsetX:x}=pa({left:I.left,top:I.top,width:I.width,height:I.height,rotate:I.rotate});I.left=A.pos-x}else I.left=A.pos}e.updateSlide({elements:f}),a()},uniformVerticalDisplay:()=>{const{minY:c,maxY:u}=tr(n.value),d=JSON.parse(JSON.stringify(n.value)),f=JSON.parse(JSON.stringify(o.value.elements)),v=[];let p=[];for(const I of d)if(I.groupId)p.find(x=>x.groupId===I.groupId)?p=p.map(x=>x.groupId===I.groupId?{...x,els:[...x.els,I]}:x):p.push({groupId:I.groupId,els:[I]});else{const{minY:A,maxY:x}=vn(I);v.push({min:A,max:x,el:I})}const h=[];for(const I of p){const{minY:A,maxY:x}=tr(I.els);h.push({min:A,max:x,els:I.els})}const m=[...v,...h];m.sort((I,A)=>I.min-A.min);let g=0;for(const I of m){const A=I.max-I.min;g+=A}const E=(u-c-g)/(m.length-1),y=[],_=m[0];let S={min:_.min,max:_.max};if("el"in _)y.push({pos:_.min,el:_.el});else for(const I of _.els){const{minY:A}=vn(I);y.push({pos:A,el:I})}for(let I=1;I<m.length;I++){const A=m[I],x=S.max-S.min,N=S.min+x+E,T=A.max-A.min;if(S={min:N,max:N+T},"el"in A)y.push({pos:N,el:A.el});else for(const L of A.els){const{minY:b}=vn(L),O=b-A.min;y.push({pos:N+O,el:L})}}for(const I of f)if(t.value.includes(I.id)){for(const A of y)if(A.el.id===I.id)if("rotate"in I&&I.rotate){const{offsetY:x}=pa({left:I.left,top:I.top,width:I.width,height:I.height,rotate:I.rotate});I.top=A.pos-x}else I.top=A.pos}e.updateSlide({elements:f}),a()}}},SH={class:"multi-position-panel"},IH={__name:"MultiPositionPanel",setup(e){const{t}=_e(),{canCombine:n,combineElements:o,uncombineElements:a}=ip(),{alignActiveElement:i}=_H(),{alignElementToCanvas:l}=cp(),{displayItemCount:s,uniformHorizontalDisplay:c,uniformVerticalDisplay:u}=TH(),d=f=>{n.value?i(f):l(f)};return(f,v)=>{const p=r.resolveComponent("AiPptAlignLeft"),h=r.resolveComponent("AiPptAlignHorizontally"),m=r.resolveComponent("AiPptAlignRight"),g=r.resolveComponent("AiPptAlignTop"),E=r.resolveComponent("AiPptAlignVertically"),y=r.resolveComponent("AiPptAlignBottom"),_=r.resolveComponent("AiPptGroup"),S=r.resolveComponent("AiPptUngroup"),I=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",SH,[r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[0]||(v[0]=A=>d(r.unref(Ve).LEFT))},{default:r.withCtx(()=>[r.createVNode(p)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[1]||(v[1]=A=>d(r.unref(Ve).HORIZONTAL))},{default:r.withCtx(()=>[r.createVNode(h)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_CENTER_HORIZONTAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[2]||(v[2]=A=>d(r.unref(Ve).RIGHT))},{default:r.withCtx(()=>[r.createVNode(m)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_RIGHT")]])]),_:1}),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[3]||(v[3]=A=>d(r.unref(Ve).TOP))},{default:r.withCtx(()=>[r.createVNode(g)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_TOP")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[4]||(v[4]=A=>d(r.unref(Ve).VERTICAL))},{default:r.withCtx(()=>[r.createVNode(E)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_CENTER_VERTICAL")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{style:{flex:"1"},onClick:v[5]||(v[5]=A=>d(r.unref(Ve).BOTTOM))},{default:r.withCtx(()=>[r.createVNode(y)]),_:1})),[[I,r.unref(t)("POSITION_PANEL.ALIGN_BOTTOM")]])]),_:1}),r.unref(s)>2?(r.openBlock(),r.createBlock(it,{key:0,class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{style:{flex:"1"},onClick:v[6]||(v[6]=A=>r.unref(c)())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(t)("MULTI_POSITION.HORIZONTAL_DISTRIBUTE")),1)]),_:1}),r.createVNode(ue,{style:{flex:"1"},onClick:v[7]||(v[7]=A=>r.unref(u)())},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(t)("MULTI_POSITION.VERTICAL_DISTRIBUTE")),1)]),_:1})]),_:1})):r.createCommentVNode("",!0),r.createVNode(Oe),r.createVNode(it,{class:"row"},{default:r.withCtx(()=>[r.createVNode(ue,{disabled:!r.unref(n),onClick:v[8]||(v[8]=A=>r.unref(o)()),style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(_,{style:{"margin-right":"3px"}}),r.createTextVNode(r.toDisplayString(r.unref(t)("EDITABLE_ELEMENT.GROUP")),1)]),_:1},8,["disabled"]),r.createVNode(ue,{disabled:r.unref(n),onClick:v[9]||(v[9]=A=>r.unref(a)()),style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(S,{style:{"margin-right":"3px"}}),r.createTextVNode(r.toDisplayString(r.unref(t)("EDITABLE_ELEMENT.UNGROUP")),1)]),_:1},8,["disabled"])]),_:1})])}}},AH=ie(IH,[["__scopeId","data-v-80bdf1ab"]]),NH={class:"multi-style-panel"},LH={class:"row"},CH={style:{width:"45%"}},xH={class:"row"},bH={style:{width:"45%"}},wH=["onClick"],OH={class:"row"},RH={style:{width:"45%"}},kH={class:"row"},DH={style:{width:"45%"}},PH={__name:"MultiStylePanel",setup(e){const t=pe(),{richTextAttrs:n,activeElementList:o}=ne.storeToRefs(fe()),{t:a}=_e(),i=r.computed(()=>Cl(a)),{addHistorySnapshot:l}=be(),s=(m,g)=>{t.updateElement({id:m,props:g}),l()},c=r.ref(["solid","dashed","dotted"]),u=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=r.ref("#fff"),f=r.ref({width:0,color:"#fff",style:"solid"}),v=m=>{for(const g of o.value){if((g.type==="text"||g.type==="shape"||g.type==="chart")&&s(g.id,{fill:m}),g.type==="table"){const E=JSON.parse(JSON.stringify(g.data));for(let y=0;y<E.length;y++)for(let _=0;_<E[y].length;_++){const S=E[y][_].style||{};E[y][_].style={...S,backcolor:m}}s(g.id,{data:E})}g.type==="audio"&&s(g.id,{color:m})}d.value=m},p=m=>{for(const g of o.value){if(g.type==="text"||g.type==="image"||g.type==="shape"||g.type==="table"||g.type==="chart"){const y={outline:{...g.outline||{width:2,color:"#000",style:"solid"},...m}};s(g.id,y)}g.type==="line"&&s(g.id,m)}f.value={...f.value,...m}},h=(m,g)=>{var E;for(const y of o.value){if((y.type==="text"||y.type==="shape"&&(!((E=y.text)===null||E===void 0)&&E.content))&&bt.emit(Et.RICH_TEXT_COMMAND,{target:y.id,action:{command:m,value:g}}),y.type==="table"){const _=JSON.parse(JSON.stringify(y.data));for(let S=0;S<_.length;S++)for(let I=0;I<_[S].length;I++){const A=_[S][I].style||{};_[S][I].style={...A,[m]:g}}s(y.id,{data:_})}y.type==="latex"&&m==="color"&&s(y.id,{color:g})}};return(m,g)=>{const E=r.resolveComponent("AiPptFontSize"),y=r.resolveComponent("AiPptAddText"),_=r.resolveComponent("AiPptText"),S=r.resolveComponent("AiPptHighLight"),I=r.resolveComponent("AiPptAlignTextLeft"),A=r.resolveComponent("AiPptAlignTextCenter"),x=r.resolveComponent("AiPptAlignTextRight"),N=r.resolveComponent("AiPptAlignTextBoth"),T=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",NH,[r.createElementVNode("div",LH,[r.createElementVNode("div",CH,r.toDisplayString(r.unref(a)("MULTI_STYLE.FILL_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=L=>v(L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:d.value},null,8,["color"])]),_:1})]),r.createVNode(Oe),r.createElementVNode("div",xH,[r.createElementVNode("div",bH,r.toDisplayString(r.unref(a)("MULTI_STYLE.OUTLINE_STYLE")),1),r.createVNode(xa,{style:{width:"60%"}},{options:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,L=>(r.openBlock(),r.createElementBlock("div",{class:"option",key:L,onClick:b=>p({style:L})},[r.createVNode(En,{type:L},null,8,["type"])],8,wH))),128))]),label:r.withCtx(()=>[r.createVNode(En,{type:f.value.style},null,8,["type"])]),_:1})]),r.createElementVNode("div",OH,[r.createElementVNode("div",RH,r.toDisplayString(r.unref(a)("MULTI_STYLE.OUTLINE_COLOR")),1),r.createVNode(Se,{trigger:"click",style:{width:"60%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:f.value.color,"onUpdate:modelValue":g[1]||(g[1]=L=>p({color:L}))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createVNode(lt,{color:f.value.color||"#000"},null,8,["color"])]),_:1})]),r.createElementVNode("div",kH,[r.createElementVNode("div",DH,r.toDisplayString(r.unref(a)("MULTI_STYLE.OUTLINE_WIDTH")),1),r.createVNode(Xt,{value:f.value.width||0,"onUpdate:value":g[2]||(g[2]=L=>p({width:L})),style:{width:"60%"}},null,8,["value"])]),r.createVNode(Oe),r.createVNode(gv,{class:"row"},{default:r.withCtx(()=>[r.createVNode(st,{style:{width:"60%"},value:r.unref(n).fontname,search:"",searchLabel:r.unref(a)("COMMON.SEARCH_FONT"),"onUpdate:value":g[3]||(g[3]=L=>h("fontname",L)),options:i.value},{icon:r.withCtx(()=>[r.createVNode(E)]),_:1},8,["value","searchLabel","options"]),r.createVNode(st,{style:{width:"40%"},value:r.unref(n).fontsize,search:"",searchLabel:r.unref(a)("COMMON.SEARCH_FONT_SIZE"),"onUpdate:value":g[4]||(g[4]=L=>h("fontsize",L)),options:u.map(L=>({label:L,value:L}))},{icon:r.withCtx(()=>[r.createVNode(y)]),_:1},8,["value","searchLabel","options"])]),_:1}),r.createVNode(it,{class:"row",passive:""},{default:r.withCtx(()=>[r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(n).color,"onUpdate:modelValue":g[5]||(g[5]=L=>h("color",L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{first:"",color:r.unref(n).color},{default:r.withCtx(()=>[r.createVNode(_)]),_:1},8,["color"])),[[T,r.unref(a)("RICH_TEXT.TEXT_COLOR")]])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:r.unref(n).backcolor,"onUpdate:modelValue":g[6]||(g[6]=L=>h("backcolor",L))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(Fa,{color:r.unref(n).backcolor},{default:r.withCtx(()=>[r.createVNode(S)]),_:1},8,["color"])),[[T,r.unref(a)("RICH_TEXT.TEXT_HIGHLIGHT")]])]),_:1}),r.withDirectives((r.openBlock(),r.createBlock(ue,{class:"font-size-btn",style:{width:"20%"},onClick:g[7]||(g[7]=L=>h("fontsize-add","2"))},{default:r.withCtx(()=>[r.createVNode(E),g[10]||(g[10]=r.createTextVNode("+ ",-1))]),_:1})),[[T,r.unref(a)("RICH_TEXT.FONT_SIZE_INCREASE")]]),r.withDirectives((r.openBlock(),r.createBlock(ue,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:g[8]||(g[8]=L=>h("fontsize-reduce","2"))},{default:r.withCtx(()=>[r.createVNode(E),g[11]||(g[11]=r.createTextVNode("- ",-1))]),_:1})),[[T,r.unref(a)("RICH_TEXT.FONT_SIZE_DECREASE")]])]),_:1}),r.createVNode(lr,{class:"row","button-style":"solid",value:r.unref(n).align,"onUpdate:value":g[9]||(g[9]=L=>h("align",L))},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(je,{value:"left",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(I)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_LEFT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"center",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(A)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_CENTER")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"right",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(x)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_RIGHT")]]),r.withDirectives((r.openBlock(),r.createBlock(je,{value:"justify",style:{flex:"1"}},{default:r.withCtx(()=>[r.createVNode(N)]),_:1})),[[T,r.unref(a)("RICH_TEXT.ALIGN_JUSTIFY")]])]),_:1},8,["value"])])}}},MH=ie(PH,[["__scopeId","data-v-61ceb85a"]]),BH={class:"toolbar"},VH={class:"content"},$H={__name:"index",setup(e){const t=fe(),{activeElementIdList:n,activeElementList:o,activeGroupElementId:a,toolbarState:i}=ne.storeToRefs(t),{t:l}=_e(),s=[{label:l("TOOLBAR.TAB_STYLE"),key:Tt.EL_STYLE},{label:l("TOOLBAR.TAB_POSITION"),key:Tt.EL_POSITION},{label:l("TOOLBAR.TAB_ANIMATION"),key:Tt.EL_ANIMATION}],c=[{label:l("TOOLBAR.TAB_DESIGN"),key:Tt.SLIDE_DESIGN},{label:l("TOOLBAR.TAB_TRANSITION"),key:Tt.SLIDE_ANIMATION},{label:l("TOOLBAR.TAB_ANIMATION"),key:Tt.EL_ANIMATION}],u=[{label:l("TOOLBAR.TAB_STYLE_MULTI"),key:Tt.MULTI_STYLE},{label:l("TOOLBAR.TAB_POSITION_MULTI"),key:Tt.MULTI_POSITION}],d=p=>{t.setToolbarState(p)},f=r.computed(()=>{if(n.value.length){if(n.value.length>1)return a.value&&o.value.find(h=>h.id===a.value)?s:u}else return c;return s});r.watch(f,()=>{const p=f.value.map(h=>h.key);p.includes(i.value)||t.setToolbarState(p[0])});const v=r.computed(()=>({[Tt.EL_STYLE]:s$,[Tt.EL_POSITION]:g$,[Tt.EL_ANIMATION]:V$,[Tt.SLIDE_DESIGN]:pH,[Tt.SLIDE_ANIMATION]:yH,[Tt.MULTI_STYLE]:MH,[Tt.MULTI_POSITION]:AH})[i.value]||null);return(p,h)=>(r.openBlock(),r.createElementBlock("div",BH,[r.createVNode(qn,{tabs:f.value,value:r.unref(i),card:"","onUpdate:value":h[0]||(h[0]=m=>d(m))},null,8,["tabs","value"]),r.createElementVNode("div",VH,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(v.value)))])]))}},FH=ie($H,[["__scopeId","data-v-c3d39bce"]]),HH={class:"editor"},UH={__name:"Editor",props:{value:{type:String,required:!0}},emits:["update"],setup(e,{expose:t,emit:n}){const o=e,a=n,i=fe(),{t:l}=_e(),s=r.useTemplateRef("editorViewRef");let c;const u=r.ref(),d=r.ref(),f=r.useTemplateRef("menuRef"),v=()=>{d.value&&d.value.hide()},p=Xe.debounce(function(){a("update",c.dom.innerHTML)},300,{trailing:!0}),h=()=>{i.setDisableHotkeysState(!0)},m=()=>{i.setDisableHotkeysState(!1)};t({updateTextContent:()=>{if(!c)return;const{doc:_,tr:S}=c.state;c.dispatch(S.replaceRangeWith(0,_.content.size,dp(o.value)))}});const E=()=>{const _=window.getSelection();if(!_||!_.anchorNode||!_.focusNode||_.isCollapsed||_.type==="Caret"||_.type==="None")return;const S=_.getRangeAt(0);if(d.value){u.value=Od(c);const{x:I,y:A,left:x,top:N}=S.getBoundingClientRect();d.value.setProps({getReferenceClientRect:()=>({x:I,y:A,left:x,top:N,height:0,width:0,right:x,bottom:N})}),d.value.show()}},y=(_,S)=>{if(_==="color"&&S){const I=c.state.schema.marks.forecolor.create({color:S});ht(c),$n(c,I)}else if(_==="backcolor"&&S){const I=c.state.schema.marks.backcolor.create({backcolor:S});ht(c),$n(c,I)}else if(_==="bold")ht(c),Ge.toggleMark(c.state.schema.marks.strong)(c.state,c.dispatch);else if(_==="em")ht(c),Ge.toggleMark(c.state.schema.marks.em)(c.state,c.dispatch);else if(_==="underline")ht(c),Ge.toggleMark(c.state.schema.marks.underline)(c.state,c.dispatch);else if(_==="strikethrough")ht(c),Ge.toggleMark(c.state.schema.marks.strikethrough)(c.state,c.dispatch);else if(_==="bulletList"){const{bullet_list:I,list_item:A}=c.state.schema.nodes;Ms(I,A,"")(c.state,c.dispatch)}else if(_==="orderedList"){const{ordered_list:I,list_item:A}=c.state.schema.nodes;Ms(I,A,"")(c.state,c.dispatch)}else if(_==="clear"){ht(c);const{$from:I,$to:A}=c.state.selection;c.dispatch(c.state.tr.removeMark(I.pos,A.pos))}c.focus(),p(),u.value=Od(c)};return r.onMounted(()=>{c=ug(s.value,o.value,{handleDOMEvents:{focus:h,blur:m,mouseup:E,mousedown:()=>{var _;(_=window.getSelection())===null||_===void 0||_.removeAllRanges(),v()},keydown:v,input:p}},{placeholder:l("COMMENT_PANEL.PLACEHOLDER")}),d.value=Zf(s.value,{duration:0,content:f.value,interactive:!0,trigger:"manual",placement:"top-start",hideOnClick:"toggle",offset:[0,6]})}),r.onUnmounted(()=>{c&&c.destroy()}),(_,S)=>{const I=r.resolveComponent("AiPptTextBold"),A=r.resolveComponent("AiPptTextItalic"),x=r.resolveComponent("AiPptTextUnderline"),N=r.resolveComponent("AiPptStrikethrough"),T=r.resolveComponent("AiPptText"),L=r.resolveComponent("AiPptHighLight"),b=r.resolveComponent("AiPptList"),O=r.resolveComponent("AiPptOrderedList"),w=r.resolveComponent("AiPptFormat"),C=r.resolveDirective("click-outside");return r.withDirectives((r.openBlock(),r.createElementBlock("div",HH,[r.createElementVNode("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:s},null,512),r.createElementVNode("div",{class:"menu",ref_key:"menuRef",ref:f},[r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.bold}),onClick:S[0]||(S[0]=P=>y("bold"))},[r.createVNode(I)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.em}),onClick:S[1]||(S[1]=P=>y("em"))},[r.createVNode(A)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.underline}),onClick:S[2]||(S[2]=P=>y("underline"))},[r.createVNode(x)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.strikethrough}),onClick:S[3]||(S[3]=P=>y("strikethrough"))},[r.createVNode(N)],2),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value?.color,"onUpdate:modelValue":S[4]||(S[4]=P=>y("color",P))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createElementVNode("button",null,[r.createVNode(T)])]),_:1}),r.createVNode(Se,{trigger:"click",style:{width:"30%"}},{content:r.withCtx(()=>[r.createVNode(Ye,{modelValue:u.value?.backcolor,"onUpdate:modelValue":S[5]||(S[5]=P=>y("backcolor",P))},null,8,["modelValue"])]),default:r.withCtx(()=>[r.createElementVNode("button",null,[r.createVNode(L)])]),_:1}),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.bulletList}),onClick:S[6]||(S[6]=P=>y("bulletList"))},[r.createVNode(b)],2),r.createElementVNode("button",{class:r.normalizeClass({active:u.value?.orderedList}),onClick:S[7]||(S[7]=P=>y("orderedList"))},[r.createVNode(O)],2),r.createElementVNode("button",{onClick:S[8]||(S[8]=P=>y("clear"))},[r.createVNode(w)])],512)])),[[C,v]])}}},GH=ie(UH,[["__scopeId","data-v-7ce68079"]]),zH={class:"remark"},YH={__name:"index",props:{height:{type:Number,required:!0}},emits:["update:height"],setup(e,{emit:t}){const n=e,o=t,a=pe(),{currentSlide:i}=ne.storeToRefs(a),l=r.useTemplateRef("editorRef");r.watch(()=>{var d;return(d=i.value)===null||d===void 0?void 0:d.id},()=>{r.nextTick(()=>{l.value&&i.value&&l.value.updateTextContent()})},{immediate:!0});const s=r.computed(()=>{var d;return((d=i.value)===null||d===void 0?void 0:d.remark)||""}),c=d=>{a.updateSlide({remark:d})},u=d=>{let f=!0;const v=d.pageY,p=n.height;document.onmousemove=h=>{if(!f)return;let E=-(h.pageY-v)+p;E<40&&(E=40),E>360&&(E=360),o("update:height",E)},document.onmouseup=()=>{f=!1,document.onmousemove=null,document.onmouseup=null}};return(d,f)=>(r.openBlock(),r.createElementBlock("div",zH,[r.createElementVNode("div",{class:"resize-handler",onMousedown:f[0]||(f[0]=v=>u(v))},null,32),r.createVNode(GH,{value:s.value,ref_key:"editorRef",ref:l,onUpdate:f[1]||(f[1]=v=>c(v))},null,8,["value"])]))}},XH=ie(YH,[["__scopeId","data-v-8309accf"]]),WH={class:"export-img-dialog"},KH={class:"thumbnails-view"},qH={class:"configs"},ZH={class:"row"},jH={class:"title"},JH={class:"row"},QH={class:"title"},eU={key:0,class:"row"},tU=["data-range"],nU={class:"row"},rU={class:"title"},oU={class:"row"},aU={class:"title"},iU={class:"config-item"},lU={class:"btns"},sU={__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),{slides:a,currentSlide:i}=ne.storeToRefs(pe()),l=r.useTemplateRef("imageThumbnailsRef"),s=r.ref("all"),c=r.ref([1,a.value.length]),u=r.ref("jpeg"),d=r.ref(1),f=r.ref(!1),v=r.computed(()=>s.value==="all"?a.value:s.value==="current"?[i.value]:a.value.filter((g,E)=>{const[y,_]=c.value;return E>=y-1&&E<=_-1})),{exportImage:p,exporting:h}=Ha(),m=()=>{l.value&&p(l.value,u.value,d.value,f.value)};return(g,E)=>{const y=r.resolveComponent("AiPptDownload"),_=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",WH,[r.createElementVNode("div",KH,[r.createElementVNode("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:l},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,S=>(r.openBlock(),r.createBlock($a,{class:"thumbnail",key:S.id,slide:S,size:1600},null,8,["slide"]))),128))],512)]),r.createElementVNode("div",qH,[r.createElementVNode("div",ZH,[r.createElementVNode("div",jH,r.toDisplayString(r.unref(o)("EXPORT.FORMAT")),1),r.createVNode(lr,{class:"config-item",value:u.value,"onUpdate:value":E[0]||(E[0]=S=>u.value=S)},{default:r.withCtx(()=>[r.createVNode(je,{style:{width:"50%"},value:"jpeg"},{default:r.withCtx(()=>[...E[7]||(E[7]=[r.createTextVNode("JPEG",-1)])]),_:1}),r.createVNode(je,{style:{width:"50%"},value:"png"},{default:r.withCtx(()=>[...E[8]||(E[8]=[r.createTextVNode("PNG",-1)])]),_:1})]),_:1},8,["value"])]),r.createElementVNode("div",JH,[r.createElementVNode("div",QH,r.toDisplayString(r.unref(o)("EXPORT.RANGE")),1),r.createVNode(lr,{class:"config-item",value:s.value,"onUpdate:value":E[1]||(E[1]=S=>s.value=S)},{default:r.withCtx(()=>[r.createVNode(je,{style:{width:"33.33%"},value:"all"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.ALL")),1)]),_:1}),r.createVNode(je,{style:{width:"33.33%"},value:"current"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CURRENT")),1)]),_:1}),r.createVNode(je,{style:{width:"33.33%"},value:"custom"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CUSTOM")),1)]),_:1})]),_:1},8,["value"])]),s.value==="custom"?(r.openBlock(),r.createElementBlock("div",eU,[r.createElementVNode("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},r.toDisplayString(r.unref(o)("EXPORT.CUSTOM_RANGE")),9,tU),r.createVNode(Wt,{class:"config-item",range:"",min:1,max:r.unref(a).length,step:1,value:c.value,"onUpdate:value":E[2]||(E[2]=S=>c.value=S)},null,8,["max","value"])])):r.createCommentVNode("",!0),r.createElementVNode("div",nU,[r.createElementVNode("div",rU,r.toDisplayString(r.unref(o)("EXPORT.IMAGE_QUALITY")),1),r.createVNode(Wt,{class:"config-item",min:0,max:1,step:.1,value:d.value,"onUpdate:value":E[3]||(E[3]=S=>d.value=S)},null,8,["value"])]),r.createElementVNode("div",oU,[r.createElementVNode("div",aU,r.toDisplayString(r.unref(o)("EXPORT.IGNORE_WEBFONT")),1),r.createElementVNode("div",iU,[r.withDirectives(r.createVNode(Sn,{value:f.value,"onUpdate:value":E[4]||(E[4]=S=>f.value=S)},null,8,["value"]),[[_,r.unref(o)("EXPORT.TIP_WEBFONT")]])])])]),r.createElementVNode("div",lU,[r.createVNode(ue,{class:"btn export",type:"primary",onClick:E[5]||(E[5]=S=>m())},{default:r.withCtx(()=>[r.createVNode(y),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("EXPORT.BTN_IMAGE")),1)]),_:1}),r.createVNode(ue,{class:"btn close",onClick:E[6]||(E[6]=S=>n("close"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CLOSE")),1)]),_:1})]),r.createVNode(Vi,{loading:r.unref(h),tip:r.unref(o)("EXPORT.EXPORTING")},null,8,["loading","tip"])])}}},cU=ie(sU,[["__scopeId","data-v-38bf3be4"]]),uU={class:"export-json-dialog"},dU={class:"preview"},fU={class:"btns"},pU={__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=_e(),{slides:a,viewportRatio:i,title:l,viewportSize:s,theme:c}=ne.storeToRefs(pe()),{exportJSON:u}=Ha(),d=r.computed(()=>({title:l.value,width:s.value,height:s.value*i.value,theme:c.value,slides:a.value}));return(f,v)=>{const p=r.resolveComponent("AiPptDownload");return r.openBlock(),r.createElementBlock("div",uU,[r.createElementVNode("div",dU,[r.createElementVNode("pre",null,r.toDisplayString(d.value),1)]),r.createElementVNode("div",fU,[r.createVNode(ue,{class:"btn export",type:"primary",onClick:v[0]||(v[0]=h=>r.unref(u)())},{default:r.withCtx(()=>[r.createVNode(p),r.createTextVNode(" "+r.toDisplayString(r.unref(o)("EXPORT.BTN_JSON")),1)]),_:1}),r.createVNode(ue,{class:"btn close",onClick:v[1]||(v[1]=h=>n("close"))},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(o)("EXPORT.CLOSE")),1)]),_:1})])])}}},vU=ie(pU,[["__scopeId","data-v-b50d9ddc"]]),hU=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},mU=(e,t,n)=>{const o="<!DOCTYPE html>";let a="";const i=document.styleSheets;if(i){for(const f of i)if(f.cssRules)for(const v of f.cssRules)a+=v.cssText}const{width:l,height:s,margin:c}=n,u=`
37
37
  <head>
38
38
  <style type="text/css">
39
39
  ${a}