PPTist/js/app.9b709042.js

2 lines
569 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){var e={8277:function(e,t,l){"use strict";var a,n=l(9963),o=l(9876),i=(l(7658),l(6252)),s=l(2262),r=l(3416);(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(a||(a={}));var u=l(5804);const c=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,d=e=>{const{empty:t}=e.state.selection;t&&(0,u.td)(e.state,e.dispatch)},p=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,a.pos,t))}},v=(e,t,l,a)=>{let n=t;const o=e=>e.type===a;let i=null,s=null,r=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(i&&l!==i)return null;s=s||t,i=i||l,r=t,n++}let u=t,c=l,d=0;n=t-1;while(n>d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;u=n,s=t,n--}n=l+1,d=e.nodeSize-2;while(n<d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;c=n,r=t,n++}return{mark:i,from:{node:s,pos:u},to:{node:r,pos:c}}},m=(e,t)=>Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,h=(e,t)=>{for(let l=e.depth;l>0;l--){const a=e.node(l);if(t(a))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:a}}},f=e=>t=>h(t.$from,e),g=e=>t=>f((t=>m(e,t)))(t),y=(e,t)=>{const l=t.schema.nodes[e];return!!g(l)(t.selection)},w=e=>e?"text"===e.type.name?e:e.lastChild?w(e.lastChild):null:null,x=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n=w(n),n?.marks||[]},k=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},b=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},_=(e,t)=>{const{from:l,$from:a,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||a.marks()):e.doc.rangeHasMark(l,n,t)},I=(e,t)=>{const{selection:l,doc:a}=e.state,{from:n,to:o}=l;let i=!0,s="";return a.nodesBetween(n,o,(e=>(i&&e.attrs[t]&&(i=!1,s=e.attrs[t]),i))),s},S={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},C=(e,t={})=>{const l={...S,...t},a=x(e),n=b(a,"strong"),o=b(a,"em"),i=b(a,"underline"),s=b(a,"strikethrough"),r=b(a,"superscript"),u=b(a,"subscript"),c=b(a,"code"),d=k(a,"forecolor","color")||l.color,p=k(a,"backcolor","backcolor")||l.backcolor,v=k(a,"fontsize","fontsize")||l.fontsize,m=k(a,"fontname","fontname")||l.fontname,h=k(a,"link","href")||"",f=I(e,"align")||l.align,g=y("bullet_list",e.state),w=y("ordered_list",e.state),_=y("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:v,fontname:m,link:h,align:f,bulletList:g,orderedList:w,blockquote:_}},L=e=>{const t=x(e),l=k(t,"fontsize","fontsize")||S.fontsize;return parseInt(l)},T={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},E=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],M=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}],U=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,a=100,n=100,o="a",i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});if(!s)return!1;i.width=a,i.height=n,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";const r=e=>{s.clearRect(0,0,a,n),s.font=`${l}px ${e}, ${t}`,s.fillText(o,a/2,n/2);const i=s.getImageData(0,0,a,n).data;return[].slice.call(i).filter((e=>0!==e))};return r(t).join("")!==r(e).join("")};var W=l(7234),D=l(6486);const H=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"<p><strong><span style='font-size: 112px'>PPTIST</span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"<p><span style='font-size: 24px'>基于 Vue 3.x + TypeScript 的在线演示文稿应用</span></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处添加副标题</span></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,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",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 80px'>感谢观看</span></span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],F={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},A=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"<p style=''><strong><span style='font-size: 80px'>输入标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"<p><span style='font-size: 24px'>请在此处输入副标题</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处添加副标题</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,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",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 80px'>感谢观看</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='font-size: 80px'>01</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"<p style=''><strong><span style='font-size: 40px'>在此处输入标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"<ol><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li></ol>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>1</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>4</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>3</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>2</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'><span style='font-size: 60px'>01</span></span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"<p style=''><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 36px'>1.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 36px'>2.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>1.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>2.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>3.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>4.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 40px'>请在此处输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容1</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容2</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容3</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容4</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>1</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>2</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>3</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>4</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>5</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>6</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],$=(0,o.Q_)("slides",{state:()=>({title:"未命名演示文稿",theme:F,slides:H,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id));return t.animations.filter((e=>a.includes(e.elId)))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id)),n=t.animations.filter((e=>a.includes(e.elId))),o=[];for(const i of n)if("click"!==i.trigger&&o.length){if("meantime"===i.trigger){const e=o[o.length-1];e.animations=e.animations.filter((e=>e.elId!==i.elId)),e.animations.push(i),o[o.length-1]=e}else if("auto"===i.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[i],autoNext:!1})}}else o.push({animations:[i],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:a,backgroundColor:n}=e.theme,o=(0,W.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(A).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{setTitle(e){this.title=e||"未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let o=0;o<t.length;o++){const e=this.slides.findIndex((e=>e.id===t[o]));l.push(e)}let a=Math.min(...l);const n=this.slides.length-t.length-1;a>n&&(a=n),this.slideIndex=a,this.slides=this.slides.filter((e=>!t.includes(e.id)))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=[...l,...t];this.slides[this.slideIndex].elements=a},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=l.filter((e=>!t.includes(e.id)));this.slides[this.slideIndex].elements=a},updateElement(e){const{id:t,props:l,slideId:a}=e,n="string"===typeof t?[t]:t,o=a?this.slides.findIndex((e=>e.id===a)):this.slideIndex,i=this.slides[o],s=i.elements.map((e=>n.includes(e.id)?{...e,...l}:e));this.slides[o].elements=s},removeElementProps(e){const{id:t,propName:l}=e,a="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>e.id===t?(0,D.omit)(e,a):e));this.slides[n].elements=i}}}),Z=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),O=Z(10),R=(0,o.Q_)("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,availableFonts:E,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:T,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:O,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1}),getters:{activeElementList(e){const t=$(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=$(),l=t.currentSlide;return l&&l.elements&&l.elements.find((t=>e.handleElementId===t.id))||null}},actions:{setActiveElementIdList(e){1===e.length?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},setAvailableFonts(){this.availableFonts=E.filter((e=>U(e.value)))},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}}});var z=l(7327),P=l(8134);const B="PPTIST_DISCARDED_DB",N="PPTist",j=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(B),l=t?JSON.parse(t):[],a=await P.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(N))return!1;const[a,n,o]=t.split("_");return a!==N||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)P.Z.delete(o);localStorage.removeItem(B)};class Y extends P.Z{constructor(){super(`${N}_${O}_${(new Date).getTime()}`),(0,z.Z)(this,"snapshots",void 0),(0,z.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const V=new Y,J=(0,o.Q_)("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=$(),t={index:e.slideIndex,slides:e.slides};await V.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=$(),t=await V.snapshots.orderBy("id").keys();let l=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(l=t.slice(this.snapshotCursor+1));const a={index:e.slideIndex,slides:e.slides};await V.snapshots.add(a);let n=t.length-l.length+1;const o=20;n>o&&(l.push(t[0]),n--),n>=2&&V.snapshots.update(t[n-2],{index:e.slideIndex}),await V.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=$(),t=R(),l=this.snapshotCursor-1,a=await V.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=$(),t=R(),l=this.snapshotCursor+1,a=await V.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),q=(0,o.Q_)("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}}}),X=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),G=(e,t)=>(0,D.padStart)(""+e,t,"0"),K=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var Q,ee,te,le,ae,ne,oe=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(Q||(Q={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(ee||(ee={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(te||(te={})),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"}(le||(le={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(ae||(ae={})),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["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"}(ne||(ne={}));const ie=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打开搜索替换",value:"Ctrl + F"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"},{label:"完成自定义形状绘制",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"行内代码",value:"Ctrl + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}];var se=l(2152),re=l.n(se),ue=l(1354),ce=l.n(ue);const de="pptist",pe=e=>ce().AES.encrypt(e,de).toString(),ve=e=>{const t=ce().AES.decrypt(e,de);return t.toString(ce().enc.Utf8)},me=e=>new Promise(((t,l)=>{const a=document.createElement("button"),n=new(re())(a,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",(e=>{n.destroy(),t(e)})),n.on("error",(e=>{n.destroy(),l(e)})),document.body.appendChild(a),a.click(),document.body.removeChild(a)})),he=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),fe=e=>{let t;try{t=JSON.parse(ve(e))}catch{t=e}return t},ge=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const a=[];for(const n in t){if(a[n]=t[n].split("\t"),1===a[n].length)return null;if(-1===l)l=a[n].length;else if(l!==a[n].length)return null}return a},ye=e=>{const{left:t,top:l,width:a,height:n,rotate:o=0}=e,i=Math.sqrt(Math.pow(a,2)+Math.pow(n,2))/2,s=180*Math.atan(n/a)/Math.PI,r=(180-o-s)*Math.PI/180,u=(s-o)*Math.PI/180,c=t+a/2,d=l+n/2,p=[c+i*Math.cos(r),c+i*Math.cos(u),c-i*Math.cos(r),c-i*Math.cos(u)],v=[d-i*Math.sin(r),d-i*Math.sin(u),d+i*Math.sin(r),d+i*Math.sin(u)];return{xRange:[Math.min(...p),Math.max(...p)],yRange:[Math.min(...v),Math.max(...v)]}},we=e=>{const{xRange:t,yRange:l}=ye({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:a,yRange:n}=ye({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:a[0]-t[0],offsetY:n[0]-l[0]}},xe=e=>{let t,l,a,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),a=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:i,width:s,height:r,rotate:u}=e,{xRange:c,yRange:d}=ye({left:o,top:i,width:s,height:r,rotate:u});t=c[0],l=c[1],a=d[0],n=d[1]}else t=e.left,l=e.left+e.width,a=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:a,maxY:n}},ke=e=>{const t=[],l=[],a=[],n=[];e.forEach((e=>{const{minX:o,maxX:i,minY:s,maxY:r}=xe(e);t.push(o),l.push(s),a.push(i),n.push(r)}));const o=Math.min(...t),i=Math.max(...a),s=Math.min(...l),r=Math.max(...n);return{minX:o,maxX:i,minY:s,maxY:r}},be=e=>{const t=[];return e.forEach((e=>{const l=t.findIndex((t=>t.value===e.value));if(-1===l)t.push(e);else{const a=t[l],n=Math.min(a.range[0],e.range[0]),o=Math.max(a.range[1],e.range[1]),i=[n,o],s={value:e.value,range:i};t[l]=s}})),t},_e=e=>{const t={};for(const l of e)t[l.id]=(0,r.x0)(10);return t},Ie=e=>{const t={},l={};for(const a of e){const e=a.groupId;e&&!t[e]&&(t[e]=(0,r.x0)(10)),l[a.id]=(0,r.x0)(10)}return{groupIdMap:t,elIdMap:l}},Se=e=>{const t=(0,W.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ce=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const a=e.broken.join(",");return`M${t} L${a} L${l}`}if(e.curve){const a=e.curve.join(",");return`M${t} Q${a} ${l}`}if(e.cubic){const[a,n]=e.cubic,o=a.join(","),i=n.join(",");return`M${t} C${o} ${i} ${l}`}return`M${t} L${l}`},Le=(e,t)=>{const l=e.getBoundingClientRect(),a=t.getBoundingClientRect();return l.top>=a.top&&l.bottom<=a.bottom};var Te=l(6108),Ee=l(1061),Me=l(8261),Ue=l(9512),We=l(2025),De=l(9872),He=l(1321),Fe=l(2696),Ae=l(3271),$e=l(9015),Ze=l(5761),Oe=l(7559),Re=l(4023),ze=l(4141),Pe=l(5010),Be=l(6492),Ne=l(1094),je=l(2677),Ye=l(683),Ve=l(7259),Je=l(1258),qe=l(9978),Xe=l(597),Ge=l(85),Ke=l(6071),Qe=l(2489),et=l(9925),tt=l(5361),lt=l(3185),at=l(139),nt=l(8461),ot=l(2882),it=l(3862),st=l(3764),rt=l(9371),ut=l(9912),ct=l(3935),dt=l(3735),pt=l(3542),vt=l(7537),mt=l(5314),ht=l(3325),ft=l(3275),gt=l(3317),yt=l(7712),wt=l(9370),xt=l(2778),kt=l(4422),bt=l(4957),_t=l(7872),It=l(5356),St=l(8684),Ct=l(9577),Lt=l(887),Tt=l(6866),Et=l(509),Mt=l(7606),Ut=l(4412),Wt=l(8814),Dt=l(2057),Ht=l(6048),Ft=l(5114),At=l(9917),$t=l(7747),Zt=l(7425),Ot=l(6717),Rt=l(6302),zt=l(3060),Pt=l(7107),Bt=l(2100),Nt=l(5460),jt=l(5268),Yt=l(1432),Vt=l(5193),Jt=l(4566),qt=l(7091),Xt=l(9602),Gt=l(4891),Kt=l(4012),Qt=l(3681),el=l(1440),tl=l(3482),ll=l(646),al=l(8e3),nl=l(4628),ol=l(9141),il=l(1060),sl=l(8389),rl=l(3467),ul=l(6935),cl=l(3590),dl=l(6453),pl=l(5957),vl=l(4467),ml=l(5547),hl=l(5650),fl=l(2790),gl=l(5620),yl=l(3339),wl=l(4666),xl=l(5215),kl=l(904),bl=l(3650),_l=l(4296),Il=l(6519),Sl=l(4790),Cl=l(3260),Ll=l(2146),Tl=l(6755),El=l(2849),Ml=l(6940),Ul=l(6116),Wl=l(5741),Dl=l(2939),Hl=l(9524),Fl=l(6135),Al=l(6821),$l=l(6149);const Zl={IconPlayOne:$l.Z,IconFullScreenPlay:Al.Z,IconLock:Fl.Z,IconUnlock:Hl.Z,IconPpt:Dl.Z,IconFormat:Wl.Z,IconPicture:Ul.Z,IconFullScreen:Ml.Z,IconList:El.Z,IconOrderedList:Tl.Z,IconFlipVertically:Ll.Z,IconFlipHorizontally:Cl.Z,IconFontSize:Sl.Z,IconCode:Il.Z,IconTextBold:_l.Z,IconTextItalic:bl.Z,IconTextUnderline:kl.Z,IconStrikethrough:xl.Z,IconEdit:wl.Z,IconQuote:yl.Z,IconBackgroundColor:gl.Z,IconGroup:fl.Z,IconUngroup:hl.Z,IconBack:ml.Z,IconNext:vl.Z,IconFullwidth:pl.Z,IconAlignTop:dl.Z,IconAlignLeft:cl.Z,IconAlignRight:ul.Z,IconAlignBottom:rl.Z,IconAlignVertically:sl.Z,IconAlignHorizontally:il.Z,IconBringToFront:ol.Z,IconSendToBack:nl.Z,IconAlignTextLeft:al.Z,IconAlignTextRight:ll.Z,IconAlignTextCenter:tl.Z,IconAlignTextBoth:el.Z,IconRowHeight:Qt.Z,IconWrite:Kt.Z,IconInsertTable:Gt.Z,IconAddText:Xt.Z,IconFill:qt.Z,IconTailoring:Jt.Z,IconEffects:Vt.Z,IconColorFilter:Yt.Z,IconUp:jt.Z,IconDown:Nt.Z,IconPlus:Bt.Z,IconMinus:Pt.Z,IconConnection:zt.Z,IconBringToFrontOne:Rt.Z,IconSentToBack:Ot.Z,IconGithub:Zt.Z,IconChartProportion:$t.Z,IconChartHistogram:At.Z,IconChartHistogramOne:Ft.Z,IconChartLineArea:Ht.Z,IconChartRing:Dt.Z,IconChartScatter:Wt.Z,IconChartLine:Ut.Z,IconChartPie:Mt.Z,IconText:Et.Z,IconRotate:Tt.Z,IconLeftTwo:Lt.Z,IconRightTwo:Ct.Z,IconPlatte:St.Z,IconClose:It.Z,IconCloseSmall:_t.Z,IconUndo:bt.Z,IconTransform:kt.Z,IconClick:xt.Z,IconTheme:wt.Z,IconArrowCircleLeft:yt.Z,IconGraphicDesign:gt.Z,IconLogout:ft.Z,IconErase:ht.Z,IconClear:mt.Z,IconAlignTextTopOne:vt.Z,IconAlignTextBottomOne:pt.Z,IconAlignTextMiddleOne:dt.Z,IconPause:ct.Z,IconVolumeMute:ut.Z,IconVolumeNotice:rt.Z,IconVolumeSmall:st.Z,IconVideoTwo:it.Z,IconFormula:ot.Z,IconLinkOne:nt.Z,IconFullScreenOne:at.Z,IconOffScreenOne:lt.Z,IconPower:tt.Z,IconListView:et.Z,IconMagic:Qe.Z,IconHighLight:Ke.Z,IconDownload:Ge.Z,IconIndentLeft:Xe.Z,IconIndentRight:qe.Z,IconVerticalSpacingBetweenItems:Je.Z,IconCopy:Ve.Z,IconDelete:Ye.Z,IconSquare:je.Z,IconRound:Ne.Z,IconNeedle:Be.Z,IconTextRotationNone:Pe.Z,IconTextRotationDown:ze.Z,IconFormatBrush:Re.Z,IconPreviewOpen:Oe.Z,IconPreviewClose:Ze.Z,IconStopwatchStart:$e.Z,IconSearch:Ae.Z,IconLeft:Fe.Z,IconRight:He.Z,IconMoveOne:De.Z,IconHamburgerButton:We.Z,IconAttention:Ue.Z,IconCheckOne:Me.Z,IconCloseOne:Ee.Z,IconInfo:Te.Z};var Ol={install(e){for(const t of Object.keys(Zl))e.component(t,Zl[t])}};const Rl=["id"],zl={class:"icons"},Pl={class:"content"},Bl={key:0,class:"title"},Nl={class:"description"},jl={key:0,class:"control"};var Yl=(0,i.aZ)({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:l}){const{IconAttention:a,IconCheckOne:o,IconCloseOne:r,IconInfo:u,IconCloseSmall:c}=Zl,d=e,p=l,v=(0,s.iH)(!0),m=(0,s.iH)(null),h=()=>{d.duration<=0||(m.value=setTimeout(g,d.duration))},f=()=>{m.value&&clearTimeout(m.value)},g=()=>v.value=!1;return(0,i.wF)((()=>{f()})),(0,i.bv)((()=>{h()})),t({close:g}),(e,t)=>((0,i.wg)(),(0,i.j4)(n.uT,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:t[3]||(t[3]=e=>p("close")),onAfterLeave:t[4]||(t[4]=e=>p("destroy"))},{default:(0,i.w5)((()=>[v.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"message",id:e.id},[(0,i._)("div",{class:"message-container",onMouseenter:t[1]||(t[1]=e=>f()),onMouseleave:t[2]||(t[2]=e=>h())},[(0,i._)("div",zl,["warning"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(a),{key:0,theme:"filled",size:"18",fill:"#faad14"})):(0,i.kq)("",!0),"success"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(o),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):(0,i.kq)("",!0),"error"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(r),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):(0,i.kq)("",!0),"info"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(u),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):(0,i.kq)("",!0)]),(0,i._)("div",Pl,[e.title?((0,i.wg)(),(0,i.iD)("div",Bl,(0,oe.zw)(e.title),1)):(0,i.kq)("",!0),(0,i._)("div",Nl,(0,oe.zw)(e.message),1)]),e.closable?((0,i.wg)(),(0,i.iD)("div",jl,[(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>g())},[(0,i.Wm)((0,s.SU)(c))])])):(0,i.kq)("",!0)],32)],8,Rl)):(0,i.kq)("",!0)])),_:1}))}}),Vl=l(3744);const Jl=(0,Vl.Z)(Yl,[["__scopeId","data-v-03d14766"]]);var ql=Jl;const Xl=[];let Gl=null,Kl=0;const Ql={duration:3e3},ea=e=>{const t="message-"+Kl++,l={...Ql,...e,id:t};Gl||(Gl=document.createElement("div"),Gl.className="message-wrap",Gl.style.cssText="\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n ",document.body.appendChild(Gl));const a=(0,i.Wm)(ql,l,null),o=document.createElement("div");a.appContext=e.ctx||ea._context||null,a.props.onClose=e.onClose,a.props.onDestroy=()=>{Gl&&Gl.childNodes.length<=1&&(Gl.remove(),Gl=null),(0,n.sY)(null,o)},(0,n.sY)(a,o),Gl.appendChild(o.firstElementChild);const s={id:t,close:()=>a?.component?.exposed?.close()};return Xl.push(s),s};ea.success=(e,t)=>ea({...t,type:"success",message:e}),ea.info=(e,t)=>ea({...t,type:"info",message:e}),ea.warning=(e,t)=>ea({...t,type:"warning",message:e}),ea.error=(e,t)=>ea({...t,type:"error",message:e}),ea.closeAll=function(){for(let e=Xl.length-1;e>=0;e--)Xl[e].close()};var ta=ea;const la=e=>{const t=e.replace(/[\n\r]+/g,"<br>"),l=t.split("<br>");let a="";for(const n of l)n&&(a+=`<div>${n}</div>`);return a},aa=e=>new Promise((t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,a=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:a})},l.onerror=()=>{l.onload=null,l.onerror=null}})),na=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),oa=1e3;var ia,sa;(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"})(ia||(ia={})),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"}(sa||(sa={}));const ra={[ia.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L ${a} ${t} Q 0 ${t} 0 ${t-a} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t-a} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L ${a} ${t} Z`}},[ia.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} Z`}},[ia.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} L ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[ia.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e} 0 L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[ia.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} Q 0 0 ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[ia.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.MESSAGE]:{formula:(e,t)=>{const l=.2*e,a=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${e/2} ${t-a} L ${e/2-l} ${t} L ${e/2-l} ${t-a} L 0 ${t-a} Z`}},[ia.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),a=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-a} ${t} L ${e/2-a} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[ia.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-a} L ${a} ${t-a} L ${a} 0 Z`}},[ia.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${a} ${a} L ${a} ${t-a} L ${e-a} ${t-a} L ${e-a} ${a} Z`}},[ia.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${e/2-a/2} 0 L ${e/2-a/2} ${t/2-a/2} L 0 ${t/2-a/2} L 0 ${t/2+a/2} L ${e/2-a/2} ${t/2+a/2} L ${e/2-a/2} ${t} L ${e/2+a/2} ${t} L ${e/2+a/2} ${t/2+a/2} L ${e} ${t/2+a/2} L ${e} ${t/2-a/2} L ${e/2+a/2} ${t/2-a/2} L ${e/2+a/2} 0 Z`}},[ia.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[ia.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[ia.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[ia.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[ia.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const a=t*l;return`M ${e/2} 0 L 0 ${a} L 0 ${t} L ${e} ${t} L ${e} ${a} Z`}},[ia.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${e} ${t/2} L ${e-a} 0 L 0 0 L ${a} ${t/2} L 0 ${t} L ${e-a} ${t} Z`}}},ua=[{type:"矩形",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:ia.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:ia.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:ia.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:ia.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:ia.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:ia.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:ia.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:ia.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"},{viewBox:[200,200],path:"M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z",title:"任意多边形"}]},{type:"常用形状",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:ia.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:ia.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:ia.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:ia.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:ia.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:ia.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:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 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:"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"},{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"},{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 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{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:ia.L},{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:ia.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{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:ia.PLUS},{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"},{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:ia.MESSAGE},{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:ia.ROUND_MESSAGE},{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"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{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"},{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"},{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 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z"}]},{type:"箭头",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"},{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"},{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"},{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"},{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"},{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:"其他形状",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:"线性",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}]}],ca={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var da=()=>{const e=J(),t=(0,D.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,D.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,D.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},pa=()=>{const e=R(),t=$(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=da(),s=(a,n)=>{t.addElement(a),e.setActiveElementIdList([a.id]),l.value&&e.setCreatingElement(null),setTimeout((()=>{e.setEditorareaFocus(!0)}),0),n&&n(),i()},u=e=>{aa(e).then((({width:t,height:l})=>{const a=l/t;a<n.value&&t>oa?(t=oa,l=t*a):l>oa*n.value&&(l=oa*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(oa-t)/2,top:(oa*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:ca[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[a.value.themeColor],gridColor:a.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}},l={..."bar"===e?{horizontalBars:!1,stackBars:!1}:{},..."horizontalBar"===e?{horizontalBars:!0,stackBars:!1}:{},..."line"===e?{showLine:!0,lineSmooth:!0,showArea:!1}:{},..."area"===e?{showLine:!0,lineSmooth:!0,showArea:!0}:{},..."scatter"===e?{showLine:!1,lineSmooth:!0,showArea:!1}:{},..."pie"===e?{donut:!1}:{},..."ring"===e?{donut:!0}:{}};s({...t,options:l})},d=(e,t)=>{const l={fontname:a.value.fontName,color:a.value.fontColor},o=[];for(let a=0;a<e;a++){const e=[];for(let a=0;a<t;a++)e.push({id:(0,r.x0)(10),colspan:1,rowspan:1,text:"",style:l});o.push(e)}const i=100,u=36,c=new Array(t).fill(1/t),d=t*i,p=e*u;s({type:"table",id:(0,r.x0)(10),width:d,height:p,colWidths:c,rotate:0,data:o,left:(oa-d)/2,top:(oa*n.value-p)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:a.value.themeColor,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},p=(e,t)=>{const{left:l,top:n,width:o,height:i}=e,u=t?.content||"",c=t?.vertical||!1,d=(0,r.x0)(10);s({type:"text",id:d,left:l,top:n,width:o,height:i,content:u,rotate:0,defaultFontName:a.value.fontName,defaultColor:a.value.fontColor,vertical:c},(()=>{setTimeout((()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()}),0)}))},v=(e,t,l={})=>{const{left:n,top:o,width:i,height:u}=e,c={type:"shape",id:(0,r.x0)(10),left:n,top:o,width:i,height:u,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0,...l};if(t.special&&(c.special=!0),t.pathFormula){c.pathFormula=t.pathFormula,c.viewBox=[i,u];const e=ra[t.pathFormula];"editable"in e?(c.path=e.formula(i,u,e.defaultValue),c.keypoint=e.defaultValue):c.path=e.formula(i,u)}s(c)},m=(e,t)=>{const{left:l,top:n,start:o,end:i}=e,u={type:"line",id:(0,r.x0)(10),left:l,top:n,start:o,end:i,points:t.points,color:a.value.themeColor,style:t.style,width:2};t.isBroken&&(u.broken=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCurve&&(u.curve=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCubic&&(u.cubic=[[(o[0]+i[0])/2,(o[1]+i[1])/2],[(o[0]+i[0])/2,(o[1]+i[1])/2]]),s(u)},h=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(oa-e.w)/2,top:(oa*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(oa-500)/2,top:(oa*n.value-300)/2,src:e,autoplay:!1})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(oa-50)/2,top:(oa*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:a.value.themeColor,src:e})};return{createImageElement:u,createChartElement:c,createTableElement:d,createTextElement:p,createShapeElement:v,createLineElement:m,createLatexElement:h,createVideoElement:f,createAudioElement:g}},va=()=>{const e=R(),t=$(),{currentSlide:l,slides:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=da(),s=a=>{const{groupIdMap:o,elIdMap:i}=Ie(a),s=a[0];let r,u=0;do{r=l.value.elements.find((e=>{if(e.type!==s.type)return!1;const{minX:t,maxX:l,minY:a,maxY:n}=xe(e),{minX:o,maxX:i,minY:r,maxY:c}=xe({...s,left:s.left+u,top:s.top+u});return t===o&&l===i&&a===r&&n===c})),r&&(u+=10)}while(r);for(const e of a)e.id=i[e.id],e.left=e.left+u,e.top=e.top+u,e.groupId&&(e.groupId=o[e.groupId]);t.addElement(a),e.setActiveElementIdList(Object.values(i)),n()},u=e=>{const l=_e(e),a=e.map((e=>{const{groupIdMap:t,elIdMap:a}=Ie(e.elements);for(const n of e.elements)n.id=a[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=(0,r.x0)(10),l.elId=a[l.elId];return{...e,id:l[e.id]}}));t.addSlide(a),n()},c=(0,i.Fl)((()=>!(a.value.length>1)&&!(a.value[0].elements.length>0)));return{addElementsFromData:s,addSlidesFromData:u,isEmptySlide:c}},ma=()=>{const{createTextElement:e}=pa(),{addElementsFromData:t,addSlidesFromData:l}=va(),a=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=n?.onlySlide||!1,i=n?.onlyElements||!1,s=fe(e);if("object"===typeof s){const{type:e,data:a}=s;"elements"!==e||o?"slides"!==e||i||l(a):t(a)}else if(!i&&!o){const e=la(s);a(e)}};return{pasteTextClipboardData:n}},ha=()=>{const e=R(),t=$(),{selectedSlidesIndex:l,activeElementIdList:a}=(0,o.Jk)(e),{currentSlide:n,slides:s,theme:u,slideIndex:c}=(0,o.Jk)(t),d=(0,i.Fl)((()=>[...l.value,c.value])),p=(0,i.Fl)((()=>s.value.filter(((e,t)=>d.value.includes(t))))),v=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:m}=ma(),{addSlidesFromData:h}=va(),{addHistorySnapshot:f}=da(),g=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},y=l=>{l===ne.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===ne.DOWN&&c.value<s.value.length-1&&(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value+1))},w=()=>{const t=pe(JSON.stringify({type:"slides",data:p.value}));me(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{he().then((e=>{m(e,{onlySlide:!0})})).catch((e=>ta.warning(e)))},k=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},b=l=>{const{groupIdMap:a,elIdMap:n}=Ie(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=a[e.groupId]);const o={...l,id:(0,r.x0)(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));h([e])},I=(l=v.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},S=()=>{const e=[...v.value];w(),I(e)},C=()=>{const t=Array.from(Array(s.value.length),((e,t)=>t));e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},L=(e,l)=>{if(l===e)return;const a=JSON.parse(JSON.stringify(s.value)),n=a[l];a.splice(l,1),a.splice(e,0,n),t.setSlides(a),t.updateSlideIndex(e)};return{resetSlides:g,updateSlideIndex:y,copySlide:w,pasteSlide:x,createSlide:k,createSlideByTemplate:b,copyAndPasteSlide:_,deleteSlide:I,cutSlide:S,selectAllSlide:C,sortSlides:L}},fa=()=>{const e=R(),t=$(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=da(),i=()=>{const o=JSON.parse(JSON.stringify(a.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},s=l=>{const o=JSON.parse(JSON.stringify(a.value.elements));if(l.groupId){const a=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,a.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(a)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:i,unlockElement:s}},ga=()=>{const e=R(),t=$(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=da(),s=()=>{if(!l.value.length)return;let o=[];o=a.value?n.value.elements.filter((e=>e.id!==a.value)):n.value.elements.filter((e=>!l.value.includes(e.id))),e.setActiveElementIdList([]),t.updateSlide({elements:o}),i()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())};return{deleteElement:s,deleteAllElements:r}},ya=()=>{const e=R(),t=$(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=da(),c=(0,i.Fl)((()=>{if(a.value.length<2)return!1;const e=a.value[0].groupId;if(!e)return!0;const t=a.value.every((t=>(t.groupId&&t.groupId)===e));return!t})),d=()=>{if(!a.value.length)return;let e=JSON.parse(JSON.stringify(s.value.elements));const n=(0,r.x0)(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const i=e.findIndex((e=>e.id===o[o.length-1].id)),c=o.map((e=>e.id));e=e.filter((e=>!c.includes(e.id)));const d=i-o.length+1;e.splice(d,0,...o),t.updateSlide({elements:e}),u()},p=()=>{if(!a.value.length)return;const o=a.value.some((e=>e.groupId));if(!o)return;const i=JSON.parse(JSON.stringify(s.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const r=n.value?[n.value]:[];e.setActiveElementIdList(r),u()};return{canCombine:c,combineElements:d,uncombineElements:p}},wa=()=>{const e=R(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=ma(),{deleteElement:n}=ga(),i=()=>{if(!t.value.length)return;const a=pe(JSON.stringify({type:"elements",data:l.value}));me(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{he().then((e=>{a(e)})).catch((e=>ta.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},xa=()=>{const e=R(),{currentSlide:t}=(0,o.Jk)($()),{hiddenElementIdList:l}=(0,o.Jk)(e),a=()=>{const a=t.value.elements.filter((e=>!e.lock&&!l.value.includes(e.id))),n=a.map((e=>e.id));e.setActiveElementIdList(n)};return{selectAllElement:a}},ka=()=>{const e=$(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case ne.LEFT:t-=i;break;case ne.RIGHT:t+=i;break;case ne.UP:l-=i;break;case ne.DOWN:l+=i;break;default:break}return{...e,left:t,top:l}};s=l.value?a.value.elements.map((e=>l.value===e.id?r(e):e)):a.value.elements.map((e=>t.value.includes(e.id)?r(e):e)),e.updateSlide({elements:s}),n()};return{moveElement:i}},ba=(l(541),()=>{const e=$(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=da(),a=(e,t)=>({minLevel:e.findIndex((e=>e.id===t[0].id)),maxLevel:e.findIndex((e=>e.id===t[t.length-1].id))}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return;const s=l[i+1],r=l.splice(o,n.length);if(s.groupId){const e=l.filter((e=>e.groupId===s.groupId));l.splice(o+e.length,0,...r)}else l.splice(o+1,0,...r)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return;const n=l[a+1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a+e.length,0,o)}else l.splice(a+1,0,o)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l[o-1],s=l.splice(o,n.length);if(i.groupId){const e=l.filter((e=>e.groupId===i.groupId));l.splice(o-e.length,0,...s)}else l.splice(o-1,0,...s)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;const n=l[a-1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a-e.length,0,o)}else l.splice(a-1,0,o)}return l},s=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return null;const s=l.splice(o,n.length);l.push(...s)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return null;l.splice(a,1),l.push(t)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l.splice(o,n.length);l.unshift(...i)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;l.splice(a,1),l.unshift(t)}return l},u=(a,o)=>{let u;o===Q.UP?u=n(t.value.elements,a):o===Q.DOWN?u=i(t.value.elements,a):o===Q.TOP?u=s(t.value.elements,a):o===Q.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const _a=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},Ia=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},Sa=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var Ca=()=>{const e=X(),t=$(),l=()=>{_a(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),Sa()&&Ia()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},La=()=>{const e=R(),{canvasPercentage:t,canvasScale:l,canvasDragged:a}=(0,o.Jk)(e),n=(0,i.Fl)((()=>Math.round(100*l.value)+"%")),s=l=>{let a=t.value;const n=5,o=200,i=30;"+"===l&&a<=o&&(a+=n),"-"===l&&a>=i&&(a-=n),e.setCanvasPercentage(a)},r=a=>{const n=Math.round(a/l.value*t.value)/100;e.setCanvasPercentage(n)},u=()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:r,scaleCanvas:s,resetCanvas:u}},Ta=()=>{const e=R(),t=q(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u,showSearchPanel:c}=(0,o.Jk)(e),{currentSlide:d}=(0,o.Jk)($()),{ctrlKeyState:p,shiftKeyState:v,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:h,copySlide:f,createSlide:g,deleteSlide:y,cutSlide:w,copyAndPasteSlide:x,selectAllSlide:k}=ha(),{combineElements:b,uncombineElements:_}=ya(),{deleteElement:I}=ga(),{lockElement:S}=fa(),{copyElement:C,cutElement:L,quickCopyElement:T}=wa(),{selectAllElement:E}=xa(),{moveElement:M}=ka(),{orderElement:U}=ba(),{redo:W,undo:D}=da(),{enterScreening:H,enterScreeningFromStart:F}=Ca(),{scaleCanvas:A,resetCanvas:Z}=La(),O=()=>{l.value.length?C():u.value&&f()},z=()=>{l.value.length?L():u.value&&w()},P=()=>{l.value.length?T():u.value&&x()},B=()=>{r.value&&E(),u.value&&k()},N=()=>{r.value&&S()},j=()=>{r.value&&b()},Y=()=>{r.value&&_()},V=()=>{l.value.length?I():u.value&&y()},J=e=>{l.value.length?M(e):e!==ne.UP&&e!==ne.DOWN||h(e)},X=e=>{e===ne.PAGEUP?h(ne.UP):e===ne.PAGEDOWN&&h(ne.DOWN)},G=e=>{n.value&&U(n.value,e)},K=()=>{u.value&&g()},ee=()=>{if(!d.value.elements.length)return;if(!s.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex((e=>e.id===s.value)),l=t>=d.value.elements.length-1?0:t+1,a=d.value.elements[l].id;e.setActiveElementIdList([a])},te=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,d=n||s,m=l.key.toUpperCase();if(d&&!p.value&&t.setCtrlKeyState(!0),o&&!v.value&&t.setShiftKeyState(!0),a.value||m!==ne.SPACE||t.setSpaceKeyState(!0),d&&m===ne.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===ne.F5)return l.preventDefault(),H(),void t.setShiftKeyState(!1);if(m===ne.F5)return l.preventDefault(),void F();if(n&&m===ne.F)return l.preventDefault(),void e.setSearchPanelState(!c.value);if(r.value||u.value){if(d&&m===ne.C){if(a.value)return;l.preventDefault(),O()}if(d&&m===ne.X){if(a.value)return;l.preventDefault(),z()}if(d&&m===ne.D){if(a.value)return;l.preventDefault(),P()}if(d&&m===ne.Z){if(a.value)return;l.preventDefault(),D()}if(d&&m===ne.Y){if(a.value)return;l.preventDefault(),W()}if(d&&m===ne.A){if(a.value)return;l.preventDefault(),B()}if(d&&m===ne.L){if(a.value)return;l.preventDefault(),N()}if(!o&&d&&m===ne.G){if(a.value)return;l.preventDefault(),j()}if(o&&d&&m===ne.G){if(a.value)return;l.preventDefault(),Y()}if(i&&m===ne.F){if(a.value)return;l.preventDefault(),G(Q.TOP)}if(i&&m===ne.B){if(a.value)return;l.preventDefault(),G(Q.BOTTOM)}if(m===ne.DELETE||m===ne.BACKSPACE){if(a.value)return;l.preventDefault(),V()}if(m===ne.UP){if(a.value)return;l.preventDefault(),J(ne.UP)}if(m===ne.DOWN){if(a.value)return;l.preventDefault(),J(ne.DOWN)}if(m===ne.LEFT){if(a.value)return;l.preventDefault(),J(ne.LEFT)}if(m===ne.RIGHT){if(a.value)return;l.preventDefault(),J(ne.RIGHT)}if(m===ne.PAGEUP){if(a.value)return;l.preventDefault(),X(ne.PAGEUP)}if(m===ne.PAGEDOWN){if(a.value)return;l.preventDefault(),X(ne.PAGEDOWN)}if(m===ne.ENTER){if(a.value)return;l.preventDefault(),K()}if(m===ne.MINUS){if(a.value)return;l.preventDefault(),A("-")}if(m===ne.EQUAL){if(a.value)return;l.preventDefault(),A("+")}if(m===ne.DIGIT_0){if(a.value)return;l.preventDefault(),Z()}if(m===ne.TAB){if(a.value)return;l.preventDefault(),ee()}}},le=()=>{p.value&&t.setCtrlKeyState(!1),v.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",te),document.addEventListener("keyup",le),window.addEventListener("blur",le)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",te),document.removeEventListener("keyup",le),window.removeEventListener("blur",le)}))},Ea=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)(R()),{pasteTextClipboardData:a}=ma(),{createImageElement:n}=pa(),s=e=>{na(e).then((e=>n(e)))},r=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,i=o[0];if(i){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&s(t))}"string"===i.kind&&"text/plain"===i.type&&i.getAsString((e=>a(e)))}};(0,i.bv)((()=>{document.addEventListener("paste",r)})),(0,i.Ah)((()=>{document.removeEventListener("paste",r)}))},Ma=l(7536),Ua=()=>{const e=$(),{theme:t}=(0,o.Jk)($()),{addSlidesFromData:l,isEmptySlide:a}=va(),n=(0,s.iH)(!1),i=(t,n=!1)=>{const o=t[0],i=new FileReader;i.addEventListener("load",(()=>{try{const t=JSON.parse(ve(i.result));n||a.value?e.setSlides(t):l(t)}catch{ta.error("无法正确读取 / 解析该文件")}})),i.readAsText(o)},u=e=>{let t=[0,0],l=[0,0];return e.isFlipV||e.isFlipH?e.isFlipV&&e.isFlipH?(t=[e.width,e.height],l=[0,0]):e.isFlipV&&!e.isFlipH?(t=[0,e.height],l=[e.width,0]):(t=[e.width,0],l=[0,e.height]):(t=[0,0],l=[e.width,e.height]),{type:"line",id:(0,r.x0)(10),width:e.borderWidth||1,left:e.left,top:e.top,start:t,end:l,style:"solid"===e.borderType?"solid":"dashed",color:e.borderColor,points:["","straightConnector1"===e.shapType?"arrow":""]}},c=o=>{const i=o[0];if(!i)return;n.value=!0;const s=[];for(const e of ua)s.push(...e.children);const c=new FileReader;c.onload=async o=>{const i=await(0,Ma.Q)(o.target.result,{slideFactor:75/914400,fontsizeFactor:100/98}),c=i.size.width,d=oa/c,p=[];for(const e of i.slides){const{type:l,value:a}=e.fill;let n;n="image"===l?{type:"image",image:a.picBase64,imageSize:"cover"}:"gradient"===l?{type:"gradient",gradientType:"linear",gradientColor:[a.colors[0].color,a.colors[a.colors.length-1].color],gradientRotate:a.rot}:{type:"solid",color:a};const o={id:(0,r.x0)(10),elements:[],background:n},i=e=>{for(const l of e)if(l.width=l.width*d,l.height=l.height*d,l.left=l.left*d,l.top=l.top*d,"text"===l.type){const e={type:"text",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,rotate:l.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:l.content,lineHeight:1,outline:{color:l.borderColor,width:l.borderWidth,style:"solid"===l.borderType?"solid":"dashed"},fill:l.fillColor,vertical:l.isVertical};l.shadow&&(e.shadow=l.shadow),o.elements.push(e)}else if("image"===l.type)o.elements.push({type:"image",id:(0,r.x0)(10),src:l.src,width:l.width,height:l.height,left:l.left,top:l.top,fixedRatio:!0,rotate:l.rotate});else if("audio"===l.type)o.elements.push({type:"audio",id:(0,r.x0)(10),src:l.blob,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,fixedRatio:!1,color:t.value.themeColor,loop:!1,autoplay:!1});else if("video"===l.type)o.elements.push({type:"video",id:(0,r.x0)(10),src:l.blob||l.src,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,autoplay:!1});else if("shape"===l.type)if("line"===l.shapType||/Connector/.test(l.shapType)){const e=u(l);o.elements.push(e)}else{const e=s.find((e=>e.pptxShapeType===l.shapType)),a={mid:"middle",down:"bottom",up:"top"},n={type:"shape",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:l.fillColor||"none",fixedRatio:!1,rotate:l.rotate,outline:{color:l.borderColor,width:l.borderWidth,style:"solid"===l.borderType?"solid":"dashed"},text:{content:l.content,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:a[l.vAlign]||"middle"},flipH:l.isFlipH,flipV:l.isFlipV};if(l.shadow&&(n.shadow=l.shadow),e&&(n.path=e.path,n.viewBox=e.viewBox,e.pathFormula)){n.pathFormula=e.pathFormula,n.viewBox=[l.width,l.height];const t=ra[e.pathFormula];"editable"in t?(n.path=t.formula(l.width,l.height,t.defaultValue),n.keypoint=t.defaultValue):n.path=t.formula(l.width,l.height)}"custom"===l.shapType&&(n.special=!0,n.path=l.path,n.viewBox=[l.width,l.height]),o.elements.push(n)}else if("table"===l.type){const e=l.data.length,a=l.data[0].length,n={fontname:t.value.fontName,color:t.value.fontColor},i=[];for(let t=0;t<e;t++){const e=[];for(let o=0;o<a;o++){const a=l.data[t][o];e.push({id:(0,r.x0)(10),colspan:a.colSpan||1,rowspan:a.rowSpan||1,text:a.text,style:n})}i.push(e)}const s=new Array(a).fill(1/a);o.elements.push({type:"table",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,colWidths:s,rotate:0,data:i,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:l.themeColor,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})}else if("chart"===l.type){let e,a,n;if("scatterChart"===l.chartType||"bubbleChart"===l.chartType){const t=l.data;e=t[0].map((e=>e+"")),a=["系列1"],n=[t[1]]}else{const t=l.data;e=Object.values(t[0].xlabels),a=t.map((e=>e.key)),n=t.map((e=>e.values.map((e=>e.y))))}const i={};let s="bar";switch(l.chartType){case"barChart":case"bar3DChart":s="bar","bar"===l.barDir&&(i.horizontalBars=!0),"stacked"!==l.grouping&&"percentStacked"!==l.grouping||(i.stackBars=!0);break;case"lineChart":case"line3DChart":case"areaChart":case"area3DChart":case"scatterChart":case"bubbleChart":s="line","areaChart"!==l.chartType&&"area3DChart"!==l.chartType||(i.showArea=!0),"scatterChart"!==l.chartType&&"bubbleChart"!==l.chartType||(i.showLine=!1);break;case"pieChart":case"pie3DChart":case"doughnutChart":s="pie","doughnutChart"===l.chartType&&(i.donut=!0);break;default:}o.elements.push({type:"chart",id:(0,r.x0)(10),chartType:s,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,themeColor:[t.value.themeColor],gridColor:t.value.fontColor,data:{labels:e,legends:a,series:n},options:i})}else if("group"===l.type||"diagram"===l.type){const e=l.elements.map((e=>({...e,left:e.left+l.left,top:e.top+l.top})));i(e)}};i(e.elements),p.push(o)}a.value?e.setSlides(p):l(p),n.value=!1},c.readAsArrayBuffer(i)};return{importSpecificFile:i,importPPTXFile:c,exporting:n}};const Wa={class:"hotkey-doc"},Da={class:"title"},Ha={class:"label"},Fa={class:"value"};var Aa=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Wa,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ie),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",Da,(0,oe.zw)(e.type),1),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"hotkey-item",key:e.label},[(0,i._)("div",Ha,(0,oe.zw)(e.label),1),(0,i._)("div",Fa,(0,oe.zw)(e.value),1)])))),128))],64)))),128))]))}});const $a=(0,Vl.Z)(Aa,[["__scopeId","data-v-a0322054"]]);var Za=$a;const Oa=["accept"];var Ra=(0,i.aZ)({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=t,a=(0,s.iH)(),n=()=>{a.value&&(a.value.value="",a.value.click())},o=e=>{const t=e.target.files;t&&l("change",t)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:t[1]||(t[1]=e=>n())},[(0,i.WI)(e.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:a,accept:e.accept,onChange:t[0]||(t[0]=e=>o(e))},null,40,Oa)]))}});const za=(0,Vl.Z)(Ra,[["__scopeId","data-v-64bedb34"]]);var Pa=za;const Ba=e=>((0,i.dD)("data-v-a5c6b41c"),e=e(),(0,i.Cn)(),e),Na={key:0,class:"fullscreen-spin"},ja={class:"spin"},Ya=Ba((()=>(0,i._)("div",{class:"spinner"},null,-1))),Va={class:"text"};var Ja=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(e,t)=>e.loading?((0,i.wg)(),(0,i.iD)("div",Na,[(0,i._)("div",ja,[Ya,(0,i._)("div",Va,(0,oe.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const qa=(0,Vl.Z)(Ja,[["__scopeId","data-v-a5c6b41c"]]);var Xa=qa;const Ga={class:"header"};var Ka=(0,i.aZ)({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)(!1),r=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));return(e,t)=>{const s=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:`drawer-slide-${e.placement}`,onAfterLeave:t[1]||(t[1]=e=>o.value=!1),onBeforeEnter:t[2]||(t[2]=e=>o.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:(0,oe.C_)(["drawer",e.placement]),style:(0,oe.j5)({width:l.width+"px"})},[(0,i._)("div",Ga,[(0,i.WI)(e.$slots,"title"),(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>a("update:visible",!1))},[(0,i.Wm)(s)])]),o.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"content",style:(0,oe.j5)(r.value)},[(0,i.WI)(e.$slots,"default")],4)):(0,i.kq)("",!0)],6),[[n.F8,e.visible]])])),_:3},8,["name"])])}}});const Qa=(0,Vl.Z)(Ka,[["__scopeId","data-v-749dadac"]]);var en=Qa;const tn={class:"prefix"},ln=["disabled","value","placeholder"],an={class:"suffix"};var nn=(0,i.aZ)({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{expose:t,emit:l}){const a=l,o=(0,s.iH)(!1),r=e=>{a("update:value",e.target.value)},u=e=>{o.value=!1,a("blur",e)},c=e=>{o.value=!0,a("focus",e)},d=(0,s.iH)(),p=()=>{d.value&&d.value.focus()};return t({focus:p}),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["input",{disabled:e.disabled,focused:o.value}])},[(0,i._)("span",tn,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("input",{type:"text",ref_key:"inputRef",ref:d,disabled:e.disabled,value:e.value,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>r(e)),onFocus:t[1]||(t[1]=e=>c(e)),onBlur:t[2]||(t[2]=e=>u(e)),onChange:t[3]||(t[3]=e=>a("change",e)),onKeydown:t[4]||(t[4]=(0,n.D2)((e=>a("enter",e)),["enter"]))},null,40,ln),(0,i._)("span",an,[(0,i.WI)(e.$slots,"suffix")])],2))}});const on=(0,Vl.Z)(nn,[["__scopeId","data-v-a97ba0dc"]]);var sn=on,rn=l(6488),un=(l(8627),(0,i.aZ)({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(!1),c=(0,i.Fl)((()=>l.contentStyle||{}));return(0,i.YP)((()=>l.value),(()=>{n.value&&(l.value?n.value.show():n.value.hide())})),(0,i.bv)((()=>{n.value=(0,rn.ZP)(o.value,{content:r.value,allowHTML:!0,trigger:l.trigger,placement:l.placement,interactive:!0,appendTo:l.appendTo||document.body,maxWidth:"none",offset:[0,8],duration:200,animation:"scale",theme:"popover",onShow(){u.value=!0},onShown(){l.value||a("update:value",!0)},onHidden(){l.value&&a("update:value",!1),u.value=!1}})})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["popover",{center:e.center}]),ref_key:"triggerRef",ref:o},[(0,i._)("div",{class:"popover-content",style:(0,oe.j5)(c.value),ref_key:"contentRef",ref:r},[u.value?(0,i.WI)(e.$slots,"content",{key:0}):(0,i.kq)("",!0)],4),(0,i.WI)(e.$slots,"default")],2))}}));const cn=(0,Vl.Z)(un,[["__scopeId","data-v-70fabe9a"]]);var dn=cn,pn=(0,i.aZ)({__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=t;return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["popover-menu-item",{center:e.center}]),onClick:t[0]||(t[0]=e=>l("click"))},[(0,i.WI)(e.$slots,"default")],2))}});const vn=(0,Vl.Z)(pn,[["__scopeId","data-v-2f137c4f"]]);var mn=vn;const hn={class:"editor-header"},fn={class:"left"},gn={class:"menu-item"},yn={class:"title"},wn=["title"],xn={class:"right"},kn={class:"group-menu-item"},bn={class:"arrow-btn"},_n={class:"github-link",href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},In={class:"menu-item"};var Sn=(0,i.aZ)({__name:"index",setup(e){const t=R(),l=$(),{title:a}=(0,o.Jk)(l),{enterScreening:n,enterScreeningFromStart:r}=Ca(),{importSpecificFile:u,importPPTXFile:c,exporting:d}=Ua(),{resetSlides:p}=ha(),v=(0,s.iH)(!1),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(),g=(0,s.iH)(""),y=()=>{g.value=a.value,h.value=!0,(0,i.Y3)((()=>f.value?.focus()))},w=()=>{l.setTitle(g.value),h.value=!1},x=e=>{window.open(e),v.value=!1},k=e=>{t.setDialogForExport(e),v.value=!1};return(e,t)=>{const l=(0,i.up)("IconHamburgerButton"),o=(0,i.up)("IconPpt"),b=(0,i.up)("IconDown"),_=(0,i.up)("IconDownload"),I=(0,i.up)("IconGithub"),S=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",hn,[(0,i._)("div",fn,[(0,i.Wm)(dn,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":t[7]||(t[7]=e=>v.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Pa,{accept:".pptist",onChange:t[0]||(t[0]=e=>{(0,s.SU)(u)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(mn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)(Pa,{accept:"application/vnd.openxmlformats-officedocument.presentationml.presentation",onChange:t[1]||(t[1]=e=>{(0,s.SU)(c)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(mn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptx 文件(测试版)")])),_:1})])),_:1}),(0,i.Wm)(mn,{onClick:t[2]||(t[2]=e=>k("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1}),(0,i.Wm)(mn,{onClick:t[3]||(t[3]=e=>{(0,s.SU)(p)(),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)(mn,{onClick:t[4]||(t[4]=e=>x("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)(mn,{onClick:t[5]||(t[5]=e=>x("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)(mn,{onClick:t[6]||(t[6]=e=>{v.value=!1,m.value=!0})},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",gn,[(0,i.Wm)(l,{class:"icon"})])])),_:1},8,["value"]),(0,i._)("div",yn,[h.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"title-input",ref_key:"titleInputRef",ref:f,value:g.value,"onUpdate:value":t[8]||(t[8]=e=>g.value=e),onBlur:t[9]||(t[9]=e=>w())},null,8,["value"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"title-text",onClick:t[10]||(t[10]=e=>y()),title:(0,s.SU)(a)},(0,oe.zw)((0,s.SU)(a)),9,wn))])]),(0,i._)("div",xn,[(0,i._)("div",kn,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[11]||(t[11]=e=>(0,s.SU)(n)())},[(0,i.Wm)(o,{class:"icon"})])),[[S,"幻灯片放映"]]),(0,i.Wm)(dn,{trigger:"click",center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:t[12]||(t[12]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)(mn,{onClick:t[13]||(t[13]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",bn,[(0,i.Wm)(b,{class:"arrow"})])])),_:1})]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[14]||(t[14]=e=>k("pptx"))},[(0,i.Wm)(_,{class:"icon"})])),[[S,"导出"]]),(0,i._)("a",_n,[(0,i._)("div",In,[(0,i.Wm)(I,{class:"icon"})])])]),(0,i.Wm)(en,{width:320,visible:m.value,"onUpdate:visible":t[15]||(t[15]=e=>m.value=e),placement:"right"},{default:(0,i.w5)((()=>[(0,i.Wm)(Za)])),_:1},8,["visible"]),(0,i.Wm)(Xa,{loading:(0,s.SU)(d),tip:"正在导入..."},null,8,["loading"])])}}});const Cn=(0,Vl.Z)(Sn,[["__scopeId","data-v-0b9f8c7b"]]);var Ln=Cn;const Tn=Symbol(),En=Symbol(),Mn=Symbol(),Un=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Wn=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=R(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)($()),c=()=>{if(!e.value)return;const o=e.value.clientWidth,i=e.value.clientHeight;if(i/o>u.value){const e=o*(n.value/100);a.setCanvasScale(e/oa),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(oa*u.value)),t.value=(o-e/u.value)/2,l.value=(i-e)/2}},d=(n,o)=>{if(!e.value)return;const i=e.value.clientWidth,s=e.value.clientHeight,r=i*(n/100),c=i*(o/100),d=s*(n/100),p=s*(o/100);s/i>u.value?a.setCanvasScale(r/oa):a.setCanvasScale(d/(oa*u.value)),t.value=t.value-(r-c)/2,l.value=l.value-(d-p)/2};(0,i.YP)(n,d),(0,i.YP)(u,c),(0,i.YP)(r,(()=>{r.value||c()}));const p=(0,i.Fl)((()=>({width:oa,height:oa*u.value,left:t.value,top:l.value}))),v=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&v.observe(e.value)})),(0,i.Ah)((()=>{e.value&&v.unobserve(e.value)}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY,s=t.value,r=l.value;document.onmousemove=e=>{if(!n)return;const a=e.pageX,u=e.pageY;t.value=s+(a-o),l.value=r+(u-i)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,a.setCanvasDragged(!0)}};return{viewportStyles:p,dragViewport:m}},Dn=(e,t)=>{const l=R(),{canvasScale:a,hiddenElementIdList:n}=(0,o.Jk)(l),i=(0,s.iH)(!1),r=(0,s.iH)(1),u=(0,s.iH)({top:0,left:0,width:0,height:0}),c=o=>{if(!t.value)return;let s=!0;const c=t.value.getBoundingClientRect(),d=5,p=o.pageX,v=o.pageY,m=(p-c.x)/a.value,h=(v-c.y)/a.value;u.value={top:h,left:m,width:0,height:0},i.value=!1,r.value=4,document.onmousemove=e=>{if(!s)return;const t=e.pageX,l=e.pageY,n=(t-p)/a.value,o=(l-v)/a.value,c=Math.abs(n),m=Math.abs(o);if(c<d||m<d)return;let h=0;n>0&&o>0?h=4:n<0&&o<0?h=2:n>0&&o<0?h=1:n<0&&o>0&&(h=3),u.value={...u.value,width:c,height:m},i.value=!0,r.value=h},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,s=!1;let t=[];for(let l=0;l<e.value.length;l++){const a=e.value[l],o=u.value.left,i=u.value.top,s=u.value.width,c=u.value.height,{minX:d,maxX:p,minY:v,maxY:m}=xe(a);let h=!1;4===r.value?h=d>o&&p<o+s&&v>i&&m<i+c:2===r.value?h=d>o-s&&p<o-s+s&&v>i-c&&m<i-c+c:1===r.value?h=d>o&&p<o+s&&v>i-c&&m<i-c+c:3===r.value&&(h=d>o-s&&p<o-s+s&&v>i&&m<i+c),!h||a.lock||n.value.includes(a.id)||t.push(a)}t=t.filter((l=>{if(l.groupId){const a=t.map((e=>e.id)),n=e.value.filter((e=>e.groupId===l.groupId));return n.every((e=>a.includes(e.id)))}return!0}));const a=t.map((e=>e.id));l.setActiveElementIdList(a),i.value=!1}};return{mouseSelection:u,mouseSelectionVisible:i,mouseSelectionQuadrant:r,updateMouseSelection:c}},Hn=e=>{const{disableHotkeys:t}=(0,o.Jk)(R()),{createImageElement:l,createTextElement:a}=pa(),n=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&na(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=la(e);a({left:0,top:0,width:600,height:50},{content:l})}))};(0,i.bv)((()=>{e.value&&e.value.addEventListener("drop",n),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()})),(0,i.Ah)((()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))};const Fn=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var An=(e,t,l)=>{const a=$(),{addHistorySnapshot:n}=da(),o=(o,i)=>{const s=!(o instanceof MouseEvent);if(s&&(!o.changedTouches||!o.changedTouches[0]))return;let r=!0,u=0;const c=i.rotate||0,d=i.left,p=i.top,v=i.width,m=i.height,h=d+v/2,f=p+m/2;if(!t.value)return;const g=t.value.getBoundingClientRect(),y=t=>{if(!r)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=(a-g.left)/l.value,s=(n-g.top)/l.value,c=o-h,d=f-s;u=Fn(c,d);const p=5;Math.abs(u)<=p?u=0:u>0&&Math.abs(u-45)<=p?u-=u-45:u<0&&Math.abs(u+45)<=p?u-=u+45:u>0&&Math.abs(u-90)<=p?u-=u-90:u<0&&Math.abs(u+90)<=p?u-=u+90:u>0&&Math.abs(u-135)<=p?u-=u-135:u<0&&Math.abs(u+135)<=p?u-=u+135:u>0&&Math.abs(u-180)<=p?u-=u-180:u<0&&Math.abs(u+180)<=p&&(u-=u+180),e.value=e.value.map((e=>i.id===e.id?{...e,rotate:u}:e))},w=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&(a.updateSlide({elements:e.value}),n())};s?(document.ontouchmove=y,document.ontouchend=w):(document.onmousemove=y,document.onmouseup=w)};return{rotateElement:o}};const $n={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Zn={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},On=(e,t)=>{const{left:l,top:a,width:n,height:o}=e,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,s=180*Math.atan(o/n)/Math.PI,r=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,c=(90-t)*Math.PI/180,d=t*Math.PI/180,p=n/2,v=o/2,m=l+p,h=a+v,f={left:m+i*Math.cos(r),top:h-i*Math.sin(r)},g={left:m+v*Math.cos(c),top:h-v*Math.sin(c)},y={left:m+i*Math.cos(u),top:h-i*Math.sin(u)},w={left:m+p*Math.cos(d),top:h+p*Math.sin(d)},x={left:m-i*Math.cos(r),top:h+i*Math.sin(r)},k={left:m-v*Math.sin(d),top:h+v*Math.cos(d)},b={left:m-i*Math.cos(u),top:h+i*Math.sin(u)},_={left:m-p*Math.cos(d),top:h-p*Math.sin(d)};return{leftTopPoint:f,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:k,leftBottomPoint:b,leftPoint:_}},Rn=(e,t)=>{const l={[le.RIGHT_BOTTOM]:t.leftTopPoint,[le.LEFT_BOTTOM]:t.rightTopPoint,[le.LEFT_TOP]:t.rightBottomPoint,[le.RIGHT_TOP]:t.leftBottomPoint,[le.TOP]:t.bottomPoint,[le.BOTTOM]:t.topPoint,[le.LEFT]:t.rightPoint,[le.RIGHT]:t.leftPoint};return l[e]};var zn,Pn,Bn=(e,t,l)=>{const a=R(),n=$(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),{addHistorySnapshot:c}=da(),d=(o,d,p)=>{const v=!(o instanceof MouseEvent);if(v&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;a.setScalingState(!0);const h=d.left,f=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,k=Math.PI*x/180,b=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,I=v?o.changedTouches[0].pageX:o.pageX,S=v?o.changedTouches[0].pageY:o.pageY,C=Zn[d.type]||20,L=e=>e<C?C:e,T=e=>{const t=C/_;return e<t?t:e};let E,M=0,U=0,W=[],D=[];if("rotate"in d&&d.rotate){const{left:e,top:t,width:l,height:a}=d;E=On({left:e,top:t,width:l,height:a},x);const n=Rn(p,E);M=n.left,U=n.top}else{const t=oa,l=oa*r.value,a=d.id===s.value;for(const s of e.value){if("rotate"in s&&s.rotate)continue;if("line"===s.type)continue;if(a&&s.id===d.id)continue;if(!a&&i.value.includes(s.id))continue;const e=s.left,t=s.top,l=s.width,n=s.height,o=e+l,r=t+n,u={value:t,range:[e,o]},c={value:r,range:[e,o]},p={value:e,range:[t,r]},v={value:o,range:[t,r]};W.push(u,c),D.push(p,v)}const n={value:0,range:[0,t]},o={value:l,range:[0,t]},u={value:l/2,range:[0,t]},c={value:0,range:[0,l]},p={value:t,range:[0,l]},v={value:t/2,range:[0,l]};W.push(n,o,u),D.push(c,p,v),W=be(W),D=be(D)}const H=(e,l)=>{const a=5,n=[];let o=!1,i=!1;const s={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t<W.length;t++){const{value:o,range:r}=W[t],u=Math.min(...r,e||0),c=Math.max(...r,e||0);Math.abs(l-o)<a&&!i&&(s.offsetY=l-o,i=!0,n.push({type:"horizontal",axis:{x:u-50,y:o},length:c-u+100}))}if(e||0===e)for(let t=0;t<D.length;t++){const{value:i,range:r}=D[t],u=Math.min(...r,l||0),c=Math.max(...r,l||0);Math.abs(e-i)<a&&!o&&(s.offsetX=e-i,o=!0,n.push({type:"vertical",axis:{x:i,y:u-50},length:c-u+100}))}return t.value=n,s},F=t=>{if(!m)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-I,i=n-S;let s=g,r=y,u=h,c=f;if(x){const e=(Math.cos(k)*o+Math.sin(k)*i)/l.value;let t=(Math.cos(k)*i-Math.sin(k)*o)/l.value;b&&(p!==le.RIGHT_BOTTOM&&p!==le.LEFT_TOP||(t=e/_),p!==le.LEFT_BOTTOM&&p!==le.RIGHT_TOP||(t=-e/_)),p===le.RIGHT_BOTTOM?(s=L(g+e),r=T(y+t)):p===le.LEFT_BOTTOM?(s=L(g-e),r=T(y+t),u=h-(s-g)):p===le.LEFT_TOP?(s=L(g-e),r=T(y-t),u=h-(s-g),c=f-(r-y)):p===le.RIGHT_TOP?(s=L(g+e),r=T(y-t),c=f-(r-y)):p===le.TOP?(r=L(y-t),c=f-(r-y)):p===le.BOTTOM?r=L(y+t):p===le.LEFT?(s=L(g-e),u=h-(s-g)):p===le.RIGHT&&(s=L(g+e));const a=On({width:s,height:r,left:u,top:c},x),n=Rn(p,a),d=n.left,v=n.top,m=d-M,w=v-U;u-=m,c-=w}else{let e=o/l.value,t=i/l.value;if(b&&(p!==le.RIGHT_BOTTOM&&p!==le.LEFT_TOP||(t=e/_),p!==le.LEFT_BOTTOM&&p!==le.RIGHT_TOP||(t=-e/_)),p===le.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=H(h+g+e,f+y+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g+e),r=T(y+t)}else if(p===le.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=H(h+e,f+y+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g-e),r=T(y+t),u=h-(s-g)}else if(p===le.LEFT_TOP){const{offsetX:l,offsetY:a}=H(h+e,f+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g-e),r=T(y-t),u=h-(s-g),c=f-(r-y)}else if(p===le.RIGHT_TOP){const{offsetX:l,offsetY:a}=H(h+g+e,f+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g+e),r=T(y-t),c=f-(r-y)}else if(p===le.LEFT){const{offsetX:t}=H(h+e,null);e-=t,s=L(g-e),u=h-(s-g)}else if(p===le.RIGHT){const{offsetX:t}=H(h+g+e,null);e-=t,s=L(g+e)}else if(p===le.TOP){const{offsetY:e}=H(null,f+t);t-=e,r=L(y-t),c=f-(r-y)}else if(p===le.BOTTOM){const{offsetY:e}=H(null,f+y+t);t-=e,r=L(y+t)}}e.value=e.value.map((e=>{if(d.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=ra[e.pathFormula];let l="";return l="editable"in t?t.formula(s,r,e.keypoint):t.formula(s,r),{...e,left:u,top:c,width:s,height:r,viewBox:[s,r],path:l}}if("table"===e.type){let t=w+(r-y)/e.data.length;return t=t<36?36:t,t===w?{...e,left:u,width:s}:{...e,left:u,top:c,width:s,height:r,cellMinHeight:t<36?36:t}}return{...e,left:u,top:c,width:s,height:r}}))},A=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,i=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;I===o&&S===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};v?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:v}=a,m=d-r,h=v-p,f=m/h,g=t.pageX,y=t.pageY,w=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,c=(a-g)/l.value;let x=(n-y)/l.value;u.value&&(o!==le.RIGHT_BOTTOM&&o!==le.LEFT_TOP||(x=c/f),o!==le.LEFT_BOTTOM&&o!==le.RIGHT_TOP||(x=-c/f));let k=r,b=d,_=p,I=v;o===le.RIGHT_BOTTOM?(b=d+c,I=v+x):o===le.LEFT_BOTTOM?(k=r+c,I=v+x):o===le.LEFT_TOP?(k=r+c,_=p+x):o===le.RIGHT_TOP?(b=d+c,_=p+x):o===le.TOP?_=p+x:o===le.BOTTOM?I=v+x:o===le.LEFT?k=r+c:o===le.RIGHT&&(b=d+c);const S=b-k,C=I-_;let L=S/m,T=C/h;L<=0&&(L=0),T<=0&&(T=0),e.value=e.value.map((e=>{if(("image"===e.type||"shape"===e.type)&&i.value.includes(e.id)){const t=w.find((t=>t.id===e.id));return{...e,width:t.width*L,height:t.height*T,left:k+(t.left-r)*L,top:_+(t.top-p)*T}}return e}))},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,g===t.pageX&&y===t.pageY||(n.updateSlide({elements:e.value}),c())}};return{scaleElement:d,scaleMultiElement:p}},Nn=(e,t)=>{const l=R(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(q()),u=(o,u,c=!0)=>{if(s.value||l.setEditorareaFocus(!0),a.value.includes(u.id)){if(r.value){let t=[];if(u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=a.value.filter((e=>!l.includes(e)))}else t=a.value.filter((e=>e!==u.id));t.length>0&&l.setActiveElementIdList(t)}else if(i.value!==u.id)l.setHandleElementId(u.id);else if(n.value!==u.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=a=>{const n=a.pageX,o=a.pageY;e===n&&t===o&&(l.setActiveGroupElementId(u.id),a.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...a.value,u.id]:[u.id],u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=[...t,...l]}l.setActiveElementIdList((0,D.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},jn=(e,t,l)=>{const a=$(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)(R()),{shiftKeyState:s}=(0,o.Jk)(q()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=da(),c=(o,c)=>{const d=!(o instanceof MouseEvent);if(d&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(c.id))return;let p=!0;const v=oa,m=oa*r.value,h=5,f=JSON.parse(JSON.stringify(e.value)),g=f.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,k="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,I=d?o.changedTouches[0].pageY:o.pageY;let S=null;const C=c.id===i.value;let L=[],T=[];for(const t of e.value){if("line"===t.type)continue;if(C&&t.id===c.id)continue;if(!C&&n.value.includes(t.id))continue;let e,l,a,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:i}=ye({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=i[0],a=n[1]-n[0],o=i[1]-i[0]}else e=t.left,l=t.top,a=t.width,o=t.height;const i=e+a,s=l+o,r=l+o/2,u=e+a/2,d={value:l,range:[e,i]},p={value:s,range:[e,i]},v={value:r,range:[e,i]},m={value:e,range:[l,s]},h={value:i,range:[l,s]},f={value:u,range:[l,s]};L.push(d,p,v),T.push(m,h,f)}const E={value:0,range:[0,v]},M={value:m,range:[0,v]},U={value:m/2,range:[0,v]},W={value:0,range:[0,m]},D={value:v,range:[0,m]},H={value:v/2,range:[0,m]};L.push(E,M,U),T.push(W,D,H),L=be(L),T=be(T);const F=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==S&&(S=Math.abs(_-o)<h&&Math.abs(I-i)<h),!p||S)return;let r=(o-_)/l.value,u=(i-I)/l.value;s.value&&(Math.abs(r)>Math.abs(u)&&(u=0),Math.abs(r)<Math.abs(u)&&(r=0));let d,v,m,f,E=y+r,M=w+u;if(1===n.value.length||C)if(b){const{xRange:e,yRange:t}=ye({left:E,top:M,width:x,height:k,rotate:b});d=e[0],v=e[1],m=t[0],f=t[1]}else"line"===c.type?(d=E,v=E+Math.max(c.start[0],c.end[0]),m=M,f=M+Math.max(c.start[1],c.end[1])):(d=E,v=E+x,m=M,f=M+k);else{const e=[],t=[],l=[],a=[];for(let n=0;n<g.length;n++){const o=g[n],i=o.left+r,s=o.top+u,c=o.width,d="height"in o&&o.height?o.height:0,p="rotate"in o&&o.rotate?o.rotate:0;if("rotate"in o&&o.rotate){const{xRange:n,yRange:o}=ye({left:i,top:s,width:c,height:d,rotate:p});e.push(n[0]),t.push(o[0]),l.push(n[1]),a.push(o[1])}else"line"===o.type?(e.push(i),t.push(s),l.push(i+Math.max(o.start[0],o.end[0])),a.push(s+Math.max(o.start[1],o.end[1]))):(e.push(i),t.push(s),l.push(i+c),a.push(s+d))}d=Math.min(...e),v=Math.max(...l),m=Math.min(...t),f=Math.max(...a)}const U=d+(v-d)/2,W=m+(f-m)/2,D=[];let H=!1,F=!1;for(let e=0;e<L.length;e++){const{value:t,range:l}=L[e],a=Math.min(...l,d,v),n=Math.max(...l,d,v);Math.abs(m-t)<h&&!F&&(M-=m-t,F=!0,D.push({type:"horizontal",axis:{x:a-50,y:t},length:n-a+100})),Math.abs(f-t)<h&&!F&&(M-=f-t,F=!0,D.push({type:"horizontal",axis:{x:a-50,y:t},length:n-a+100})),Math.abs(W-t)<h&&!F&&(M-=W-t,F=!0,D.push({type:"horizontal",axis:{x:a-50,y:t},length:n-a+100}))}for(let e=0;e<T.length;e++){const{value:t,range:l}=T[e],a=Math.min(...l,m,f),n=Math.max(...l,m,f);Math.abs(d-t)<h&&!H&&(E-=d-t,H=!0,D.push({type:"vertical",axis:{x:t,y:a-50},length:n-a+100})),Math.abs(v-t)<h&&!H&&(E-=v-t,H=!0,D.push({type:"vertical",axis:{x:t,y:a-50},length:n-a+100})),Math.abs(U-t)<h&&!H&&(E-=U-t,H=!0,D.push({type:"vertical",axis:{x:t,y:a-50},length:n-a+100}))}if(t.value=D,1===n.value.length||C)e.value=e.value.map((e=>e.id===c.id?{...e,left:E,top:M}:e));else{const t=e.value.find((e=>e.id===c.id));if(!t)return;e.value=e.value.map((e=>n.value.includes(e.id)?e.id===c.id?{...e,left:E,top:M}:{...e,left:e.left+(E-t.left),top:e.top+(M-t.top)}:e))}},A=l=>{p=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;_===n&&I===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)};return{dragElement:c}},Yn=e=>{const t=$(),{canvasScale:l}=(0,o.Jk)(R()),{ctrlOrShiftKeyActive:a}=(0,o.Jk)(q()),{addHistorySnapshot:n}=da(),i=(o,i,s)=>{let r=!0;const u=8,c=o.pageX,d=o.pageY,p=[];for(let t=0;t<e.value.length;t++){const l=e.value[t];if("line"===l.type||l.rotate)continue;const a=l.left,n=l.top,o=l.width,i=l.height,s=a+o,r=n+i,u=n+i/2,c=a+o/2,d={x:c,y:n},v={x:c,y:r},m={x:a,y:u},h={x:s,y:u},f={x:a,y:n},g={x:s,y:n},y={x:a,y:r},w={x:s,y:r};p.push(d,v,m,h,f,g,y,w)}document.onmousemove=t=>{if(!r)return;const n=t.pageX,o=t.pageY,v=(n-c)/l.value,m=(o-d)/l.value;let h=i.left+i.start[0],f=i.top+i.start[1],g=i.left+i.end[0],y=i.top+i.end[1];const w=i.broken||i.curve||[0,0];let x=i.left+w[0],k=i.top+w[1];const[b,_]=i.cubic||[[0,0],[0,0]];let I=i.left+b[0],S=i.top+b[1],C=i.left+_[0],L=i.top+_[1];if(s===ae.START){h+=v,f+=m,Math.abs(h-g)<u&&(h=g),Math.abs(f-y)<u&&(f=y);for(const e of p){const{x:t,y:l}=e;if(Math.abs(t-h)<u&&Math.abs(l-f)<u){h=t,f=l;break}}}else if(s===ae.END){g+=v,y+=m,Math.abs(h-g)<u&&(g=h),Math.abs(f-y)<u&&(y=f);for(const e of p){const{x:t,y:l}=e;if(Math.abs(t-g)<u&&Math.abs(l-y)<u){g=t,y=l;break}}}else s===ae.C?(x+=v,k+=m,Math.abs(x-h)<u&&(x=h),Math.abs(k-f)<u&&(k=f),Math.abs(x-g)<u&&(x=g),Math.abs(k-y)<u&&(k=y),Math.abs(x-(h+g)/2)<u&&Math.abs(k-(f+y)/2)<u&&(x=(h+g)/2,k=(f+y)/2)):s===ae.C1?(I+=v,S+=m,Math.abs(I-h)<u&&(I=h),Math.abs(S-f)<u&&(S=f),Math.abs(I-g)<u&&(I=g),Math.abs(S-y)<u&&(S=y)):s===ae.C2&&(C+=v,L+=m,Math.abs(C-h)<u&&(C=h),Math.abs(L-f)<u&&(L=f),Math.abs(C-g)<u&&(C=g),Math.abs(L-y)<u&&(L=y));const T=Math.min(h,g),E=Math.min(f,y),M=Math.max(h,g),U=Math.max(f,y),W=[0,0],D=[M-T,U-E];h>g&&(W[0]=M-T,D[0]=0),f>y&&(W[1]=U-E,D[1]=0),e.value=e.value.map((e=>{if(e.id===i.id){const t={...e,left:T,top:E,start:W,end:D};return s===ae.START||s===ae.END?a.value?(i.broken&&(t.broken=[x-T,k-E]),i.curve&&(t.curve=[x-T,k-E]),i.cubic&&(t.cubic=[[I-T,S-E],[C-T,L-E]])):(i.broken&&(t.broken=[(W[0]+D[0])/2,(W[1]+D[1])/2]),i.curve&&(t.curve=[(W[0]+D[0])/2,(W[1]+D[1])/2]),i.cubic&&(t.cubic=[[(W[0]+D[0])/2,(W[1]+D[1])/2],[(W[0]+D[0])/2,(W[1]+D[1])/2]])):s===ae.C?(i.broken&&(t.broken=[x-T,k-E]),i.curve&&(t.curve=[x-T,k-E])):i.cubic&&(t.cubic=[[I-T,S-E],[C-T,L-E]]),t}return e}))},document.onmouseup=l=>{r=!1,document.onmousemove=null,document.onmouseup=null;const a=l.pageX,o=l.pageY;c===a&&d===o||(t.updateSlide({elements:e.value}),n())}};return{dragLineElement:i}},Vn=(e,t)=>{const l=$(),{addHistorySnapshot:a}=da(),n=(n,o)=>{const i=!(n instanceof MouseEvent);if(i&&(!n.changedTouches||!n.changedTouches[0]))return;let s=!0;const r=i?n.changedTouches[0].pageX:n.pageX,u=i?n.changedTouches[0].pageY:n.pageY,c=ra[o.pathFormula];let d=null;if("editable"in c){const e=c.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,a]=c.range,n=c.relative;d={baseSize:e,originPos:t,min:l,max:a,relative:n}}const p=l=>{if(!s)return;const a=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,i=(a-r)/t.value,p=(n-u)/t.value;e.value=e.value.map((e=>{if(e.id===o.id&&d){const{baseSize:t,originPos:l,min:a,max:n,relative:o}=d,s=e;let r=0;return"left"===o&&(r=(l+i)/t),"right"===o&&(r=(l-i)/t),"center"===o&&(r=(l-2*i)/t),"top"===o&&(r=(l+p)/t),"bottom"===o&&(r=(l-p)/t),r<a&&(r=a),r>n&&(r=n),{...e,keypoint:r,path:c.formula(s.width,s.height,r)}}return e}))},v=t=>{s=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;r===n&&u===o||(l.updateSlide({elements:e.value}),a())};i?(document.ontouchmove=p,document.ontouchend=v):(document.onmousemove=p,document.onmouseup=v)};return{moveShapeKeypoint:n}},Jn=e=>{const t=R(),{canvasScale:l,creatingElement:a}=(0,o.Jk)(t),n=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value;return{left:m,top:h,width:f,height:g}},i=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value,y=[i===c?0:f,s===p?0:g],w=[r===c?0:f,u===p?0:g];return{left:m,top:h,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=pa(),c=e=>{if(!a.value)return;const l=a.value.type;if("text"===l){const t=n(e);t&&s(t,{vertical:a.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,a.value.data)}else if("line"===l){const t=i(e);t&&u(t,a.value.data)}t.setCreatingElement(null)};return{formatCreateSelection:n,insertElementFromCreateSelection:c}},qn=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=da(),s=o=>{const s=oa,r=oa*n.value,{minX:u,maxX:c,minY:d,maxY:p}=ke(l.value),v=JSON.parse(JSON.stringify(a.value.elements));for(const e of v)if(t.value.includes(e.id)){if(o===ee.CENTER){const t=d+(p-d)/2-r/2,l=u+(c-u)/2-s/2;e.top=e.top-t,e.left=e.left-l}if(o===ee.TOP){const t=d-0;e.top=e.top-t}else if(o===ee.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===ee.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===ee.LEFT){const t=u-0;e.left=e.left-t}else if(o===ee.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===ee.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:v}),i()};return{alignElementToCanvas:s}},Xn=e=>{const t=(0,i.Fl)((()=>{if(e.value){const{h:t,v:l,blur:a,color:n}=e.value;return`${t}px ${l}px ${a}px ${n}`}return""}));return{shadowStyle:t}},Gn=(e,t)=>{const l=(0,i.Fl)((()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l}));return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})(zn||(zn={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(Pn||(Pn={}));const Kn={rect:{name:"矩形",type:zn.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:zn.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:zn.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:zn.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:zn.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:zn.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:zn.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:zn.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:zn.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:zn.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:zn.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:zn.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:zn.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:zn.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:zn.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:zn.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:zn.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:zn.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:zn.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:zn.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var Qn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return Kn.rect;const t=e.value.shape||zn.RECT;return Kn[t]})),l=(0,i.Fl)((()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,a=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/a,i=t[1]/n;return{left:-o+"%",top:-i+"%",width:100/a+"%",height:100/n+"%"}}));return{clipShape:t,imgPosition:l}},eo=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";const l=Object.keys(e.value);for(const a of l)t+=`${a}(${e.value[a]}) `;return t}));return{filter:t}},to=e=>{const t=(0,i.Fl)((()=>e.value?.width??0)),l=(0,i.Fl)((()=>e.value?.style||"solid")),a=(0,i.Fl)((()=>e.value?.color||"#d14424")),n=(0,i.Fl)((()=>{if("dashed"!==l.value)return"0 0";const e=t.value;return e<=6?`${4.5*e} ${2*e}`:`${4*e} ${1.5*e}`}));return{outlineWidth:t,outlineStyle:l,outlineColor:a,strokeDashArray:n}};const lo=["width","height"],ao=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var no=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("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:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,ao)],8,lo)):(0,i.kq)("",!0)}});const oo=(0,Vl.Z)(no,[["__scopeId","data-v-35e36256"]]);var io=oo;const so=["width","height"],ro=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var uo=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("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:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,ro)],8,so)):(0,i.kq)("",!0)}});const co=(0,Vl.Z)(uo,[["__scopeId","data-v-11836cf8"]]);var po=co;const vo=["width","height"],mo=["d","stroke","stroke-width","stroke-dasharray"];var ho=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,mo)],8,vo)):(0,i.kq)("",!0)}});const fo=(0,Vl.Z)(ho,[["__scopeId","data-v-6e021ee2"]]);var go=fo;const yo={class:"image-outline"};var wo=(0,i.aZ)({__name:"index",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Qn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",yo,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(io,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,s.SU)(a).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(po,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(go,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,s.SU)(a).createPath},null,8,["width","height","outline","createPath"])):(0,i.kq)("",!0)]))}});const xo=wo;var ko=xo;const bo=e=>((0,i.dD)("data-v-5984406b"),e=e(),(0,i.Cn)(),e),_o=["src"],Io=["src"],So=["onMousedown"],Co=bo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("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))),Lo=[Co],To=["onMousedown"],Eo=bo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1))),Mo=[Eo];var Uo=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{},clipPath:{},width:{},height:{},top:{},left:{},rotate:{},clipData:{}},emits:["clip"],setup(e,{emit:t}){const l=e,a=t,{canvasScale:r}=(0,o.Jk)(R()),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),c=(0,s.iH)({top:"0",left:"0"}),d=(0,s.iH)(!1),p=(0,s.iH)(null),v=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],a=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/a,i=e[1]/n;return{widthScale:a,heightScale:n,left:o,top:i}},m=(0,i.Fl)((()=>{const{widthScale:e,heightScale:t,left:l,top:a}=v();return{left:-l,top:-a,width:100/e,height:100/t}})),h=(0,i.Fl)((()=>({top:m.value.top+"%",left:m.value.left+"%",width:m.value.width+"%",height:m.value.height+"%"}))),f=(0,s.iH)({top:0,left:0,width:0,height:0}),g=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=f.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),y=(0,i.Fl)((()=>{const e=m.value.width,t=m.value.height,{top:l,left:a,width:n,height:o}=f.value;return{left:100/n*-a+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}})),w=()=>{const{left:e,top:t}=v();f.value={left:e,top:t,width:100,height:100},c.value={top:-t+"%",left:-e+"%"}},x=()=>{if(d.value)return;if(!p.value)return void a("clip",null);const{left:e,top:t}=v(),n={left:(f.value.left-e)/100*l.width,top:(f.value.top-t)/100*l.height,width:(f.value.width-100)/100*l.width,height:(f.value.height-100)/100*l.height},o={range:p.value,position:n};a("clip",o)},k=e=>{const t=e.key.toUpperCase();t===ne.ENTER&&x()};(0,i.bv)((()=>{w(),document.addEventListener("keydown",k)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",k)}));const b=()=>{const e={left:parseInt(y.value.left),top:parseInt(y.value.top),width:parseInt(y.value.width),height:parseInt(y.value.height)},t=100/e.width,l=100/e.height,a=[-e.left*t,-e.top*l],n=[100*t+a[0],100*l+a[1]];p.value=[a,n]},_=e=>{d.value=!0;let t=!0;const a=e.pageX,n=e.pageY,o=m.value,i={...f.value};document.onmousemove=e=>{if(!t)return;const s=e.pageX,u=e.pageY;let c=(s-a)/r.value/l.width*100,d=(u-n)/r.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-n)/r.value/l.width*100,d=-(s-a)/r.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(c=-c,d=-d),l.rotate>-135&&l.rotate<-45&&(c=-(u-n)/r.value/l.width*100,d=(s-a)/r.value/l.height*100);let p=i.left+c,v=i.top+d;p<0?p=0:p+i.width>o.width&&(p=o.width-i.width),v<0?v=0:v+i.height>o.height&&(v=o.height-i.height),f.value={...f.value,left:p,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout((()=>{d.value=!1}),0)}},I=(e,t)=>{d.value=!0;let a=!0;const n=50/l.width*100,o=50/l.height*100,i=e.pageX,s=e.pageY,c=m.value,p={...f.value},v=f.value.width/f.value.height;document.onmousemove=e=>{if(!a)return;const d=e.pageX,m=e.pageY;let h,g,y,w,x=(d-i)/r.value/l.width*100,k=(m-s)/r.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(m-s)/r.value/l.width*100,k=-(d-i)/r.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,k=-k),l.rotate>-135&&l.rotate<-45&&(x=-(m-s)/r.value/l.width*100,k=(d-i)/r.value/l.height*100),u.value&&(t!==le.RIGHT_BOTTOM&&t!==le.LEFT_TOP||(k=x/v),t!==le.LEFT_BOTTOM&&t!==le.RIGHT_TOP||(k=-x/v)),t===le.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+k<0&&(k=-p.top),p.width-x<n&&(x=p.width-n),p.height-k<o&&(k=p.height-o),y=p.width-x,w=p.height-k,h=p.left+x,g=p.top+k):t===le.RIGHT_TOP?(p.left+p.width+x>c.width&&(x=c.width-(p.left+p.width)),p.top+k<0&&(k=-p.top),p.width+x<n&&(x=n-p.width),p.height-k<o&&(k=p.height-o),y=p.width+x,w=p.height-k,h=p.left,g=p.top+k):t===le.LEFT_BOTTOM?(p.left+x<0&&(x=-p.left),p.top+p.height+k>c.height&&(k=c.height-(p.top+p.height)),p.width-x<n&&(x=p.width-n),p.height+k<o&&(k=o-p.height),y=p.width-x,w=p.height+k,h=p.left+x,g=p.top):t===le.RIGHT_BOTTOM?(p.left+p.width+x>c.width&&(x=c.width-(p.left+p.width)),p.top+p.height+k>c.height&&(k=c.height-(p.top+p.height)),p.width+x<n&&(x=n-p.width),p.height+k<o&&(k=o-p.height),y=p.width+x,w=p.height+k,h=p.left,g=p.top):t===le.TOP?(p.top+k<0&&(k=-p.top),p.height-k<o&&(k=p.height-o),y=p.width,w=p.height-k,h=p.left,g=p.top+k):t===le.BOTTOM?(p.top+p.height+k>c.height&&(k=c.height-(p.top+p.height)),p.height+k<o&&(k=o-p.height),y=p.width,w=p.height+k,h=p.left,g=p.top):t===le.LEFT?(p.left+x<0&&(x=-p.left),p.width-x<n&&(x=p.width-n),y=p.width-x,w=p.height,h=p.left+x,g=p.top):(p.left+p.width+x>c.width&&(x=c.width-(p.left+p.width)),p.width+x<n&&(x=n-p.width),w=p.height,y=p.width+x,h=p.left,g=p.top),f.value={left:h,top:g,width:y,height:w}},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout((()=>d.value=!1),0)}},S=(0,i.Fl)((()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0})),C=[le.LEFT_TOP,le.RIGHT_TOP,le.LEFT_BOTTOM,le.RIGHT_BOTTOM],L=[le.TOP,le.BOTTOM,le.LEFT,le.RIGHT];return(e,t)=>{const l=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,oe.j5)(c.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,oe.j5)(h.value)},null,12,_o),(0,i._)("div",{class:"top-image-content",style:(0,oe.j5)({...g.value,clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,oe.j5)(y.value)},null,12,Io)],4),(0,i._)("div",{class:"operate",style:(0,oe.j5)(g.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>_(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,oe.C_)(["clip-point",e,S.value]),key:e,onMousedown:(0,n.iM)((t=>I(t,e)),["stop"])},Lo,42,So))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(L,(e=>(0,i._)("div",{class:(0,oe.C_)(["clip-point",e,S.value]),key:e,onMousedown:(0,n.iM)((t=>I(t,e)),["stop"])},Mo,42,To))),64))],36)],4)),[[l,x]])}}});const Wo=(0,Vl.Z)(Uo,[["__scopeId","data-v-5984406b"]]);var Do=Wo;const Ho=["src"];var Fo=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=da(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Xn(d),v=(0,i.Fl)((()=>t.elementInfo.flipH)),m=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:h}=Gn(v,m),f=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Qn(f),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=eo(w),k=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,i=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},s=t.elementInfo.left+o.left,r=t.elementInfo.top+o.top,u=t.elementInfo.width+o.width,d=t.elementInfo.height+o.height;let p=0,v=0;if(t.elementInfo.rotate){const e=s+u/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(r+d/2-(t.elementInfo.top+t.elementInfo.height/2)),a=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(a)-l*Math.sin(a),o=e*Math.sin(a)+l*Math.cos(a);p=n-e,v=-(o-l)}const m={clip:{...i,range:n},left:s+p,top:r+v,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:m}),c()};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[u.value?((0,i.wg)(),(0,i.j4)(Do,{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:(0,s.SU)(g).style,onClip:t[0]||(t[0]=e=>b(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:1,class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(h)}),onMousedown:t[2]||(t[2]=e=>k(e)),onTouchstart:t[3]||(t[3]=e=>k(e))},[(0,i.Wm)(ko,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,oe.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,oe.j5)({top:(0,s.SU)(y).top,left:(0,s.SU)(y).left,width:(0,s.SU)(y).width,height:(0,s.SU)(y).height,filter:(0,s.SU)(x)}),onDragstart:t[1]||(t[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,Ho),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,oe.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],36)),[[l,e.contextmenus]])],4)],6)}}});const Ao=(0,Vl.Z)(Fo,[["__scopeId","data-v-1156b3e1"]]);var $o=Ao;const Zo=["width","height"],Oo=["d","stroke","stroke-width","stroke-dasharray"];var Ro=(0,i.aZ)({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("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:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,Oo)],8,Zo)):(0,i.kq)("",!0)}});const zo=(0,Vl.Z)(Ro,[["__scopeId","data-v-efb76626"]]);var Po=zo,Bo=l(2376),No=l(4348),jo=l(2806),Yo=l(728),Vo=l(8463),Jo=l(4251),qo=l(915),Xo=l(3833),Go=l(6912);const Ko=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",u.MI),l("Alt-ArrowDown",u.Ig),l("Mod-z",Vo.Yw),l("Mod-y",Vo.KX),l("Backspace",Go.dU),l("Escape",u.N0),l("Mod-b",(0,u.w9)(e.marks.strong)),l("Mod-i",(0,u.w9)(e.marks.em)),l("Mod-u",(0,u.w9)(e.marks.underline)),l("Mod-d",(0,u.w9)(e.marks.strikethrough)),l("Mod-e",(0,u.w9)(e.marks.code)),l("Mod-;",(0,u.w9)(e.marks.superscript)),l("Mod-'",(0,u.w9)(e.marks.subscript)),l("Enter",(0,u.QF)((0,Xo.s6)(e.nodes.list_item),u.QK,u.mD,u.X0,u.$j)),l("Mod-[",(0,Xo.IB)(e.nodes.list_item)),l("Mod-]",(0,Xo.bw)(e.nodes.list_item)),l("Tab",(0,Xo.bw)(e.nodes.list_item)),t},Qo=e=>(0,Go.S0)(/^\s*>\s$/,e),ei=e=>(0,Go.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),ti=e=>(0,Go.S0)(/^\s*([-+*])\s$/,e),li=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Go.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(`${t[2]} `,l,a),i=n.marks.code.create();return o.addMark(l,l+t[2].length,i)}))},ai=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Go.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(t[0],l,a),i=n.marks.link.create({href:t[0],title:t[0]});return o.addMark(l,l+t[0].length,i)}))},ni=e=>{const t=[...Go.yR,Go.LH,Go.pR];return t.push(Qo(e.nodes.blockquote)),t.push(ei(e.nodes.ordered_list)),t.push(ti(e.nodes.bullet_list)),t.push(li()),t.push(ai()),(0,Go.Hw)({rules:t})},oi=e=>"paragraph"===e.type.name&&2===e.nodeSize,ii=e=>new Bo.Sy({props:{decorations(t){const{$from:l}=t.selection;if(oi(l.parent)){const a=No.p.node(l.before(),l.after(),{"data-placeholder":e});return No.EH.create(t.doc,[a])}}}}),si=(e,t)=>{const l=t?.placeholder,a=[ni(e),(0,Yo.h)(Ko(e)),(0,Yo.h)(u.YR),(0,Jo.q)(),(0,qo.d)(),(0,Vo.m8)()];return l&&a.push(ii(l)),a};var ri=l(4073);const ui={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:a,fontSize:n,color:o}=e.style;return a&&(l["listStyleType"]=a),n&&(l["fontsize"]=n),o&&(l["color"]=o),l}}],toDOM:e=>{const{order:t,listStyleType:l,fontsize:a,color:n}=e.attrs;let o="";l&&(o+=`list-style-type: ${l};`),a&&(o+=`font-size: ${a};`),n&&(o+=`color: ${n};`);const i={style:o};return 1!==t&&(i["start"]=t),["ol",i,0]}},ci={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const t={},{listStyleType:l,fontSize:a,color:n}=e.style;return l&&(t["listStyleType"]=l),a&&(t["fontsize"]=a),n&&(t["color"]=n),t}}],toDOM:e=>{const{listStyleType:t,fontsize:l,color:a}=e.attrs;let n="";return t&&(n+=`list-style-type: ${t};`),l&&(n+=`font-size: ${l};`),a&&(n+=`color: ${a};`),["ul",{style:n},0]}},di={...Xo.qb,content:"paragraph block*",group:"block"},pi={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:l}=e.style;let a=e.getAttribute("align")||t||"";a=/(left|right|center|justify)/.test(a)?a:"";let n=0;l&&(/em/.test(l)?n=parseInt(l):/px/.test(l)&&(n=Math.floor(parseInt(l)/20),n||(n=1)));const o=+(e.getAttribute("data-indent")||0);return{align:a,indent:o,textIndent:n}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l,textIndent:a}=e.attrs;let n="";t&&"left"!==t&&(n+=`text-align: ${t};`),a&&(n+=`text-indent: ${20*a}px;`);const o={style:n};return l&&(o["data-indent"]=l),["p",o,0]}},{doc:vi,blockquote:mi,text:hi}=ri.nodes;var fi={doc:vi,paragraph:pi,blockquote:mi,text:hi,ordered_list:ui,bullet_list:ci,list_item:di};const gi={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},yi={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},wi={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},xi={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},ki={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},bi={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},_i={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+=`font-size: ${t};`),["span",{style:l},0]}},Ii={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+=`font-family: ${t};`),["span",{style:l},0]}},Si={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]},Ci={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>{const t=e.dataset.index;return{index:t}}}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:Li,strong:Ti,code:Ei}=ri.marks;var Mi={em:Li,strong:Ti,fontsize:_i,fontname:Ii,code:Ei,forecolor:ki,backcolor:bi,subscript:gi,superscript:yi,strikethrough:wi,underline:xi,link:Si,mark:Ci};const Ui=fi,Wi=Mi,Di=new jo.V_({nodes:Ui,marks:Wi}),Hi=e=>{const t=`<div>${e}</div>`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return jo.aw.fromSchema(Di).parse(a)},Fi=(e,t,l,a)=>new No.tk(e,{state:Bo.yy.create({doc:Hi(t),plugins:si(Di,a)}),...l});var Ai,$i=l(9391);(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"})(Ai||(Ai={}));const Zi=(0,$i.Z)();var Oi=Zi;const Ri=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;const{from:o,to:i}=a,{nodes:s}=t,r=s.blockquote,u=s.list_item,c=s.paragraph,d=[];l=l||"";const p=new Set([r,u,c]);return n.nodesBetween(o,i,((e,t)=>{const a=e.type,n=e.attrs.align||"";return n!==l&&p.has(a)&&d.push({node:e,pos:t,nodeType:a}),!0})),d.length?(d.forEach((t=>{const{node:a,pos:n,nodeType:o}=t;let{attrs:i}=a;i=l?{...i,align:l}:{...i,align:null},e=e.setNodeMarkup(n,o,i,a.marks)})),e):e},zi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Ri(l.tr.setSelection(n),a,t);e.dispatch(o)};function Pi(e,t,l,a){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const o=0,i=8;let s=(n.attrs[a]||0)+l;if(s<o&&(s=o),s>i&&(s=i),s===n.attrs[a])return e;const r={...n.attrs,[a]:s};return e.setNodeMarkup(t,n.type,r,n.marks)}const Bi=(e,t,l,a)=>{const{selection:n,doc:o}=e;if(!n||!o)return e;if(!(n instanceof Bo.Bs||n instanceof Bo.C1))return e;const{from:i,to:s}=n;return o.nodesBetween(i,s,((n,o)=>{const i=n.type;return"paragraph"===i.name||"blockquote"===i.name?(e=Pi(e,o,l,a),!1):!c(n,t)})),e},Ni=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Bi(l.tr.setSelection(n),a,t,"indent");return!!o.docChanged&&(e.dispatch(o),!0)},ji=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Bi(l.tr.setSelection(n),a,t,"textIndent");return!!o.docChanged&&(e.dispatch(o),!0)},Yi=(e,t,l,a={})=>(n,o)=>{const{schema:i,selection:s}=n,{$from:r,$to:u}=s,d=r.blockRange(u);if(!d)return!1;const p=f((e=>c(e,i)))(s);if(d.depth>=1&&p&&d.depth-p.depth<=1){if(p.node.type===e&&!l)return(0,Xo.IB)(t)(n,o);if(c(p.node,i)&&e.validContent(p.node.content)){const{tr:t}=n,i={...p.node.attrs,...a};return l&&(i.listStyleType=l),t.setNodeMarkup(p.pos,e,i),o&&o(t),!1}}const v={...a};return l&&(v.listStyleType=l),(0,Xo.KI)(e,v)(n,o)},Vi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=l.tr.setSelection(n),{doc:i}=o;if(!i)return o;const{from:s,to:r}=n;i.nodesBetween(s,r,((e,l)=>{if(c(e,a)&&s-3<=l&&r+3>=l+e.nodeSize){const e=Array.isArray(t)?t:[t];for(const t of e)o.setNodeAttribute(l,t.key,t.value)}return!1})),e.dispatch(o)};var Ji=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{},defaultColor:{},defaultFontName:{},value:{},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=l,r=R(),{handleElementId:c,textFormatPainter:m,richTextAttrs:h}=(0,o.Jk)(r),f=(0,s.iH)();let g;const w=(0,D.debounce)((function(){n("update",g.dom.innerHTML)}),300,{trailing:!0}),x=()=>{r.setDisableHotkeysState(!0),n("focus")},k=()=>{r.setDisableHotkeysState(!1),n("blur")},b=(0,D.debounce)((function(){const e=C(g,{color:a.defaultColor,fontname:a.defaultFontName});r.setRichtextAttrs(e)}),30,{trailing:!0}),I=()=>{w(),b()},S=(0,i.Fl)((()=>a.value));(0,i.YP)(S,(()=>{if(!g)return;if(g.hasFocus())return;const{doc:e,tr:t}=g.state;g.dispatch(t.replaceRangeWith(0,e.content.size,Hi(S.value)))})),(0,i.YP)((()=>a.editable),(()=>{g.setProps({editable:()=>a.editable})}));const T=()=>g.focus();t({focus:T});const E=({target:e,action:t})=>{if(!e&&c.value!==a.elementId)return;if(e&&e!==a.elementId)return;const l="command"in t?[t]:t;for(const a of l)if("fontname"===a.command&&a.value){const e=g.state.schema.marks.fontname.create({fontname:a.value});d(g),p(g,e)}else if("fontsize"===a.command&&a.value){const e=g.state.schema.marks.fontsize.create({fontsize:a.value});d(g),p(g,e),Vi(g,{key:"fontsize",value:a.value})}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;d(g);const t=L(g)+e+"px",l=g.state.schema.marks.fontsize.create({fontsize:t});p(g,l),Vi(g,{key:"fontsize",value:t})}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;d(g);let t=L(g)-e;t<12&&(t=12);const l=g.state.schema.marks.fontsize.create({fontsize:t+"px"});p(g,l),Vi(g,{key:"fontsize",value:t+"px"})}else if("color"===a.command&&a.value){const e=g.state.schema.marks.forecolor.create({color:a.value});d(g),p(g,e),Vi(g,{key:"color",value:a.value})}else if("backcolor"===a.command&&a.value){const e=g.state.schema.marks.backcolor.create({backcolor:a.value});d(g),p(g,e)}else if("bold"===a.command)d(g),(0,u.w9)(g.state.schema.marks.strong)(g.state,g.dispatch);else if("em"===a.command)d(g),(0,u.w9)(g.state.schema.marks.em)(g.state,g.dispatch);else if("underline"===a.command)d(g),(0,u.w9)(g.state.schema.marks.underline)(g.state,g.dispatch);else if("strikethrough"===a.command)d(g),(0,u.w9)(g.state.schema.marks.strikethrough)(g.state,g.dispatch);else if("subscript"===a.command)(0,u.w9)(g.state.schema.marks.subscript)(g.state,g.dispatch);else if("superscript"===a.command)(0,u.w9)(g.state.schema.marks.superscript)(g.state,g.dispatch);else if("blockquote"===a.command){const e=y("blockquote",g.state);e?(0,u.xb)(g.state,g.dispatch):(0,u.ym)(g.state.schema.nodes.blockquote)(g.state,g.dispatch)}else if("code"===a.command)(0,u.w9)(g.state.schema.marks.code)(g.state,g.dispatch);else if("align"===a.command&&a.value)zi(g,a.value);else if("indent"===a.command&&a.value)Ni(g,+a.value);else if("textIndent"===a.command&&a.value)ji(g,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=g.state.schema.nodes,n={color:h.value.color,fontsize:h.value.fontsize};Yi(t,l,e,n)(g.state,g.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=g.state.schema.nodes,n={color:h.value.color,fontsize:h.value.fontsize};Yi(t,l,e,n)(g.state,g.dispatch)}else if("clear"===a.command){d(g);const{$from:e,$to:t}=g.state.selection;g.dispatch(g.state.tr.removeMark(e.pos,t.pos)),Vi(g,[{key:"fontsize",value:""},{key:"color",value:""}])}else if("link"===a.command){const e=g.state.schema.marks.link,{from:t,to:l}=g.state.selection,n=v(g.state.doc,t,l,e);if(n)if(a.value){const e=g.state.schema.marks.link.create({href:a.value,title:a.value});p(g,e,{from:n.from.pos,to:n.to.pos+1})}else g.dispatch(g.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(_(g.state,e))if(a.value){const e=g.state.schema.marks.link.create({href:a.value,title:a.value});p(g,e)}else(0,u.w9)(e)(g.state,g.dispatch);else a.value&&(d(g),(0,u.w9)(e,{href:a.value,title:a.value})(g.state,g.dispatch))}else"insert"===a.command&&a.value&&g.dispatch(g.state.tr.insertText(a.value));g.focus(),w(),b()},M=()=>{if(!m.value)return;const{keep:e,...t}=m.value,l=[{command:"clear"}];for(const a of Object.keys(t)){const e=a,t=m.value[a];!0===t?l.push({command:e}):t&&l.push({command:e,value:t})}E({action:l}),e||r.setTextFormatPainter(null)};(0,i.bv)((()=>{g=Fi(f.value,S.value,{handleDOMEvents:{focus:x,blur:k,keydown:I,click:b,mouseup:M},editable:()=>a.editable}),a.autoFocus&&g.focus()})),(0,i.Ah)((()=>{g&&g.destroy()}));const U=()=>{c.value===a.elementId&&b()};return Oi.on(Ai.RICH_TEXT_COMMAND,E),Oi.on(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE,U),(0,i.Ah)((()=>{Oi.off(Ai.RICH_TEXT_COMMAND,E),Oi.off(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE,U)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(m)}]),ref_key:"editorViewRef",ref:f,onMousedown:t[0]||(t[0]=e=>n("mousedown",e))},null,34))}});const qi=(0,Vl.Z)(Ji,[["__scopeId","data-v-653f533c"]]);var Xi=qi;const Gi=e=>((0,i.dD)("data-v-2a1e49ba"),e=e(),(0,i.Cn)(),e),Ki=Gi((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Qi=Gi((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var es=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=da(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Xn(d),v=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},m=(0,s.iH)(-1),h=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===m.value||(a.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1),t.elementInfo.vertical&&-1!==h.value&&(a.updateElement({id:t.elementInfo.id,props:{width:h.value}}),h.value=-1)))}));const f=e=>{const l=e[0].contentRect;if(!c.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?m.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?h.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(f);(0,i.bv)((()=>{c.value&&g.observe(c.value)})),(0,i.Ah)((()=>{c.value&&g.unobserve(c.value)}));const y=e=>{a.updateElement({id:t.elementInfo.id,props:{content:e}}),u()},w=(0,D.debounce)((function(){const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||a.deleteElement(t.elementInfo.id)}),300,{trailing:!0}),x=(0,i.Fl)((()=>n.value===t.elementInfo.id));return(0,i.YP)(x,(()=>{x.value||w()})),(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",ref_key:"elementRef",ref:c,style:(0,oe.j5)({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:(0,s.SU)(p),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"}),onMousedown:t[2]||(t[2]=e=>v(e)),onTouchstart:t[3]||(t[3]=e=>v(e))},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Xi,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,oe.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:t[0]||(t[0]=e=>y(e)),onMousedown:t[1]||(t[1]=e=>v(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Ki,Qi],36)),[[l,e.contextmenus]])],4)],6)}}});const ts=(0,Vl.Z)(es,[["__scopeId","data-v-2a1e49ba"]]);var ls=ts;const as=["id","gradientTransform"],ns=["stop-color"],os=["stop-color"],is=["id"],ss=["stop-color"],rs=["stop-color"];var us=(0,i.aZ)({__name:"GradientDefs",props:{id:{},type:{},color1:{},color2:{},rotate:{default:0}},setup(e){return(e,t)=>"linear"===e.type?((0,i.wg)(),(0,i.iD)("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ns),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,os)],8,as)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ss),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,rs)],8,is))}});const cs=us;var ds=cs;const ps=["width","height"],vs={key:0},ms=["transform"],hs=["d","fill","stroke","stroke-width","stroke-dasharray"];var fs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{handleElementId:n,shapeFormatPainter:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=da(),c=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},d=()=>{if(!r.value)return;const{keep:e,...n}=r.value;a.updateElement({id:t.elementInfo.id,props:n}),u(),e||l.setShapeFormatPainter(null)},p=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:v,outlineColor:m,strokeDashArray:h}=to(p),f=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:g}=Xn(f),y=(0,i.Fl)((()=>t.elementInfo.flipH)),w=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:x}=Gn(y,w),k=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&k.value&&(k.value=!1)}));const b=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),_=e=>{const l={...b.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),u()},I=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),u())},S=(0,s.iH)(),C=()=>{k.value=!0,(0,i.Y3)((()=>S.value&&S.value.focus()))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-shape",{lock:e.elementInfo.lock,"format-painter":(0,s.SU)(r)}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,oe.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(g)?`drop-shadow(${(0,s.SU)(g)})`:"",transform:(0,s.SU)(x),color:b.value.defaultColor,fontFamily:b.value.defaultFontName}),onMousedown:t[3]||(t[3]=e=>c(e)),onMouseup:t[4]||(t[4]=e=>d()),onTouchstart:t[5]||(t[5]=e=>c(e)),onDblclick:t[6]||(t[6]=e=>C())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",vs,[(0,i.Wm)(ds,{id:`editabel-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("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)`},[(0,i._)("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(m),"stroke-width":(0,s.SU)(v),"stroke-dasharray":(0,s.SU)(h)},null,8,hs)],8,ms)],8,ps)),(0,i._)("div",{class:(0,oe.C_)(["shape-text",[b.value.align,{editable:k.value||b.value.content}]])},[k.value||b.value.content?((0,i.wg)(),(0,i.j4)(Xi,{key:0,ref_key:"prosemirrorEditorRef",ref:S,elementId:e.elementInfo.id,defaultColor:b.value.defaultColor,defaultFontName:b.value.defaultFontName,editable:!e.elementInfo.lock,value:b.value.content,onUpdate:t[0]||(t[0]=e=>_(e)),onBlur:t[1]||(t[1]=e=>I()),onMousedown:t[2]||(t[2]=e=>c(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[l,e.contextmenus]])],4)],6)}}});const gs=(0,Vl.Z)(fs,[["__scopeId","data-v-5d988de2"]]);var ys=gs;const ws=["id","markerWidth","markerHeight","refX","refY"],xs=["d","fill","transform"];var ks=(0,i.aZ)({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},setup(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},a={"arrow-start":180,"arrow-end":0},n=(0,i.Fl)((()=>l[t.type])),o=(0,i.Fl)((()=>a[`${t.type}-${t.position}`]||0)),s=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(e,t)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*s.value,markerHeight:3*s.value,refX:1.5*s.value,refY:1.5*s.value},[(0,i._)("path",{d:n.value,fill:e.color,transform:`scale(${.3*s.value}, ${.3*s.value}) rotate(${o.value}, 5, 5)`},null,8,xs)],8,ws))}});const bs=ks;var _s=bs;const Is=["width","height"],Ss=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],Cs=["d"];var Ls=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:n}=Xn(a),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),r=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),u=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),c=(0,i.Fl)((()=>Ce(t.elementInfo)));return(e,t)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:o.value,height:r.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(_s,{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"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(_s,{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"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-point",d:c.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":u.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,Ss),(0,i.wy)((0,i._)("path",{class:"line-path",d:c.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,Cs),[[a,e.contextmenus]])],8,Is))],36)],6)}}});const Ts=(0,Vl.Z)(Ls,[["__scopeId","data-v-16512454"]]);var Es=Ts,Ms=l(7678),Us=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{},height:{},type:{},data:{},themeColor:{},legends:{},options:{},gridColor:{},legend:{}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(Tn)||(0,s.iH)(1);let n;const o=(0,i.Fl)((()=>t.legend?t.height-20:t.height)),r=()=>({...t.data,series:t.data.series[0]}),u=()=>{const e=t.options||{};return{...e,width:t.width*a.value,height:o.value*a.value}},c=()=>{if(!l.value)return;const e=u();"bar"===t.type&&(n=new Ms.vz(l.value,t.data,e)),"line"===t.type&&(n=new Ms.wW(l.value,t.data,e)),"pie"===t.type&&(n=new Ms.uc(l.value,r(),e))},d=()=>{if(!n)return void c();const e=u(),l="pie"===t.type?r():t.data;n.update(l,e)};(0,i.YP)([()=>t.width,()=>t.height,()=>t.data,()=>t.options,a],d),(0,i.bv)(c);const p=(0,i.Fl)((()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=(0,W.Z)(t.themeColor[0]).analogous(10).map((e=>e.toRgbString()));else{const l=t.themeColor.length,a=(0,W.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toRgbString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),v=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty(`--theme-color-${e+1}`,p.value[e])};(0,i.YP)(p,v),(0,i.bv)(v);const m=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),m),(0,i.bv)(m),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,oe.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,oe.j5)({width:e.width+"px",height:o.value+"px",transform:`scale(${1/(0,s.SU)(a)})`})},null,4),e.legend?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"legends",style:(0,oe.j5)({transform:`scale(${1/(0,s.SU)(a)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.legends,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"legend",key:l,style:(0,oe.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,oe.j5)({backgroundColor:p.value[l]})},null,4),(0,i.Uk)(" "+(0,oe.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const Ws=(0,Vl.Z)(Us,[["__scopeId","data-v-ae2a96a6"]]);var Ds=Ws,Hs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Oi.emit(Ai.OPEN_CHART_DATA_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,oe.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ds,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[n,e.contextmenus]])],4)],6)}}});const Fs=(0,Vl.Z)(Hs,[["__scopeId","data-v-6fc3de39"]]);var As=Fs;const $s=e=>{if(!e)return{};const{bold:t,em:l,underline:a,strikethrough:n,color:o,backcolor:i,fontsize:s,fontname:r,align:u}=e;let c=`${a?"underline":""} ${n?"line-through":""}`;return" "===c&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:c,color:o||"#000",backgroundColor:i||"",fontSize:s||"14px",fontFamily:r||"微软雅黑",textAlign:u||"left"}},Zs=e=>e.replace(/\n/g,"</br>").replace(/ /g,"&nbsp;");var Os=e=>{const t=(0,i.Fl)((()=>{const t=[];for(let l=0;l<e.value.length;l++){const a=e.value[l];for(let e=0;e<a.length;e++){const n=a[e];if(n.colspan>1||n.rowspan>1)for(let a=l;a<l+n.rowspan;a++)for(let o=a===l?e+1:e;o<e+n.colspan;o++)t.push(`${a}_${o}`)}}return t}));return{hideCells:t}},Rs=e=>{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=Se(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const zs=["innerHTML"];var Ps=(0,i.aZ)({__name:"CustomTextarea",props:{value:{default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(),o=(0,s.iH)(""),r=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{r.value||(o.value=l.value,n.value&&(n.value.innerHTML=l.value))}),{immediate:!0});const u=()=>{if(!n.value)return;const e=n.value.innerHTML;a("updateValue",e)},c=()=>{r.value=!0,n.value&&(n.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const t=e.clipboardData.items[0];t&&"string"===t.kind&&"text/plain"===t.type&&t.getAsString((e=>{const t=fe(e);if("object"===typeof t)return;const l=ge(e);if(l)return a("insertExcelData",l),void(n.value&&(n.value.innerHTML=l[0][0]));document.execCommand("insertText",!1,e)}))})},d=()=>{r.value=!1,n.value&&(n.value.onpaste=null)};return(0,i.Jd)((()=>{n.value&&(n.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:n,contenteditable:!0,onFocus:t[0]||(t[0]=e=>c()),onBlur:t[1]||(t[1]=e=>d()),onInput:t[2]||(t[2]=e=>u()),innerHTML:o.value},null,40,zs))}});const Bs=(0,Vl.Z)(Ps,[["__scopeId","data-v-7a7222ac"]]);var Ns=Bs;const js={key:0,class:"handler"},Ys=["onMousedown"],Vs=["width"],Js=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],qs=["innerHTML"];var Xs=(0,i.aZ)({__name:"EditableTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,a=t,{canvasScale:u}=(0,o.Jk)(R()),c=(0,s.iH)(!1),d=(0,s.iH)([]),p=(0,s.iH)([]),v=(0,i.Fl)({get(){return l.data},set(e){a("change",e)}}),m=(0,i.Fl)((()=>l.theme)),{subThemeColor:h}=Rs(m),f=(0,s.iH)([]),g=(0,i.Fl)((()=>f.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>l.colWidths,()=>l.width],(()=>{f.value=l.colWidths.map((e=>e*l.width))}),{immediate:!0});const y=()=>{d.value=[],p.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||y()}));const w=(0,i.Fl)((()=>{const e=[];for(let t=1;t<f.value.length+1;t++){const l=f.value.slice(0,t).reduce(((e,t)=>e+t));e.push(l)}return e})),x=(0,i.Fl)((()=>l.data)),{hideCells:k}=Os(x),b=(0,i.Fl)((()=>{if(!d.value.length)return[];const[e,t]=d.value;if(!p.value.length)return[`${e}_${t}`];const[l,a]=p.value;if(e===l&&t===a)return[`${e}_${t}`];const n=[],o=Math.min(e,l),i=Math.min(t,a),s=Math.max(e,l),r=Math.max(t,a);for(let u=0;u<v.value.length;u++){const e=v.value[u];for(let t=0;t<e.length;t++)u>=o&&u<=s&&t>=i&&t<=r&&n.push(`${u}_${t}`)}return n}));(0,i.YP)(b,((e,t)=>{(0,D.isEqual)(e,t)||a("changeSelectedCells",b.value)}));const _=(0,i.Fl)((()=>b.value.length>1?null:b.value[0])),I=()=>c.value=!1,S=(e,t,l)=>{0===e.button&&(p.value=[],c.value=!0,d.value=[t,l])},C=(e,t)=>{c.value&&(p.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",I)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",I)}));const L=(e,t)=>k.value.includes(`${e}_${t}`),T=e=>{const t=v.value.length-1;d.value=[0,e],p.value=[t,e]},E=e=>{const t=v.value[e].length-1;d.value=[e,0],p.value=[e,t]},M=()=>{const e=v.value.length-1,t=v.value[e].length-1;d.value=[0,0],p.value=[e,t]},U=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=v.value[e],a=[];for(let n=0;n<l.length;n++)L(e,n)&&a.push(n);for(const n of a)for(let l=e;l>=0;l--)if(!L(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),v.value=t},W=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=[];for(let a=0;a<v.value.length;a++)L(a,e)&&l.push(a);for(const a of l)for(let l=e;l>=0;l--)if(!L(a,l)){t[a][l].colspan=t[a][l].colspan-1;break}v.value=t.map((t=>(t.splice(e,1),t))),f.value.splice(e,1),a("changeColWidths",f.value)},H=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=[];for(let a=0;a<t[0].length;a++)l.push({colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)});t.splice(e,0,l),v.value=t},F=e=>{v.value=v.value.map((t=>{const l={colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)};return t.splice(e,0,l),t})),f.value.splice(e,0,100),a("changeColWidths",f.value)},A=(e,t)=>{let l=JSON.parse(JSON.stringify(v.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let a=0;a<e;a++){const e=[];for(let t=0;t<l[0].length;t++)e.push({...n,id:(0,r.x0)(10)});t.push(e)}l=[...l,...t]}t&&(l=l.map((e=>{const l=[];for(let a=0;a<t;a++){const e={...n,id:(0,r.x0)(10)};l.push(e)}return[...e,...l]})),f.value=[...f.value,...new Array(t).fill(100)],a("changeColWidths",f.value)),v.value=l},$=()=>{const[e,t]=d.value,[l,a]=p.value,n=Math.min(e,l),o=Math.min(t,a),i=Math.max(e,l),s=Math.max(t,a),r=JSON.parse(JSON.stringify(v.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,v.value=r,y()},Z=(e,t)=>{const l=JSON.parse(JSON.stringify(v.value));l[e][t].rowspan=1,l[e][t].colspan=1,v.value=l,y()},O=(e,t)=>{y();let l=!0;const n=f.value[t],o=e.pageX,i=50;document.onmousemove=e=>{if(!l)return;const a=(e.pageX-o)/u.value,s=n+a<i?i:Math.round(n+a);f.value[t]=s},document.onmouseup=()=>{l=!1,document.onmousemove=null,document.onmouseup=null,a("changeColWidths",f.value)}},z=()=>{const e=JSON.parse(JSON.stringify(v.value));for(let t=0;t<e.length;t++)for(let l=0;l<e[t].length;l++)b.value.includes(`${t}_${l}`)&&(e[t][l].text="");v.value=e},P=()=>{const e=(t,l)=>v.value[t]?v.value[t][l]?L(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;p.value=[];const t=d.value[0],l=d.value[1]+1,a=e(t,l);a?d.value=a:(H(t+1),d.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},B=e=>{if(!l.editable||!b.value.length)return;const t=e.key.toUpperCase();if(b.value.length<2){if(t===ne.TAB&&(e.preventDefault(),P()),e.ctrlKey&&t===ne.UP){e.preventDefault();const t=+b.value[0].split("_")[0];H(t)}if(e.ctrlKey&&t===ne.DOWN){e.preventDefault();const t=+b.value[0].split("_")[0];H(t+1)}if(e.ctrlKey&&t===ne.LEFT){e.preventDefault();const t=+b.value[0].split("_")[1];F(t)}if(e.ctrlKey&&t===ne.RIGHT){e.preventDefault();const t=+b.value[0].split("_")[1];F(t+1)}}else t===ne.DELETE&&z()};(0,i.bv)((()=>{document.addEventListener("keydown",B)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",B)}));const N=(0,D.debounce)((function(e,t,l){v.value[t][l].text=e,a("change",v.value)}),300,{trailing:!0}),j=(e,t,l)=>{const n=e.length,o=e[0].length;let s=0,r=0;t+n>v.value.length&&(s=t+n-v.value.length),l+o>v.value[0].length&&(r=l+o-v.value[0].length),(s||r)&&A(s,r),(0,i.Y3)((()=>{for(let a=0;a<n;a++)for(let n=0;n<o;n++)v.value[t+a][l+n]&&(v.value[t+a][l+n].text=e[a][n]);a("change",v.value)}))},Y=()=>{const e=[];for(let t=0;t<v.value.length;t++){const l=v.value[t],a=[];for(let e=0;e<l.length;e++)L(t,e)||a.push(l[e]);a.length&&e.push(a)}return e},V=()=>{const e=Y(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},J=(e,t)=>{const l=b.value.length>1,a=v.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},q=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];b.value.includes(`${l}_${a}`)||(d.value=[l,a],p.value=[]);const{canMerge:n,canSplit:o}=J(l,a),{canDeleteRow:i,canDeleteCol:s}=V();return[{text:"插入列",children:[{text:"到左侧",handler:()=>F(a)},{text:"到右侧",handler:()=>F(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>H(l)},{text:"到下方",handler:()=>H(l+1)}]},{text:"删除列",disable:!s,handler:()=>W(a)},{text:"删除行",disable:!i,handler:()=>U(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:$},{text:"取消合并单元格",disable:!o,handler:()=>Z(l,a)},{divider:!0},{text:"选中当前列",handler:()=>T(a)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:M}]};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,oe.j5)({width:g.value+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",js,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,oe.j5)({left:e+"px"}),onMousedown:e=>O(e,t)},null,44,Ys)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,oe.C_)({theme:m.value,"row-header":m.value?.rowHeader,"row-footer":m.value?.rowFooter,"col-header":m.value?.colHeader,"col-footer":m.value?.colFooter}),style:(0,oe.j5)(`--themeColor: ${m.value?.color}; --subThemeColor1: ${(0,s.SU)(h)[0]}; --subThemeColor2: ${(0,s.SU)(h)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(f.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,Vs)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((t,a)=>((0,i.wg)(),(0,i.iD)("tr",{key:a,style:(0,oe.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,o)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:(0,oe.C_)(["cell",{selected:b.value.includes(`${a}_${o}`)&&b.value.length>1,active:_.value===`${a}_${o}`}]),style:(0,oe.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)($s)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${a}_${o}`,onMousedown:e=>S(e,a,o),onMouseenter:e=>C(a,o)},[_.value===`${a}_${o}`?((0,i.wg)(),(0,i.j4)(Ns,{key:0,class:(0,oe.C_)(["cell-text",{active:_.value===`${a}_${o}`}]),style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(N)(e,a,o),onInsertExcelData:e=>j(e,a,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Zs)(t.text)},null,12,qs))],46,Js)),[[n.F8,!(0,s.SU)(k).includes(`${a}_${o}`)],[l,e=>q(e)]]))),128))],4)))),128))])],6)],4)}}});const Gs=(0,Vl.Z)(Xs,[["__scopeId","data-v-0236a619"]]);var Ks=Gs;const Qs={class:"element-content"};var er=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=da(),v=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},m=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(m.value=!1)})),(0,i.YP)(m,(()=>{l.setDisableHotkeysState(m.value)}));const h=()=>{t.elementInfo.lock||(m.value=!0)},f=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(m.value=!1),c.value||-1===f.value||(a.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?f.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}}))},y=new ResizeObserver(g);(0,i.bv)((()=>{d.value&&y.observe(d.value)})),(0,i.Ah)((()=>{d.value&&y.unobserve(d.value)}));const w=e=>{a.updateElement({id:t.elementInfo.id,props:{data:e}}),p()},x=e=>{const l=e.reduce(((e,t)=>e+t)),n=e.map((e=>e/l));a.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),p()},k=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Qs,[(0,i.Wm)(Ks,{onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["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:m.value,onChange:t[1]||(t[1]=e=>w(e)),onChangeColWidths:t[2]||(t[2]=e=>x(e)),onChangeSelectedCells:t[3]||(t[3]=e=>k(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!m.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:t[4]||(t[4]=e=>h()),onMousedown:t[5]||(t[5]=e=>v(e)),onTouchstart:t[6]||(t[6]=e=>v(e))},[(0,s.SU)(u)===e.elementInfo.id?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"mask-tip",style:(0,oe.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)):(0,i.kq)("",!0)],34)):(0,i.kq)("",!0)])),[[l,e.contextmenus]])],4)],6)}}});const tr=(0,Vl.Z)(er,[["__scopeId","data-v-742a731e"]]);var lr=tr;const ar=["width","height","stroke","stroke-width"],nr=["transform"],or=["d"];var ir=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Oi.emit(Ai.OPEN_LATEX_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[((0,i.wg)(),(0,i.iD)("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"},[(0,i._)("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)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,or)],8,nr)],8,ar))],32)),[[n,e.contextmenus]])],4)],6)}}});const sr=(0,Vl.Z)(ir,[["__scopeId","data-v-35c33b80"]]);var rr=sr,ur=(e,t)=>{(0,i.bv)((()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const a=new l;a.loadSource(e),a.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const a=l.createPlayer({type:"flv",url:e});a.attachMediaElement(t.value),a.load()}}}))};const cr=e=>((0,i.dD)("data-v-e55352ca"),e=e(),(0,i.Cn)(),e),dr={key:0,class:"load-error"},pr=["src","autoplay","poster"],vr={class:"bezel"},mr=cr((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),hr={class:"controller"},fr={class:"icons icons-left"},gr={class:"icon-content"},yr={class:"volume"},wr={class:"icon-content"},xr=cr((()=>(0,i._)("span",{class:"thumb"},null,-1))),kr=[xr],br={class:"time"},_r={class:"ptime"},Ir={class:"dtime"},Sr={class:"icons icons-right"},Cr={class:"speed"},Lr={class:"icon speed-icon"},Tr=["onClick"],Er={class:"icon-content"},Mr={class:"bar"},Ur=cr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Wr=[Ur];var Dr=(0,i.aZ)({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(.5),c=(0,s.iH)(!0),d=(0,s.iH)(0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(1),g=(0,s.iH)(!1),y=(0,s.iH)("00:00"),w=(0,s.iH)("0"),x=(0,i.Fl)((()=>l(d.value))),k=(0,i.Fl)((()=>l(p.value))),b=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>v.value/p.value*100+"%")),I=(0,i.Fl)((()=>100*u.value+"%")),S=(0,s.iH)(!1),C=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],L=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,p.value),n.value.currentTime=e,d.value=e)},T=()=>{n.value&&(c.value=!1,n.value.play(),h.value=!0)},E=()=>{n.value&&(c.value=!0,n.value.pause(),h.value=!0)},M=()=>{c.value?T():E()},U=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,u.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},W=e=>{n.value&&(n.value.playbackRate=e),f.value=e},D=()=>{p.value=n.value?.duration||0},H=()=>{d.value=n.value?.currentTime||0},F=()=>{m.value?(L(0),T()):E()},A=()=>{v.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},$=(0,s.iH)(!1),Z=()=>$.value=!0,O=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i},R=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i,document.removeEventListener("mousemove",O),document.removeEventListener("touchmove",O),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R)},z=()=>{document.addEventListener("mousemove",O),document.addEventListener("touchmove",O),document.addEventListener("mouseup",R),document.addEventListener("touchend",R)},P=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;U(l)},B=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",P),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",B)},N=()=>{document.addEventListener("mousemove",P),document.addEventListener("touchmove",P),document.addEventListener("mouseup",B),document.addEventListener("touchend",B)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;U(t)},Y=e=>{if(p.value&&o.value){const t=o.value.getBoundingClientRect().left,a=e.clientX-t;if(a<0||a>o.value.offsetWidth)return;const n=p.value*(a/o.value.offsetWidth);w.value=a-(n>=3600?25:20)+"px",y.value=l(n),g.value=!0}},V=()=>{n.value&&(n.value.muted?(n.value.muted=!1,U(.5)):(n.value.muted=!0,U(0)))},J=()=>{m.value=!m.value},q=(0,s.iH)(-1),X=(0,s.iH)(!1),G=()=>{X.value=!1,clearTimeout(q.value),q.value=setTimeout((()=>{n.value?.played.length&&(X.value=!0)}),3e3)};return ur(t.src,n),(e,t)=>{const l=(0,i.up)("IconPause"),a=(0,i.up)("IconPlayOne"),s=(0,i.up)("IconVolumeMute"),d=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["video-player",{"hide-controller":X.value}]),style:(0,oe.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:t[22]||(t[22]=e=>G()),onClick:t[23]||(t[23]=e=>G())},[(0,i._)("div",{class:"video-wrap",onClick:t[8]||(t[8]=e=>M())},[$.value?((0,i.wg)(),(0,i.iD)("div",dr,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,autoplay:e.autoplay,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:t[0]||(t[0]=e=>D()),onTimeupdate:t[1]||(t[1]=e=>H()),onEnded:t[2]||(t[2]=e=>F()),onProgress:t[3]||(t[3]=e=>A()),onPlay:t[4]||(t[4]=e=>{G(),c.value=!1}),onPause:t[5]||(t[5]=e=>G()),onError:t[6]||(t[6]=e=>Z())},null,40,pr),(0,i._)("div",vr,[(0,i._)("span",{class:(0,oe.C_)(["bezel-icon",{"bezel-transition":h.value}]),onAnimationend:t[7]||(t[7]=e=>h.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))],34)])]),mr,(0,i._)("div",hr,[(0,i._)("div",fr,[(0,i._)("div",{class:"icon play-icon",onClick:t[9]||(t[9]=e=>M())},[(0,i._)("span",gr,[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(l,{key:1}))])]),(0,i._)("div",yr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[10]||(t[10]=e=>V())},[(0,i._)("span",wr,[0===u.value?((0,i.wg)(),(0,i.j4)(s,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(d,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[11]||(t[11]=e=>N()),onTouchstart:t[12]||(t[12]=e=>N()),onClick:t[13]||(t[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,oe.j5)({width:I.value})},kr,4)],512)],32)]),(0,i._)("span",br,[(0,i._)("span",_r,(0,oe.zw)(x.value),1),(0,i.Uk)(" / "),(0,i._)("span",Ir,(0,oe.zw)(k.value),1)])]),(0,i._)("div",Sr,[(0,i._)("div",Cr,[(0,i._)("div",Lr,[(0,i._)("span",{class:"icon-content",onClick:t[14]||(t[14]=e=>S.value=!S.value)},(0,oe.zw)(1===f.value?"倍速":f.value+"x"),1),S.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:t[15]||(t[15]=e=>S.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,oe.C_)(["speed-menu-item",{active:e.value===f.value}]),key:e.label,onClick:t=>W(e.value)},(0,oe.zw)(e.label),11,Tr))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:t[16]||(t[16]=e=>J())},[(0,i._)("div",{class:(0,oe.C_)(["icon loop-icon",{active:m.value}])},[(0,i._)("span",Er,"循环"+(0,oe.zw)(m.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:t[17]||(t[17]=e=>z()),onTouchstart:t[18]||(t[18]=e=>z()),onMousemove:t[19]||(t[19]=e=>Y(e)),onMouseenter:t[20]||(t[20]=e=>g.value=!0),onMouseleave:t[21]||(t[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,oe.C_)(["bar-time",{hidden:!g.value}]),style:(0,oe.j5)({left:w.value})},(0,oe.zw)(y.value),7),(0,i._)("div",Mr,[(0,i._)("div",{class:"loaded",style:(0,oe.j5)({width:_.value})},null,4),(0,i._)("div",{class:"played",style:(0,oe.j5)({width:b.value})},Wr,4)])],544)])],38)}}});const Hr=(0,Vl.Z)(Dr,[["__scopeId","data-v-e55352ca"]]);var Fr=Hr,Ar=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[2]||(t[2]=e=>a(e,!1)),onTouchstart:t[3]||(t[3]=e=>a(e,!1))},[(0,i.Wm)(Fr,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(["t","b","l","r"],(e=>(0,i._)("div",{class:(0,oe.C_)(["handler-border",e]),key:e,onMousedown:t[0]||(t[0]=e=>a(e)),onTouchstart:t[1]||(t[1]=e=>a(e))},null,34))),64))],32)),[[n,e.contextmenus]])],4)],6)}}});const $r=(0,Vl.Z)(Ar,[["__scopeId","data-v-5dc89f2a"]]);var Zr=$r;const Or=e=>((0,i.dD)("data-v-44037f56"),e=e(),(0,i.Cn)(),e),Rr=["src","autoplay"],zr={class:"controller"},Pr={class:"icons"},Br={class:"icon-content"},Nr={class:"volume"},jr={class:"icon-content"},Yr=Or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Vr=[Yr],Jr={class:"time"},qr={class:"ptime"},Xr={class:"dtime"},Gr={class:"bar"},Kr=Or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Qr=[Kr];var eu=(0,i.aZ)({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e,{expose:t}){const l=e,a=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(),c=(0,s.iH)(.5),d=(0,s.iH)(!0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(0),h=(0,s.iH)(!1),f=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(v.value))),x=(0,i.Fl)((()=>p.value/v.value*100+"%")),k=(0,i.Fl)((()=>m.value/v.value*100+"%")),b=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,v.value),o.value.currentTime=e,p.value=e)},I=()=>{o.value&&(d.value=!1,o.value.play())},S=()=>{o.value&&(d.value=!0,o.value.pause())},C=()=>{d.value?I():S()},L=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,c.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},T=()=>{v.value=o.value?.duration||0},E=()=>{p.value=o.value?.currentTime||0},M=()=>{d.value=!1},U=()=>{l.loop?(_(0),I()):S()},W=()=>{m.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=()=>ta.error("视频加载失败"),H=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a},F=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},A=()=>{document.addEventListener("mousemove",H),document.addEventListener("touchmove",H),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},$=e=>{if(!u.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(u.value))/45;L(l)},Z=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("touchmove",$),document.removeEventListener("mouseup",Z),document.removeEventListener("touchend",Z)},O=()=>{document.addEventListener("mousemove",$),document.addEventListener("touchmove",$),document.addEventListener("mouseup",Z),document.addEventListener("touchend",Z)},R=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},z=e=>{if(v.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=v.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",f.value=a(n),h.value=!0}},P=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:C}),(e,t)=>{const l=(0,i.up)("IconPlayOne"),a=(0,i.up)("IconPause"),n=(0,i.up)("IconVolumeMute"),s=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,oe.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:t[0]||(t[0]=e=>T()),onTimeupdate:t[1]||(t[1]=e=>E()),onPlay:t[2]||(t[2]=e=>M()),onEnded:t[3]||(t[3]=e=>U()),onProgress:t[4]||(t[4]=e=>W()),onError:t[5]||(t[5]=e=>D())},null,40,Rr),(0,i._)("div",zr,[(0,i._)("div",Pr,[(0,i._)("div",{class:"icon play-icon",onClick:t[6]||(t[6]=e=>C())},[(0,i._)("span",Br,[d.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",Nr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[7]||(t[7]=e=>P())},[(0,i._)("span",jr,[0===c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(s,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[8]||(t[8]=e=>O()),onTouchstart:t[9]||(t[9]=e=>O()),onClick:t[10]||(t[10]=e=>R(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,oe.j5)({width:b.value})},Vr,4)],512)],32)])]),(0,i._)("span",Jr,[(0,i._)("span",qr,(0,oe.zw)(y.value),1),(0,i.Uk)(" / "),(0,i._)("span",Xr,(0,oe.zw)(w.value),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:t[11]||(t[11]=e=>A()),onTouchstart:t[12]||(t[12]=e=>A()),onMousemove:t[13]||(t[13]=e=>z(e)),onMouseenter:t[14]||(t[14]=e=>h.value=!0),onMouseleave:t[15]||(t[15]=e=>h.value=!1)},[(0,i._)("div",{class:(0,oe.C_)(["bar-time",{hidden:!h.value}]),style:(0,oe.j5)({left:g.value})},(0,oe.zw)(f.value),7),(0,i._)("div",Gr,[(0,i._)("div",{class:"loaded",style:(0,oe.j5)({width:k.value})},null,4),(0,i._)("div",{class:"played",style:(0,oe.j5)({width:x.value})},Qr,4)])],544)])],4)}}});const tu=(0,Vl.Z)(eu,[["__scopeId","data-v-44037f56"]]);var lu=tu,au=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)(R()),{viewportRatio:r}=(0,o.Jk)($()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=oa,a=oa*r.value,n=280/l.value,o=50/l.value,i=t.elementInfo.width,s=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=s;return u+n>=e&&(d=i-n),c+s+o>=a&&(p=-o),{left:d+"px",top:p+"px"}})),d=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(e,t)=>{const o=(0,i.up)("IconVolumeNotice"),r=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[1]||(t[1]=e=>d(e)),onTouchstart:t[2]||(t[2]=e=>d(e))},[(0,i.Wm)(o,{class:"audio-icon",style:(0,oe.j5)({fontSize:u.value,color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(lu,{key:0,class:"audio-player",style:(0,oe.j5)({...c.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[r,e.contextmenus]])],4)],6)}}});const nu=(0,Vl.Z)(au,[["__scopeId","data-v-53bdc956"]]);var ou=nu;const iu=["id"];var su=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{},elementIndex:{},isMultiSelect:{type:Boolean},selectElement:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:$o,[sa.TEXT]:ls,[sa.SHAPE]:ys,[sa.LINE]:Es,[sa.CHART]:As,[sa.TABLE]:lr,[sa.LATEX]:rr,[sa.VIDEO]:Zr,[sa.AUDIO]:ou};return e[t.elementInfo.type]||null})),{orderElement:a}=ba(),{alignElementToCanvas:n}=qn(),{combineElements:o,uncombineElements:s}=ya(),{deleteElement:r}=ga(),{lockElement:u,unlockElement:c}=fa(),{copyElement:d,pasteElement:p,cutElement:v}=wa(),{selectAllElement:m}=xa(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>c(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:p},{divider:!0},{text:"水平居中",handler:()=>n(ee.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(ee.CENTER)},{text:"水平居中",handler:()=>n(ee.HORIZONTAL)},{text:"左对齐",handler:()=>n(ee.LEFT)},{text:"右对齐",handler:()=>n(ee.RIGHT)}]},{text:"垂直居中",handler:()=>n(ee.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(ee.CENTER)},{text:"垂直居中",handler:()=>n(ee.VERTICAL)},{text:"顶部对齐",handler:()=>n(ee.TOP)},{text:"底部对齐",handler:()=>n(ee.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,Q.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,Q.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,Q.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,Q.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,Q.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,Q.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?s:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:r}];return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,iu))}});const ru=su;var uu=ru,cu=(0,i.aZ)({__name:"MouseSelection",props:{top:{},left:{},width:{},height:{},quadrant:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,oe.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const du=(0,Vl.Z)(cu,[["__scopeId","data-v-2c5e1d42"]]);var pu=du;const vu={class:"grid-lines"},mu=["d","stroke"];var hu=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)(R()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)($()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return W.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=oa,t=oa*n.value;let a="";for(let n=0;n<=Math.floor(t/l.value);n++)a+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)a+=`M${n*l.value} 0 L${n*l.value} ${t} `;return a}));return(e,l)=>((0,i.wg)(),(0,i.iD)("svg",vu,[(0,i._)("path",{style:(0,oe.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:c.value,fill:"none",stroke:u.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,mu)]))}});const fu=(0,Vl.Z)(hu,[["__scopeId","data-v-05484a24"]]);var gu=fu,yu=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:a,imageSize:n,gradientColor:o,gradientRotate:i,gradientType:s}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return a?"repeat"===n?{backgroundImage:`url(${a}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${a}`,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=i||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===s?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},wu=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)(R()),{currentSlide:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=yu(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,oe.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(gu,{key:0})):(0,i.kq)("",!0)],4))}});const xu=(0,Vl.Z)(wu,[["__scopeId","data-v-b6b18502"]]);var ku=xu,bu=(0,i.aZ)({__name:"AlignmentLine",props:{type:{},axis:{},length:{},canvasScale:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.axis.x*t.canvasScale+"px")),a=(0,i.Fl)((()=>t.axis.y*t.canvasScale+"px")),n=(0,i.Fl)((()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,oe.j5)({left:l.value,top:a.value})},[(0,i._)("div",{class:(0,oe.C_)(["line",e.type]),style:(0,oe.j5)(n.value)},null,6)],4))}});const _u=(0,Vl.Z)(bu,[["__scopeId","data-v-ed6fc00a"]]);var Iu=_u;const Su={class:"ruler"};var Cu=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Su,[(0,i._)("div",{class:"h",style:(0,oe.j5)({width:e.viewportStyles.width*(0,s.SU)(l)+"px",left:e.viewportStyles.left+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,oe.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,oe.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,oe.j5)({height:e.viewportStyles.height*(0,s.SU)(l)+"px",top:e.viewportStyles.top+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,oe.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:e,style:(0,oe.j5)({height:a.value+"px"})},[(0,i._)("span",null,(0,oe.zw)(e),1)],6))),64))],4)]))}});const Lu=(0,Vl.Z)(Cu,[["__scopeId","data-v-2963c74c"]]);var Tu=Lu;const Eu=["width","height"],Mu=["d"];var Uu=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=t,a=R(),{creatingElement:r}=(0,o.Jk)(a),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!p.value)return;const{x:e,y:t}=p.value.getBoundingClientRect();v.value={x:e,y:t}}));const m=e=>{let t=!0;const n=e.pageX,o=e.pageY;c.value=[n,o],document.onmousemove=e=>{if(!r.value||!t)return;let l=e.pageX,a=e.pageY;if(u.value){const e=l-n,t=a-o,i=Math.abs(e),s=Math.abs(t);if("shape"===r.value.type){const r=t>0&&e<0||t<0&&e>0;i>s?a=r?o-e:o+e:l=r?n-t:n+t}else"line"===r.value.type&&(i>s?a=o:l=n)}d.value=[l,a]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>a.setCreatingElement(null)),0);t=!1;const i=e.pageX,s=e.pageY,u=30;if("line"===r.value?.type&&(Math.abs(i-n)>=u||Math.abs(s-o)>=u))l("created",{start:c.value,end:d.value});else if("line"!==r.value?.type&&Math.abs(i-n)>=u&&Math.abs(s-o)>=u)l("created",{start:c.value,end:d.value});else{const e=200,t=Math.min(i,n),a=Math.min(s,o),r=Math.max(i,n),c=Math.max(s,o),d=r-t>=u?r-t:e,p=c-a>=u?c-a:e;l("created",{start:[t,a],end:[t+d,a+p]})}}},h=(0,i.Fl)((()=>{if(!c.value||!d.value)return null;if(!r.value||"line"!==r.value.type)return null;const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),u=o-n>=24?o-n:24,p=s-i>=24?s-i:24,v=e===n?0:o-n,m=t===i?0:s-i,h=l===n?0:o-n,f=a===i?0:s-i,g=`M${v}, ${m} L${h}, ${f}`;return{svgWidth:u,svgHeight:p,startX:v,startY:m,endX:h,endY:f,path:g}})),f=(0,i.Fl)((()=>{if(!c.value||!d.value)return{};const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,u=s-i;return{left:n-v.value.x+"px",top:i-v.value.y+"px",width:r+"px",height:u+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:p,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>m(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[c.value&&d.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["selection",(0,s.SU)(r)?.type]),style:(0,oe.j5)(f.value)},["line"===(0,s.SU)(r)?.type&&h.value?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:h.value.svgWidth,height:h.value.svgHeight},[(0,i._)("path",{d:h.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,Mu)],8,Eu)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const Wu=(0,Vl.Z)(Uu,[["__scopeId","data-v-85b0bbaa"]]);var Du=Wu;const Hu={overflow:"visible"},Fu=["d","fill"];var Au=(0,i.aZ)({__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const l=t,a=R(),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(q()),{theme:u}=(0,o.Jk)($()),c=(0,s.iH)(),d=(0,s.iH)(!1),p=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!c.value)return;const{x:e,y:t}=c.value.getBoundingClientRect();p.value={x:e,y:t}}));const v=(0,s.iH)(null),m=(0,s.iH)([]),h=(0,s.iH)(!1),f=(e,t=!1)=>{let l=e.pageX-p.value.x,a=e.pageY-p.value.y;if(t)return{pageX:l,pageY:a};if(r.value&&m.value.length){const[e,t]=m.value[m.value.length-1];Math.abs(e-l)-Math.abs(t-a)>0?a=t:l=e}return{pageX:l,pageY:a}},g=e=>{if(d.value){const{pageX:t,pageY:l}=f(e,!0);return m.value.push([t,l]),void(v.value=null)}const{pageX:t,pageY:l}=f(e);if(v.value=[t,l],m.value.length>=2){const[e,a]=m.value[0];Math.abs(e-t)<5&&Math.abs(a-l)<5?h.value=!0:h.value=!1}else h.value=!1},y=(0,i.Fl)((()=>{let e="";for(let t=0;t<m.value.length;t++){const l=m.value[t];e+=0===t?`M ${l[0]} ${l[1]} `:`L ${l[0]} ${l[1]} `}return m.value.length&&v.value&&(e+=`L ${v.value[0]} ${v.value[1]}`),e})),w=(e=!0)=>{const t=m.value.map((e=>e[0])),l=m.value.map((e=>e[1])),a=Math.min(...t),n=Math.min(...l),o=Math.max(...t),i=Math.max(...l),s=m.value.map((e=>[e[0]-a,e[1]-n]));let r="";for(let p=0;p<s.length;p++){const e=s[p];r+=0===p?`M ${e[0]} ${e[1]} `:`L ${e[0]} ${e[1]} `}e&&(r+="Z");const u=[a+p.value.x,n+p.value.y],c=[o+p.value.x,i+p.value.y],d=[o-a,i-n];return{start:u,end:c,path:r,viewBox:d}},x=e=>{const{pageX:t,pageY:a}=f(e);d.value=!0,h.value?l("created",w()):m.value.push([t,a]),document.onmouseup=()=>{d.value=!1}},k=()=>{a.setCreatingCustomShapeState(!1)},b=()=>{l("created",{...w(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:u.value.themeColor,style:"solid"}}),k()},_=e=>{const t=e.key.toUpperCase();t===ne.ESC&&k(),t===ne.ENTER&&b()};return(0,i.bv)((()=>{ta.success("点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成",{duration:5e3}),document.addEventListener("keydown",_)})),(0,i.Ah)((()=>document.removeEventListener("keydown",_))),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:c,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>x(e)),["stop"])),onMousemove:t[1]||(t[1]=e=>g(e)),onContextmenu:t[2]||(t[2]=(0,n.iM)((e=>k()),["stop","prevent"]))},[((0,i.wg)(),(0,i.iD)("svg",Hu,[(0,i._)("path",{d:y.value,stroke:"#d14424",fill:h.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,Fu)]))],544))}});const $u=(0,Vl.Z)(Au,[["__scopeId","data-v-6dc9876e"]]);var Zu=$u,Ou=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:le.LEFT_TOP,style:{}},{direction:le.TOP,style:{left:e.value/2+"px"}},{direction:le.RIGHT_TOP,style:{left:e.value+"px"}},{direction:le.LEFT,style:{top:t.value/2+"px"}},{direction:le.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:le.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:le.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:le.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:le.LEFT,style:{top:t.value/2+"px"}},{direction:le.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:le.TOP,style:{left:e.value/2+"px"}},{direction:le.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:te.T,style:{width:e.value+"px"}},{type:te.B,style:{top:t.value+"px",width:e.value+"px"}},{type:te.L,style:{height:t.value+"px"}},{type:te.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},Ru=(0,i.aZ)({__name:"ResizeHandler",props:{type:{},rotate:{default:0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["resize-handler",l.value,e.type])},null,2))}});const zu=(0,Vl.Z)(Ru,[["__scopeId","data-v-1e66197f"]]);var Pu=zu,Bu=(0,i.aZ)({__name:"BorderLine",props:{type:{},isWide:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Nu=(0,Vl.Z)(Bu,[["__scopeId","data-v-8346cf6c"]]);var ju=Nu,Yu=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{},scaleMultiElement:{type:Function}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>t.elementList.filter((e=>l.value.includes(e.id))))),u=(0,s.iH)({minX:0,maxX:0,minY:0,maxY:0}),c=(0,i.Fl)((()=>(u.value.maxX-u.value.minX)*a.value)),d=(0,i.Fl)((()=>(u.value.maxY-u.value.minY)*a.value)),{resizeHandlers:p,borderLines:v}=Ou(c,d),m=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=ke(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(m);const h=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,oe.j5)({left:u.value.minX*(0,s.SU)(a)+"px",top:u.value.minY*(0,s.SU)(a)+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.j4)(ju,{key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),h.value?(0,i.kq)("",!0):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:0},(0,i.Ko)((0,s.SU)(p),(t=>((0,i.wg)(),(0,i.j4)(Pu,{key:t.direction,type:t.direction,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const Vu=(0,Vl.Z)(Yu,[["__scopeId","data-v-97dc9b9a"]]);var Ju=Vu;const qu={class:"rotate-handler"};function Xu(e,t){return(0,i.wg)(),(0,i.iD)("div",qu)}const Gu={},Ku=(0,Vl.Z)(Gu,[["render",Xu],["__scopeId","data-v-b99d8dae"]]);var Qu=Ku;const ec={inheritAttrs:!1};var tc=(0,i.aZ)({...ec,__name:"ImageElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>a.value===t.elementInfo.id)),u=(0,i.Fl)((()=>t.elementInfo.width*l.value)),c=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:d,borderLines:p}=Ou(u,c);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["image-element-operate",{cliping:r.value}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:u.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const lc=(0,Vl.Z)(tc,[["__scopeId","data-v-7bcad5a9"]]);var ac=lc;const nc={class:"text-element-operate"},oc={inheritAttrs:!1};var ic=(0,i.aZ)({...oc,__name:"TextElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=Ou(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const sc=ic;var rc=sc;const uc={class:"shape-element-operate"},cc={inheritAttrs:!1};var dc=(0,i.aZ)({...cc,__name:"ShapeElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},moveShapeKeypoint:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Ou(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||void 0===t.elementInfo.keypoint)return{};const e=ra[t.elementInfo.pathFormula];if("editable"in e){const a=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:a*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-a)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-a)/2*l.value+"px"};if("top"===e.relative)return{top:a*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-a)*l.value+"px"}}return{}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"operate-keypoint-handler",style:(0,oe.j5)(d.value),onMousedown:t[1]||(t[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const pc=(0,Vl.Z)(dc,[["__scopeId","data-v-52dcdbf8"]]);var vc=pc;const mc={class:"line-element-operate"},hc=["width","height","stroke"],fc={key:0},gc=["x1","y1","x2","y2"],yc=["x1","y1","x2","y2"],wc=["x1","y1","x2","y2"],xc=["x1","y1","x2","y2"],kc={inheritAttrs:!1};var bc=(0,i.aZ)({...kc,__name:"LineElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},dragLineElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0]))),r=(0,i.Fl)((()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1]))),u=(0,i.Fl)((()=>{const e=[{handler:ae.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:ae.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const a=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:ae.C,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[a,n]=t.elementInfo.cubic;e.push({handler:ae.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:ae.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",mc,[e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.handler,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.dragLineElement(l,e.elementInfo,t.handler)),["stop"])},null,8,["style","onMousedown"])))),128)),((0,i.wg)(),(0,i.iD)("svg",{width:a.value||1,height:r.value||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,oe.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",fc,[(0,i._)("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,gc),(0,i._)("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,yc)])):(0,i.kq)("",!0),e.elementInfo.cubic?((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)(e.elementInfo.cubic,((t,l)=>((0,i.wg)(),(0,i.iD)("g",{key:l},[0===l?((0,i.wg)(),(0,i.iD)("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,wc)):(0,i.kq)("",!0),1===l?((0,i.wg)(),(0,i.iD)("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,xc)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,hc))],64)):(0,i.kq)("",!0)]))}});const _c=(0,Vl.Z)(bc,[["__scopeId","data-v-3aa5cc44"]]);var Ic=_c;const Sc={class:"table-element-operate"},Cc={inheritAttrs:!1};var Lc=(0,i.aZ)({...Cc,__name:"TableElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.outline.width||1)),r=(0,i.Fl)((()=>(t.elementInfo.width+a.value)*l.value)),u=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:c,borderLines:d}=Ou(r,u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:r.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const Tc=Lc;var Ec=Tc;const Mc={class:"common-element-operate"},Uc={inheritAttrs:!1};var Wc=(0,i.aZ)({...Uc,__name:"CommonElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Ou(a,r),d=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Mc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),d.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Qu,{key:0,class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const Dc=Wc;var Hc=Dc,Fc=()=>{const e=$(),{addHistorySnapshot:t}=da(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return ta.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return ta.error("请先选择链接目标"),!1;const o={link:a};return e.updateElement({id:l.id,props:o}),t(),!0},a=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:a}},Ac=(0,i.aZ)({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:0}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["divider",e.type]),style:(0,oe.j5)({margin:"horizontal"===e.type?`${e.margin||24}px 0`:`0 ${e.margin||8}px`})},null,6))}});const $c=(0,Vl.Z)(Ac,[["__scopeId","data-v-6b66cde8"]]);var Zc=$c;const Oc=["href"],Rc={class:"btns"};var zc=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{},link:{},openLinkDialog:{type:Function}},setup(e){const t=e,l=R(),a=$(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=Fc(),c=(0,i.Fl)((()=>"line"===t.elementInfo.type?0:t.elementInfo.height)),d=e=>{const t=r.value.findIndex((t=>t.id===e));-1!==t&&(l.setActiveElementIdList([]),a.updateSlideIndex(t))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,oe.j5)({top:c.value*(0,s.SU)(n)+10+"px"})},["web"===e.link.type?((0,i.wg)(),(0,i.iD)("a",{key:0,class:"link",href:e.link.target,target:"_blank"},(0,oe.zw)(e.link.target),9,Oc)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:t[0]||(t[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,oe.zw)(e.link.target),1)),(0,i._)("div",Rc,[(0,i._)("div",{class:"btn",onClick:t[1]||(t[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)(Zc,{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:t[2]||(t[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const Pc=(0,Vl.Z)(zc,[["__scopeId","data-v-316c4664"]]);var Bc=Pc;const Nc={key:1,class:"animation-index"};var jc=(0,i.aZ)({__name:"index",props:{elementInfo:{},isSelected:{type:Boolean},isActive:{type:Boolean},isActiveGroupElement:{type:Boolean},isMultiSelect:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},dragLineElement:{type:Function},moveShapeKeypoint:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)(R()),{formatedAnimations:r}=(0,o.Jk)($()),u=(0,i.Fl)((()=>{const e={[sa.IMAGE]:ac,[sa.TEXT]:rc,[sa.SHAPE]:vc,[sa.LINE]:Ic,[sa.TABLE]:Ec,[sa.CHART]:Hc,[sa.LATEX]:Hc,[sa.VIDEO]:Hc,[sa.AUDIO]:Hc};return e[t.elementInfo.type]||null})),c=(0,i.Fl)((()=>{const e=[];for(let l=0;l<r.value.length;l++){const a=r.value[l].animations.map((e=>e.elId));a.includes(t.elementInfo.id)&&e.push(l)}return e})),d=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),p=(0,i.Fl)((()=>"height"in t.elementInfo?t.elementInfo.height:0));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,oe.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${d.value}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${p.value*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)(u.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"])):(0,i.kq)("",!0),"elAnimation"===(0,s.SU)(a)&&c.value.length?((0,i.wg)(),(0,i.iD)("div",Nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,oe.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)(Bc,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Yc=(0,Vl.Z)(jc,[["__scopeId","data-v-5ec1ff35"]]);var Vc=Yc;const Jc=["src"];var qc=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Gn(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Qn(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:v}=eo(p);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(ko,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,oe.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,oe.j5)({top:(0,s.SU)(d).top,left:(0,s.SU)(d).left,width:(0,s.SU)(d).width,height:(0,s.SU)(d).height,filter:(0,s.SU)(v)}),alt:""},null,12,Jc),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,oe.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const Xc=(0,Vl.Z)(qc,[["__scopeId","data-v-24fef706"]]);var Gc=Xc;const Kc=["innerHTML"];var Qc=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({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:(0,s.SU)(a),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"})},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i._)("div",{class:"text ProseMirror-static",style:(0,oe.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,12,Kc)],4)],4)],4))}});const ed=(0,Vl.Z)(Qc,[["__scopeId","data-v-52a206f2"]]);var td=ed;const ld=["width","height"],ad={key:0},nd=["transform"],od=["d","fill","stroke","stroke-width","stroke-dasharray"],id=["innerHTML"];var sd=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineColor:n,strokeDashArray:o}=to(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=Xn(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Gn(c,d),v=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",ad,[(0,i.Wm)(ds,{id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("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)`},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(n),"stroke-width":(0,s.SU)(a),"stroke-dasharray":(0,s.SU)(o)},null,8,od)],8,nd)],8,ld)),(0,i._)("div",{class:(0,oe.C_)(["shape-text",v.value.align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,id)],2)],4)],4)],4))}});const rd=(0,Vl.Z)(sd,[["__scopeId","data-v-b13f8fa8"]]);var ud=rd;const cd=["width","height"],dd=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var pd=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l),n=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),r=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),u=(0,i.Fl)((()=>Ce(t.elementInfo)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:n.value,height:o.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(_s,{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"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(_s,{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"])):(0,i.kq)("",!0)]),(0,i._)("path",{d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":r.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,dd)],8,cd))],4)],4))}});const vd=(0,Vl.Z)(pd,[["__scopeId","data-v-443e2f82"]]);var md=vd,hd=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{}},setup(e){const t=(0,i.f3)(Tn)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ds,{width:e.elementInfo.width*a.value,height:e.elementInfo.height*a.value,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:(0,oe.j5)({zoom:1/a.value})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const fd=(0,Vl.Z)(hd,[["__scopeId","data-v-7c03d68d"]]);var gd=fd;const yd=["width"],wd=["rowspan","colspan"],xd=["innerHTML"];var kd=(0,i.aZ)({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=(0,s.iH)([]),a=(0,i.Fl)((()=>l.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>t.colWidths,()=>t.width],(()=>{l.value=t.colWidths.map((e=>e*t.width))}),{immediate:!0});const o=(0,i.Fl)((()=>t.data)),{hideCells:r}=Os(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=Rs(u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,oe.j5)({width:a.value+"px"})},[(0,i._)("table",{class:(0,oe.C_)({theme:u.value,"row-header":u.value?.rowHeader,"row-footer":u.value?.rowFooter,"col-header":u.value?.colHeader,"col-footer":u.value?.colFooter}),style:(0,oe.j5)(`--themeColor: ${u.value?.color}; --subThemeColor1: ${(0,s.SU)(c)[0]}; --subThemeColor2: ${(0,s.SU)(c)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,yd)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.data,((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,oe.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,a)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:"cell",style:(0,oe.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)($s)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Zs)(t.text)},null,12,xd)],12,wd)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const bd=(0,Vl.Z)(kd,[["__scopeId","data-v-5d949d4d"]]);var _d=bd;const Id={class:"element-content"};var Sd=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Id,[(0,i.Wm)(_d,{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))}});const Cd=(0,Vl.Z)(Sd,[["__scopeId","data-v-3eff7eba"]]);var Ld=Cd;const Td={class:"element-content"},Ed=["width","height","stroke","stroke-width"],Md=["transform"],Ud=["d"];var Wd=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Td,[((0,i.wg)(),(0,i.iD)("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"},[(0,i._)("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)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,Ud)],8,Md)],8,Ed))])],4)],4))}});const Dd=(0,Vl.Z)(Wd,[["__scopeId","data-v-1587280d"]]);var Hd=Dd,Fd=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[(0,i.Wm)(l,{class:"icon"})],4)],4)],4)}}});const Ad=(0,Vl.Z)(Fd,[["__scopeId","data-v-09436dde"]]);var $d=Ad;const Zd={class:"element-content"};var Od=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(e,t)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Zd,[(0,i.Wm)(a,{class:"audio-icon",style:(0,oe.j5)({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const Rd=(0,Vl.Z)(Od,[["__scopeId","data-v-5da834d7"]]);var zd=Rd,Pd=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:Gc,[sa.TEXT]:td,[sa.SHAPE]:ud,[sa.LINE]:md,[sa.CHART]:gd,[sa.TABLE]:Ld,[sa.LATEX]:Hd,[sa.VIDEO]:$d,[sa.AUDIO]:zd};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const Bd=Pd;var Nd=Bd;const jd={key:1,class:"placeholder"};var Yd=(0,i.aZ)({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=yu(a),r=(0,i.Fl)((()=>t.size/oa));return(0,i.JJ)(Tn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,oe.j5)({width:e.size+"px",height:e.size*(0,s.SU)(l)+"px"})},[e.visible?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"elements",style:(0,oe.j5)({width:(0,s.SU)(oa)+"px",height:(0,s.SU)(oa)*(0,s.SU)(l)+"px",transform:`scale(${r.value})`})},[(0,i._)("div",{class:"background",style:(0,oe.j5)((0,s.SU)(n))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((e,t)=>((0,i.wg)(),(0,i.j4)(Nd,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",jd,"加载中 ..."))],4))}});const Vd=(0,Vl.Z)(Yd,[["__scopeId","data-v-43dcaa52"]]);var Jd=Vd;const qd=["onClick"];var Xd=(0,i.aZ)({__name:"Tabs",props:{value:{},tabs:{},card:{type:Boolean,default:!1},tabsStyle:{},tabStyle:{},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=t;return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:(0,oe.j5)(e.tabsStyle||{})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.tabs,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["tab",{active:t.key===e.value}]),key:t.key,style:(0,oe.j5)({...e.tabStyle||{},"--color":t.color}),onClick:e=>l("update:value",t.key)},(0,oe.zw)(t.label),15,qd)))),128))],6))}});const Gd=(0,Vl.Z)(Xd,[["__scopeId","data-v-5e3d7626"]]);var Kd=Gd,Qd=(0,i.aZ)({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,n=()=>{l.disabled||a("click")};return(e,t)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,oe.C_)(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&"default"===e.type,primary:!e.disabled&&"primary"===e.type,checkbox:!e.disabled&&"checkbox"===e.type,radio:!e.disabled&&"radio"===e.type,small:"small"===e.size,first:e.first,last:e.last}]),onClick:t[0]||(t[0]=e=>n())},[(0,i.WI)(e.$slots,"default")],2))}});const ep=(0,Vl.Z)(Qd,[["__scopeId","data-v-52c90330"]]);var tp=ep;const lp={key:0,class:"select-wrap"},ap={class:"selector"},np={class:"icon"},op=["onClick"],ip={class:"selector"},sp={class:"icon"};var rp=(0,i.aZ)({__name:"Select",props:{value:{},options:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.options.find((e=>e.value===l.value))?.label||l.value)),n=t,o=(0,s.iH)(!1),r=(0,s.iH)(),u=(0,s.iH)(0),c=()=>{r.value&&(u.value=r.value.clientWidth)},d=new ResizeObserver(c);(0,i.bv)((()=>{r.value&&d.observe(r.value)})),(0,i.Ah)((()=>{r.value&&d.unobserve(r.value)}));const p=e=>{e.disabled||(n("update:value",e.value),o.value=!1)};return(e,t)=>{const l=(0,i.up)("IconDown");return e.disabled?((0,i.wg)(),(0,i.iD)("div",lp,[(0,i._)("div",{class:"select disabled",ref_key:"selectRef",ref:r},[(0,i._)("div",ap,(0,oe.zw)(e.value),1),(0,i._)("div",np,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])):((0,i.wg)(),(0,i.j4)(dn,{key:1,class:"select-wrap",trigger:"click",value:o.value,"onUpdate:value":t[0]||(t[0]=e=>o.value=e),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"options",style:(0,oe.j5)({width:u.value+2+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["option",{disabled:t.disabled,selected:t.value===e.value}]),key:t.value,onClick:e=>p(t)},(0,oe.zw)(t.label),11,op)))),128))],4)])),default:(0,i.w5)((()=>[(0,i._)("div",{class:"select",ref_key:"selectRef",ref:r},[(0,i._)("div",ip,(0,oe.zw)(a.value),1),(0,i._)("div",sp,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])),_:3},8,["value","contentStyle"]))}}});const up=(0,Vl.Z)(rp,[["__scopeId","data-v-5bf3b141"]]);var cp=up;const dp=e=>((0,i.dD)("data-v-cc39ee16"),e=e(),(0,i.Cn)(),e),pp={class:"link-dialog"},vp={key:2,class:"preview"},mp=dp((()=>(0,i._)("div",null,"预览:",-1))),hp={class:"btns"};var fp=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const l=t,{handleElement:a}=(0,o.Jk)(R()),{slides:n,currentSlide:r}=(0,o.Jk)($()),u=(0,s.iH)("web"),c=(0,s.iH)(""),d=(0,s.iH)(""),p=(0,i.Fl)((()=>n.value.map(((e,t)=>({label:`幻灯片 ${t+1}`,value:e.id,disabled:r.value.id===e.id})))));d.value=n.value.find((e=>e.id!==r.value.id))?.id||"";const v=(0,i.Fl)((()=>d.value&&n.value.find((e=>e.id===d.value))||null)),m=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:h}=Fc();(0,i.bv)((()=>{a.value?.link&&("web"===a.value.link.type?c.value=a.value.link.target:"slide"===a.value.link.type&&(d.value=a.value.link.target),u.value=a.value.link.type)}));const f=()=>{const e={type:u.value,target:"web"===u.value?c.value:d.value};if(a.value){const t=h(a.value,e);t?l("close"):c.value=""}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",pp,[(0,i.Wm)(Kd,{tabs:m,value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),"web"===u.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"input",value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===u.value?((0,i.wg)(),(0,i.j4)(cp,{key:1,class:"input",value:d.value,"onUpdate:value":t[2]||(t[2]=e=>d.value=e),options:p.value},null,8,["value","options"])):(0,i.kq)("",!0),"slide"===u.value&&v.value?((0,i.wg)(),(0,i.iD)("div",vp,[mp,(0,i.Wm)(Jd,{class:"thumbnail",slide:v.value,size:500},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",hp,[(0,i.Wm)(tp,{onClick:t[3]||(t[3]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[4]||(t[4]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const gp=(0,Vl.Z)(fp,[["__scopeId","data-v-cc39ee16"]]);var yp=gp,wp=(0,i.aZ)({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(e,{emit:t}){const{IconClose:l}=Zl,a=e,o=(0,s.iH)(),r=t,u=(0,s.iH)(!1),c=(0,i.Fl)((()=>({width:a.width+"px",...a.contentStyle||{}})));(0,i.YP)((()=>a.visible),(()=>{a.visible&&(0,i.Y3)((()=>o.value.focus()))}));const d=()=>{r("update:visible",!1),r("closed")},p=()=>{a.visible&&a.closeOnEsc&&d()},v=()=>{a.closeOnClickMask&&d()};return(e,t)=>((0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:"modal-fade"},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal",ref_key:"modalRef",ref:o,tabindex:"-1",onKeyup:t[4]||(t[4]=(0,n.D2)((e=>p()),["esc"]))},[(0,i._)("div",{class:"mask",onClick:t[0]||(t[0]=e=>v())}),(0,i.Wm)(n.uT,{name:"modal-zoom",onAfterLeave:t[2]||(t[2]=e=>u.value=!1),onBeforeEnter:t[3]||(t[3]=e=>u.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal-content",style:(0,oe.j5)(c.value)},[e.closeButton?((0,i.wg)(),(0,i.iD)("span",{key:0,class:"close-btn",onClick:t[1]||(t[1]=e=>d())},[(0,i.Wm)((0,s.SU)(l))])):(0,i.kq)("",!0),u.value?(0,i.WI)(e.$slots,"default",{key:1}):(0,i.kq)("",!0)],4),[[n.F8,e.visible]])])),_:3})],544),[[n.F8,e.visible]])])),_:3})]))}});const xp=(0,Vl.Z)(wp,[["__scopeId","data-v-fea8edcc"]]);var kp=xp;const bp={class:"operates"},_p={key:2,class:"drag-mask"};var Ip=(0,i.aZ)({__name:"index",setup(e){const t=R(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,creatingElement:v,creatingCustomShape:m,canvasScale:h,textFormatPainter:f}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)($()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(q()),x=(0,s.iH)(),k=(0,s.iH)([]),b=(0,s.iH)(!1),_=()=>b.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const I=(0,s.iH)([]),S=()=>{I.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(S);const C=(0,s.iH)(),{dragViewport:L,viewportStyles:T}=Wn(C);Hn(C);const{mouseSelection:E,mouseSelectionVisible:M,mouseSelectionQuadrant:U,updateMouseSelection:W}=Dn(I,x),{dragElement:H}=jn(I,k,h),{dragLineElement:F}=Yn(I),{selectElement:A}=Nn(I,H),{scaleElement:Z,scaleMultiElement:O}=Bn(I,k,h),{rotateElement:z}=An(I,x,h),{moveShapeKeypoint:P}=Vn(I,h),{selectAllElement:B}=xa(),{deleteAllElements:N}=ga(),{pasteElement:j}=wa(),{enterScreeningFromStart:Y}=Ca(),{updateSlideIndex:V}=ha(),{createTextElement:J,createShapeElement:X}=pa();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const G=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):W(e),c.value||t.setEditorareaFocus(!0),f.value&&t.setTextFormatPainter(null),Un()},K=e=>{if(l.value.length||v.value||m.value)return;if(!x.value)return;const t=x.value.getBoundingClientRect(),a=(e.pageX-t.x)/h.value,n=(e.pageY-t.y)/h.value;J({left:a,top:n,width:200/h.value,height:0})};(0,i.Ah)((()=>{f.value&&t.setTextFormatPainter(null)}));const Q=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:ee}=La(),te=(0,D.throttle)(ee,100,{leading:!0,trailing:!1}),le=(0,D.throttle)(V,300,{leading:!0,trailing:!1}),ae=e=>{e.preventDefault(),y.value?e.deltaY>0?te("-"):e.deltaY<0&&te("+"):e.deltaY>0?le(ne.DOWN):e.deltaY<0&&le(ne.UP)},ie=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:se,formatCreateSelection:re}=Jn(x),ue=e=>{const{start:l,end:a,path:n,viewBox:o}=e,i=re({start:l,end:a});if(i){const t={};e.fill&&(t.fill=e.fill),e.outline&&(t.outline=e.outline),X(i,{path:n,viewBox:o},t)}t.setCreatingCustomShapeState(!1)},ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:B},{text:"标尺",subText:p.value?"√":"",handler:ie},{text:"网格线",handler:()=>t.setGridLineSize(d.value?0:50),children:[{text:"无",subText:0===d.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===d.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===d.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===d.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:N},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:Y}];return(0,i.JJ)(Tn,h),(e,t)=>{const o=(0,i.Q2)("contextmenu"),c=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[4]||(t[4]=e=>ae(e)),onMousedown:t[5]||(t[5]=e=>G(e)),onDblclick:t[6]||(t[6]=e=>K(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(Du,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(se)(e))})):(0,i.kq)("",!0),(0,s.SU)(m)?((0,i.wg)(),(0,i.j4)(Zu,{key:1,onCreated:t[1]||(t[1]=e=>ue(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,oe.j5)({width:(0,s.SU)(T).width*(0,s.SU)(h)+"px",height:(0,s.SU)(T).height*(0,s.SU)(h)+"px",left:(0,s.SU)(T).left+"px",top:(0,s.SU)(T).top+"px"})},[(0,i._)("div",bp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(k.value,((e,t)=>((0,i.wg)(),(0,i.j4)(Iu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(h)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(Ju,{key:0,elementList:I.value,scaleMultiElement:(0,s.SU)(O)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(Vc,{key:e.id,elementInfo:e,isSelected:(0,s.SU)(l).includes(e.id),isActive:(0,s.SU)(r)===e.id,isActiveGroupElement:(0,s.SU)(a)===e.id,isMultiSelect:(0,s.SU)(l).length>1,rotateElement:(0,s.SU)(z),scaleElement:(0,s.SU)(Z),openLinkDialog:_,dragLineElement:(0,s.SU)(F),moveShapeKeypoint:(0,s.SU)(P)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(ku)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,oe.j5)({transform:`scale(${(0,s.SU)(h)})`})},[(0,s.SU)(M)?((0,i.wg)(),(0,i.j4)(pu,{key:0,top:(0,s.SU)(E).top,left:(0,s.SU)(E).left,width:(0,s.SU)(E).width,height:(0,s.SU)(E).height,quadrant:(0,s.SU)(U)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(uu,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(A),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128))],4)],4),(0,s.SU)(w)?((0,i.wg)(),(0,i.iD)("div",_p)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(Tu,{key:3,viewportStyles:(0,s.SU)(T)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)(kp,{visible:b.value,"onUpdate:visible":t[3]||(t[3]=e=>b.value=e),width:540},{default:(0,i.w5)((()=>[(0,i.Wm)(yp,{onClose:t[2]||(t[2]=e=>b.value=!1)})])),_:1},8,["visible"])],32)),[[o,ce],[c,Q]])}}});const Sp=(0,Vl.Z)(Ip,[["__scopeId","data-v-5294a048"]]);var Cp=Sp;const Lp={class:"shape-item-thumbnail"},Tp={class:"shape-content"},Ep={overflow:"visible",width:"18",height:"18"},Mp=["transform"],Up=["fill","stroke","d"];var Wp=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lp,[(0,i._)("div",Tp,[((0,i.wg)(),(0,i.iD)("svg",Ep,[(0,i._)("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:(0,oe.C_)(["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,Up)],8,Mp)]))])]))}});const Dp=(0,Vl.Z)(Wp,[["__scopeId","data-v-8603ad34"]]);var Hp=Dp;const Fp={class:"shape-pool"},Ap={class:"category-name"},$p={class:"shape-list"};var Zp=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=t,a=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Fp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ua),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Ap,(0,oe.zw)(e.type),1),(0,i._)("div",$p,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Hp,{class:"shape-item",key:t,shape:e,onClick:t=>a(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const Op=(0,Vl.Z)(Zp,[["__scopeId","data-v-8b994b42"]]);var Rp=Op;const zp=[{type:"直线",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:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!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}]}],Pp={class:"line-pool"},Bp={class:"category-name"},Np={class:"line-list"},jp=["onClick"],Yp={overflow:"visible",width:"20",height:"20"},Vp=["d","stroke-dasharray","marker-start","marker-end"];var Jp=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=t,a=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Pp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(zp),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Bp,(0,oe.zw)(e.type),1),(0,i._)("div",Np,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:l},[(0,i._)("div",{class:"line-content",onClick:t=>a(e)},[((0,i.wg)(),(0,i.iD)("svg",Yp,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,class:"line-marker",id:`preset-line-${t}-${l}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0),e.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,class:"line-marker",id:`preset-line-${t}-${l}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${l}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${l}-${e.points[1]}-end)`:""},null,8,Vp)]))],8,jp)])))),128))])])))),128))]))}});const qp=(0,Vl.Z)(Jp,[["__scopeId","data-v-554824b6"]]);var Xp=qp;const Gp={class:"chart-pool"},Kp=["onClick"];var Qp=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=t,a=["bar","horizontalBar","line","area","scatter","pie","ring"],n=e=>{l("select",e)};return(e,t)=>{const l=(0,i.up)("IconChartLine"),o=(0,i.up)("IconChartHistogram"),s=(0,i.up)("IconChartPie"),r=(0,i.up)("IconChartHistogramOne"),u=(0,i.up)("IconChartLineArea"),c=(0,i.up)("IconChartRing"),d=(0,i.up)("IconChartScatter");return(0,i.wg)(),(0,i.iD)("ul",Gp,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(a,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>n(e)},["line"===e?((0,i.wg)(),(0,i.j4)(l,{key:0,size:"24"})):"bar"===e?((0,i.wg)(),(0,i.j4)(o,{key:1,size:"24"})):"pie"===e?((0,i.wg)(),(0,i.j4)(s,{key:2,size:"24"})):"horizontalBar"===e?((0,i.wg)(),(0,i.j4)(r,{key:3,size:"24"})):"area"===e?((0,i.wg)(),(0,i.j4)(u,{key:4,size:"24"})):"ring"===e?((0,i.wg)(),(0,i.j4)(c,{key:5,size:"24"})):"scatter"===e?((0,i.wg)(),(0,i.j4)(d,{key:6,size:"24"})):(0,i.kq)("",!0)],8,Kp)]))),64))])}}});const ev=(0,Vl.Z)(Qp,[["__scopeId","data-v-398f5699"]]);var tv=ev;const lv=e=>((0,i.dD)("data-v-268948c2"),e=e(),(0,i.Cn)(),e),av={class:"prefix"},nv={class:"input-wrap"},ov=["disabled","placeholder"],iv={class:"handlers"},sv=lv((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("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))),rv=[sv],uv=lv((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("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))),cv=[uv],dv={class:"suffix"};var pv=(0,i.aZ)({__name:"NumberInput",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},min:{default:0},max:{default:1/0},step:{default:1}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)(0),r=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{l.value!==o.value&&(o.value=l.value)}),{immediate:!0}),(0,i.YP)(o,(()=>{let e=+o.value;isNaN(e)?e=l.min:e>l.max?e=l.max:e<l.min&&(e=l.min),o.value=e,a("update:value",o.value)}));const u=e=>{r.value=!1,a("blur",e)},c=e=>{r.value=!0,a("focus",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["number-input",{disabled:e.disabled,focused:r.value}])},[(0,i._)("span",av,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("div",nv,[(0,i.wy)((0,i._)("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),placeholder:e.placeholder,onInput:t[1]||(t[1]=e=>a("input",e)),onFocus:t[2]||(t[2]=e=>c(e)),onBlur:t[3]||(t[3]=e=>u(e)),onChange:t[4]||(t[4]=e=>a("change",e)),onKeydown:t[5]||(t[5]=(0,n.D2)((e=>a("enter",e)),["enter"]))},null,40,ov),[[n.nr,o.value]]),(0,i._)("div",iv,[(0,i._)("span",{class:"handler",onClick:t[6]||(t[6]=t=>o.value+=e.step)},rv),(0,i._)("span",{class:"handler",onClick:t[7]||(t[7]=t=>o.value-=e.step)},cv)])]),(0,i._)("span",dv,[(0,i.WI)(e.$slots,"suffix")])],2))}});const vv=(0,Vl.Z)(pv,[["__scopeId","data-v-268948c2"]]);var mv=vv;const hv=e=>((0,i.dD)("data-v-372c6730"),e=e(),(0,i.Cn)(),e),fv={class:"table-generator"},gv={class:"title"},yv={class:"lef"},wv=["onMouseenter"],xv={key:1,class:"custom"},kv={class:"row"},bv=hv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"行数:",-1))),_v={class:"row"},Iv=hv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"列数:",-1))),Sv={class:"btns"};var Cv=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)([]),n=(0,s.iH)(3),o=(0,s.iH)(3),r=(0,s.iH)(!1),u=()=>{if(!a.value.length)return;const[e,t]=a.value;l("insert",{row:e,col:t})},c=()=>n.value<1||n.value>20||o.value<1||o.value>20?ta.warning("行数/列数必须在0~20之间"):(l("insert",{row:n.value,col:o.value}),void(r.value=!1)),d=()=>{l("close"),r.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",fv,[(0,i._)("div",gv,[(0,i._)("div",yv,"表格 "+(0,oe.zw)(a.value.length?`${a.value[0]} x ${a.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>r.value=!r.value)},(0,oe.zw)(r.value?"返回":"自定义"),1)]),r.value?((0,i.wg)(),(0,i.iD)("div",xv,[(0,i._)("div",kv,[bv,(0,i.Wm)(mv,{min:1,max:20,value:n.value,"onUpdate:value":t[3]||(t[3]=e=>n.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",_v,[Iv,(0,i.Wm)(mv,{min:1,max:20,value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",Sv,[(0,i.Wm)(tp,{class:"btn",onClick:t[5]||(t[5]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>a.value=[]),onClick:t[2]||(t[2]=e=>u())},[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(t=>(0,i._)("td",{onMouseenter:l=>a.value=[e,t],key:t},[(0,i._)("div",{class:(0,oe.C_)(["cell",{active:a.value.length&&e<=a.value[0]&&t<=a.value[1]}])},null,2)],40,wv))),64))]))),64))])],32))]))}});const Lv=(0,Vl.Z)(Cv,[["__scopeId","data-v-372c6730"]]);var Tv=Lv;const Ev={class:"media-input"},Mv={class:"btns"},Uv={class:"btns"};var Wv=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)("video"),n=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),o=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),r=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],u=()=>{if(!n.value)return ta.error("请先输入正确的视频地址");l("insertVideo",n.value)},c=()=>{if(!o.value)return ta.error("请先输入正确的音频地址");l("insertAudio",o.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ev,[(0,i.Wm)(Kd,{tabs:r,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>a.value=e),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),"video"===a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)(sn,{value:n.value,"onUpdate:value":t[1]||(t[1]=e=>n.value=e),placeholder:"请输入视频地址e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Mv,[(0,i.Wm)(tp,{onClick:t[2]||(t[2]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[3]||(t[3]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(sn,{value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),placeholder:"请输入音频地址e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Uv,[(0,i.Wm)(tp,{onClick:t[5]||(t[5]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[6]||(t[6]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Dv=(0,Vl.Z)(Wv,[["__scopeId","data-v-35a1214c"]]);var Hv=Dv,Fv=l(3576);Fv.kh.SUB_SUP_SCALE=.5;const Av=[{label:"高斯公式",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:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",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",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],$v=[{type:"operators",label:"数学",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:"组合",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:"函数",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:"希腊字母",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"}]}],Zv=["width","height"],Ov=["transform"],Rv=["d"];var zv=(0,i.aZ)({__name:"FormulaContent",props:{latex:{},width:{},height:{}},setup(e){const t=e,l=(0,s.iH)({x:0,y:0,w:0,h:0}),a=(0,s.iH)("");(0,i.YP)((()=>t.latex),(()=>{const e=new Fv._q(t.latex);a.value=e.pathd({}),l.value=e.box({})}),{immediate:!0});const n=(0,i.Fl)((()=>{const e=l.value.w+32,a=l.value.h+32;return e>t.width||a>t.height?e/a>t.width/t.height?t.width/e:t.height/a:1}));return(e,t)=>((0,i.wg)(),(0,i.iD)("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${n.value}, ${n.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,Rv)],8,Ov)],8,Zv))}});const Pv=(0,Vl.Z)(zv,[["__scopeId","data-v-567417d3"]]);var Bv=Pv;const Nv=["innerHTML"];var jv=(0,i.aZ)({__name:"SymbolContent",props:{latex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Fv._q(t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-content",innerHTML:l.value},null,8,Nv))}});const Yv=jv;var Vv=Yv;const Jv=["disabled","value","rows","placeholder"];var qv=(0,i.aZ)({__name:"TextArea",props:{value:{},rows:{default:4},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(e,{expose:t,emit:l}){const a=l,n=e=>{a("update:value",e.target.value)},o=(0,s.iH)(),r=()=>{o.value&&o.value.focus()};return t({focus:r}),(e,t)=>((0,i.wg)(),(0,i.iD)("textarea",{class:(0,oe.C_)(["textarea",{disabled:e.disabled,resizable:e.resizable}]),ref_key:"textareaRef",ref:o,disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>n(e))},null,42,Jv))}});const Xv=(0,Vl.Z)(qv,[["__scopeId","data-v-65d72404"]]);var Gv=Xv;const Kv={class:"latex-editor"},Qv={class:"container"},em={class:"left"},tm={class:"input-area"},lm={class:"preview"},am={key:0,class:"placeholder"},nm={key:1,class:"preview-content"},om={class:"right"},im={class:"content"},sm={key:0,class:"symbol"},rm={class:"symbol-pool"},um=["onClick"],cm={key:1,class:"formula"},dm={class:"formula-title"},pm=["onClick"],vm={class:"footer"};var mm=(0,i.aZ)({__name:"index",props:{value:{default:""}},emits:["update","close"],setup(e,{emit:t}){const l=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],a=e,n=t,o=Av,r=$v.map((e=>({label:e.label,key:e.type}))),u=(0,s.iH)(""),c=(0,s.iH)("symbol"),d=(0,s.iH)(),p=(0,s.iH)($v[0].type),v=(0,i.Fl)((()=>{const e=$v.find((e=>e.type===p.value));return e?.children||[]}));(0,i.bv)((()=>{a.value&&(u.value=a.value)}));const m=()=>{if(!u.value)return ta.error("公式不能为空");const e=new Fv._q(u.value),t=e.pathd({}),l=e.box({});n("update",{latex:u.value,path:t,w:l.w+32,h:l.h+32})},h=e=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,e))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Kv,[(0,i._)("div",Qv,[(0,i._)("div",em,[(0,i._)("div",tm,[(0,i.Wm)(Gv,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:d},null,8,["value"])]),(0,i._)("div",lm,[u.value?((0,i.wg)(),(0,i.iD)("div",nm,[(0,i.Wm)(Bv,{width:518,height:138,latex:u.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",am,"公式预览"))])]),(0,i._)("div",om,[(0,i.Wm)(Kd,{tabs:l,value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e),card:""},null,8,["value"]),(0,i._)("div",im,["symbol"===c.value?((0,i.wg)(),(0,i.iD)("div",sm,[(0,i.Wm)(Kd,{tabs:(0,s.SU)(r),value:p.value,"onUpdate:value":t[2]||(t[2]=e=>p.value=e),spaceBetween:"",tabsStyle:{margin:"10px 10px 0"}},null,8,["tabs","value"]),(0,i._)("div",rm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>h(e.latex)},[(0,i.Wm)(Vv,{latex:e.latex},null,8,["latex"])],8,um)))),128))])])):((0,i.wg)(),(0,i.iD)("div",cm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(o),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"formula-item",key:e.label},[(0,i._)("div",dm,(0,oe.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>u.value=e.latex},[(0,i.Wm)(Bv,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,pm)])))),128))]))])])]),(0,i._)("div",vm,[(0,i.Wm)(tp,{class:"btn",onClick:t[3]||(t[3]=e=>n("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{class:"btn",type:"primary",onClick:t[4]||(t[4]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const hm=(0,Vl.Z)(mm,[["__scopeId","data-v-49a14edf"]]);var fm=hm;const gm={class:"canvas-tool"},ym={class:"left-handler"},wm={class:"add-element-handler"},xm={class:"handler-item group-btn"},km={class:"right-handler"},bm={class:"text"};var _m=(0,i.aZ)({__name:"index",setup(e){const t=R(),{creatingElement:l,creatingCustomShape:a,showSelectPanel:n,showSearchPanel:r}=(0,o.Jk)(t),{canUndo:u,canRedo:c}=(0,o.Jk)(J()),{redo:d,undo:p}=da(),{scaleCanvas:v,setCanvasScalePercentage:m,resetCanvas:h,canvasScalePercentage:f}=La(),g=[200,150,100,80,50],y=(0,s.iH)(!1),w=e=>{m(e),y.value=!1},{createImageElement:x,createChartElement:k,createTableElement:b,createLatexElement:_,createVideoElement:I,createAudioElement:S}=pa(),C=e=>{const t=e[0];t&&na(t).then((e=>x(e)))},L=(0,s.iH)(!1),T=(0,s.iH)(!1),E=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},F=e=>{"任意多边形"===e.title?t.setCreatingCustomShapeState(!0):t.setCreatingElement({type:"shape",data:e}),L.value=!1},A=e=>{t.setCreatingElement({type:"line",data:e}),T.value=!1},$=()=>{t.setSelectPanelState(!n.value)},Z=()=>{t.setSearchPanelState(!r.value)};return(e,t)=>{const o=(0,i.up)("IconBack"),m=(0,i.up)("IconNext"),x=(0,i.up)("IconMoveOne"),O=(0,i.up)("IconSearch"),R=(0,i.up)("IconFontSize"),z=(0,i.up)("IconTextRotationNone"),P=(0,i.up)("IconTextRotationDown"),B=(0,i.up)("IconDown"),N=(0,i.up)("IconPicture"),j=(0,i.up)("IconGraphicDesign"),Y=(0,i.up)("IconConnection"),V=(0,i.up)("IconChartProportion"),J=(0,i.up)("IconInsertTable"),q=(0,i.up)("IconFormula"),X=(0,i.up)("IconVideoTwo"),G=(0,i.up)("IconMinus"),K=(0,i.up)("IconPlus"),Q=(0,i.up)("IconFullScreen"),ee=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",gm,[(0,i._)("div",ym,[(0,i.wy)((0,i.Wm)(o,{class:(0,oe.C_)(["handler-item",{disable:!(0,s.SU)(u)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(p)())},null,8,["class"]),[[ee,"撤销"]]),(0,i.wy)((0,i.Wm)(m,{class:(0,oe.C_)(["handler-item",{disable:!(0,s.SU)(c)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(d)())},null,8,["class"]),[[ee,"重做"]]),(0,i.Wm)(Zc,{type:"vertical",style:{height:"20px"}}),(0,i.wy)((0,i.Wm)(x,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(n)}]),onClick:t[2]||(t[2]=e=>$())},null,8,["class"]),[[ee,"选择窗格"]]),(0,i.wy)((0,i.Wm)(O,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(r)}]),onClick:t[3]||(t[3]=e=>Z())},null,8,["class"]),[[ee,"查找/替换"]])]),(0,i._)("div",wm,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",xm,[(0,i.Wm)(R,{class:(0,oe.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[4]||(t[4]=e=>H())},null,8,["class"]),(0,i.Wm)(dn,{trigger:"click",value:D.value,"onUpdate:value":t[7]||(t[7]=e=>D.value=e),style:{height:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{center:"",onClick:t[5]||(t[5]=()=>{H(),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(z),(0,i.Uk)(" 横向文本框")])),_:1}),(0,i.Wm)(mn,{center:"",onClick:t[6]||(t[6]=()=>{H(!0),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(P),(0,i.Uk)(" 竖向文本框")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(B,{class:"arrow"})])),_:1},8,["value"])])),[[ee,"插入文字"]]),(0,i.Wm)(Pa,{onChange:t[8]||(t[8]=e=>C(e))},{default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(N,{class:"handler-item"},null,512),[[ee,"插入图片"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",value:L.value,"onUpdate:value":t[10]||(t[10]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Rp,{onSelect:t[9]||(t[9]=e=>F(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(j,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(a)||"shape"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入形状"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:T.value,"onUpdate:value":t[12]||(t[12]=e=>T.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Xp,{onSelect:t[11]||(t[11]=e=>A(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(Y,{class:(0,oe.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入线条"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:E.value,"onUpdate:value":t[14]||(t[14]=e=>E.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(tv,{onSelect:t[13]||(t[13]=e=>{(0,s.SU)(k)(e),E.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(V,{class:"handler-item"},null,512),[[ee,"插入图表"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:M.value,"onUpdate:value":t[17]||(t[17]=e=>M.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Tv,{onClose:t[15]||(t[15]=e=>M.value=!1),onInsert:t[16]||(t[16]=({row:e,col:t})=>{(0,s.SU)(b)(e,t),M.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(J,{class:"handler-item"},null,512),[[ee,"插入表格"]])])),_:1},8,["value"]),(0,i.wy)((0,i.Wm)(q,{class:"handler-item",onClick:t[18]||(t[18]=e=>W.value=!0)},null,512),[[ee,"插入公式"]]),(0,i.Wm)(dn,{trigger:"click",value:U.value,"onUpdate:value":t[22]||(t[22]=e=>U.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Hv,{onClose:t[19]||(t[19]=e=>U.value=!1),onInsertVideo:t[20]||(t[20]=e=>{(0,s.SU)(I)(e),U.value=!1}),onInsertAudio:t[21]||(t[21]=e=>{(0,s.SU)(S)(e),U.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(X,{class:"handler-item"},null,512),[[ee,"插入音视频"]])])),_:1},8,["value"])]),(0,i._)("div",km,[(0,i.Wm)(G,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(v)("-"))}),(0,i.Wm)(dn,{trigger:"click",value:y.value,"onUpdate:value":t[24]||(t[24]=e=>y.value=e)},{content:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(g,(e=>(0,i.Wm)(mn,{center:"",key:e,onClick:t=>w(e)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(e)+"%",1)])),_:2},1032,["onClick"]))),64))])),default:(0,i.w5)((()=>[(0,i._)("span",bm,(0,oe.zw)((0,s.SU)(f)),1)])),_:1},8,["value"]),(0,i.Wm)(K,{class:"handler-item viewport-size",onClick:t[25]||(t[25]=e=>(0,s.SU)(v)("+"))}),(0,i.wy)((0,i.Wm)(Q,{class:"handler-item viewport-size-adaptation",onClick:t[26]||(t[26]=e=>(0,s.SU)(h)())},null,512),[[ee,"适应屏幕"]])]),(0,i.Wm)(kp,{visible:W.value,"onUpdate:visible":t[29]||(t[29]=e=>W.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(fm,{onClose:t[27]||(t[27]=e=>W.value=!1),onUpdate:t[28]||(t[28]=e=>{(0,s.SU)(_)(e),W.value=!1})})])),_:1},8,["visible"])])}}});const Im=(0,Vl.Z)(_m,[["__scopeId","data-v-7e81f183"]]);var Sm=Im,Cm=()=>{const{slides:e}=(0,o.Jk)($()),t=(0,s.iH)(null),l=(0,s.iH)(50),a=()=>{e.value.length>l.value?t.value=setTimeout((()=>{l.value=l.value+20,a()}),600):l.value=9999};return(0,i.bv)(a),(0,i.Ah)((()=>{t.value&&clearTimeout(t.value)})),{slidesLoadLimit:l}};const Lm={class:"layout-pool"},Tm=["onClick"];var Em=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const l=t,{layouts:a}=(0,o.Jk)($()),n=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>n(e)},[(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,Tm)))),128))]))}});const Mm=(0,Vl.Z)(Em,[["__scopeId","data-v-8ee3e590"]]);var Um=Mm,Wm=l(9980),Dm=l.n(Wm);const Hm={class:"add-slide"},Fm={class:"select-btn"},Am=["onMousedown"],$m={class:"page-number"};var Zm=(0,i.aZ)({__name:"index",setup(e){const t=R(),l=$(),a=q(),{selectedSlidesIndex:n,thumbnailsFocus:r}=(0,o.Jk)(t),{slides:u,slideIndex:c}=(0,o.Jk)(l),{ctrlKeyState:d,shiftKeyState:p}=(0,o.Jk)(a),{slidesLoadLimit:v}=Cm(),m=(0,i.Fl)((()=>[...n.value,c.value])),h=(0,s.iH)(!1),{copySlide:f,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:k,cutSlide:b,selectAllSlide:_,sortSlides:I}=ha(),S=(0,s.iH)();(0,i.YP)((()=>c.value),(()=>{m.value.length&&t.updateSelectedSlidesIndex([]),(0,i.Y3)((()=>{const e=S.value?.$el?.querySelector(".thumbnail-item.active");S.value&&e&&!Le(e,S.value.$el)&&setTimeout((()=>{e.scrollIntoView({behavior:"smooth"})}),100)}))}));const C=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},L=(e,l)=>{const a=m.value.length>1;if(!a||!m.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),C(m.value[0])}else if(m.value.includes(l)){const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...m.value,l];t.updateSelectedSlidesIndex(e)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...m.value),n=l;l<e&&(n=Math.max(...m.value),e=l);const o=[];for(let t=e;t<=n;t++)o.push(t);t.updateSelectedSlidesIndex(o)}else t.updateSelectedSlidesIndex([]),C(l)},T=e=>{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},E=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&I(t,l)},{enterScreening:M,enterScreeningFromStart:U}=Ca(),W=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:U}],D=()=>[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:f},{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{divider:!0},{text:"新建页面",subText:"Enter",handler:y},{text:"复制页面",subText:"Ctrl + D",handler:x},{text:"删除页面",subText:"Delete",handler:()=>k()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:M}];return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconDown"),n=(0,i.Q2)("contextmenu"),o=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"thumbnails",onMousedown:t[4]||(t[4]=()=>T(!0))},[(0,i._)("div",Hm,[(0,i._)("div",{class:"btn",onClick:t[0]||(t[0]=e=>(0,s.SU)(y)())},[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)("添加幻灯片")]),(0,i.Wm)(dn,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e),center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(Um,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),h.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",Fm,[(0,i.Wm)(a)])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(Dm()),{class:"thumbnail-list",ref_key:"thumbnailsRef",ref:S,modelValue:(0,s.SU)(u),animation:200,scroll:!0,scrollSensitivity:50,onEnd:E,itemKey:"id"},{item:(0,i.w5)((({element:e,index:l})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail-item",{active:(0,s.SU)(c)===l,selected:m.value.includes(l)}]),onMousedown:e=>L(e,l),onDblclick:t[3]||(t[3]=e=>(0,s.SU)(M)())},[(0,i._)("div",{class:(0,oe.C_)(["label",{"offset-left":l>=99}])},(0,oe.zw)((0,s.SU)(G)(l+1,2)),3),(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:120,visible:l<(0,s.SU)(v)},null,8,["slide","visible"])],42,Am)),[[n,D]])])),_:1},8,["modelValue"]),(0,i._)("div",$m,"幻灯片 "+(0,oe.zw)((0,s.SU)(c)+1)+" / "+(0,oe.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>T(!1)],[n,W]])}}});const Om=(0,Vl.Z)(Zm,[["__scopeId","data-v-0dbead61"]]);var Rm=Om,zm=()=>{const e=R(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=(a=!1)=>{l.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})};return{toggleTextFormatPainter:a}},Pm=l(8374);const Bm={class:"bar"},Nm=["data-tooltip"],jm=["data-tooltip"],Ym=["data-tooltip"];var Vm=(0,i.aZ)({__name:"Slider",props:{value:{},disabled:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e=>e.getBoundingClientRect().left,a=e,n=t,o=(0,s.iH)(),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)("end"),p=e=>{let t=e/100*(a.max-a.min);if(a.step>=1)t=Math.fround(t);else{const e=a.step.toString(),l=e.match(/^[0.]*([1-9])/);if(l){const a=l[1],n=e.indexOf(a)-1;if(n>0){const e=Math.pow(10,n);t=Math.fround(t*e)/e}}}return Pm.ZP.plus(t,a.min)},v=(0,i.Fl)((()=>p(r.value))),m=(0,i.Fl)((()=>p(u.value))),h=(0,i.Fl)((()=>p(c.value)));(0,i.YP)((()=>a.value),(()=>{a.max!==a.min&&("number"===typeof a.value?r.value=(a.value-a.min)/(a.max-a.min)*100:(u.value=(a.value[0]-a.min)/(a.max-a.min)*100,c.value=(a.value[1]-a.min)/(a.max-a.min)*100))}),{immediate:!0});const f=e=>{if(!o.value)return 0;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let n=(t-l(o.value))/o.value.clientWidth;n=Math.max(n,0),n=Math.min(n,1);let i=100*n;const s=a.step/(a.max-a.min)*100,r=i%s;return r>0&&(r<=s/2?i-=r:i=i-r+s),i},g=e=>{const t=f(e);"start"===d.value?u.value=t:c.value=t},y=e=>{w(e);const t=p(r.value),l=a.value,o="start"===d.value?[t,l[1]]:[l[0],t];o[0]>o[1]&&([o[0],o[1]]=[o[1],o[0]]),n("update:value",o),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",y),document.removeEventListener("touchend",y)},w=e=>{r.value=f(e)},x=e=>{w(e);const t=p(r.value);n("update:value",t),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x)},k=e=>{if(!a.disabled)if(a.range){const t=f(e);Math.abs(t-u.value)<Math.abs(t-c.value)?d.value="start":d.value="end",document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",y),document.addEventListener("touchend",y)}else document.addEventListener("mousemove",w),document.addEventListener("touchmove",w),document.addEventListener("mouseup",x),document.addEventListener("touchend",x)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:o,onMousedown:t[0]||(t[0]=e=>k(e))},[(0,i._)("div",Bm,[e.range?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",{class:"track",style:(0,oe.j5)({width:c.value-u.value+"%",left:`${u.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${u.value}%`}),"data-tooltip":m.value},null,12,jm),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${c.value}%`}),"data-tooltip":h.value},null,12,Ym)],64)):((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"track",style:(0,oe.j5)({width:`${r.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${r.value}%`}),"data-tooltip":v.value},null,12,Nm)],64))])],34))}});const Jm=(0,Vl.Z)(Vm,[["__scopeId","data-v-563bd2a0"]]);var qm=Jm;const Xm=e=>((0,i.dD)("data-v-03715c20"),e=e(),(0,i.Cn)(),e),Gm={class:"element-opacity"},Km={class:"row"},Qm=Xm((()=>(0,i._)("div",{style:{width:"40%"}},"不透明度:",-1)));var eh=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=(0,s.iH)(1);(0,i.YP)(l,(()=>{l.value&&(a.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)}),{deep:!0,immediate:!0});const{addHistorySnapshot:n}=da(),r=e=>{if(!l.value)return;const a={opacity:e};t.updateElement({id:l.value.id,props:a}),n()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Gm,[(0,i._)("div",Km,[Qm,(0,i.Wm)(qm,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>r(e)),style:{width:"60%"}},null,8,["value"])])]))}});const th=(0,Vl.Z)(eh,[["__scopeId","data-v-03715c20"]]);var lh=th;const ah={class:"color-block"};var nh=(0,i.aZ)({__name:"ColorButton",props:{color:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)(tp,{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",ah,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(l,{class:"color-btn-icon"})])),_:1})}}});const oh=(0,Vl.Z)(nh,[["__scopeId","data-v-7fa73bdc"]]);var ih=oh,sh=l(6459),rh=(0,i.aZ)({__name:"Checkboard",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e,l={},a=(e,t,l)=>{const a=document.createElement("canvas");a.width=a.height=2*l;const n=a.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,a.width,a.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),a.toDataURL()):null},n=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const i=a(e,t,n);return l[o]=i,i},o=(0,i.Fl)((()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"checkerboard",style:(0,oe.j5)(o.value)},null,4))}});const uh=(0,Vl.Z)(rh,[["__scopeId","data-v-fa191ace"]]);var ch=uh;const dh=e=>((0,i.dD)("data-v-84628bc8"),e=e(),(0,i.Cn)(),e),ph={class:"alpha"},vh={class:"alpha-checkboard-wrap"},mh=dh((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),hh=[mh];var fh=(0,i.aZ)({__name:"Alpha",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>l.value)),o=(0,i.Fl)((()=>{const e=[n.value.r,n.value.g,n.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),r=(0,s.iH)(),u=e=>{if(e.preventDefault(),!r.value)return;const t=r.value.clientWidth,l=r.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-l;let i;i=o<0?0:o>t?1:Math.round(100*o/t)/100,n.value.a!==i&&a("colorChange",{r:n.value.r,g:n.value.g,b:n.value.b,a:i})},c=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",c)},d=e=>{u(e),window.addEventListener("mousemove",u),window.addEventListener("mouseup",c)};return(0,i.Ah)(c),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ph,[(0,i._)("div",vh,[(0,i.Wm)(ch)]),(0,i._)("div",{class:"alpha-gradient",style:(0,oe.j5)({background:o.value})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:r,onMousedown:t[0]||(t[0]=e=>d(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,oe.j5)({left:100*n.value.a+"%"})},hh,4)],544)]))}});const gh=(0,Vl.Z)(fh,[["__scopeId","data-v-84628bc8"]]);var yh=gh;const wh=e=>((0,i.dD)("data-v-5711e710"),e=e(),(0,i.Cn)(),e),xh={class:"hue"},kh=wh((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),bh=[kh];var _h=(0,i.aZ)({__name:"Hue",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(0),o=(0,s.iH)(""),r=(0,i.Fl)((()=>{const e=(0,W.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),u=(0,i.Fl)((()=>0===r.value.h&&"right"===o.value?"100%":100*r.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,W.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-n.value>0&&(o.value="right"),0!==t&&t-n.value<0&&(o.value="left"),n.value=t}));const c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-n;let i,s;o<0?i=0:o>t?i=360:(s=100*o/t,i=360*s/100),-1!==l.hue&&r.value.h===i||a("colorChange",{h:i,l:r.value.l,s:r.value.s,a:r.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},v=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p)};return(0,i.Ah)(p),(e,t)=>((0,i.wg)(),(0,i.iD)("div",xh,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:c,onMousedown:t[0]||(t[0]=e=>v(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,oe.j5)({left:u.value})},bh,4)],544)]))}});const Ih=(0,Vl.Z)(_h,[["__scopeId","data-v-5711e710"]]);var Sh=Ih;const Ch=e=>((0,i.dD)("data-v-c79c0446"),e=e(),(0,i.Cn)(),e),Lh=Ch((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),Th=Ch((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Eh=Ch((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Mh=[Eh];var Uh=(0,i.aZ)({__name:"Saturation",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>{const e=(0,W.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),o=(0,i.Fl)((()=>`hsl(${n.value.h}, 100%, 50%)`)),r=(0,i.Fl)((()=>-100*n.value.v+1+100+"%")),u=(0,i.Fl)((()=>100*n.value.s+"%")),c=(0,D.throttle)((function(e){a("colorChange",e)}),20,{leading:!0,trailing:!1}),d=(0,s.iH)(),p=e=>{if(e.preventDefault(),!d.value)return;const t=d.value.clientWidth,l=d.value.clientHeight,a=d.value.getBoundingClientRect().left+window.pageXOffset,o=d.value.getBoundingClientRect().top+window.pageYOffset,i=(0,D.clamp)(e.pageX-a,0,t),s=(0,D.clamp)(e.pageY-o,0,l),r=i/t,u=(0,D.clamp)(-s/l+1,0,1);c({h:n.value.h,s:r,v:u,a:n.value.a})},v=()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",v)},m=e=>{p(e),window.addEventListener("mousemove",p),window.addEventListener("mouseup",v)};return(0,i.Ah)(v),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"saturation",ref_key:"saturationRef",ref:d,style:(0,oe.j5)({background:o.value}),onMousedown:t[0]||(t[0]=e=>m(e))},[Lh,Th,(0,i._)("div",{class:"saturation-pointer",style:(0,oe.j5)({top:r.value,left:u.value})},Mh,4)],36))}});const Wh=(0,Vl.Z)(Uh,[["__scopeId","data-v-c79c0446"]]);var Dh=Wh;const Hh={class:"editable-input"},Fh=["value"];var Ah=(0,i.aZ)({__name:"EditableInput",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,W.Z)(l.value).toHex8String().toUpperCase():(0,W.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),o=e=>{const t=e.target.value;if(t.length>=6){const e=(0,W.Z)(t);e.isValid()&&a("colorChange",e.toRgb())}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Hh,[(0,i._)("input",{class:"input-content",value:n.value,onInput:t[0]||(t[0]=e=>o(e))},null,40,Fh)]))}});const $h=(0,Vl.Z)(Ah,[["__scopeId","data-v-65e2913c"]]);var Zh=$h;const Oh={class:"color-picker"},Rh={class:"picker-saturation-wrap"},zh={class:"picker-controls"},Ph={class:"picker-color-wrap"},Bh={class:"picker-sliders"},Nh={class:"picker-hue-wrap"},jh={class:"picker-alpha-wrap"},Yh={class:"picker-field"},Vh={class:"picker-presets"},Jh=["onClick"],qh={class:"picker-gradient-presets"},Xh=["onClick"],Gh={class:"picker-presets"},Kh=["onClick"],Qh={key:0,class:"recent-colors-title"},ef={class:"picker-presets"},tf=["onClick"],lf="RECENT_COLORS";var af=(0,i.aZ)({__name:"index",props:{modelValue:{default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,n=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],o=(e,t,l)=>{const a=(0,W.Z)(e).toRgb(),n=(0,W.Z)(t).toRgb(),o=(n.r-a.r)/l,i=(n.g-a.g)/l,s=(n.b-a.b)/l,r=[];for(let u=0;u<l;u++){const e=(0,W.Z)({r:a.r+o*u,g:a.g+i*u,b:a.b+s*u}).toRgbString();r.push(e)}return r},r=()=>{const e=[];for(const t of n)e.push(o(t[1],t[0],5));return e},u=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],c=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],d=(0,s.iH)(-1),p=(0,s.iH)([]),v=(0,i.Fl)({get(){return(0,W.Z)(l.modelValue).toRgb()},set(e){const t=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;a("update:modelValue",t)}}),m=r(),h=(0,i.Fl)((()=>`rgba(${[v.value.r,v.value.g,v.value.b,v.value.a].join(",")})`)),f=e=>{d.value=(0,W.Z)(e).toHsl().h,a("update:modelValue",e)},g=(0,D.debounce)((function(){const e=(0,W.Z)(v.value).toRgbString();if(!p.value.includes(e)){p.value=[e,...p.value];const t=10;p.value.length>t&&(p.value=p.value.slice(0,t))}}),300,{trailing:!0});(0,i.bv)((()=>{const e=localStorage.getItem(lf);e&&(p.value=JSON.parse(e))})),(0,i.YP)(p,(()=>{const e=JSON.stringify(p.value);localStorage.setItem(lf,e)}));const y=e=>{"h"in e?(d.value=e.h,v.value=(0,W.Z)(e).toRgb()):(d.value=(0,W.Z)(e).toHsl().h,v.value=e),g()},w=()=>{const e="EyeDropper"in window;e?x():k()},x=()=>{ta.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,W.Z)(e.sRGBHex);d.value=t.toHsl().h,v.value=t.toRgb(),g()})).catch((()=>{ta.success("关闭取色吸管")}))},k=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:a,top:n,width:o,height:i}=e.getBoundingClientRect(),s=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));(0,sh.rT)(e,{filter:s,fontEmbedCSS:"",width:o,height:i,canvasWidth:o,canvasHeight:i,pixelRatio:1}).then((e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${a}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let i="";const s=e=>{const t=e.x,s=e.y,r=t-a,u=s-n,[c,d,p,v]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(v/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=s+10+"px",l.style.backgroundColor=i},r=()=>{i="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},u=l=>{if(i&&0===l.button){const e=(0,W.Z)(i);d.value=e.toHsl().h,v.value=e.toRgb(),g()}document.body.removeChild(t),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",r),window.removeEventListener("mousedown",u)};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",r),window.addEventListener("mousedown",u)})).catch((()=>{ta.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Oh,[(0,i._)("div",Rh,[(0,i.Wm)(Dh,{value:v.value,hue:d.value,onColorChange:t[0]||(t[0]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",zh,[(0,i._)("div",Ph,[(0,i._)("div",{class:"picker-current-color",style:(0,oe.j5)({background:h.value})},null,4),(0,i.Wm)(ch)]),(0,i._)("div",Bh,[(0,i._)("div",Nh,[(0,i.Wm)(Sh,{value:v.value,hue:d.value,onColorChange:t[1]||(t[1]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",jh,[(0,i.Wm)(yh,{value:v.value,onColorChange:t[2]||(t[2]=e=>y(e))},null,8,["value"])])])]),(0,i._)("div",Yh,[(0,i.Wm)(Zh,{class:"input",value:v.value,onColorChange:t[3]||(t[3]=e=>y(e))},null,8,["value"]),(0,i._)("div",{class:"straw",onClick:t[4]||(t[4]=e=>w())},[(0,i.Wm)(l)]),(0,i._)("div",{class:"transparent",onClick:t[5]||(t[5]=e=>f("#00000000"))},[(0,i.Wm)(ch)])]),(0,i._)("div",Vh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(u,(e=>(0,i._)("div",{class:"picker-presets-color",key:e,style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Jh))),64))]),(0,i._)("div",qh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(m),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-col",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-color",key:e,style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Xh)))),128))])))),128))]),(0,i._)("div",Gh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(c,(e=>(0,i._)("div",{key:e,class:"picker-presets-color",style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Kh))),64))]),p.value.length?((0,i.wg)(),(0,i.iD)("div",Qh,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",ef,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:"picker-presets-color alpha",onClick:t=>f(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,oe.j5)({background:e})},null,4)],8,tf)))),128))])])}}});const nf=(0,Vl.Z)(af,[["__scopeId","data-v-fec0b01a"]]);var of=nf;const sf=e=>((0,i.dD)("data-v-0566b060"),e=e(),(0,i.Cn)(),e),rf=sf((()=>(0,i._)("span",{class:"switch-core"},null,-1))),uf=[rf];var cf=(0,i.aZ)({__name:"Switch",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=()=>{l.disabled||a("update:value",!l.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("span",{class:(0,oe.C_)(["switch",{active:e.value,disabled:e.disabled}]),onClick:t[0]||(t[0]=e=>n())},uf,2))}});const df=(0,Vl.Z)(cf,[["__scopeId","data-v-0566b060"]]);var pf=df;const vf=e=>((0,i.dD)("data-v-18fbbd33"),e=e(),(0,i.Cn)(),e),mf={class:"element-outline"},hf={key:0,class:"row"},ff=vf((()=>(0,i._)("div",{style:{width:"40%"}},"启用边框:",-1))),gf={class:"switch-wrapper",style:{width:"60%"}},yf={class:"row"},wf=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),xf={class:"row"},kf=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),bf={class:"row"},_f=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var If=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=$(),{theme:l}=(0,o.Jk)(t),{handleElement:a}=(0,o.Jk)(R()),n=(0,s.iH)(),r=(0,s.iH)(!1);(0,i.YP)(a,(()=>{a.value&&(n.value="outline"in a.value?a.value.outline:void 0,r.value=!!n.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:u}=da(),c=e=>{if(!a.value)return;const l={outline:{...n.value,...e}};t.updateElement({id:a.value.id,props:l}),u()},d=e=>{if(a.value){if(e){const e=l.value.outline;t.updateElement({id:a.value.id,props:{outline:e}})}else t.removeElementProps({id:a.value.id,propName:"outline"});u()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",mf,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",hf,[ff,(0,i._)("div",gf,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>d(e))},null,8,["value"])])])),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",yf,[wf,(0,i.Wm)(cp,{style:{width:"60%"},value:n.value.style||"","onUpdate:value":t[1]||(t[1]=e=>c({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",xf,[kf,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",bf,[_f,(0,i.Wm)(mv,{value:n.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>c({width:e})),style:{width:"60%"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const Sf=(0,Vl.Z)(If,[["__scopeId","data-v-18fbbd33"]]);var Cf=Sf;const Lf=e=>((0,i.dD)("data-v-3a267bbc"),e=e(),(0,i.Cn)(),e),Tf={class:"element-shadow"},Ef={class:"row"},Mf=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"启用阴影:",-1))),Uf={class:"switch-wrapper",style:{width:"60%"}},Wf={class:"row"},Df=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Hf={class:"row"},Ff=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Af={class:"row"},$f=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Zf={class:"row"},Of=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1)));var Rf=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=$(),{theme:l}=(0,o.Jk)(t),{handleElement:a}=(0,o.Jk)(R()),n=(0,s.iH)(),r=(0,s.iH)(!1);(0,i.YP)(a,(()=>{a.value&&(n.value="shadow"in a.value?a.value.shadow:void 0,r.value=!!n.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:u}=da(),c=e=>{if(!a.value||!n.value)return;const l={...n.value,...e};t.updateElement({id:a.value.id,props:{shadow:l}}),u()},d=e=>{if(a.value){if(e){const e=l.value.shadow;t.updateElement({id:a.value.id,props:{shadow:e}})}else t.removeElementProps({id:a.value.id,propName:"shadow"});u()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Tf,[(0,i._)("div",Ef,[Mf,(0,i._)("div",Uf,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>d(e))},null,8,["value"])])]),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Wf,[Df,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:n.value.h,"onUpdate:value":t[1]||(t[1]=e=>c({h:e}))},null,8,["value"])]),(0,i._)("div",Hf,[Ff,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:n.value.v,"onUpdate:value":t[2]||(t[2]=e=>c({v:e}))},null,8,["value"])]),(0,i._)("div",Af,[$f,(0,i.Wm)(qm,{style:{width:"60%"},min:1,max:20,step:1,value:n.value.blur,"onUpdate:value":t[3]||(t[3]=e=>c({blur:e}))},null,8,["value"])]),(0,i._)("div",Zf,[Of,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const zf=(0,Vl.Z)(Rf,[["__scopeId","data-v-3a267bbc"]]);var Pf=zf;const Bf={class:"text-color-block"};var Nf=(0,i.aZ)({__name:"TextColorButton",props:{color:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(tp,{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default"),(0,i._)("div",Bf,[(0,i._)("div",{class:"text-color-block-content",style:(0,oe.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const jf=(0,Vl.Z)(Nf,[["__scopeId","data-v-37449800"]]);var Yf=jf,Vf=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(tp,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Jf=Vf;var qf=Jf,Xf=(0,i.aZ)({__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["button-group",{passive:e.passive}]),ref:"groupRef"},[(0,i.WI)(e.$slots,"default")],2))}});const Gf=(0,Vl.Z)(Xf,[["__scopeId","data-v-4db942e2"]]);var Kf=Gf,Qf=(0,i.aZ)({__name:"RadioButton",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:l}=(0,i.f3)(Mn);return(e,a)=>((0,i.wg)(),(0,i.j4)(tp,{checked:!e.disabled&&(0,s.SU)(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=t=>!e.disabled&&(0,s.SU)(l)(e.value))},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const eg=Qf;var tg=eg,lg=(0,i.aZ)({__name:"RadioGroup",props:{value:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=e=>{l.disabled||a("update:value",e)},o=(0,i.Fl)((()=>l.value));return(0,i.JJ)(Mn,{value:o,updateValue:n}),(e,t)=>((0,i.wg)(),(0,i.j4)(Kf,{class:"radio-group"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3}))}});const ag=lg;var ng=ag;const og={class:"select-group"};function ig(e,t){return(0,i.wg)(),(0,i.iD)("div",og,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const sg={},rg=(0,Vl.Z)(sg,[["render",ig],["__scopeId","data-v-d2acb09c"]]);var ug=rg;const cg=e=>((0,i.dD)("data-v-4cf37a85"),e=e(),(0,i.Cn)(),e),dg={class:"text-style-panel"},pg={class:"preset-style"},vg=["onClick"],mg={class:"link-popover"},hg={class:"btns"},fg={class:"row",passive:""},gg={class:"list-wrap"},yg=["onClick"],wg=cg((()=>(0,i._)("span",null,null,-1))),xg=[wg],kg=cg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),bg={class:"list-wrap"},_g=["onClick"],Ig=cg((()=>(0,i._)("span",null,null,-1))),Sg=[Ig],Cg={class:"row"},Lg=cg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Tg={class:"row"},Eg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"行间距:",-1))),Mg={class:"row"},Ug=cg((()=>(0,i._)("div",{style:{width:"40%"}},"段间距:",-1))),Wg={class:"row"},Dg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"字间距:",-1))),Hg={class:"row"},Fg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"文本框填充:",-1)));var Ag=(0,i.aZ)({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],l=R(),a=$(),{handleElement:n,handleElementId:r,richTextAttrs:u,availableFonts:c,textFormatPainter:d}=(0,o.Jk)(l),{addHistorySnapshot:p}=da(),{toggleTextFormatPainter:v}=zm(),m=e=>{a.updateElement({id:r.value,props:e}),p()},h=(0,s.iH)(!1),f=(0,s.iH)(!1),g=(0,s.iH)(!1),y=(0,s.iH)(!1),w=(0,s.iH)(["disc","circle","square"]),x=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),k=(0,s.iH)("#000"),b=(0,s.iH)(),_=(0,s.iH)(),I=(0,s.iH)();(0,i.YP)(n,(()=>{n.value&&"text"===n.value.type&&(k.value=n.value.fill||"#fff",b.value=n.value.lineHeight||1.5,_.value=n.value.wordSpace||0,I.value=void 0===n.value.paragraphSpace?5:n.value.paragraphSpace,Oi.emit(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE))}),{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],C=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],L=[0,1,2,3,4,5,6,8,10],T=[0,5,10,15,20,25,30,40,50,80],E=e=>{m({lineHeight:e})},U=e=>{m({paragraphSpace:e})},W=e=>{m({wordSpace:e})},D=e=>{m({fill:e})},H=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},F=e=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:e})},A=(0,s.iH)(""),Z=(0,s.iH)(!1);(0,i.YP)(u,(()=>Z.value=!1));const O=()=>{A.value=u.value.link},z=e=>{const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!e||!t.test(e))return ta.error("不是正确的网页链接地址");H("link",e),Z.value=!1};return(e,l)=>{const a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),r=(0,i.up)("IconHighLight"),p=(0,i.up)("IconTextBold"),m=(0,i.up)("IconTextItalic"),$=(0,i.up)("IconTextUnderline"),R=(0,i.up)("IconStrikethrough"),P=(0,i.up)("IconCode"),B=(0,i.up)("IconQuote"),N=(0,i.up)("IconFormat"),j=(0,i.up)("IconFormatBrush"),Y=(0,i.up)("IconLinkOne"),V=(0,i.up)("IconAlignTextLeft"),J=(0,i.up)("IconAlignTextCenter"),q=(0,i.up)("IconAlignTextRight"),X=(0,i.up)("IconAlignTextBoth"),G=(0,i.up)("IconList"),K=(0,i.up)("IconDown"),Q=(0,i.up)("IconOrderedList"),ee=(0,i.up)("IconIndentLeft"),te=(0,i.up)("IconIndentRight"),le=(0,i.up)("IconRowHeight"),ae=(0,i.up)("IconVerticalSpacingBetweenItems"),ne=(0,i.up)("IconFullwidth"),ie=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",dg,[(0,i._)("div",pg,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,oe.j5)(e.style),onClick:t=>F(e.cmd)},(0,oe.zw)(e.label),13,vg))),64))]),(0,i.Wm)(Zc),(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(u).fontname,"onUpdate:value":l[0]||(l[0]=e=>H("fontname",e)),options:[...(0,s.SU)(c),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(u).fontsize,"onUpdate:value":l[1]||(l[1]=e=>H("fontsize",e)),options:S.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).color,"onUpdate:modelValue":l[2]||(l[2]=e=>H("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(u).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[ie,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>H("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(u).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[ie,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:l[4]||(l[4]=e=>H("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[ie,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:l[5]||(l[5]=e=>H("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[ie,"减小字号"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[6]||(l[6]=e=>H("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1},8,["checked"])),[[ie,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[7]||(l[7]=e=>H("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])),[[ie,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[8]||(l[8]=e=>H("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1},8,["checked"])),[[ie,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[9]||(l[9]=e=>H("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(R)])),_:1},8,["checked"])),[[ie,"删除线"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).superscript,onClick:l[10]||(l[10]=e=>H("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])),[[ie,"上标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).subscript,onClick:l[11]||(l[11]=e=>H("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])),[[ie,"下标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).code,onClick:l[12]||(l[12]=e=>H("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(P)])),_:1},8,["checked"])),[[ie,"行内代码"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).blockquote,onClick:l[13]||(l[13]=e=>H("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(B)])),_:1},8,["checked"])),[[ie,"引用"]])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{first:"",style:{flex:"1"},onClick:l[14]||(l[14]=e=>H("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})),[[ie,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:l[15]||(l[15]=e=>(0,s.SU)(v)()),onDblclick:l[16]||(l[16]=e=>(0,s.SU)(v)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(j)])),_:1},8,["checked"])),[[ie,"格式刷(双击连续使用)"]]),(0,i.Wm)(dn,{placement:"bottom-end",trigger:"click",value:Z.value,"onUpdate:value":l[21]||(l[21]=e=>Z.value=e),style:{width:"33.33%"}},{content:(0,i.w5)((()=>[(0,i._)("div",mg,[(0,i.Wm)(sn,{value:A.value,"onUpdate:value":l[17]||(l[17]=e=>A.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",hg,[(0,i.Wm)(tp,{size:"small",disabled:!(0,s.SU)(u).link,onClick:l[18]||(l[18]=e=>z()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{size:"small",type:"primary",onClick:l[19]||(l[19]=e=>z(A.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{last:"",style:{width:"100%"},checked:!!(0,s.SU)(u).link,onClick:l[20]||(l[20]=e=>O())},{default:(0,i.w5)((()=>[(0,i.Wm)(Y)])),_:1},8,["checked"])),[[ie,"超链接"]])])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[22]||(l[22]=e=>H("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(V)])),_:1})),[[ie,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1})),[[ie,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(q)])),_:1})),[[ie,"右对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"justify",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1})),[[ie,"两端对齐"]])])),_:1},8,["value"]),(0,i._)("div",fg,[(0,i.Wm)(Kf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",type:(0,s.SU)(u).bulletList?"primary":"default",style:{flex:"1"},onClick:l[23]||(l[23]=e=>H("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["type"])),[[ie,"项目符号"]]),(0,i.Wm)(dn,{trigger:"click",value:h.value,"onUpdate:value":l[24]||(l[24]=e=>h.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",gg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,oe.j5)({listStyleType:e}),onClick:t=>H("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},xg))),64))],12,yg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),kg,(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",type:(0,s.SU)(u).orderedList?"primary":"default",style:{flex:"1"},onClick:l[25]||(l[25]=e=>H("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["type"])),[[ie,"编号"]]),(0,i.Wm)(dn,{trigger:"click",value:f.value,"onUpdate:value":l[26]||(l[26]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",bg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(x.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,oe.j5)({listStyleType:e}),onClick:t=>H("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},Sg))),64))],12,_g)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i._)("div",Cg,[(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",style:{flex:"1"},onClick:l[27]||(l[27]=e=>H("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})),[[ie,"减小段落缩进"]]),(0,i.Wm)(dn,{trigger:"click",value:g.value,"onUpdate:value":l[29]||(l[29]=e=>g.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:l[28]||(l[28]=e=>H("textIndent","-1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("减小首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),Lg,(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",style:{flex:"1"},onClick:l[30]||(l[30]=e=>H("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})),[[ie,"增大段落缩进"]]),(0,i.Wm)(dn,{trigger:"click",value:y.value,"onUpdate:value":l[32]||(l[32]=e=>y.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:l[31]||(l[31]=e=>H("textIndent","+1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("增大首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",Tg,[Eg,(0,i.Wm)(cp,{style:{width:"60%"},value:b.value||1,"onUpdate:value":l[33]||(l[33]=e=>E(e)),options:C.map((e=>({label:e+"倍",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1},8,["value","options"])]),(0,i._)("div",Mg,[Ug,(0,i.Wm)(cp,{style:{width:"60%"},value:I.value||0,"onUpdate:value":l[34]||(l[34]=e=>U(e)),options:T.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ae)])),_:1},8,["value","options"])]),(0,i._)("div",Wg,[Dg,(0,i.Wm)(cp,{style:{width:"60%"},value:_.value||0,"onUpdate:value":l[35]||(l[35]=e=>W(e)),options:L.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ne)])),_:1},8,["value","options"])]),(0,i._)("div",Hg,[Fg,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:k.value,"onUpdate:modelValue":l[36]||(l[36]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:k.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(lh)])}}});const $g=(0,Vl.Z)(Ag,[["__scopeId","data-v-4cf37a85"]]);var Zg=$g;const Og={class:"element-flip"};var Rg=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=(0,s.iH)(!1),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(a.value=!!l.value.flipH,n.value=!!l.value.flipV)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=da(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=(0,i.up)("IconFlipVertically"),o=(0,i.up)("IconFlipHorizontally");return(0,i.wg)(),(0,i.iD)("div",Og,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(qf,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>u({flipV:!n.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(l),(0,i.Uk)(" 垂直翻转")])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:a.value,onClick:t[1]||(t[1]=e=>u({flipH:!a.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(o),(0,i.Uk)(" 水平翻转")])),_:1},8,["checked"])])),_:1})])}}});const zg=(0,Vl.Z)(Rg,[["__scopeId","data-v-7571b056"]]);var Pg=zg;const Bg=e=>((0,i.dD)("data-v-2c8acf3c"),e=e(),(0,i.Cn)(),e),Ng={class:"element-filter"},jg={class:"row"},Yg=Bg((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Vg={class:"switch-wrapper",style:{flex:"3"}},Jg={key:0,class:"filter"},qg={class:"name"};var Xg=(0,i.aZ)({__name:"ElementFilter",setup(e){const t=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],l=$(),{handleElement:a,handleElementId:n}=(0,o.Jk)(R()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=da();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>{const l=e[t.key];return l?{...t,value:parseInt(l)}:t})),u.value=!0):(r.value=JSON.parse(JSON.stringify(t)),u.value=!1)}),{deep:!0,immediate:!0});const d=(e,t)=>{const o=a.value,i=o.filters||{},s={...i,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:s}}),c()},p=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{filters:{}}}):l.removeElementProps({id:a.value.id,propName:"filters"}),c())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ng,[(0,i._)("div",jg,[Yg,(0,i._)("div",Vg,[(0,i.Wm)(pf,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["value"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",Jg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(r.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"filter-item",key:e.key},[(0,i._)("div",qg,(0,oe.zw)(e.label),1),(0,i.Wm)(qm,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,"onUpdate:value":t=>d(e,t)},null,8,["max","step","value","onUpdate:value"])])))),128))])):(0,i.kq)("",!0)]))}});const Gg=(0,Vl.Z)(Xg,[["__scopeId","data-v-2c8acf3c"]]);var Kg=Gg;const Qg=e=>((0,i.dD)("data-v-0ae0ff99"),e=e(),(0,i.Cn)(),e),ey={class:"element-color-mask"},ty={class:"row"},ly=Qg((()=>(0,i._)("div",{style:{width:"40%"}},"着色(蒙版):",-1))),ay={class:"switch-wrapper",style:{width:"60%"}},ny={key:0,class:"row",style:{"margin-top":"15px"}},oy=Qg((()=>(0,i._)("div",{style:{width:"40%"}},"蒙版颜色:",-1))),iy="rgba(226, 83, 77, 0.5)";var sy=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t=$(),{handleElement:l,handleElementId:a}=(0,o.Jk)(R()),n=(0,s.iH)(iy),r=(0,s.iH)(!1),{addHistorySnapshot:u}=da();(0,i.YP)(l,(()=>{l.value&&"image"===l.value.type&&(l.value.colorMask?(n.value=l.value.colorMask,r.value=!0):r.value=!1)}),{deep:!0,immediate:!0});const c=e=>{l.value&&(e?t.updateElement({id:l.value.id,props:{colorMask:iy}}):t.removeElementProps({id:l.value.id,propName:"colorMask"}),u())},d=e=>{t.updateElement({id:a.value,props:{colorMask:e}}),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ey,[(0,i._)("div",ty,[ly,(0,i._)("div",ay,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),r.value?((0,i.wg)(),(0,i.iD)("div",ny,[oy,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value},null,8,["color"])])),_:1})])):(0,i.kq)("",!0)]))}});const ry=(0,Vl.Z)(sy,[["__scopeId","data-v-0ae0ff99"]]);var uy=ry;const cy=e=>((0,i.dD)("data-v-080b6de7"),e=e(),(0,i.Cn)(),e),dy={class:"image-style-panel"},py={class:"clip"},vy=cy((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),my={class:"shape-clip"},hy=["onClick"],fy={key:0,class:"title"};var gy=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=Kn,l=[{label:"纵横比(正方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],a=R(),n=$(),{handleElement:r,handleElementId:u}=(0,o.Jk)(a),{currentSlide:c}=(0,o.Jk)(n),d=r,p=(0,s.iH)(!1),{addHistorySnapshot:v}=da(),m=()=>{a.setClipingImageElementId(u.value),p.value=!1},h=()=>{const e=r.value,t=e.width,l=e.height,a=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],i=t/((o[1][0]-o[0][0])/100),s=l/((o[1][1]-o[0][1])/100),u=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:u,originTop:c}},f=(e,t=0)=>{const l=r.value,{originClipRange:a,originWidth:o,originHeight:i,originLeft:s,originTop:c}=h();if(t){const a=i/o,r=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[r,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,r],[d-e,d]]}n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:p},left:s+o*(p[0][0]/100),top:c+i*(p[0][1]/100),width:o*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:a}}});m(),v()},g=e=>{const t=e[0];t&&(na(t).then((e=>{const t={src:e};n.updateElement({id:u.value,props:t})})),v())},y=()=>{const e=r.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();n.updateElement({id:u.value,props:{left:l,top:a,width:e,height:t}})}n.removeElementProps({id:u.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},w=()=>{const e=r.value,t={...c.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),v()};return(e,a)=>{const n=(0,i.up)("IconTailoring"),o=(0,i.up)("IconDown"),r=(0,i.up)("IconTransform"),u=(0,i.up)("IconUndo"),c=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",dy,[(0,i._)("div",{class:"origin-image",style:(0,oe.j5)({backgroundImage:`url(${(0,s.SU)(d).src})`})},null,4),(0,i.Wm)(Pg),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:a[0]||(a[0]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)(dn,{trigger:"click",value:p.value,"onUpdate:value":a[1]||(a[1]=e=>p.value=e),style:{width:"calc(100% / 6)"}},{content:(0,i.w5)((()=>[(0,i._)("div",py,[vy,(0,i._)("div",my,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[(0,i._)("div",{class:"shape",style:(0,oe.j5)({clipPath:e.style})},null,4)],8,hy)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",fy,"按"+(0,oe.zw)(e.label)+"",1)):(0,i.kq)("",!0),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(uy),(0,i.Wm)(Zc),(0,i.Wm)(Kg),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(Pa,{onChange:a[2]||(a[2]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)(tp,{class:"full-width-btn",onClick:a[3]||(a[3]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)(tp,{class:"full-width-btn",onClick:a[4]||(a[4]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const yy=(0,Vl.Z)(gy,[["__scopeId","data-v-080b6de7"]]);var wy=yy,xy=()=>{const e=R(),{shapeFormatPainter:t,handleElement:l}=(0,o.Jk)(e),a=(a=!1)=>{const n=l.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:n.fill,gradient:n.gradient,outline:n.outline,opacity:n.opacity,shadow:n.shadow})};return{toggleShapeFormatPainter:a}};const ky=e=>((0,i.dD)("data-v-0674f2cf"),e=e(),(0,i.Cn)(),e),by={class:"shape-style-panel"},_y={class:"title"},Iy=ky((()=>(0,i._)("span",null,"点击替换形状",-1))),Sy={class:"shape-pool"},Cy={class:"shape-list"},Ly={class:"row"},Ty=ky((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Ey={class:"row"},My=ky((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Uy={class:"row"},Wy=ky((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Dy={key:0,class:"row"},Hy=ky((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),Fy={class:"row"};var Ay=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const t=R(),l=$(),{handleElement:a,handleElementId:n,richTextAttrs:r,availableFonts:u,textFormatPainter:c,shapeFormatPainter:d}=(0,o.Jk)(t),p=a,v=(0,s.iH)("#000"),m=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),h=(0,s.iH)("fill"),f=(0,s.iH)("middle");(0,i.YP)(a,(()=>{a.value&&"shape"===a.value.type&&(v.value=a.value.fill||"#fff",m.value=a.value.gradient||{type:"linear",rotate:0,color:[v.value,"#fff"]},h.value=a.value.gradient?"gradient":"fill",f.value=a.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:g}=da(),{toggleTextFormatPainter:y}=zm(),{toggleShapeFormatPainter:w}=xy(),x=e=>{l.updateElement({id:n.value,props:e}),g()},k=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),g()):x({gradient:m.value})},b=e=>{if(!m.value)return;const t={...m.value,...e};x({gradient:t})},_=e=>{x({fill:e})},I=e=>{const{width:t,height:l}=a.value,n={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){n.pathFormula=e.pathFormula,n.viewBox=[t,l];const a=ra[e.pathFormula];"editable"in a?(n.path=a.formula(t,l,a.defaultValue),n.keypoint=a.defaultValue):n.path=a.formula(t,l)}else n.pathFormula=void 0,n.keypoint=void 0;x(n)},S=e=>{const t=a.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;x({text:{...n,align:e}})},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"],L=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{const l=(0,i.up)("IconDown"),a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),g=(0,i.up)("IconHighLight"),x=(0,i.up)("IconTextBold"),T=(0,i.up)("IconTextItalic"),E=(0,i.up)("IconTextUnderline"),U=(0,i.up)("IconStrikethrough"),W=(0,i.up)("IconFormat"),D=(0,i.up)("IconFormatBrush"),H=(0,i.up)("IconAlignTextLeft"),F=(0,i.up)("IconAlignTextCenter"),A=(0,i.up)("IconAlignTextRight"),$=(0,i.up)("IconAlignTextTopOne"),Z=(0,i.up)("IconAlignTextMiddleOne"),O=(0,i.up)("IconAlignTextBottomOne"),R=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",by,[(0,i._)("div",_y,[Iy,(0,i.Wm)(l)]),(0,i._)("div",Sy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ua),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Cy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,["任意多边形"!==e.title?((0,i.wg)(),(0,i.j4)(Hp,{class:"shape-item",key:t,shape:e,onClick:t=>I(e)},null,8,["shape","onClick"])):(0,i.kq)("",!0)],64)))),256))])])))),128))]),(0,i._)("div",Ly,[(0,i.Wm)(cp,{style:{flex:"1"},value:h.value,"onUpdate:value":t[0]||(t[0]=e=>k(e)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Ty,"fill"===h.value?((0,i.wg)(),(0,i.j4)(dn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=e=>_(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:v.value},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)(cp,{key:1,style:{flex:"1"},value:m.value.type,"onUpdate:value":t[2]||(t[2]=e=>b({type:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"gradient"===h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Ey,[My,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:m.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>b({color:[e,m.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:m.value.color[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Uy,[Wy,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:m.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>b({color:[m.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:m.value.color[1]},null,8,["color"])])),_:1})]),"linear"===m.value.type?((0,i.wg)(),(0,i.iD)("div",Dy,[Hy,(0,i.Wm)(qm,{style:{width:"60%"},min:0,max:360,step:15,value:m.value.rotate,"onUpdate:value":t[5]||(t[5]=e=>b({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Pg),(0,i.Wm)(Zc),(0,s.SU)(p).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(r).fontname,"onUpdate:value":t[6]||(t[6]=e=>L("fontname",e)),options:[...(0,s.SU)(u),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(r).fontsize,"onUpdate:value":t[7]||(t[7]=e=>L("fontsize",e)),options:C.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(r).color,"onUpdate:modelValue":t[8]||(t[8]=e=>L("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(r).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[R,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(r).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>L("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(r).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["color"])),[[R,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:t[10]||(t[10]=e=>L("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[R,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[11]||(t[11]=e=>L("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[R,"减小字号"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).bold,onClick:t[12]||(t[12]=e=>L("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1},8,["checked"])),[[R,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).em,onClick:t[13]||(t[13]=e=>L("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])),[[R,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).underline,onClick:t[14]||(t[14]=e=>L("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1},8,["checked"])),[[R,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).strikethrough,onClick:t[15]||(t[15]=e=>L("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1},8,["checked"])),[[R,"删除线"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},onClick:t[16]||(t[16]=e=>L("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[R,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(c),onClick:t[17]||(t[17]=e=>(0,s.SU)(y)()),onDblclick:t[18]||(t[18]=e=>(0,s.SU)(y)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1},8,["checked"])),[[R,"格式刷(双击连续使用)"]])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(r).align,"onUpdate:value":t[19]||(t[19]=e=>L("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1})),[[R,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})),[[R,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":t[20]||(t[20]=e=>S(e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1})),[[R,"顶对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(O)])),_:1})),[[R,"底对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Zc)],64)):(0,i.kq)("",!0),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(lh),(0,i.Wm)(Zc),(0,i._)("div",Fy,[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:t[21]||(t[21]=e=>(0,s.SU)(w)()),onDblclick:t[22]||(t[22]=e=>(0,s.SU)(w)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D),(0,i.Uk)(" 形状格式刷")])),_:1},8,["checked"])),[[R,"双击连续使用"]])])])}}});const $y=(0,Vl.Z)(Ay,[["__scopeId","data-v-0674f2cf"]]);var Zy=$y;const Oy=e=>((0,i.dD)("data-v-ae80032c"),e=e(),(0,i.Cn)(),e),Ry={class:"line-style-panel"},zy={class:"row"},Py=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条样式:",-1))),By={class:"row"},Ny=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条颜色:",-1))),jy={class:"row"},Yy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条宽度:",-1))),Vy={class:"row"},Jy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"起点样式:",-1))),qy={class:"row"},Xy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"终点样式:",-1)));var Gy=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ry,[(0,i._)("div",zy,[Py,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).style,"onUpdate:value":t[0]||(t[0]=e=>r({style:e})),options:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",By,[Ny,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",jy,[Yy,(0,i.Wm)(mv,{value:(0,s.SU)(a).width,"onUpdate:value":t[2]||(t[2]=e=>r({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Vy,[Jy,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).points[0],"onUpdate:value":t[3]||(t[3]=e=>r({points:[e,(0,s.SU)(a).points[1]]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i._)("div",qy,[Xy,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).points[1],"onUpdate:value":t[4]||(t[4]=e=>r({points:[(0,s.SU)(a).points[0],e]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i.Wm)(Pf)]))}});const Ky=(0,Vl.Z)(Gy,[["__scopeId","data-v-ae80032c"]]);var Qy=Ky;const ew={class:"chart-data-editor"},tw={class:"editor-content"},lw={class:"range-box"},aw=["id","onFocus","onPaste"],nw={class:"btns"},ow={class:"left"},iw={class:"right"},sw=100,rw=32;var uw=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)([0,0]),r=(0,s.iH)({width:0,height:0}),u=(0,s.iH)(null),c=(0,i.Fl)((()=>{const e=o.value[0]*sw,t=o.value[1]*rw;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]})),d=(0,i.Fl)((()=>{const e=o.value[0]*sw,t=o.value[1]*rw;return{left:e+"px",top:t+"px"}})),p=()=>{const e=[],{labels:t,legends:a,series:n}=l.data,i=t.length,s=n.length;e.push(["",...a]);for(let l=0;l<i;l++){const a=[t[l]];for(let e=0;e<s;e++)a.push(n[e][l]+"");e.push(a)}for(let l=0;l<i+1;l++)for(let t=0;t<s+1;t++){const a=document.querySelector(`#cell-${l}-${t}`);a&&(a.value=e[l][t]+"")}o.value=[s+1,i+1]};(0,i.bv)(p);const v=()=>{if(!u.value)return;const[e,t]=u.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},m=e=>{const t=e.key.toUpperCase();t===ne.ENTER&&v()};(0,i.bv)((()=>{document.addEventListener("keydown",m)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",m)}));const h=()=>{const[e,t]=o.value,l=[],n=[],i=[];for(let a=1;a<t;a++){let e=`类别${a}`;const t=document.querySelector(`#cell-${a}-0`);t&&t.value&&(e=t.value),l.push(e)}for(let a=1;a<e;a++){let e=`系列${a}`;const t=document.querySelector(`#cell-0-${a}`);t&&t.value&&(e=t.value),n.push(e)}for(let a=1;a<e;a++){const e=[];for(let l=1;l<t;l++){const t=document.querySelector(`#cell-${l}-${a}`);let n=0;t&&t.value&&+t.value&&(n=+t.value),e.push(n)}i.push(e)}a("save",{labels:l,legends:n,series:i})},f=()=>{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},g=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const a=e.clipboardData.items[0];a&&"string"===a.kind&&"text/plain"===a.type&&a.getAsString((e=>{const a=fe(e);if("object"===typeof a)return;const n=ge(e);if(n){const e=t+n.length,a=l+n[0].length;for(let o=t;o<e;o++)for(let e=l;e<a;e++){const a=document.querySelector(`#cell-${o}-${e}`);a&&(a.value=n[o-t][e-l])}}}))},y=()=>a("close"),w=e=>{let t=!0;const l=e.pageX,a=e.pageY,n=o.value[0]*sw,i=o.value[1]*rw;document.onmousemove=e=>{if(!t)return;const o=e.pageX,s=e.pageY,u=o-l,c=s-a,d=n+u,p=i+c;r.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const n=e.pageX,i=e.pageY;if(l===n&&a===i)return;let s=r.value.width,u=r.value.height;s%sw>.5*sw&&(s+=sw-s%sw),u%rw>.5*rw&&(u+=rw-u%rw);let c=Math.round(u/rw),d=Math.round(s/sw);c<3&&(c=3),d<2&&(d=2),o.value=[d,c],r.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ew,[(0,i._)("div",tw,[(0,i._)("div",lw,[(0,i._)("div",{class:"temp-range",style:(0,oe.j5)({width:r.value.width+"px",height:r.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["range-line",e.type]),key:e.type,style:(0,oe.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,oe.j5)(d.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>w(e)),["stop"]))},null,36)]),(0,i._)("table",null,[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(31,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(7,(t=>(0,i._)("td",{key:t,class:(0,oe.C_)({head:1===t&&e<=o.value[1]||1===e&&t<=o.value[0]})},[(0,i._)("input",{class:(0,oe.C_)(["item",{selected:e<=o.value[1]&&t<=o.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>u.value=[e-1,t-1],onPaste:l=>g(l,e-1,t-1)},null,42,aw)],2))),64))]))),64))])])]),(0,i._)("div",nw,[(0,i._)("div",ow,[(0,i.Wm)(tp,{class:"btn",onClick:t[1]||(t[1]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",iw,[(0,i.Wm)(tp,{class:"btn",onClick:t[2]||(t[2]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>h()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const cw=(0,Vl.Z)(uw,[["__scopeId","data-v-f7b59928"]]);var dw=cw;const pw=e=>((0,i.dD)("data-v-26bf4835"),e=e(),(0,i.Cn)(),e),vw=pw((()=>(0,i._)("span",{class:"checkbox-input"},null,-1))),mw=pw((()=>(0,i._)("input",{class:"checkbox-original",type:"checkbox"},null,-1))),hw={class:"checkbox-label"};var fw=(0,i.aZ)({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=e=>{l.disabled||a("update:value",e.target.checked)};return(e,t)=>((0,i.wg)(),(0,i.iD)("label",{class:(0,oe.C_)(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:t[0]||(t[0]=e=>n(e))},[vw,mw,(0,i._)("span",hw,[(0,i.WI)(e.$slots,"default")])],34))}});const gw=(0,Vl.Z)(fw,[["__scopeId","data-v-26bf4835"]]);var yw=gw;const ww=e=>((0,i.dD)("data-v-45827db6"),e=e(),(0,i.Cn)(),e),xw={class:"chart-style-panel"},kw={class:"row"},bw={class:"row"},_w={key:1,class:"row"},Iw={key:2,class:"row"},Sw={class:"row"},Cw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"图例:",-1))),Lw={class:"row"},Tw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"背景填充:",-1))),Ew={class:"row"},Mw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"网格颜色:",-1))),Uw={style:{width:"40%"}},Ww={class:"color-btn-wrap",style:{width:"100%"}},Dw=["onClick"],Hw={class:"preset-themes"},Fw=["onClick","onMouseenter"];var Aw=(0,i.aZ)({__name:"index",setup(e){const t=[["#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"]],l=R(),a=$(),{handleElement:r,handleElementId:u}=(0,o.Jk)(l),{theme:c}=(0,o.Jk)(a),d=r,p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)([-1,-1]),{addHistorySnapshot:h}=da(),f=(0,s.iH)("#000"),g=(0,s.iH)([]),y=(0,s.iH)(""),w=(0,s.iH)(""),x=(0,s.iH)(!0),k=(0,s.iH)(!0),b=(0,s.iH)(!1),_=(0,s.iH)(!1),I=(0,s.iH)(!1),S=(0,s.iH)(!1);(0,i.YP)(r,(()=>{if(r.value&&"chart"===r.value.type){if(f.value=r.value.fill||"#fff",r.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=r.value.options;x.value=!!e,k.value=!!t,b.value=!!l,_.value=!!a,I.value=!!n,S.value=!!o}g.value=r.value.themeColor,y.value=r.value.gridColor||"#333",w.value=r.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{a.updateElement({id:u.value,props:e}),h()},L=e=>{p.value=!1,C({data:e})},T=e=>{C({fill:e})},E=e=>{const t=r.value,l={...t.options,...e};C({options:l})},M=(e,t)=>{const l={themeColor:g.value.map(((l,a)=>a===t?e:l))};C(l)},U=()=>{const e={themeColor:[...g.value,c.value.themeColor]};C(e)},W=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),v.value=!1},D=e=>{const t={themeColor:g.value.filter(((t,l)=>l!==e))};C(t)},H=e=>{C({gridColor:e})},F=e=>{C({legend:e})},A=()=>p.value=!0;return Oi.on(Ai.OPEN_CHART_DATA_EDITOR,A),(0,i.Ah)((()=>{Oi.off(Ai.OPEN_CHART_DATA_EDITOR,A)})),(e,l)=>{const a=(0,i.up)("IconEdit"),o=(0,i.up)("IconCloseSmall"),r=(0,i.up)("IconPlus"),u=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",xw,[(0,i.Wm)(tp,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>p.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)(Zc),"line"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",kw,[(0,i.Wm)(yw,{"onUpdate:value":l[1]||(l[1]=e=>E({showArea:e})),value:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":l[2]||(l[2]=e=>E({showLine:e})),value:!k.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["value"])]),(0,i._)("div",bw,[(0,i.Wm)(yw,{"onUpdate:value":l[3]||(l[3]=e=>E({lineSmooth:e})),value:x.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["value"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",_w,[(0,i.Wm)(yw,{"onUpdate:value":l[4]||(l[4]=e=>E({horizontalBars:e})),value:_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":l[5]||(l[5]=e=>E({stackBars:e})),value:S.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",Iw,[(0,i.Wm)(yw,{"onUpdate:value":l[6]||(l[6]=e=>E({donut:e})),value:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),(0,i.Wm)(Zc),(0,i._)("div",Sw,[Cw,(0,i.Wm)(cp,{style:{width:"60%"},value:w.value,"onUpdate:value":l[7]||(l[7]=e=>F(e)),options:[{label:"不显示",value:""},{label:"显示在上方",value:"top"},{label:"显示在下方",value:"bottom"}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i._)("div",Lw,[Tw,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>T(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:f.value},null,8,["color"])])),_:1})]),(0,i._)("div",Ew,[Mw,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=e=>H(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:y.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"row",key:t},[(0,i._)("div",Uw,(0,oe.zw)(0===t?"主题配色:":""),1),(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:e,"onUpdate:modelValue":e=>M(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",Ww,[(0,i.Wm)(ih,{color:e},null,8,["color"]),0!==t?(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>D(t)),["stop"])},[(0,i.Wm)(o)],8,Dw)),[[u,"删除"]]):(0,i.kq)("",!0)])])),_:2},1024)])))),128)),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",open:v.value,"onUpdate:open":l[11]||(l[11]=e=>v.value=e),style:{width:"40%"}},{content:(0,i.w5)((()=>[(0,i._)("div",Hw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((a,n)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["preset-theme-color",{select:m.value[0]===t&&n<=m.value[1]}]),key:a,style:(0,oe.j5)({backgroundColor:a}),onClick:t=>W(e,n),onMouseenter:e=>m.value=[t,n],onMouseleave:l[10]||(l[10]=e=>m.value=[-1,-1])},null,46,Fw)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{first:"",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["open"]),(0,i.Wm)(tp,{last:"",disabled:g.value.length>=10,style:{width:"60%"},onClick:l[12]||(l[12]=e=>U())},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(kp,{visible:p.value,"onUpdate:visible":l[15]||(l[15]=e=>p.value=e),width:640},{default:(0,i.w5)((()=>[(0,i.Wm)(dw,{data:(0,s.SU)(d).data,onClose:l[13]||(l[13]=e=>p.value=!1),onSave:l[14]||(l[14]=e=>L(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const $w=(0,Vl.Z)(Aw,[["__scopeId","data-v-45827db6"]]);var Zw=$w;const Ow=e=>((0,i.dD)("data-v-e5523cbc"),e=e(),(0,i.Cn)(),e),Rw={class:"table-style-panel"},zw={class:"row"},Pw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"行数:",-1))),Bw={class:"set-count",style:{width:"60%"}},Nw={class:"count-text"},jw={class:"row"},Yw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"列数:",-1))),Vw={class:"set-count",style:{width:"60%"}},Jw={class:"count-text"},qw={class:"row theme-switch"},Xw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"启用主题表格:",-1))),Gw={class:"switch-wrapper",style:{width:"60%"}},Kw={class:"row"},Qw={class:"row"},ex={class:"row"},tx=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"主题颜色:",-1)));var lx=(0,i.aZ)({__name:"TableStylePanel",setup(e){const t=$(),{handleElement:l,handleElementId:a,selectedTableCells:n,availableFonts:u}=(0,o.Jk)(R()),c=(0,i.Fl)((()=>t.theme.themeColor)),d=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],p=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),v=(0,s.iH)(),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,s.iH)(0);(0,i.YP)(l,(()=>{l.value&&"table"===l.value.type&&(v.value=l.value.theme,m.value=!!v.value,h.value=l.value.data.length,f.value=l.value.data[0].length,g.value=l.value.data.length,y.value=l.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:w}=da(),x=()=>{if(!l.value||"table"!==l.value.type)return;let e=0,t=0;if(n.value.length){const l=n.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const a=l.value.data[e][t].style;p.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{n.value.length&&x()})),(0,i.YP)(n,x);const k=e=>{t.updateElement({id:a.value,props:e}),w()},b=e=>{const t=l.value,a=JSON.parse(JSON.stringify(t.data));for(let l=0;l<a.length;l++)for(let t=0;t<a[l].length;t++)if(!n.value.length||n.value.includes(`${l}_${t}`)){const n=a[l][t].style||{};a[l][t].style={...n,...e}}k({data:a}),x()},_=e=>{if(!v.value)return;const t={...v.value,...e};k({theme:t})},I=e=>{if(e){const e={theme:{color:c.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};k(e)}else t.removeElementProps({id:a.value,propName:"theme"}),w()},S=e=>{const t=l.value,a=t.data.length;if(e>a){const l=new Array(f.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-a).fill(l),o=JSON.parse(JSON.stringify(t.data));o.push(...n),k({data:o})}else{const l=t.data.slice(0,e);k({data:l})}},C=e=>{const t=l.value,a=t.data[0].length;let n=t.data,o=t.colWidths.map((e=>e*t.width));if(e>a){n=n.map((t=>{const l=new Array(e-a).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...l),t}));const t=new Array(e-a).fill(100);o.push(...t)}else n=n.map((t=>t.slice(0,e))),o=o.slice(0,e);const i=o.reduce(((e,t)=>e+t)),s=o.map((e=>e/i)),u={width:i,data:n,colWidths:s};k(u)};return(e,t)=>{const l=(0,i.up)("IconFontSize"),a=(0,i.up)("IconAddText"),n=(0,i.up)("IconText"),o=(0,i.up)("IconFill"),r=(0,i.up)("IconTextBold"),c=(0,i.up)("IconTextItalic"),g=(0,i.up)("IconTextUnderline"),y=(0,i.up)("IconStrikethrough"),w=(0,i.up)("IconAlignTextLeft"),x=(0,i.up)("IconAlignTextCenter"),k=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconMinus"),T=(0,i.up)("IconPlus"),E=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Rw,[(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{style:{width:"50%"},value:p.value.fontname,"onUpdate:value":t[0]||(t[0]=e=>b({fontname:e})),options:[...(0,s.SU)(u),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(l)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"50%"},value:p.value.fontsize,"onUpdate:value":t[1]||(t[1]=e=>b({fontsize:e})),options:d.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>b({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:p.value.color},{default:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["color"])),[[E,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>b({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{last:"",color:p.value.backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[E,"单元格填充"]])])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.bold,onClick:t[4]||(t[4]=e=>b({bold:!p.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"])),[[E,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.em,onClick:t[5]||(t[5]=e=>b({em:!p.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])),[[E,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.underline,onClick:t[6]||(t[6]=e=>b({underline:!p.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])),[[E,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.strikethrough,onClick:t[7]||(t[7]=e=>b({strikethrough:!p.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[E,"删除线"]])])),_:1}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:p.value.align,"onUpdate:value":t[8]||(t[8]=e=>b({align:e}))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1})),[[E,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1})),[[E,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(k)])),_:1})),[[E,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Zc),(0,i.Wm)(Cf,{fixed:!0}),(0,i.Wm)(Zc),(0,i._)("div",zw,[Pw,(0,i._)("div",Bw,[(0,i.Wm)(tp,{class:"btn",disabled:h.value<=1,onClick:t[9]||(t[9]=e=>S(h.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Nw,(0,oe.zw)(h.value),1),(0,i.Wm)(tp,{class:"btn",disabled:h.value>=30,onClick:t[10]||(t[10]=e=>S(h.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i._)("div",jw,[Yw,(0,i._)("div",Vw,[(0,i.Wm)(tp,{class:"btn",disabled:f.value<=1,onClick:t[11]||(t[11]=e=>C(f.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Jw,(0,oe.zw)(f.value),1),(0,i.Wm)(tp,{class:"btn",disabled:f.value>=30,onClick:t[12]||(t[12]=e=>C(f.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i.Wm)(Zc),(0,i._)("div",qw,[Xw,(0,i._)("div",Gw,[(0,i.Wm)(pf,{value:m.value,"onUpdate:value":t[13]||(t[13]=e=>I(e))},null,8,["value"])])]),v.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Kw,[(0,i.Wm)(yw,{"onUpdate:value":t[14]||(t[14]=e=>_({rowHeader:e})),value:v.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":t[15]||(t[15]=e=>_({rowFooter:e})),value:v.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["value"])]),(0,i._)("div",Qw,[(0,i.Wm)(yw,{"onUpdate:value":t[16]||(t[16]=e=>_({colHeader:e})),value:v.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":t[17]||(t[17]=e=>_({colFooter:e})),value:v.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["value"])]),(0,i._)("div",ex,[tx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>_({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:v.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const ax=(0,Vl.Z)(lx,[["__scopeId","data-v-e5523cbc"]]);var nx=ax;const ox=e=>((0,i.dD)("data-v-3a5ca316"),e=e(),(0,i.Cn)(),e),ix={class:"latex-style-panel"},sx={class:"row"},rx={class:"row"},ux=ox((()=>(0,i._)("div",{style:{width:"40%"}},"颜色:",-1))),cx={class:"row"},dx=ox((()=>(0,i._)("div",{style:{width:"40%"}},"粗细:",-1)));var px=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=da(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},c=e=>{u({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>n.value=!0;return Oi.on(Ai.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Oi.off(Ai.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ix,[(0,i._)("div",sx,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",rx,[ux,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",cx,[dx,(0,i.Wm)(mv,{min:1,max:3,value:(0,s.SU)(a).strokeWidth,"onUpdate:value":t[2]||(t[2]=e=>u({strokeWidth:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(kp,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(fm,{value:(0,s.SU)(a).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{c(e),n.value=!1})},null,8,["value"])])),_:1},8,["visible"])]))}});const vx=(0,Vl.Z)(px,[["__scopeId","data-v-3a5ca316"]]);var mx=vx;const hx=e=>((0,i.dD)("data-v-b3551c8c"),e=e(),(0,i.Cn)(),e),fx={class:"video-style-panel"},gx=hx((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),yx={class:"background-image-wrapper"},wx={class:"background-image"},xx={class:"row"},kx={class:"row switch-row"},bx=hx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),_x={class:"switch-wrapper",style:{width:"60%"}};var Ix=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&na(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",fx,[gx,(0,i._)("div",yx,[(0,i.Wm)(Pa,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",wx,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundImage:(0,s.SU)(a).poster?`url(${(0,s.SU)(a).poster})`:""})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",xx,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})]),(0,i._)("div",kx,[bx,(0,i._)("div",_x,[(0,i.Wm)(pf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[2]||(t[2]=e=>r({autoplay:e}))},null,8,["value"])])])])}}});const Sx=(0,Vl.Z)(Ix,[["__scopeId","data-v-b3551c8c"]]);var Cx=Sx;const Lx=e=>((0,i.dD)("data-v-32517bcf"),e=e(),(0,i.Cn)(),e),Tx={class:"audio-style-panel"},Ex={class:"row"},Mx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"图标颜色:",-1))),Ux={class:"row switch-row"},Wx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),Dx={class:"switch-wrapper",style:{width:"60%"}},Hx={class:"row switch-row"},Fx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"循环播放:",-1))),Ax={class:"switch-wrapper",style:{width:"60%"}};var $x=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Tx,[(0,i._)("div",Ex,[Mx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",Ux,[Wx,(0,i._)("div",Dx,[(0,i.Wm)(pf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["value"])])]),(0,i._)("div",Hx,[Fx,(0,i._)("div",Ax,[(0,i.Wm)(pf,{value:(0,s.SU)(a).loop,"onUpdate:value":t[2]||(t[2]=e=>r({loop:e}))},null,8,["value"])])])]))}});const Zx=(0,Vl.Z)($x,[["__scopeId","data-v-32517bcf"]]);var Ox=Zx;const Rx=e=>((0,i.dD)("data-v-80f1bc4e"),e=e(),(0,i.Cn)(),e),zx={class:"multi-style-panel"},Px={class:"row"},Bx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"填充颜色:",-1))),Nx={class:"row"},jx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),Yx={class:"row"},Vx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Jx={class:"row"},qx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var Xx=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const t=$(),{richTextAttrs:l,availableFonts:a,activeElementList:n}=(0,o.Jk)(R()),{addHistorySnapshot:r}=da(),u=(e,l)=>{t.updateElement({id:e,props:l}),r()},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"],d=(0,s.iH)("#fff"),p=(0,s.iH)({width:0,color:"#fff",style:"solid"}),v=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||u(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t<l.length;t++)for(let a=0;a<l[t].length;a++){const n=l[t][a].style||{};l[t][a].style={...n,backcolor:e}}u(t.id,{data:l})}"audio"===t.type&&u(t.id,{color:e})}d.value=e},m=e=>{for(const t of n.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},a={outline:{...l,...e}};u(t.id,a)}"line"===t.type&&u(t.id,e)}p.value={...p.value,...e}},h=(e,t)=>{for(const l of n.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Oi.emit(Ai.RICH_TEXT_COMMAND,{target:l.id,action:{command:e,value:t}}),"table"===l.type){const a=JSON.parse(JSON.stringify(l.data));for(let l=0;l<a.length;l++)for(let n=0;n<a[l].length;n++){const o=a[l][n].style||{};a[l][n].style={...o,[e]:t}}u(l.id,{data:a})}"latex"===l.type&&"color"===e&&u(l.id,{color:t})}};return(e,t)=>{const n=(0,i.up)("IconFontSize"),o=(0,i.up)("IconAddText"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),f=(0,i.up)("IconAlignTextLeft"),g=(0,i.up)("IconAlignTextCenter"),y=(0,i.up)("IconAlignTextRight"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",zx,[(0,i._)("div",Px,[Bx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>v(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",Nx,[jx,(0,i.Wm)(cp,{style:{width:"60%"},value:p.value.style||"","onUpdate:value":t[1]||(t[1]=e=>m({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",Yx,[Vx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>m({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:p.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Jx,[qx,(0,i.Wm)(mv,{value:p.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>m({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(Zc),(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(l).fontname,"onUpdate:value":t[4]||(t[4]=e=>h("fontname",e)),options:[...(0,s.SU)(a),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(l).fontsize,"onUpdate:value":t[5]||(t[5]=e=>h("fontsize",e)),options:c.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>h("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(l).color},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[w,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>h("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(l).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["color"])),[[w,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:t[8]||(t[8]=e=>h("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("+")])),_:1})),[[w,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[9]||(t[9]=e=>h("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("-")])),_:1})),[[w,"减小字号"]])])),_:1}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(l).align,"onUpdate:value":t[10]||(t[10]=e=>h("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})),[[w,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1})),[[w,"右对齐"]])])),_:1},8,["value"])])}}});const Gx=(0,Vl.Z)(Xx,[["__scopeId","data-v-80f1bc4e"]]);var Kx=Gx;const Qx={class:"element-style-panel"};var ek=(0,i.aZ)({__name:"index",setup(e){const t={[sa.TEXT]:Zg,[sa.IMAGE]:wy,[sa.SHAPE]:Zy,[sa.LINE]:Qy,[sa.CHART]:Zw,[sa.TABLE]:nx,[sa.LATEX]:mx,[sa.VIDEO]:Cx,[sa.AUDIO]:Ox},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:s}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>{if(l.value.length>1){if(!s.value)return Kx;const e=a.value.find((e=>e.id===s.value));return e&&t[e.type]||null}return n.value&&t[n.value.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Qx,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value)))]))}});const tk=ek;var lk=tk;const ak=e=>((0,i.dD)("data-v-a2bcea28"),e=e(),(0,i.Cn)(),e),nk={class:"element-positopn-panel"},ok=ak((()=>(0,i._)("div",{class:"title"},"层级:",-1))),ik=ak((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),sk={class:"row"},rk=ak((()=>(0,i._)("div",{style:{width:"10%"}},null,-1))),uk={key:0,class:"row"},ck={key:1,style:{width:"10%"}},dk={class:"row"},pk=ak((()=>(0,i._)("div",{style:{width:"7%"}},null,-1)));var vk=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=$(),{handleElement:l,handleElementId:a}=(0,o.Jk)(R()),n=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(!1),v=(0,i.Fl)((()=>l.value&&Zn[l.value.type]||20)),m=(0,i.Fl)((()=>"text"===l.value?.type&&!l.value.vertical)),h=(0,i.Fl)((()=>"text"===l.value?.type&&l.value.vertical));(0,i.YP)(l,(()=>{l.value&&(n.value=(0,D.round)(l.value.left,1),r.value=(0,D.round)(l.value.top,1),p.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(u.value=(0,D.round)(l.value.width,1),c.value=(0,D.round)(l.value.height,1),d.value="rotate"in l.value&&void 0!==l.value.rotate?(0,D.round)(l.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:f}=ba(),{alignElementToCanvas:g}=qn(),{addHistorySnapshot:y}=da(),w=e=>{const l={left:e};t.updateElement({id:a.value,props:l}),y()},x=e=>{const l={top:e};t.updateElement({id:a.value,props:l}),y()},k=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const a=ra[l.value.pathFormula];let n="";return n="editable"in a?a.formula(e,t,l.value.keypoint):a.formula(e,t),{viewBox:[e,t],path:n}}return null},b=e=>{let l={width:e};const n=k(e,c.value);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},_=e=>{let l={height:e};const n=k(u.value,e);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},I=e=>{const l={rotate:e};t.updateElement({id:a.value,props:l}),y()},S=e=>{const l={fixedRatio:e};t.updateElement({id:a.value,props:l}),y()},C=e=>{let l=45*Math.floor(d.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:a.value,props:n}),y()};return(e,t)=>{const a=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),y=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),L=(0,i.up)("IconAlignLeft"),T=(0,i.up)("IconAlignVertically"),E=(0,i.up)("IconAlignRight"),M=(0,i.up)("IconAlignTop"),U=(0,i.up)("IconAlignHorizontally"),W=(0,i.up)("IconAlignBottom"),D=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),F=(0,i.up)("IconRotate"),A=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",nk,[ok,(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Zc),ik,(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>(0,s.SU)(g)((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})),[[A,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>(0,s.SU)(g)((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1})),[[A,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>(0,s.SU)(g)((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})),[[A,"右对齐"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>(0,s.SU)(g)((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[A,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>(0,s.SU)(g)((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})),[[A,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>(0,s.SU)(g)((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[A,"下对齐"]])])),_:1}),(0,i.Wm)(Zc),(0,i._)("div",sk,[(0,i.Wm)(mv,{step:5,value:n.value,"onUpdate:value":t[10]||(t[10]=e=>w(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 水平: ")])),_:1},8,["value"]),rk,(0,i.Wm)(mv,{step:5,value:r.value,"onUpdate:value":t[11]||(t[11]=e=>x(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 垂直: ")])),_:1},8,["value"])]),"line"!==(0,s.SU)(l).type?((0,i.wg)(),(0,i.iD)("div",uk,[(0,i.Wm)(mv,{min:v.value,max:1500,step:5,disabled:h.value,value:u.value,"onUpdate:value":t[12]||(t[12]=e=>b(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 宽度: ")])),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(l).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[p.value?(0,i.wy)(((0,i.wg)(),(0,i.j4)(D,{key:0,style:{width:"10%"},class:"icon-btn",onClick:t[13]||(t[13]=e=>S(!1))},null,512)),[[A,"解除宽高比锁定"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(H,{key:1,style:{width:"10%"},class:"icon-btn",onClick:t[14]||(t[14]=e=>S(!0))},null,512)),[[A,"宽高比锁定"]])],64)):((0,i.wg)(),(0,i.iD)("div",ck)),(0,i.Wm)(mv,{min:v.value,max:800,step:5,disabled:m.value||"table"===(0,s.SU)(l).type,value:c.value,"onUpdate:value":t[15]||(t[15]=e=>_(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 高度: ")])),_:1},8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(l).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(Zc),(0,i._)("div",dk,[(0,i.Wm)(mv,{min:-180,max:180,step:5,value:d.value,"onUpdate:value":t[16]||(t[16]=e=>I(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 旋转: ")])),_:1},8,["value"]),pk,(0,i._)("div",{class:"text-btn",onClick:t[17]||(t[17]=e=>C("-")),style:{width:"24%"}},[(0,i.Wm)(F),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:t[18]||(t[18]=e=>C("+")),style:{width:"24%"}},[(0,i.Wm)(F,{style:(0,oe.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const mk=(0,Vl.Z)(vk,[["__scopeId","data-v-a2bcea28"]]);var hk=mk;const fk=1e3,gk="click",yk="animate__",wk=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],xk=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],kk=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],bk=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移3D",value:"slideX3D"},{label:"上下推移3D",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],_k=e=>((0,i.dD)("data-v-5abd2ee4"),e=e(),(0,i.Cn)(),e),Ik={class:"element-animation-panel"},Sk={key:0,class:"element-animation"},Ck={class:"type-title"},Lk={class:"pool-item-wrapper"},Tk=["onMouseenter","onClick"],Ek={key:0,class:"mask"},Mk={key:1,class:"tip"},Uk={class:"sequence-content"},Wk={class:"index"},Dk={class:"text"},Hk={class:"handler"},Fk={key:0,class:"configs"},Ak={class:"config-item"},$k=_k((()=>(0,i._)("div",{style:{width:"35%"}},"持续时长:",-1))),Zk={class:"config-item"},Ok=_k((()=>(0,i._)("div",{style:{width:"35%"}},"触发方式:",-1))),Rk={class:"config-item"};var zk=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t={};for(const o of wk)for(const e of o.children)t[e.value]=e.name;for(const o of xk)for(const e of o.children)t[e.value]=e.name;for(const o of kk)for(const e of o.children)t[e.value]=e.name;const l=["in","out","attention"],a=$(),{handleElement:n,handleElementId:u}=(0,o.Jk)(R()),{currentSlide:c,formatedAnimations:d,currentSlideAnimations:p}=(0,o.Jk)(a),v=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],m=(0,s.iH)("in"),h=(0,s.iH)(!1);(0,i.YP)((()=>u.value),(()=>{g.value=!1}));const f=(0,s.iH)(""),g=(0,s.iH)(!1),{addHistorySnapshot:y}=da(),w=(0,i.Fl)((()=>{const e=[];for(let l=0;l<d.value.length;l++){const a=d.value[l];for(let n=0;n<a.animations.length;n++){const o=a.animations[n],i=c.value.elements.find((e=>e.id===o.elId));if(!i)continue;const s=$n[i.type],r=t[o.effect];e.push({...o,index:0===n?l+1:"",elType:s,animationEffect:r})}}return e})),x=(0,i.Fl)((()=>{const e=p.value,t=e.filter((e=>e.elId===u.value));return t||[]})),k=e=>{const t=p.value.filter((t=>t.id!==e));a.updateSlide({animations:t}),y()},b=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const n=JSON.parse(JSON.stringify(p.value)),o=n[l];n.splice(l,1),n.splice(t,0,o),a.updateSlide({animations:n}),y()},_=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${yk}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${yk}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${yk}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},I=async()=>{h.value=!h.value;for(let e=0;e<w.value.length;e++){if(!h.value)break;const t=w.value[e];1!==t.index&&"meantime"!==t.trigger&&await new Promise((e=>setTimeout(e,t.duration+100))),_(t.elId,t.effect,t.duration),e>=w.value.length-1&&(h.value=!1)}},S=(e,t)=>{if(t<100||t>5e3)return;const l=p.value.map((l=>l.id===e?{...l,duration:t}:l));a.updateSlide({animations:l}),y()},C=(e,t)=>{const l=p.value.map((l=>l.id===e?{...l,trigger:t}:l));a.updateSlide({animations:l}),y()},L=(e,t)=>{const l=p.value.map((l=>l.id===T.value?{...l,type:e,effect:t}:l));a.updateSlide({animations:l}),g.value=!1,y();const n=p.value.find((e=>e.elId===u.value)),o=n?.duration||fk;setTimeout((()=>{_(u.value,t,o)}),0)},T=(0,s.iH)(""),E=(e,t)=>{if(T.value)return void L(e,t);const l=JSON.parse(JSON.stringify(p.value));l.push({id:(0,r.x0)(10),elId:u.value,type:e,effect:t,duration:fk,trigger:gk}),a.updateSlide({animations:l}),g.value=!1,y(),setTimeout((()=>{_(u.value,t,fk)}),0)},M=(0,s.iH)(!1),U=e=>{e?setTimeout((()=>M.value=!0),600):M.value=!1},W=e=>{g.value=!0,T.value=e,U(!0)},D={in:wk,out:xk,attention:kk};return(e,t)=>{const a=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),u=(0,i.up)("IconCloseSmall"),c=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Ik,[(0,s.SU)(n)?((0,i.wg)(),(0,i.iD)("div",Sk,[(0,i.Wm)(dn,{trigger:"click",value:g.value,"onUpdate:value":[t[3]||(t[3]=e=>g.value=e),t[4]||(t[4]=e=>U(e))],style:{width:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(Kd,{tabs:v,value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[m.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(D[e],(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:l.name},[(0,i._)("div",Ck,(0,oe.zw)(l.name)+"",1),(0,i._)("div",Lk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.children,(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:l.name,onMouseenter:e=>f.value=l.value,onMouseleave:t[1]||(t[1]=e=>f.value=""),onClick:t=>E(e,l.value)},[(0,i._)("div",{class:(0,oe.C_)(["animation-box",[`${(0,s.SU)(yk)}animated`,`${(0,s.SU)(yk)}fast`,f.value===l.value&&`${(0,s.SU)(yk)}${l.value}`]])},(0,oe.zw)(l.name),3)],40,Tk)))),128))])])))),128)),M.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",Ek))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{class:"element-animation-btn",onClick:t[2]||(t[2]=e=>T.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["value"])])):((0,i.wg)(),(0,i.iD)("div",Mk,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)(Zc),(0,i.Wm)((0,s.SU)(Dm()),{class:"animation-sequence",modelValue:w.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:b},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,oe.C_)(["sequence-item",[e.type,{active:(0,s.SU)(n)?.id===e.elId}]])},[(0,i._)("div",Uk,[(0,i._)("div",Wk,(0,oe.zw)(e.index),1),(0,i._)("div",Dk,"【"+(0,oe.zw)(e.elType)+"】"+(0,oe.zw)(e.animationEffect),1),(0,i._)("div",Hk,[(0,i.wy)((0,i.Wm)(r,{class:"handler-btn",onClick:t=>_(e.elId,e.effect,e.duration)},null,8,["onClick"]),[[c,"预览"]]),(0,i.wy)((0,i.Wm)(u,{class:"handler-btn",onClick:t=>k(e.id)},null,8,["onClick"]),[[c,"删除"]])])]),x.value[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",Fk,[(0,i.Wm)(Zc,{style:{margin:"16px 0"}}),(0,i._)("div",Ak,[$k,(0,i.Wm)(mv,{min:500,max:3e3,step:500,value:e.duration,"onUpdate:value":t=>S(e.id,t),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),(0,i._)("div",Zk,[Ok,(0,i.Wm)(cp,{value:e.trigger,"onUpdate:value":t=>C(e.id,t),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),(0,i._)("div",Rk,[(0,i.Wm)(tp,{style:{width:"100%"},onClick:t=>W(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["modelValue"]),w.value.length>=2?((0,i.wg)(),(0,i.iD)(i.HY,{key:2},[(0,i.Wm)(Zc),(0,i.Wm)(tp,{onClick:t[5]||(t[5]=e=>I())},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(h.value?"停止预览":"预览全部"),1)])),_:1})],64)):(0,i.kq)("",!0)])}}});const Pk=(0,Vl.Z)(zk,[["__scopeId","data-v-5abd2ee4"]]);var Bk=Pk;const Nk=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var jk=()=>{const e=$(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,W.Z)(l.theme.color).getAlpha()){const e=(0,W.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,W.Z)(l.color).getAlpha()){const e=(0,W.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,W.Z)(l.color).getAlpha()){const e=(0,W.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},s=(e,t)=>{const l=i(e),a={};if(l.length>t.length){const e=(0,W.Z)(t[0]).analogous(l.length-t.length+10),a=e.map((e=>e.toHexString())).slice(1);t.push(...a)}for(let n=0;n<l.length;n++)a[l[n]]=t[n];return a},r=(e,t)=>{const l=s(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const a of e.elements){if("shape"===a.type&&(a.fill=l[(0,W.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,W.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,W.Z)(a.theme.color).toRgbString()]||a.theme.color);for(const e of a.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===a.type&&(a.themeColor=[l[(0,W.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,W.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,W.Z)(a.color).toRgbString()]||a.color),"latex"===a.type&&(a.color=t.fontColor)}},u=t=>{const a=JSON.parse(JSON.stringify(l.value));r(a,t),e.updateSlide({background:a.background,elements:a.elements}),n()},c=l=>{const a=JSON.parse(JSON.stringify(t.value));for(const e of a)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(a),n()},d=(l=!1)=>{const o=JSON.parse(JSON.stringify(t.value)),{themeColor:i,backgroundColor:s,fontColor:r,fontName:u,outline:c,shadow:d}=a.value;for(const e of o){e.background&&"image"===e.background.type||(e.background={type:"solid",color:s});for(const t of e.elements)if(l&&("outline"in t&&t.outline&&(t.outline=c),"shadow"in t&&t.shadow&&(t.shadow=d)),"shape"===t.type)t.fill=i;else if("line"===t.type)t.color=i;else if("text"===t.type)t.defaultColor=r,t.defaultFontName=u,t.fill&&(t.fill=i);else if("table"===t.type){t.theme&&(t.theme.color=i);for(const e of t.data)for(const t of e)t.style&&(t.style.color=r,t.style.fontname=u)}else"chart"===t.type?(t.themeColor=[i],t.gridColor=r):"latex"===t.type?t.color=r:"audio"===t.type&&(t.color=i)}e.setSlides(o),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const Yk=e=>((0,i.dD)("data-v-ea674bd8"),e=e(),(0,i.Cn)(),e),Vk={class:"slide-design-panel"},Jk=Yk((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),qk={class:"row"},Xk=Yk((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Gk={key:0,class:"background-image-wrapper"},Kk={class:"background-image"},Qk={key:1,class:"background-gradient-wrapper"},eb={class:"row"},tb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),lb={class:"row"},ab=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),nb={key:0,class:"row"},ob=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),ib={class:"row"},sb={class:"row"},rb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"画布尺寸:",-1))),ub={class:"title"},cb=Yk((()=>(0,i._)("span",null,"全局主题",-1))),db=Yk((()=>(0,i._)("span",{class:"text"},"更多",-1))),pb={class:"row"},vb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"字体:",-1))),mb={class:"row"},hb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"字体颜色:",-1))),fb={class:"row"},gb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"背景颜色:",-1))),yb={class:"row"},wb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"主题色:",-1))),xb={class:"row"},kb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),bb={class:"row"},_b=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Ib={class:"row"},Sb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1))),Cb={class:"row",style:{height:"30px"}},Lb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Tb={class:"row",style:{height:"30px"}},Eb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Mb={class:"row",style:{height:"30px"}},Ub=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Wb={class:"row"},Db=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1))),Hb={class:"row"},Fb=Yk((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),Ab={class:"theme-list"},$b={class:"theme-item-content"},Zb={class:"colors"},Ob={class:"btns"},Rb=["onClick"],zb=["onClick"];var Pb=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const t=$(),{availableFonts:l}=(0,o.Jk)(R()),{slides:a,currentSlide:n,viewportRatio:r,theme:u}=(0,o.Jk)(t),c=(0,s.iH)(!1),d=(0,i.Fl)((()=>n.value.background?n.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:p}=da(),{applyPresetThemeToSingleSlide:v,applyPresetThemeToAllSlides:m,applyThemeToAllSlides:h}=jk(),f=e=>{if("solid"===e){const e={...d.value,type:"solid",color:d.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...d.value,type:"image",image:d.value.image||"",imageSize:d.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...d.value,type:"gradient",gradientType:d.value.gradientType||"linear",gradientColor:d.value.gradientColor||["#fff","#fff"],gradientRotate:d.value.gradientRotate||0};t.updateSlide({background:e})}p()},g=e=>{t.updateSlide({background:{...d.value,...e}}),p()},y=e=>{const t=e[0];t&&na(t).then((e=>g({image:e})))},w=()=>{const e=a.value.map((e=>({...e,background:n.value.background})));t.setSlides(e),p()},x=e=>{t.setTheme(e)},k=e=>{t.setViewportRatio(e)};return(e,t)=>{const a=(0,i.up)("IconPlus"),n=(0,i.up)("IconDown"),o=(0,i.up)("IconRight");return(0,i.wg)(),(0,i.iD)("div",Vk,[Jk,(0,i._)("div",qk,[(0,i.Wm)(cp,{style:{flex:"1"},value:d.value.type,"onUpdate:value":t[0]||(t[0]=e=>f(e)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Xk,"solid"===d.value.type?((0,i.wg)(),(0,i.j4)(dn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>g({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.color||"#fff"},null,8,["color"])])),_:1})):"image"===d.value.type?((0,i.wg)(),(0,i.j4)(cp,{key:1,style:{flex:"1"},value:d.value.imageSize||"cover","onUpdate:value":t[2]||(t[2]=e=>g({imageSize:e})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):((0,i.wg)(),(0,i.j4)(cp,{key:2,style:{flex:"1"},value:d.value.gradientType||"","onUpdate:value":t[3]||(t[3]=e=>g({gradientType:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"image"===d.value.type?((0,i.wg)(),(0,i.iD)("div",Gk,[(0,i.Wm)(Pa,{onChange:t[4]||(t[4]=e=>y(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Kk,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundImage:`url(${d.value.image})`})},[(0,i.Wm)(a)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===d.value.type?((0,i.wg)(),(0,i.iD)("div",Qk,[(0,i._)("div",eb,[tb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>g({gradientColor:[e,d.value.gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.gradientColor[0]},null,8,["color"])])),_:1})]),(0,i._)("div",lb,[ab,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>g({gradientColor:[d.value.gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.gradientColor[1]},null,8,["color"])])),_:1})]),"linear"===d.value.gradientType?((0,i.wg)(),(0,i.iD)("div",nb,[ob,(0,i.Wm)(qm,{min:0,max:360,step:15,value:d.value.gradientRotate||0,"onUpdate:value":t[7]||(t[7]=e=>g({gradientRotate:e})),style:{width:"60%"}},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",ib,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",sb,[rb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(r),"onUpdate:value":t[9]||(t[9]=e=>k(e)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678},{label:"竖向 A3 / A4",value:1.41421356}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i._)("div",ub,[cb,(0,i._)("span",{class:"more",onClick:t[10]||(t[10]=e=>c.value=!c.value)},[db,c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):((0,i.wg)(),(0,i.j4)(o,{key:1}))])]),(0,i._)("div",pb,[vb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(u).fontName,"onUpdate:value":t[11]||(t[11]=e=>x({fontName:e})),options:[...(0,s.SU)(l),...(0,s.SU)(M)]},null,8,["value","options"])]),(0,i._)("div",mb,[hb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).fontColor,"onUpdate:modelValue":t[12]||(t[12]=e=>x({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).fontColor},null,8,["color"])])),_:1})]),(0,i._)("div",fb,[gb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).backgroundColor,"onUpdate:modelValue":t[13]||(t[13]=e=>x({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).backgroundColor},null,8,["color"])])),_:1})]),(0,i._)("div",yb,[wb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).themeColor,"onUpdate:modelValue":t[14]||(t[14]=e=>x({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).themeColor},null,8,["color"])])),_:1})]),c.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:2},[(0,i._)("div",xb,[kb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(u).outline.style||"","onUpdate:value":t[15]||(t[15]=e=>x({outline:{...(0,s.SU)(u).outline,style:e}})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",bb,[_b,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).outline.color,"onUpdate:modelValue":t[16]||(t[16]=e=>x({outline:{...(0,s.SU)(u).outline,color:e}}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).outline.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Ib,[Sb,(0,i.Wm)(mv,{value:(0,s.SU)(u).outline.width||0,"onUpdate:value":t[17]||(t[17]=e=>x({outline:{...(0,s.SU)(u).outline,width:e}})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Cb,[Lb,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:(0,s.SU)(u).shadow.h,"onUpdate:value":t[18]||(t[18]=e=>x({shadow:{...(0,s.SU)(u).shadow,h:e}}))},null,8,["value"])]),(0,i._)("div",Tb,[Eb,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:(0,s.SU)(u).shadow.v,"onUpdate:value":t[19]||(t[19]=e=>x({shadow:{...(0,s.SU)(u).shadow,v:e}}))},null,8,["value"])]),(0,i._)("div",Mb,[Ub,(0,i.Wm)(qm,{style:{width:"60%"},min:1,max:20,step:1,value:(0,s.SU)(u).shadow.blur,"onUpdate:value":t[20]||(t[20]=e=>x({shadow:{...(0,s.SU)(u).shadow,blur:e}}))},null,8,["value"])]),(0,i._)("div",Wb,[Db,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).shadow.color,"onUpdate:modelValue":t[21]||(t[21]=e=>x({shadow:{...(0,s.SU)(u).shadow,color:e}}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).shadow.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0),(0,i._)("div",Hb,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[22]||(t[22]=e=>(0,s.SU)(h)(c.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)(Zc),Fb,(0,i._)("div",Ab,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Nk),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,oe.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",$b,[(0,i._)("div",{class:"text",style:(0,oe.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",Zb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.colors,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"color-block",key:t,style:(0,oe.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",Ob,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(v)(e)},"应用",8,Rb),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(m)(e)},"应用全局",8,zb)])])],4)))),128))])])}}});const Bb=(0,Vl.Z)(Pb,[["__scopeId","data-v-ea674bd8"]]);var Nb=Bb;const jb={class:"slide-animation-panel"},Yb={class:"animation-pool"},Vb=["onClick"],Jb={class:"animation-text"};var qb=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=$(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=bk,{addHistorySnapshot:u}=da(),c=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),u())},d=()=>{const e=l.value.map((e=>({...e,turningMode:a.value.turningMode})));t.setSlides(e),ta.success("已应用到全部"),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jb,[(0,i._)("div",Yb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["animation-item",{active:n.value===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,oe.C_)(["animation-block",e.value])},null,2),(0,i._)("div",Jb,(0,oe.zw)(e.label),1)],10,Vb)))),128))]),(0,i.Wm)(tp,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const Xb=(0,Vl.Z)(qb,[["__scopeId","data-v-0562c530"]]);var Gb=Xb,Kb=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=ke(l.value),c=JSON.parse(JSON.stringify(a.value.elements)),d={};for(const e of l.value)if(e.groupId&&!d[e.groupId]){const t=l.value.filter((t=>t.groupId===e.groupId));d[e.groupId]=ke(t)}if(o===ee.LEFT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minX-i;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=i-t}else e.left=i}));else if(o===ee.RIGHT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxX-s;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=s-t+l}else e.left=s-t}}));else if(o===ee.TOP)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minY-r;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=r-t}else e.top=r}));else if(o===ee.BOTTOM)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxY-u;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=u-t+l}else e.top=u-t}}));else if(o===ee.HORIZONTAL){const e=(i+s)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxX+t.minX)/2,n=a-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}}))}else if(o===ee.VERTICAL){const e=(r+u)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxY+t.minY)/2,n=a-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}}))}e.updateSlide({elements:c}),n()};return{alignActiveElement:i}},Qb=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),s=(0,i.Fl)((()=>{let e=0;const t=[];for(const a of l.value)a.groupId?t.includes(a.groupId)||(t.push(a.groupId),e+=1):e+=1;return e})),r=()=>{const{minX:o,maxX:i}=ke(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=xe(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minX:t,maxX:l}=ke(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=xe(e);h.push({pos:t,el:e})}for(let e=1;e<p.length;e++){const t=p[e],l=g.max-g.min,a=g.min+l+m,n=t.max-t.min;if(g={min:a,max:a+n},"el"in t)h.push({pos:a,el:t.el});else for(const e of t.els){const{minX:l}=xe(e),n=l-t.min;h.push({pos:a+n,el:e})}}for(const e of r)if(t.value.includes(e.id))for(const t of h)if(t.el.id===e.id)if("rotate"in e&&e.rotate){const{offsetX:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=t.pos-l}else e.left=t.pos;e.updateSlide({elements:r}),n()},u=()=>{const{minY:o,maxY:i}=ke(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=xe(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minY:t,maxY:l}=ke(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=xe(e);h.push({pos:t,el:e})}for(let e=1;e<p.length;e++){const t=p[e],l=g.max-g.min,a=g.min+l+m,n=t.max-t.min;if(g={min:a,max:a+n},"el"in t)h.push({pos:a,el:t.el});else for(const e of t.els){const{minY:l}=xe(e),n=l-t.min;h.push({pos:a+n,el:e})}}for(const e of r)if(t.value.includes(e.id))for(const t of h)if(t.el.id===e.id)if("rotate"in e&&e.rotate){const{offsetY:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=t.pos-l}else e.top=t.pos;e.updateSlide({elements:r}),n()};return{displayItemCount:s,uniformHorizontalDisplay:r,uniformVerticalDisplay:u}};const e_={class:"multi-position-panel"};var t_=(0,i.aZ)({__name:"MultiPositionPanel",setup(e){const{canCombine:t,combineElements:l,uncombineElements:a}=ya(),{alignActiveElement:n}=Kb(),{alignElementToCanvas:o}=qn(),{displayItemCount:r,uniformHorizontalDisplay:u,uniformVerticalDisplay:c}=Qb(),d=e=>{t.value?n(e):o(e)};return(e,n)=>{const o=(0,i.up)("IconAlignLeft"),p=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),m=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),f=(0,i.up)("IconAlignBottom"),g=(0,i.up)("IconGroup"),y=(0,i.up)("IconUngroup"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",e_,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>d((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>d((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1})),[[w,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>d((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})),[[w,"右对齐"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>d((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})),[[w,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>d((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})),[[w,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>d((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"下对齐"]])])),_:1}),(0,s.SU)(r)>2?((0,i.wg)(),(0,i.j4)(Kf,{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)(Zc),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{disabled:!(0,s.SU)(t),onClick:n[8]||(n[8]=e=>(0,s.SU)(l)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g,{style:{"margin-right":"3px"}}),(0,i.Uk)("组合")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{disabled:(0,s.SU)(t),onClick:n[9]||(n[9]=e=>(0,s.SU)(a)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const l_=(0,Vl.Z)(t_,[["__scopeId","data-v-e95a4c6c"]]);var a_=l_;const n_=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","","Ⅱ","Ⅲ","Ⅳ","","Ⅵ","Ⅶ","Ⅷ","Ⅸ","","Ⅺ","Ⅻ","","","","","","ⅱ","ⅲ","ⅳ","","ⅵ","ⅶ","ⅷ","ⅸ","","ⅺ","ⅻ","","","","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","","∩","","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","","⋂","","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],o_={class:"symbol-panel"},i_={class:"pool"},s_=["onClick"],r_={class:"symbol"};var u_=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(n_[0].key),l=(0,i.Fl)((()=>{const e=n_.find((e=>e.key===t.value));return e?.children||[]})),a=n_.map((e=>({key:e.key,label:e.label}))),n=e=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",o_,[(0,i.Wm)(Kd,{tabs:(0,s.SU)(a),value:t.value,"onUpdate:value":o[0]||(o[0]=e=>t.value=e),tabsStyle:{marginBottom:"8px"},spaceBetween:""},null,8,["tabs","value"]),(0,i._)("div",i_,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:t,onClick:t=>n(e)},[(0,i._)("div",r_,(0,oe.zw)(e),1)],8,s_)))),128))])]))}});const c_=(0,Vl.Z)(u_,[["__scopeId","data-v-2bb5f257"]]);var d_=c_;const p_={class:"toolbar"},v_={class:"content"};var m_=(0,i.aZ)({__name:"index",setup(e){const t=R(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",key:a.EL_STYLE},{label:"符号",key:a.SYMBOL},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}]:[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}])),c=[{label:"设计",key:a.SLIDE_DESIGN},{label:"切换",key:a.SLIDE_ANIMATION},{label:"动画",key:a.EL_ANIMATION}],d=[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},v=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(v,(()=>{const e=v.value.map((e=>e.key));e.includes(r.value)||t.setToolbarState(e[0])}));const m=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:lk,[a.EL_POSITION]:hk,[a.EL_ANIMATION]:Bk,[a.SLIDE_DESIGN]:Nb,[a.SLIDE_ANIMATION]:Gb,[a.MULTI_POSITION]:a_,[a.SYMBOL]:d_};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",p_,[(0,i.Wm)(Kd,{tabs:v.value,value:(0,s.SU)(r),card:"","onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["tabs","value"]),(0,i._)("div",v_,[((0,i.wg)(),(0,i.j4)((0,i.LL)(m.value)))])]))}});const h_=(0,Vl.Z)(m_,[["__scopeId","data-v-6c9ece83"]]);var f_=h_;const g_={class:"editor"};var y_=(0,i.aZ)({__name:"Editor",props:{value:{}},emits:["update"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=R(),r=(0,s.iH)();let c;const v=(0,s.iH)(),m=(0,s.iH)(),h=(0,s.iH)(),f=()=>{m.value&&m.value.hide()},g=(0,D.debounce)((function(){n("update",c.dom.innerHTML)}),300,{trailing:!0}),y=()=>{o.setDisableHotkeysState(!0)},w=()=>{o.setDisableHotkeysState(!1)},x=()=>{if(!c)return;const{doc:e,tr:t}=c.state;c.dispatch(t.replaceRangeWith(0,e.content.size,Hi(a.value)))};t({updateTextContent:x});const k=()=>{const e=window.getSelection();if(!e||!e.anchorNode||!e.focusNode||e.isCollapsed||"Caret"===e.type||"None"===e.type)return;const t=e.getRangeAt(0);if(m.value){v.value=C(c);const{x:e,y:l,left:a,top:n}=t.getBoundingClientRect();m.value.setProps({getReferenceClientRect:()=>({x:e,y:l,left:a,top:n,height:0,width:0,right:a,bottom:n})}),m.value.show()}},b=(e,t)=>{if("color"===e&&t){const e=c.state.schema.marks.forecolor.create({color:t});d(c),p(c,e)}else if("backcolor"===e&&t){const e=c.state.schema.marks.backcolor.create({backcolor:t});d(c),p(c,e)}else if("bold"===e)d(c),(0,u.w9)(c.state.schema.marks.strong)(c.state,c.dispatch);else if("em"===e)d(c),(0,u.w9)(c.state.schema.marks.em)(c.state,c.dispatch);else if("underline"===e)d(c),(0,u.w9)(c.state.schema.marks.underline)(c.state,c.dispatch);else if("strikethrough"===e)d(c),(0,u.w9)(c.state.schema.marks.strikethrough)(c.state,c.dispatch);else if("bulletList"===e){const{bullet_list:e,list_item:t}=c.state.schema.nodes;Yi(e,t,"")(c.state,c.dispatch)}else if("orderedList"===e){const{ordered_list:e,list_item:t}=c.state.schema.nodes;Yi(e,t,"")(c.state,c.dispatch)}else if("clear"===e){d(c);const{$from:e,$to:t}=c.state.selection;c.dispatch(c.state.tr.removeMark(e.pos,t.pos))}c.focus(),g(),v.value=C(c)};return(0,i.bv)((()=>{c=Fi(r.value,a.value,{handleDOMEvents:{focus:y,blur:w,mouseup:k,mousedown:()=>{window.getSelection()?.removeAllRanges(),f()},keydown:f,input:g}},{placeholder:"点击输入演讲者备注"}),m.value=(0,rn.ZP)(r.value,{duration:0,content:h.value,interactive:!0,trigger:"manual",placement:"top-start",hideOnClick:"toggle",offset:[0,6]})})),(0,i.Ah)((()=>{c&&c.destroy()})),(e,t)=>{const l=(0,i.up)("IconTextBold"),a=(0,i.up)("IconTextItalic"),n=(0,i.up)("IconTextUnderline"),o=(0,i.up)("IconStrikethrough"),s=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),c=(0,i.up)("IconList"),d=(0,i.up)("IconOrderedList"),p=(0,i.up)("IconFormat"),m=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",g_,[(0,i._)("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:r},null,512),(0,i._)("div",{class:"menu",ref_key:"menuRef",ref:h},[(0,i._)("button",{class:(0,oe.C_)({active:v.value?.bold}),onClick:t[0]||(t[0]=e=>b("bold"))},[(0,i.Wm)(l)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.em}),onClick:t[1]||(t[1]=e=>b("em"))},[(0,i.Wm)(a)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.underline}),onClick:t[2]||(t[2]=e=>b("underline"))},[(0,i.Wm)(n)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.strikethrough}),onClick:t[3]||(t[3]=e=>b("strikethrough"))},[(0,i.Wm)(o)],2),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value?.color,"onUpdate:modelValue":t[4]||(t[4]=e=>b("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(s)])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value?.backcolor,"onUpdate:modelValue":t[5]||(t[5]=e=>b("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(u)])])),_:1}),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.bulletList}),onClick:t[6]||(t[6]=e=>b("bulletList"))},[(0,i.Wm)(c)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.orderedList}),onClick:t[7]||(t[7]=e=>b("orderedList"))},[(0,i.Wm)(d)],2),(0,i._)("button",{onClick:t[8]||(t[8]=e=>b("clear"))},[(0,i.Wm)(p)])],512)])),[[m,f]])}}});const w_=(0,Vl.Z)(y_,[["__scopeId","data-v-31d96c24"]]);var x_=w_;const k_={class:"remark"};var b_=(0,i.aZ)({__name:"index",props:{height:{}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=t,n=$(),{currentSlide:r}=(0,o.Jk)(n),u=(0,s.iH)();(0,i.YP)((()=>r.value.id),(()=>{(0,i.Y3)((()=>{u.value.updateTextContent()}))}),{immediate:!0});const c=(0,i.Fl)((()=>r.value?.remark||"")),d=e=>{n.updateSlide({remark:e})},p=e=>{let t=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!t)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>360&&(s=360),a("update:height",s)},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",k_,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>p(e))},null,32),(0,i.Wm)(x_,{value:c.value,ref_key:"editorRef",ref:u,onUpdate:t[1]||(t[1]=e=>d(e))},null,8,["value"])]))}});const __=(0,Vl.Z)(b_,[["__scopeId","data-v-458a41b9"]]);var I_=__,S_=l(3162),C_=l(3907);const L_=["style","script","template"],T_=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],E_={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},M_=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U_=(e,t)=>{const l=t-e.position;W_(e,l)},W_=(e,t)=>{e.position=e.position+t},D_=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const a=e.charAt(l+1);if("/"===a||"!"===a||/[A-Za-z0-9]/.test(a))return l;t=l+1}return-1},H_=e=>{const{str:t}=e;let l=D_(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);U_(e,l),e.tokens.push({type:"text",content:a})},F_=e=>{const{str:t}=e;W_(e,4);let l=t.indexOf("--\x3e",e.position),a=l+3;-1===l&&(l=a=t.length);const n=t.slice(e.position,l);U_(e,a),e.tokens.push({type:"comment",content:n})},A_=e=>{const{str:t}=e,l=t.length;let a=e.position;while(a<l){const e=t.charAt(a),l=!(/\s/.test(e)||"/"===e||">"===e);if(l)break;a++}let n=a+1;while(n<l){const e=t.charAt(n),l=!(/\s/.test(e)||"/"===e||">"===e);if(!l)break;n++}U_(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},$_=e=>{const{str:t,tokens:l}=e;let a=e.position,n=null,o=a;const i=[],s=t.length;while(a<s){const e=t.charAt(a);if(n){const t=e===n;t&&(n=null),a++;continue}const l="/"===e||">"===e;if(l){a!==o&&i.push(t.slice(o,a));break}const s=/\s/.test(e);if(s){a!==o&&i.push(t.slice(o,a)),o=a+1,a++;continue}const r="'"===e||'"'===e;r?(n=e,a++):a++}U_(e,a);const r="attribute";for(let u=0;u<i.length;u++){const e=i[u],t=-1===e.indexOf("=");if(t){const t=i[u+1];if(t&&(0,D.startsWith)(t,"=")){if(t.length>1){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=i[u+2];if(u+=1,a){const t=e+"="+a;l.push({type:r,content:t}),u+=1;continue}}}if((0,D.endsWith)(e,"=")){const t=i[u+1];if(t&&-1===t.indexOf("=")){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=e.slice(0,-1);l.push({type:r,content:a})}else l.push({type:r,content:e})}},Z_=(e,t)=>{const{str:l,tokens:a}=t,n=e.toLowerCase(),o=l.length;let i=t.position;while(i<o){const e=l.indexOf("</",i);if(-1===e){H_(t);break}const o={str:l,position:t.position,tokens:[]};U_(o,e);const s=O_(o);if(n===s.toLowerCase()){if(e!==t.position){const n=t.position;U_(t,e),a.push({type:"text",content:l.slice(n,e)})}a.push(...o.tokens),U_(t,o.position);break}i=o.position}},O_=e=>{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;W_(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=A_(e);$_(e);const o=t.charAt(e.position),i="/"===o;return W_(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},R_=e=>{const t=e.str,l=t.length;while(e.position<l){const l=e.position;if(H_(e),e.position===l){const a=(0,D.startsWith)(t,"!--",l+1);if(a)F_(e);else{const t=O_(e),l=t.toLowerCase();L_.includes(l)&&Z_(t,e)}}}},z_=e=>{const t={str:e,position:0,tokens:[]};return R_(t),t.tokens},P_=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return j_(l),t.children},B_=(e,t)=>{const l=E_[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(n&&l.includes(n))return!0;a--}}return!1},N_=(e,t)=>{e.splice(t)},j_=e=>{const{stack:t,tokens:l}=e;let{cursor:a}=e,n=t[t.length-1].children;const o=l.length;while(a<o){const e=l[a];if("tag-start"!==e.type){n.push(e),a++;continue}const i=l[++a];a++;const s=i.content.toLowerCase();if(e.close){let e=t.length,n=!1;while(--e>-1)if(t[e].tagName===s){n=!0;break}while(a<o){if("tag-end"!==l[a].type)break;a++}if(n){N_(t,e);break}continue}const r=T_.includes(s);let u=r;if(u&&(u=!B_(s,t)),u){let e=t.length-1;while(e>0){if(s===t[e].tagName){N_(t,e);const l=e-1;n=t[l].children;break}e-=1}}const c=[];let d;while(a<o){const e=l[a];if("tag-end"===e.type){d=e;break}c.push(e.content),a++}if(!d)break;a++;const p=[],v={type:"element",tagName:i.content,attributes:c,children:p};n.push(v);const m=!(d.close||M_.includes(s));if(m){t.push({tagName:s,children:p});const e={tokens:l,cursor:a,stack:t};j_(e),a=e.cursor}}e.cursor=a},Y_=(e,t)=>{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},V_=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},J_=e=>e.map((e=>{const t=Y_(e.trim(),"="),l=t[0],a="string"===typeof t[1]?V_(t[1]):null;return{key:l,value:a}})),q_=e=>e.map((e=>{if("element"===e.type){const t=q_(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:J_(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),X_=e=>{const t=z_(e),l=P_(t);return q_(l)};var G_=l(5851),K_=l(7943);const Q_={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},eI=e=>{const t=new G_.OU(e),l=[];for(const a of t.commands){const e=Q_[a.type];if(2!==a.type&&16!==a.type||l.push({x:a.x,y:a.y,relative:a.relative,type:e}),32===a.type)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:a.relative,type:e});else if(128===a.type)l.push({x:a.x,y:a.y,curve:{type:"quadratic",x1:a.x1,y1:a.y1},relative:a.relative,type:e});else if(512===a.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=(0,K_.Z)({px:e.x,py:e.y,cx:a.x,cy:a.y,rx:a.rX,ry:a.rY,xAxisRotation:a.xRot,largeArcFlag:a.lArcFlag,sweepFlag:a.sweepFlag});for(const a of t)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:!1,type:"C"})}else{if(1!==a.type)continue;l.push({close:!0,type:e})}}return l},tI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lI="data:image/svg+xml;base64,",aI=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l<e.length;l++){const a=e.charCodeAt(l);a<128?t+=String.fromCharCode(a):a>127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},nI=e=>{let t,l,a,n,o,i,s,r="",u=0;e=aI(e);while(u<e.length)t=e.charCodeAt(u++),l=e.charCodeAt(u++),a=e.charCodeAt(u++),n=t>>2,o=(3&t)<<4|l>>4,i=(15&l)<<2|a>>6,s=63&a,isNaN(l)?i=s=64:isNaN(a)&&(s=64),r=r+tI.charAt(n)+tI.charAt(o)+tI.charAt(i)+tI.charAt(s);return r},oI=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return lI+nI(l)},iI=100,sI=.75;var rI=()=>{const e=$(),{slides:t,theme:l,viewportRatio:a,title:n}=(0,o.Jk)(e),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const o="png"===t?sh.YM:sh.hi,s=e.querySelectorAll("foreignObject [xmlns]");s.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const s={quality:l,width:1600};a&&(s.fontEmbedCSS=""),o(e,s).then((e=>{i.value=!1,(0,S_.saveAs)(e,`${n.value}.${t}`)})).catch((()=>{i.value=!1,ta.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([pe(JSON.stringify(e))],{type:""});(0,S_.saveAs)(t,`${n.value}.pptist`)},c=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,S_.saveAs)(e,`${n.value}.json`)},d=e=>{const t=(0,W.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},p=e=>{const t=X_(e);let l=!1,a=0;const n=[],o=(e,t={})=>{for(const i of e){const e="tagName"in i&&["div","li","p"].includes(i.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const s={...t},r="attributes"in i?i.attributes.find((e=>"style"===e.key)):null;if(r&&r.value){const e=r.value.split(";");for(const t of e){const[e,l]=t.split(": "),[a,n]=[(0,D.trim)(e),(0,D.trim)(l)];a&&n&&(s[a]=n)}}if("tagName"in i){if("em"===i.tagName&&(s["font-style"]="italic"),"strong"===i.tagName&&(s["font-weight"]="bold"),"sup"===i.tagName&&(s["vertical-align"]="super"),"sub"===i.tagName&&(s["vertical-align"]="sub"),"a"===i.tagName){const e=i.attributes.find((e=>"href"===e.key));s["href"]=e?.value||""}if("ul"===i.tagName&&(s["list-type"]="ul"),"ol"===i.tagName&&(s["list-type"]="ol"),"li"===i.tagName&&(l=!0),"p"===i.tagName&&"attributes"in i){const e=i.attributes.find((e=>"data-indent"===e.key));e&&e.value&&(a=+e.value)}}if("tagName"in i&&"br"===i.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in i){const e=i.content.replace(/&nbsp;/g," ").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*sI),s["color"]&&(t.color=d(s["color"]).color),s["background-color"]&&(t.highlight=d(s["background-color"]).color),s["text-decoration-line"]&&(-1!==s["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),s["text-decoration"]&&(-1!==s["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),s["vertical-align"]&&("super"===s["vertical-align"]&&(t.superscript=!0),"sub"===s["vertical-align"]&&(t.subscript=!0)),s["text-align"]&&(t.align=s["text-align"]),s["font-weight"]&&(t.bold="bold"===s["font-weight"]),s["font-style"]&&(t.italic="italic"===s["font-style"]),s["font-family"]&&(t.fontFace=s["font-family"]),s["href"]&&(t.hyperlink={url:s["href"]}),l&&"ol"===s["list-type"]&&(t.bullet={type:"number",indent:1.25*(t.fontSize||20)},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:1.25*(t.fontSize||20)},t.paraSpaceBefore=.1,l=!1),a&&(t.indentLevel=a,a=0),n.push({text:e,options:t})}else"children"in i&&o(i.children,s)}};return o(t),n},v=(e,t={x:1,y:1})=>e.map((e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,curve:{type:"cubic",x1:e.curve.x1/iI*t.x,y1:e.curve.y1/iI*t.y,x2:e.curve.x2/iI*t.x,y2:e.curve.y2/iI*t.y}};if("quadratic"===e.curve.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,curve:{type:"quadratic",x1:e.curve.x1/iI*t.x,y1:e.curve.y1/iI*t.y}}}return{x:e.x/iI*t.x,y:e.y/iI*t.y}})),m=e=>{const t=d(e.color),{h:l,v:a}=e;let n=4,o=45;return 0===l&&0===a?(n=4,o=45):0===l?a>0?(n=a,o=90):(n=-a,o=270):0===a?l>0?(n=l,o=1):(n=-l,o=180):l>0&&a>0?(n=Math.max(l,a),o=45):l>0&&a<0?(n=Math.max(l,-a),o=315):l<0&&a>0?(n=Math.max(-l,a),o=135):l<0&&a<0&&(n=Math.max(-l,-a),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*sI,offset:n,angle:o}},h=e=>{const t=d(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*sI,dashType:"solid"===e.style?"solid":"dash"}},f=e=>{const{type:l,target:a}=e;if("web"===l)return{url:a};if("slide"===l){const e=t.value.findIndex((e=>e.id===a));if(-1!==e)return{slide:e+1}}return null},g=(e,t,o)=>{i.value=!0;const s=new C_.Z;if(.625===a.value?s.layout="LAYOUT_16x10":.75===a.value?s.layout="LAYOUT_4x3":.70710678===a.value?(s.defineLayout({name:"A3",width:10,height:7.0710678}),s.layout="A3"):1.41421356===a.value?(s.defineLayout({name:"A3_V",width:10,height:14.1421356}),s.layout="A3_V"):s.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);s.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=s.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=d(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,a]=t.gradientColor,n=W.Z.mix(l,a).toHexString(),o=d(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){const l=p(t.content),a={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fontSize:20*sI,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*sI,paraSpaceBefore:5*sI,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*sI),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;a.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(a.color=d(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=m(t.shadow)),t.outline?.width&&(a.line=h(t.outline)),void 0!==t.opacity&&(a.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(a.paraSpaceBefore=t.paragraphSpace*sI),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=f(t.link);e&&(l.hyperlink=e)}if(t.filters?.opacity&&(l.transparency=100-parseInt(t.filters?.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,a]=t.clip.range,[n,o]=e,[i,s]=a,r=t.width/((i-n)/iI),u=t.height/((s-o)/iI);l.w=r/iI,l.h=u/iI,l.sizing={type:"crop",x:n/iI*r/iI,y:o/iI*u/iI,w:(i-n)/iI*r/iI,h:(s-o)/iI*u/iI}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=oI(l),n={data:a,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},a=v(eI(t.path),l),n=d(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:a};if(t.flipH&&(i.flipH=t.flipH),t.flipV&&(i.flipV=t.flipV),t.shadow&&(i.shadow=m(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.rotate&&(i.rotate=t.rotate),t.link){const e=f(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=p(t.text.content),a={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fontSize:20*sI,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*sI,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ce(t),a=v(eI(l)),{minX:n,maxX:o,minY:i,maxY:s}=xe(t),r=d(t.color),u={x:t.left/iI,y:t.top/iI,w:(o-n)/iI,h:(s-i)/iI,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*sI,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=m(t.shadow)),e.addShape("custGeom",u)}else if("chart"===t.type){const l=[];for(let e=0;e<t.data.series.length;e++){const a=t.data.series[e];l.push({name:`系列${e+1}`,labels:t.data.labels,values:a})}let a=[];if(10===t.themeColor.length)a=t.themeColor.map((e=>d(e).color));else if(1===t.themeColor.length)a=(0,W.Z)(t.themeColor[0]).analogous(10).map((e=>d(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,W.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>d(e).color))}const n={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(n.plotArea={fill:{color:d(t.fill).color}}),t.legend&&(n.showLegend=!0,n.legendPos="top"===t.legend?"t":"b",n.legendColor=d(t.gridColor||"#000000").color,n.legendFontSize=14*sI);let o=s.ChartType.bar;"bar"===t.chartType?(o=s.ChartType.bar,n.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?o=s.ChartType.area:!1===t.options?.showLine?(o=s.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),n.lineSize=0):o=s.ChartType.line,t.options?.lineSmooth&&(n.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(o=s.ChartType.doughnut,n.holeSize=75):o=s.ChartType.pie),e.addChart(o,l,n)}else if("table"===t.type){const l=[];for(let e=0;e<t.data.length;e++){const a=t.data[e];for(let t=0;t<a.length;t++){const n=a[t];if(n.colspan>1||n.rowspan>1)for(let a=e;a<e+n.rowspan;a++)for(let o=a===e?t+1:t;o<t+n.colspan;o++)l.push(`${a}_${o}`)}}const a=[],n=t.theme;let o=null,i=[];n&&(o=d(n.color),i=Se(n.color).map((e=>d(e))));for(let e=0;e<t.data.length;e++){const s=t.data[e],r=[];for(let a=0;a<s.length;a++){const u=s[a],c={colspan:u.colspan,rowspan:u.rowspan,bold:u.style?.bold||!1,italic:u.style?.em||!1,underline:{style:u.style?.underline?"sng":"none"},align:u.style?.align||"left",valign:"middle",fontFace:u.style?.fontname||"微软雅黑",fontSize:(u.style?.fontsize?parseInt(u.style?.fontsize):14)*sI};if(n&&o){let l;l=e%2===0?i[1]:i[0],(n.rowHeader&&0===e||n.rowFooter&&e===t.data.length-1||n.colHeader&&0===a||n.colFooter&&a===s.length-1)&&(l=o),c.fill={color:l.color,transparency:100*(1-l.alpha)}}if(u.style?.backcolor){const e=d(u.style.backcolor);c.fill={color:e.color,transparency:100*(1-e.alpha)}}u.style?.color&&(c.color=d(u.style.color).color),l.includes(`${e}_${a}`)||r.push({text:u.text,options:c})}r.length&&a.push(r)}const s={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,colW:t.colWidths.map((e=>t.width*e/iI))};t.theme&&(s.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(s.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*sI,color:d(t.outline.color).color}),e.addTable(a,s)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=oI(l),n={data:a,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else if(!o&&("video"===t.type||"audio"===t.type)){const l={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,path:t.src,type:t.type};"video"===t.type&&t.poster&&(l.cover=t.poster);const a=t.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);a&&a[1]?l.extn=a[1]:t.ext&&(l.extn=t.ext);const n=["avi","mp4","m4v","mov","wmv"],o=["mp3","m4a","mp4","wav","wma"];l.extn&&[...n,...o].includes(l.extn)&&e.addMedia(l)}}setTimeout((()=>{s.writeFile({fileName:`${n.value}.pptx`}).then((()=>i.value=!1)).catch((()=>{i.value=!1,ta.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:c,exportSpecificFile:u,exportPPTX:g}};const uI=e=>((0,i.dD)("data-v-1df3f398"),e=e(),(0,i.Cn)(),e),cI={class:"export-img-dialog"},dI={class:"thumbnails-view"},pI={class:"configs"},vI={class:"row"},mI=uI((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),hI={class:"row"},fI=uI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),gI={key:0,class:"row"},yI=["data-range"],wI={class:"row"},xI=uI((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),kI={class:"row"},bI=uI((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),_I={class:"config-item"},II={class:"btns"};var SI=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),r=(0,s.iH)(),u=(0,s.iH)("all"),c=(0,s.iH)([1,a.value.length]),d=(0,s.iH)("jpeg"),p=(0,s.iH)(1),v=(0,s.iH)(!0),m=(0,i.Fl)((()=>"all"===u.value?a.value:"current"===u.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1})))),{exportImage:h,exporting:f}=rI(),g=()=>{r.value&&h(r.value,d.value,p.value,v.value)};return(e,t)=>{const n=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",cI,[(0,i._)("div",dI,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:r},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.j4)(Jd,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",pI,[(0,i._)("div",vI,[mI,(0,i.Wm)(ng,{class:"config-item",value:d.value,"onUpdate:value":t[0]||(t[0]=e=>d.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)(tg,{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",hI,[fI,(0,i.Wm)(ng,{class:"config-item",value:u.value,"onUpdate:value":t[1]||(t[1]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",gI,[(0,i._)("div",{class:"title","data-range":`${c.value[0]} ~ ${c.value[1]}`},"自定义范围:",8,yI),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:c.value,"onUpdate:value":t[2]||(t[2]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",wI,[xI,(0,i.Wm)(qm,{class:"config-item",min:0,max:1,step:.1,value:p.value,"onUpdate:value":t[3]||(t[3]=e=>p.value=e)},null,8,["value"])]),(0,i._)("div",kI,[bI,(0,i._)("div",_I,[(0,i.wy)((0,i.Wm)(pf,{value:v.value,"onUpdate:value":t[4]||(t[4]=e=>v.value=e)},null,8,["value"]),[[n,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),(0,i._)("div",II,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[5]||(t[5]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[6]||(t[6]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Xa,{loading:(0,s.SU)(f),tip:"正在导出..."},null,8,["loading"])])}}});const CI=(0,Vl.Z)(SI,[["__scopeId","data-v-1df3f398"]]);var LI=CI;const TI={class:"export-json-dialog"},EI={class:"preview"},MI={class:"btns"};var UI=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a}=(0,o.Jk)($()),{exportJSON:n}=rI();return(e,t)=>((0,i.wg)(),(0,i.iD)("div",TI,[(0,i._)("div",EI,[(0,i._)("pre",null,(0,oe.zw)((0,s.SU)(a)),1)]),(0,i._)("div",MI,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[0]||(t[0]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[1]||(t[1]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const WI=(0,Vl.Z)(UI,[["__scopeId","data-v-6a7223ca"]]);var DI=WI;const HI=()=>{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},FI=(e,t,l)=>{const a="<!DOCTYPE html>";let n="";const o=document.styleSheets;if(o)for(const d of o)if(d.cssRules)for(const e of d.cssRules)n+=e.cssText;const{width:i,height:s,margin:r}=l,u=`\n <head>\n <style type="text/css">\n ${n} \n html, body {\n height: auto;\n overflow: auto;\n }\n @media print {\n @page {\n size: ${i+2*r}px ${s+2*r}px;\n margin: ${r}px;\n }\n }\n </style>\n </head>\n `,c="<body>"+t.innerHTML+"</body>";e.open(),e.write(`\n ${a}\n <html>\n ${u}\n ${c}\n </html>\n `),e.close()},AI=(e,t)=>{const l=HI(),a=l.contentWindow;if(!l.contentDocument||!a)return;FI(l.contentDocument,e,t);const n=()=>{a.focus(),a.print()},o=()=>{l.removeEventListener("load",n),a.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),a.addEventListener("afterprint",o)},$I=e=>((0,i.dD)("data-v-1668f898"),e=e(),(0,i.Cn)(),e),ZI={class:"export-pdf-dialog"},OI={class:"thumbnails-view"},RI={class:"configs"},zI={class:"row"},PI=$I((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),BI={class:"row"},NI=$I((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),jI={class:"row"},YI=$I((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),VI={class:"config-item"},JI=$I((()=>(0,i._)("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),qI={class:"btns"};var XI=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)($()),u=(0,s.iH)(),c=(0,s.iH)("all"),d=(0,s.iH)(1),p=(0,s.iH)(!0),v=()=>{if(!u.value)return;const e={width:1600,height:"all"===c.value?1600*r.value*d.value:1600*r.value,margin:p.value?50:0};AI(u.value,e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ZI,[(0,i._)("div",OI,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:u},["current"===c.value?((0,i.wg)(),(0,i.j4)(Jd,{key:0,class:"thumbnail",slide:(0,s.SU)(n),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.j4)(Jd,{class:(0,oe.C_)(["thumbnail",{"break-page":(t+1)%d.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",RI,[(0,i._)("div",zI,[PI,(0,i.Wm)(ng,{class:"config-item",value:c.value,"onUpdate:value":t[0]||(t[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",BI,[NI,(0,i.Wm)(cp,{class:"config-item",value:d.value,"onUpdate:value":t[1]||(t[1]=e=>d.value=e),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),(0,i._)("div",jI,[YI,(0,i._)("div",VI,[(0,i.Wm)(pf,{value:p.value,"onUpdate:value":t[2]||(t[2]=e=>p.value=e)},null,8,["value"])])]),JI]),(0,i._)("div",qI,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[3]||(t[3]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[4]||(t[4]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const GI=(0,Vl.Z)(XI,[["__scopeId","data-v-1668f898"]]);var KI=GI;const QI=e=>((0,i.dD)("data-v-265d4b60"),e=e(),(0,i.Cn)(),e),eS={class:"export-pptx-dialog"},tS={class:"configs"},lS={class:"row"},aS=QI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),nS={key:0,class:"row"},oS=["data-range"],iS={class:"row"},sS=QI((()=>(0,i._)("div",{class:"title"},"忽略音频/视频:",-1))),rS={class:"config-item"},uS={class:"row"},cS=QI((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),dS={class:"config-item"},pS={key:1,class:"tip"},vS={class:"btns"};var mS=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),{exportPPTX:r,exporting:u}=rI(),c=(0,s.iH)("all"),d=(0,s.iH)([1,a.value.length]),p=(0,s.iH)(!0),v=(0,s.iH)(!0),m=(0,i.Fl)((()=>"all"===c.value?a.value:"current"===c.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=d.value;return t>=l-1&&t<=a-1}))));return(e,t)=>{const n=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",eS,[(0,i._)("div",tS,[(0,i._)("div",lS,[aS,(0,i.Wm)(ng,{class:"config-item",value:c.value,"onUpdate:value":t[0]||(t[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===c.value?((0,i.wg)(),(0,i.iD)("div",nS,[(0,i._)("div",{class:"title","data-range":`${d.value[0]} ~ ${d.value[1]}`},"自定义范围:",8,oS),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:d.value,"onUpdate:value":t[1]||(t[1]=e=>d.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",iS,[sS,(0,i._)("div",rS,[(0,i.wy)((0,i.Wm)(pf,{value:v.value,"onUpdate:value":t[2]||(t[2]=e=>v.value=e)},null,8,["value"]),[[n,"导出时默认忽略音视频若您的幻灯片中存在音视频元素且希望将其导出到PPTX文件中可选择关闭【忽略音视频】选项但要注意这将会大幅增加导出用时。"]])])]),(0,i._)("div",uS,[cS,(0,i._)("div",dS,[(0,i.Wm)(pf,{value:p.value,"onUpdate:value":t[3]||(t[3]=e=>p.value=e)},null,8,["value"])])]),v.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",pS," 提示1. 支持导出格式avi、mp4、mov、wmv、mp3、wav2. 跨域资源无法导出。 "))]),(0,i._)("div",vS,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[4]||(t[4]=e=>(0,s.SU)(r)(m.value,p.value,v.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[5]||(t[5]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Xa,{loading:(0,s.SU)(u),tip:"正在导出..."},null,8,["loading"])])}}});const hS=(0,Vl.Z)(mS,[["__scopeId","data-v-265d4b60"]]);var fS=hS;const gS=e=>((0,i.dD)("data-v-26422ed7"),e=e(),(0,i.Cn)(),e),yS={class:"export-pptist-dialog"},wS={class:"configs"},xS={class:"row"},kS=gS((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),bS={key:0,class:"row"},_S=["data-range"],IS=gS((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),SS={class:"btns"};var CS=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),{exportSpecificFile:r}=rI(),u=(0,s.iH)("all"),c=(0,s.iH)([1,a.value.length]),d=(0,i.Fl)((()=>"all"===u.value?a.value:"current"===u.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1}))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",yS,[(0,i._)("div",wS,[(0,i._)("div",xS,[kS,(0,i.Wm)(ng,{class:"config-item",value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",bS,[(0,i._)("div",{class:"title","data-range":`${c.value[0]} ~ ${c.value[1]}`},"自定义范围:",8,_S),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),IS]),(0,i._)("div",SS,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[2]||(t[2]=e=>(0,s.SU)(r)(d.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[3]||(t[3]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const LS=(0,Vl.Z)(CS,[["__scopeId","data-v-26422ed7"]]);var TS=LS;const ES={class:"export-dialog"},MS={class:"content"};var US=(0,i.aZ)({__name:"index",setup(e){const t=R(),{dialogForExport:l}=(0,o.Jk)(t),a=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=(0,i.Fl)((()=>{const e={image:LI,json:DI,pdf:KI,pptx:fS,pptist:TS};return l.value&&e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ES,[(0,i.Wm)(Kd,{tabs:n,value:(0,s.SU)(l),card:"","onUpdate:value":t[0]||(t[0]=e=>(0,s.SU)(a)(e))},null,8,["value"]),(0,i._)("div",MS,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value),{onClose:t[1]||(t[1]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const WS=(0,Vl.Z)(US,[["__scopeId","data-v-b20137f0"]]);var DS=WS;const HS={class:"title"},FS={class:"content"};var AS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{},height:{},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(0),o=(0,s.iH)(0),r=(0,s.iH)(),u=(0,i.Fl)((()=>l.height?l.height:r.value?.clientHeight||0));(0,i.bv)((()=>{l.left>=0?n.value=l.left:n.value=document.body.clientWidth+l.left-l.width,l.top>=0?o.value=l.top:o.value=document.body.clientHeight+l.top-u.value}));const c=e=>{if(!l.moveable)return;let t=!0;const a=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,r=e.pageY,c=n.value,d=o.value;document.onmousemove=e=>{if(!t)return;const p=e.pageX-s,v=e.pageY-r;let m=c+p,h=d+v;m<0&&(m=0),h<0&&(h=0),m+l.width>a&&(m=a-l.width),h+u.value>i&&(h=i-u.value),n.value=m,o.value=h},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>{const l=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:r,style:(0,oe.j5)({width:e.width+"px",height:e.height?e.height+"px":"auto",left:n.value+"px",top:o.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:t[1]||(t[1]=e=>c(e))},[(0,i._)("div",HS,(0,oe.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>a("close"))},[(0,i.Wm)(l)])],32),(0,i._)("div",FS,[(0,i.WI)(e.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:t[2]||(t[2]=e=>c(e))},[(0,i.WI)(e.$slots,"default")],32))],4)}}});const $S=(0,Vl.Z)(AS,[["__scopeId","data-v-fc791e00"]]);var ZS=$S;const OS=e=>((0,i.dD)("data-v-15470598"),e=e(),(0,i.Cn)(),e),RS={key:0,class:"handler"},zS={class:"btns"},PS={key:0,class:"icon-btns"},BS={class:"element-list"},NS={key:0,class:"group-els"},jS=OS((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),YS=["onClick","onDblclick"],VS=["id","value","onBlur","onKeydown"],JS={key:1,class:"name"},qS={class:"icons"},XS=["onClick","onDblclick"],GS=["id","value","onBlur","onKeydown"],KS={key:1,class:"name"},QS={class:"icons"};var eC=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=$(),l=R(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:v}=ba(),m=(0,i.Fl)((()=>{const e=[];for(const t of a.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e})),h=(e,t)=>{if(u.value===t)return;if(p.value.includes(t))return;const a=e.elements.map((e=>e.id));l.setActiveElementIdList(a),l.setHandleElementId(t),(0,i.Y3)((()=>l.setActiveGroupElementId(t)))},f=e=>{u.value!==e&&(p.value.includes(e)||l.setActiveElementIdList([e]))},g=e=>{p.value.includes(e)?l.setHiddenElementIdList(p.value.filter((t=>t!==e))):l.setHiddenElementIdList([...p.value,e]),c.value.includes(e)&&l.setActiveElementIdList([])},y=()=>{const e=a.value.elements.map((e=>e.id)),t=p.value.filter((t=>!e.includes(t)));l.setHiddenElementIdList(t)},w=()=>{const e=a.value.elements.map((e=>e.id));l.setHiddenElementIdList([...p.value,...e]),c.value.length&&l.setActiveElementIdList([])},x=(0,s.iH)(""),k=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},b=e=>{x.value=e,(0,i.Y3)((()=>{const t=document.querySelector(`#input-${e}`);t.focus()}))},_=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=(0,i.up)("IconDown"),o=(0,i.up)("IconUp"),u=(0,i.up)("IconPreviewClose"),I=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(ZS,{class:"select-panel",width:200,height:360,title:`选择(${(0,s.SU)(c).length}/${(0,s.SU)(a).elements.length}`,left:-270,top:90,onClose:t[4]||(t[4]=e=>_())},{default:(0,i.w5)((()=>[m.value.length?((0,i.wg)(),(0,i.iD)("div",RS,[(0,i._)("div",zS,[(0,i.Wm)(tp,{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)(tp,{size:"small",onClick:t[1]||(t[1]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部隐藏")])),_:1})]),(0,s.SU)(r)?((0,i.wg)(),(0,i.iD)("div",PS,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(Q).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(Q).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",BS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",NS,[jS,((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.elements,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>h(e,t.id),onDblclick:e=>b(t.id)},[x.value===t.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${t.id}`,value:t.name||(0,s.SU)($n)[t.type],class:"input",type:"text",onBlur:e=>k(e,t.id),onKeydown:(0,n.D2)((e=>k(e,t.id)),["enter"])},null,40,VS)):((0,i.wg)(),(0,i.iD)("div",JS,(0,oe.zw)(t.name||(0,s.SU)($n)[t.type]),1)),(0,i._)("div",qS,[(0,s.SU)(p).includes(t.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,YS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,oe.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>f(e.id),onDblclick:t=>b(e.id)},[x.value===e.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${e.id}`,value:e.name||(0,s.SU)($n)[e.type],class:"input",type:"text",onBlur:t=>k(t,e.id),onKeydown:(0,n.D2)((t=>k(t,e.id)),["enter"])},null,40,GS)):((0,i.wg)(),(0,i.iD)("div",KS,(0,oe.zw)(e.name||(0,s.SU)($n)[e.type]),1)),(0,i._)("div",QS,[(0,s.SU)(p).includes(e.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,XS))],64)))),128))])])),_:1},8,["title"])}}});const tC=(0,Vl.Z)(eC,[["__scopeId","data-v-15470598"]]);var lC=tC,aC=()=>{const e=R(),t=$(),{handleElement:l}=(0,o.Jk)(e),{slides:a,slideIndex:n,currentSlide:r}=(0,o.Jk)(t),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,s.iH)([]),p=(0,s.iH)(-1),v=(0,s.iH)("g"),m=()=>{const e=[],t=new RegExp(u.value,v.value),l=/(<([^>]+)>)/g;for(const n of a.value)for(const a of n.elements)if("text"===a.type){const o=a.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("shape"===a.type&&a.text&&a.text.content){const o=a.text.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("table"===a.type)for(let o=0;o<a.data.length;o++){const i=a.data[o];for(let s=0;s<i.length;s++){const r=i[s];if(!r.text)continue;const u=r.text.replace(l,""),c=u.match(t);c&&e.push(...new Array(c.length).fill({slideId:n.id,elId:a.id,elType:a.type,cellIndex:[o,s]}))}}e.length?(d.value=e,p.value=0,k()):(ta.warning("未查找到匹配项"),x())},h=e=>{const t=[...e.childNodes],l=[];while(t.length){const e=t.shift();e.nodeType===e.TEXT_NODE?e.wholeText&&l.push(e):t.unshift(...e.childNodes)}return l},f=e=>{let t=0;const l=e.map((e=>{const l=t,a=t+e.wholeText.length;return t=a,{text:e.wholeText,startIdx:l,endIdx:a}}));return l},g=(e,t)=>{const l=new RegExp(t,v.value),a=[];let n=l.exec(e);while(n)a.push(n),n=l.exec(e);return a},y=(e,t,l,a)=>{for(let n=l.length-1;n>=0;n--){const o=l[n],i=o.index,s=i+o[0].length;for(let l=0;l<t.length;l++){const{text:o,startIdx:r,endIdx:u}=t[l];if(u<i)continue;if(r>=s)break;let c=e[l];const d=Math.max(0,i-r),p=Math.min(u,s)-r-d;d>0&&(c=c.splitText(d)),p<c.wholeText.length&&c.splitText(p);const v=document.createElement("mark");v.dataset.index=a+n+"",v.innerText=o.substring(d,d+p),c.parentNode.replaceChild(v,c)}}},w=(e,t)=>{for(const l of e)l.innerHTML=l.innerHTML.replace(new RegExp(u.value,v.value),(()=>`<mark data-index=${t++}>${u.value}</mark>`))},x=()=>{const e=document.querySelectorAll(".editable-element mark");for(const t of e)setTimeout((()=>{const e=t.parentNode,l=t.textContent;e.replaceChild(document.createTextNode(l),t)}),0)},k=()=>{x(),setTimeout((()=>{for(let e=0;e<d.value.length;e++){const t=d.value[e-1],l=d.value[e];if(l.slideId!==r.value.id)continue;if(t&&t.elId===l.elId)continue;const a=document.querySelector(`#editable-element-${l.elId}`);if(a)if("table"===l.elType){const t=a.querySelectorAll(".cell-text");w(t,e)}else{const t=h(a),l=f(t),n=l.map((({text:e})=>e)).join(""),o=g(n,u.value);y(t,l,o,e)}}}),0)},b=()=>{const e=document.querySelectorAll("mark[data-index]");for(const t of e)setTimeout((()=>{const e=t.dataset.index;void 0!==e&&+e===p.value?t.classList.add("active"):t.classList.remove("active")}),0)},_=()=>{if(-1===p.value)return;const e=d.value[p.value];if(e.slideId===r.value.id)setTimeout(b,0);else{const l=a.value.findIndex((t=>t.id===e.slideId));-1!==l&&t.updateSlideIndex(l)}},I=()=>{if(!u.value)return ta.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value<d.value.length-1?p.value+=1:p.value=0,_()},S=()=>{if(!u.value)return ta.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value>0?p.value-=1:p.value=d.value.length-1,_()},C=()=>{if(!u.value)return;if(-1===p.value)return void I();const e=d.value[p.value];let l=null;if("table"===e.elType){const[t,a]=e.cellIndex;l=document.querySelector(`#editable-element-${e.elId} .cell[data-cell-index="${t}_${a}"] .cell-text`)}else l=document.querySelector(`#editable-element-${e.elId} .ProseMirror`);if(!l)return;const a=document.createElement("div");a.innerHTML=l.innerHTML;let n=!1;const o=a.querySelectorAll("mark[data-index]");for(const t of o){const e=t.parentNode;if(t.classList.contains("active"))n?e.removeChild(t):(e.replaceChild(document.createTextNode(c.value),t),n=!0);else{const l=t.textContent;e.replaceChild(document.createTextNode(l),t)}}if("text"===e.elType){const l={content:a.innerHTML};t.updateElement({id:e.elId,props:l})}else if("shape"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"shape"===l.type&&l.text){const n={text:{...l.text,content:a.innerHTML}};t.updateElement({id:e.elId,props:n})}}else if("table"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"table"===l.type){const n=l.data.map(((t,l)=>l===e.cellIndex[0]?t.map(((t,l)=>l===e.cellIndex[1]?{...t,text:a.innerHTML}:t)):t)),o={data:n};t.updateElement({id:e.elId,props:o})}}d.value.splice(p.value,1),d.value.length?(p.value>d.value.length-1&&(p.value=0),(0,i.Y3)((()=>{k(),_()}))):p.value=-1},L=()=>{if(u.value)if(-1!==p.value){for(let e=0;e<d.value.length;e++){const l=d.value[e-1],n=d.value[e];if(l&&l.elId===n.elId)continue;const o=a.value.find((e=>e.id===n.slideId));if(!o)continue;const i=o.elements.find((e=>e.id===n.elId));if(!i)continue;const s=document.createElement("div");if("text"===i.type?s.innerHTML=i.content:"shape"===i.type&&(s.innerHTML=i.text?.content||""),"table"===n.elType){const e=i.data.map((e=>e.map((e=>e.text?{...e,text:e.text.replaceAll(u.value,c.value)}:e)))),l={data:e};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}else{const l=h(s),a=f(l),o=a.map((({text:e})=>e)).join(""),i=g(o,u.value);y(l,a,i,e);const d=s.querySelectorAll("mark[data-index]");let p=-1;for(const e of d){const t=+e.dataset.index,l=e.parentNode;t===p?l.removeChild(e):(l.replaceChild(document.createTextNode(c.value),e),p=t)}if("text"===n.elType){const e={content:s.innerHTML};t.updateElement({id:n.elId,slideId:n.slideId,props:e})}else if("shape"===n.elType){const e=r.value.elements.find((e=>e.id===n.elId));if(e&&"shape"===e.type&&e.text){const l={text:{...e.text,content:s.innerHTML}};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}}}}d.value=[],p.value=-1}else I()},T=()=>{p.value=-1,d.value=[],u.value||x()};(0,i.YP)(u,T),(0,i.YP)(n,(()=>{(0,i.Y3)((()=>{k(),setTimeout(b,0)}))})),(0,i.YP)(l,(()=>{l.value&&(p.value=-1,d.value=[],x())})),(0,i.Jd)(x);const E=()=>{v.value="g"===v.value?"gi":"g",T()};return{searchWord:u,replaceWord:c,searchResults:d,searchIndex:p,modifiers:v,searchNext:I,searchPrev:S,replace:C,replaceAll:L,toggleModifiers:E}};const nC={class:"count"},oC={key:1,class:"footer"};var iC=(0,i.aZ)({__name:"SearchPanel",setup(e){const t=R(),{searchWord:l,replaceWord:a,searchResults:o,searchIndex:r,modifiers:u,searchNext:c,searchPrev:d,replace:p,replaceAll:v,toggleModifiers:m}=aC(),h=(0,s.iH)("search"),f=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],g=()=>{t.setSearchPanelState(!1)},y=(0,s.iH)();return(0,i.bv)((()=>{y.value.focus()})),(0,i.YP)(h,(()=>{(0,i.Y3)((()=>{y.value.focus()}))})),(e,t)=>{const w=(0,i.up)("IconClose"),x=(0,i.up)("IconLeft"),k=(0,i.up)("IconRight"),b=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.j4)(ZS,{class:"search-panel",width:330,height:0,left:-270,top:90},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>g()),onMousedown:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(w)],32),(0,i.Wm)(Kd,{tabs:f,value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e)},null,8,["value"]),(0,i._)("div",{class:(0,oe.C_)(["content",h.value]),onMousedown:t[12]||(t[12]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(sn,{class:"input",value:(0,s.SU)(l),"onUpdate:value":t[6]||(t[6]=e=>(0,s.dq)(l)?l.value=e:null),placeholder:"输入查找内容",onEnter:t[7]||(t[7]=e=>(0,s.SU)(c)()),ref_key:"searchInpRef",ref:y},{suffix:(0,i.w5)((()=>[(0,i._)("span",nC,(0,oe.zw)((0,s.SU)(r)+1)+"/"+(0,oe.zw)((0,s.SU)(o).length),1),(0,i.Wm)(Zc,{type:"vertical"}),(0,i.wy)(((0,i.wg)(),(0,i.iD)("span",{class:(0,oe.C_)(["ignore-case",{active:"g"===(0,s.SU)(u)}]),onClick:t[3]||(t[3]=e=>(0,s.SU)(m)())},[(0,i.Uk)("Aa")],2)),[[b,"忽略大小写"]]),(0,i.Wm)(Zc,{type:"vertical"}),(0,i.wy)((0,i.Wm)(x,{class:"next-btn left",onClick:t[4]||(t[4]=e=>(0,s.SU)(d)())},null,512),[[b,"上一个"]]),(0,i.wy)((0,i.Wm)(k,{class:"next-btn right",onClick:t[5]||(t[5]=e=>(0,s.SU)(c)())},null,512),[[b,"下一个"]])])),_:1},8,["value"]),"replace"===h.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"input",value:(0,s.SU)(a),"onUpdate:value":t[8]||(t[8]=e=>(0,s.dq)(a)?a.value=e:null),placeholder:"输入替换内容",onEnter:t[9]||(t[9]=e=>(0,s.SU)(p)())},null,8,["value"])):(0,i.kq)("",!0),"replace"===h.value?((0,i.wg)(),(0,i.iD)("div",oC,[(0,i.Wm)(tp,{disabled:!(0,s.SU)(l),style:{"margin-left":"5px"},onClick:t[10]||(t[10]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("替换")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{disabled:!(0,s.SU)(l),type:"primary",style:{"margin-left":"5px"},onClick:t[11]||(t[11]=e=>(0,s.SU)(v)())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部替换")])),_:1},8,["disabled"])])):(0,i.kq)("",!0)],34)])),_:1})}}});const sC=(0,Vl.Z)(iC,[["__scopeId","data-v-fb93ddde"]]);var rC=sC;const uC={class:"pptist-editor"},cC={class:"layout-content"},dC={class:"layout-content-center"};var pC=(0,i.aZ)({__name:"index",setup(e){const t=R(),{dialogForExport:l,showSelectPanel:a,showSearchPanel:n}=(0,o.Jk)(t),r=()=>t.setDialogForExport(""),u=(0,s.iH)(40);return Ta(),Ea(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",uC,[(0,i.Wm)(Ln,{class:"layout-header"}),(0,i._)("div",cC,[(0,i.Wm)(Rm,{class:"layout-content-left"}),(0,i._)("div",dC,[(0,i.Wm)(Sm,{class:"center-top"}),(0,i.Wm)(Cp,{class:"center-body",style:(0,oe.j5)({height:`calc(100% - ${u.value+40}px)`})},null,8,["style"]),(0,i.Wm)(I_,{class:"center-bottom",height:u.value,"onUpdate:height":t[0]||(t[0]=e=>u.value=e),style:(0,oe.j5)({height:`${u.value}px`})},null,8,["height","style"])]),(0,i.Wm)(f_,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)(lC,{key:0})):(0,i.kq)("",!0),(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)(rC,{key:1})):(0,i.kq)("",!0),(0,i.Wm)(kp,{visible:!!(0,s.SU)(l),width:680,onClosed:t[1]||(t[1]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Wm)(DS)])),_:1},8,["visible"])],64))}});const vC=(0,Vl.Z)(pC,[["__scopeId","data-v-1e00f97b"]]);var mC=vC,hC=()=>{const e=$(),{slides:t,slideIndex:l,formatedAnimations:a}=(0,o.Jk)(e),n=(0,s.iH)(0),r=(0,s.iH)(!1),u=(0,s.iH)(l.value),c=()=>{if(r.value)return;const{animations:e,autoNext:t}=a.value[n.value];n.value+=1,r.value=!0;let l=0;for(const a of e){const n=document.querySelector(`#screen-element-${a.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${yk}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(yk)&&n.classList.remove(e,`${yk}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${yk}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${yk}animated`)),l+=1,l===e.length&&(r.value=!1,t&&c())};n.addEventListener("animationend",i,{once:!0})}},d=()=>{n.value-=1;const{animations:e}=a.value[n.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(yk)&&e.classList.remove(t,`${yk}animated`)}}e.every((e=>"attention"===e.type))&&g()},p=(0,s.iH)(0),v=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(v);const m=(0,s.iH)(!1),h=e=>{m.value=e},f=(0,D.throttle)((function(e){ta.success(e)}),1e3,{leading:!0,trailing:!1}),g=()=>{a.value.length&&n.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value<u.value?(n.value=0,u.value=l.value):n.value=a.value.length):m.value?E(t.value.length-1):f("已经是第一页了"),r.value=!1},y=()=>{a.value.length&&n.value<a.value.length?c():l.value<t.value.length-1?(e.updateSlideIndex(l.value+1),n.value=0,r.value=!1):(m.value?E(0):(f("已经是最后一页了"),v()),r.value=!1)},w=(0,s.iH)(2500),x=()=>{v(),ta.success("开始自动放映"),p.value=setInterval(y,w.value)},k=e=>{v(),w.value=e,x()},b=(0,D.throttle)((function(e){e.deltaY<0?g():e.deltaY>0&&y()}),500,{leading:!0,trailing:!1}),_=(0,s.iH)(null),I=e=>{_.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!_.value)return;const t=Math.abs(_.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-_.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(_.value=null,l>0?g():y())},C=e=>{const t=e.key.toUpperCase();t===ne.UP||t===ne.LEFT||t===ne.PAGEUP?g():t!==ne.DOWN&&t!==ne.RIGHT&&t!==ne.SPACE&&t!==ne.ENTER&&t!==ne.PAGEDOWN||y()};(0,i.bv)((()=>document.addEventListener("keydown",C))),(0,i.Ah)((()=>document.removeEventListener("keydown",C)));const L=()=>{e.updateSlideIndex(l.value-1),n.value=0},T=()=>{e.updateSlideIndex(l.value+1),n.value=0},E=t=>{e.updateSlideIndex(t),n.value=0},M=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlayInterval:w,setAutoPlayInterval:k,autoPlay:x,closeAutoPlay:v,loopPlay:m,setLoopPlay:h,mousewheelListener:b,touchStartListener:I,touchEndListener:S,turnPrevSlide:L,turnNextSlide:T,turnSlideToIndex:E,turnSlideToId:M,execPrev:g,execNext:y,animationIndex:n}},fC=e=>{const t=$(),{viewportRatio:l}=(0,o.Jk)(t),a=(0,s.iH)(0),n=(0,s.iH)(0),r=()=>{const t=e?.value||document.body,o=t.clientWidth,i=t.clientHeight;let s,r;i/o===l.value?(s=o,r=i):i/o>l.value?(s=o,r=o*l.value):(s=i/l.value,r=i),a.value=s,n.value=r};return(0,i.bv)((()=>{r(),window.addEventListener("resize",r)})),(0,i.Ah)((()=>{window.removeEventListener("resize",r)})),{slideWidth:a,slideHeight:n}},gC=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=Ca(),a=()=>{e.value=Sa(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=Sa(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)})),(0,i.Ah)((()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}));const n=()=>{e.value&&(t.value=!1,Ia())};return{fullscreenState:e,manualExitFullscreen:n}};const yC={class:"element-content"};var wC=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=(0,o.Jk)($()),l=(0,i.f3)(Tn)||(0,s.iH)(1),a=(0,i.f3)(En)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-video screen-element-video",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",yC,[n.value?((0,i.wg)(),(0,i.j4)(Fr,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4))}});const xC=(0,Vl.Z)(wC,[["__scopeId","data-v-76bf5b3f"]]);var kC=xC;const bC={class:"element-content"};var _C=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)($()),n=(0,i.f3)(Tn)||(0,s.iH)(1),r=(0,i.f3)(En)||(0,s.iH)(""),u=(0,i.Fl)((()=>a.value.id===r.value)),c=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),d=(0,i.Fl)((()=>{const e=oa,a=oa*l.value,o=280/n.value,i=50/n.value,s=t.elementInfo.width,r=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=r;return u+o>=e&&(d=s-o),c+r+i>=a&&(p=-i),{left:d+"px",top:p+"px"}})),p=(0,s.iH)(),v=()=>{p.value&&p.value.toggle()};return(e,t)=>{const l=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio screen-element-audio",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",bC,[(0,i.Wm)(l,{class:"audio-icon",style:(0,oe.j5)({fontSize:c.value,color:e.elementInfo.color}),onClick:t[0]||(t[0]=e=>v())},null,8,["style"]),u.value?((0,i.wg)(),(0,i.j4)(lu,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,oe.j5)({...d.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(n)},null,8,["style","src","loop","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4)}}});const IC=(0,Vl.Z)(_C,[["__scopeId","data-v-adf39436"]]);var SC=IC;const CC=["id","title"];var LC=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:Gc,[sa.TEXT]:td,[sa.SHAPE]:ud,[sa.LINE]:md,[sa.CHART]:gd,[sa.TABLE]:Ld,[sa.LATEX]:Hd,[sa.VIDEO]:kC,[sa.AUDIO]:SC};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)($()),r=(0,i.Fl)((()=>{const e=a.value.findIndex((e=>{const l=e.animations.map((e=>e.elId));return l.includes(t.elementInfo.id)}));if(-1===e)return!1;if(e<t.animationIndex)return!1;const l=a.value[e].animations.find((e=>e.elId===t.elementInfo.id));return"in"===l?.type})),u=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,oe.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:r.value?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:t[0]||(t[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,CC))}});const TC=(0,Vl.Z)(LC,[["__scopeId","data-v-2139723a"]]);var EC=TC,MC=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=yu(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(En,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,oe.j5)({width:(0,s.SU)(oa)+"px",height:(0,s.SU)(oa)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,oe.j5)({...(0,s.SU)(n)})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((t,l)=>((0,i.wg)(),(0,i.j4)(EC,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"])))),128))],4))}});const UC=(0,Vl.Z)(MC,[["__scopeId","data-v-016af5da"]]);var WC=UC;const DC={class:"screen-slide-list"};var HC=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)($()),n=(0,i.Fl)((()=>l.value.map((e=>{let t=e.turningMode;if(t||(t="slideY"),"random"===t){const e=bk.filter((e=>!["random","no"].includes(e.value))).map((e=>e.value));t=e[Math.floor(Math.random()*e.length)]}return{...e,turningMode:t}})))),r=(0,i.Fl)((()=>t.slideWidth/oa));return(0,i.JJ)(Tn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",DC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.value,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slide-item",`turning-mode-${t.turningMode}`,{current:l===(0,s.SU)(a),before:l<(0,s.SU)(a),after:l>(0,s.SU)(a),hide:(l===(0,s.SU)(a)-1||l===(0,s.SU)(a)+1)&&t.turningMode!==n.value[(0,s.SU)(a)].turningMode}]),key:t.id},[Math.abs((0,s.SU)(a)-l)<2||t.animations?.length?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,oe.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(WC,{slide:t,scale:r.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const FC=(0,Vl.Z)(HC,[["__scopeId","data-v-552b63d2"]]);var AC=FC;const $C={class:"slide-thumbnails"},ZC={class:"return-button"},OC={class:"slide-thumbnails-content"},RC=["onClick"];var zC=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const l=e,a=t,{slides:n,slideIndex:r}=(0,o.Jk)($()),{slidesLoadLimit:u}=Cm(),c=e=>{l.turnSlideToIndex(e),a("close")};return(e,t)=>{const l=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",$C,[(0,i._)("div",ZC,[(0,i.Wm)(l,{class:"icon",onClick:t[0]||(t[0]=e=>a("close"))})]),(0,i._)("div",OC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail",{active:t===(0,s.SU)(r)}]),key:e.id,onClick:e=>c(t)},[(0,i.Wm)(Jd,{slide:e,size:150,visible:t<(0,s.SU)(u)},null,8,["slide","visible"])],10,RC)))),128))])])}}});const PC=(0,Vl.Z)(zC,[["__scopeId","data-v-15912b32"]]);var BC=PC;const NC={key:0,class:"blackboard"};var jC=(0,i.aZ)({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e,n=l;let o=null;const r=(0,s.iH)(),u=(0,s.iH)();let c={x:0,y:0},d=!1,p=0,v=-1;const m=(0,s.iH)({x:0,y:0}),h=(0,s.iH)(!1),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,i.Fl)((()=>u.value?f.value/u.value.width:1)),w=(0,i.Fl)((()=>u.value?g.value/u.value.height:1)),x=()=>{r.value&&(f.value=r.value.clientWidth,g.value=r.value.clientHeight)},k=new ResizeObserver(x);(0,i.bv)((()=>{r.value&&k.observe(r.value)})),(0,i.Ah)((()=>{r.value&&k.unobserve(r.value)}));const b=()=>{u.value&&r.value&&(o=u.value.getContext("2d"),o&&(u.value.width=r.value.clientWidth,u.value.height=r.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};(0,i.bv)(b);const _=()=>{o&&("mark"===a.model?(o.globalCompositeOperation="xor",o.globalAlpha=.5):"pen"===a.model&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};(0,i.YP)((()=>a.model),_);const I=(e,t,l)=>{if(!o)return;const n=c.x,i=c.y;o.lineWidth=l,o.strokeStyle=a.color,o.beginPath(),o.moveTo(n,i),o.lineTo(e,t),o.stroke(),o.closePath()},S=(e,t)=>{if(!o||!u.value)return;const l=c.x,n=c.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-n)/(e-l))),r=i*Math.cos(Math.atan((t-n)/(e-l))),d=[l+s,n-r],p=[l-s,n+r],v=[e+s,t-r],m=[e-s,t+r];o.save(),o.beginPath(),o.arc(e,t,i,0,2*Math.PI),o.clip(),o.clearRect(0,0,u.value.width,u.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...d),o.lineTo(...v),o.lineTo(...m),o.lineTo(...p),o.closePath(),o.clip(),o.clearRect(0,0,u.value.width,u.value.height),o.restore()},C=(e,t)=>{const l=c.x,a=c.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},L=(e,t)=>{const l=10,n=.1,o=a.penSize,i=3,s=e/t;let r;return r=s<=n?o:s>=l?i:o-s/l*o,-1===v?r:1*r/3+2*v/3},T=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=C(e,t),n=l-p,o=L(a,n);I(e,t,o),v=o}else"mark"===a.model?I(e,t,a.markSize):S(e,t);c={x:e,y:t},p=(new Date).getTime()},E=e=>{if(!u.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=u.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},M=e=>{const[t,l]=E(e),a=t/y.value,n=l/w.value;d=!0,c={x:a,y:n},p=(new Date).getTime(),e instanceof MouseEvent||(m.value={x:t,y:l},h.value=!0)},U=e=>{const[t,l]=E(e),a=t/y.value,n=l/w.value;m.value={x:t,y:l},d&&T(a,n)},W=()=>{d&&(d=!1,n("end"))},D=()=>{o&&u.value&&(o.clearRect(0,0,u.value.width,u.value.height),n("end"))},H=()=>u.value?.toDataURL(),F=e=>{if(o&&u.value&&(o.clearRect(0,0,u.value.width,u.value.height),e)){o.globalCompositeOperation="source-over",o.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{o.drawImage(t,0,0),_()}}};return t({clearCanvas:D,getImageDataURL:H,setImageDataURL:F}),(e,t)=>{const l=(0,i.up)("IconWrite"),a=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:r},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",NC)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:u,style:(0,oe.j5)({width:f.value+"px",height:g.value+"px"}),onMousedown:t[0]||(t[0]=e=>M(e)),onMousemove:t[1]||(t[1]=e=>U(e)),onMouseup:t[2]||(t[2]=e=>W()),onTouchstart:t[3]||(t[3]=e=>M(e)),onTouchmove:t[4]||(t[4]=e=>U(e)),onTouchend:t[5]||(t[5]=e=>{W(),h.value=!1}),onMouseleave:t[6]||(t[6]=e=>{W(),h.value=!1}),onMouseenter:t[7]||(t[7]=e=>h.value=!0)},null,36),h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},["eraser"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"eraser",style:(0,oe.j5)({left:m.value.x-e.rubberSize/2+"px",top:m.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):(0,i.kq)("",!0),"pen"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:1,class:"pen",style:(0,oe.j5)({left:m.value.x-e.penSize/2+"px",top:m.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?((0,i.wg)(),(0,i.j4)(l,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0),"mark"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:2,class:"pen",style:(0,oe.j5)({left:m.value.x-e.markSize/2+"px",top:m.value.y+"px",color:e.color})},["mark"===e.model?((0,i.wg)(),(0,i.j4)(a,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)],512)}}});const YC=(0,Vl.Z)(jC,[["__scopeId","data-v-d8027742"]]);var VC=YC;const JC=e=>((0,i.dD)("data-v-92cd0b5a"),e=e(),(0,i.Cn)(),e),qC={class:"writing-board-tool"},XC={class:"tool-content"},GC={class:"size"},KC=JC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),QC={class:"size"},eL=JC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),tL={class:"size"},lL=JC((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),aL={class:"colors"},nL=["onClick"];var oL=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],a=t,{currentSlide:r}=(0,o.Jk)($()),u=(0,s.iH)(),c=(0,s.iH)("#e2534d"),d=(0,s.iH)("pen"),p=(0,s.iH)(!1),v=(0,s.iH)(""),m=(0,s.iH)(6),h=(0,s.iH)(24),f=(0,s.iH)(80),g=e=>{d.value===e?v.value=v.value===e?"":e:(v.value&&(v.value=""),d.value=e)},y=()=>{u.value.clearCanvas()},w=e=>{"eraser"===d.value&&(d.value="pen"),c.value=e},x=()=>{a("close")};(0,i.YP)(r,(()=>{V.writingBoardImgs.where("id").equals(r.value.id).toArray().then((e=>{const t=e[0];u.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const k=()=>{const e=u.value.getImageDataURL();e&&V.writingBoardImgs.where("id").equals(r.value.id).toArray().then((t=>{const l=t[0];l?V.writingBoardImgs.update(l,{dataURL:e}):V.writingBoardImgs.add({id:r.value.id,dataURL:e})}))};return(e,t)=>{const a=(0,i.up)("IconWrite"),o=(0,i.up)("IconHighLight"),s=(0,i.up)("IconErase"),r=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),_=(0,i.up)("IconClose"),I=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",qC,[(0,i._)("div",{class:"writing-board-wrap",style:(0,oe.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(VC,{ref_key:"writingBoardRef",ref:u,color:c.value,blackboard:p.value,model:d.value,penSize:m.value,markSize:h.value,rubberSize:f.value,onEnd:t[0]||(t[0]=e=>k())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(ZS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===v.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:t[10]||(t[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",XC,[(0,i.Wm)(dn,{trigger:"manual",value:"pen"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",GC,[KC,(0,i.Wm)(qm,{class:"size-slider",min:4,max:10,step:2,value:m.value,"onUpdate:value":t[1]||(t[1]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"pen"===d.value}]),onClick:t[2]||(t[2]=e=>g("pen"))},[(0,i.Wm)(a,{class:"icon"})],2)),[[I,"画笔"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"manual",value:"mark"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",QC,[eL,(0,i.Wm)(qm,{class:"size-slider",min:16,max:40,step:4,value:h.value,"onUpdate:value":t[3]||(t[3]=e=>h.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"mark"===d.value}]),onClick:t[4]||(t[4]=e=>g("mark"))},[(0,i.Wm)(o,{class:"icon"})],2)),[[I,"荧光笔"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"manual",value:"eraser"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",tL,[lL,(0,i.Wm)(qm,{class:"size-slider",min:20,max:200,step:20,value:f.value,"onUpdate:value":t[5]||(t[5]=e=>f.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"eraser"===d.value}]),onClick:t[6]||(t[6]=e=>g("eraser"))},[(0,i.Wm)(s,{class:"icon"})],2)),[[I,"橡皮擦"]])])),_:1},8,["value"]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[7]||(t[7]=e=>y())},[(0,i.Wm)(r,{class:"icon"})])),[[I,"清除墨迹"]]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:p.value}]),onClick:t[8]||(t[8]=e=>p.value=!p.value)},[(0,i.Wm)(b,{class:"icon"})],2)),[[I,"黑板"]]),(0,i._)("div",aL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,oe.C_)(["color",{active:e===c.value}]),key:e,style:(0,oe.j5)({backgroundColor:e}),onClick:t=>w(e)},null,14,nL))),64))])]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[9]||(t[9]=e=>x())},[(0,i.Wm)(_,{class:"icon"})])),[[I,"关闭画笔"]])],32)])),_:1},8,["left","top","moveable"])])}}});const iL=(0,Vl.Z)(oL,[["__scopeId","data-v-92cd0b5a"]]);var sL=iL;const rL=e=>((0,i.dD)("data-v-83a589f0"),e=e(),(0,i.Cn)(),e),uL={class:"header"},cL={class:"content"},dL={class:"timer"},pL=["value","disabled"],vL=rL((()=>(0,i._)("div",{class:"colon"},":",-1))),mL={class:"timer"},hL=["value","disabled"];var fL=(0,i.aZ)({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)(null),o=(0,s.iH)(!1),r=(0,s.iH)(!1),u=(0,s.iH)(0),c=(0,i.Fl)((()=>Math.floor(u.value/60))),d=(0,i.Fl)((()=>u.value%60)),p=(0,i.Fl)((()=>!r.value||o.value)),v=()=>{a.value&&clearInterval(a.value)};(0,i.Ah)(v);const m=()=>{v(),o.value=!1},h=()=>{v(),o.value=!1,r.value?u.value=600:u.value=0},f=()=>{v(),r.value?a.value=setInterval((()=>{u.value=u.value-1,u.value<=0&&h()}),1e3):a.value=setInterval((()=>{u.value=u.value+1,u.value>36e3&&m()}),1e3),o.value=!0},g=()=>{o.value?m():f()},y=()=>{r.value=!r.value,h()},w=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),u.value="minute"===t?60*+a+d.value:+a+60*c.value):l.value=G("minute"===t?c.value:d.value,2)};return(e,t)=>{const a=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(ZS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",uL,[(0,i._)("span",{class:"text-btn",onClick:t[0]||(t[0]=e=>g())},(0,oe.zw)(o.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:t[1]||(t[1]=e=>h())},"重置"),(0,i._)("span",{class:(0,oe.C_)(["text-btn",{active:r.value}]),onClick:t[2]||(t[2]=e=>y())},"倒计时",2)]),(0,i._)("div",cL,[(0,i._)("div",dL,[(0,i._)("input",{type:"text",value:(0,s.SU)(G)(c.value,2),maxlength:3,disabled:p.value,onMousedown:t[3]||(t[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:t[4]||(t[4]=e=>w(e,"minute")),onKeydown:[t[5]||(t[5]=(0,n.iM)((()=>{}),["stop"])),t[6]||(t[6]=(0,n.D2)((0,n.iM)((e=>w(e,"minute")),["stop"]),["enter"]))]},null,40,pL)]),vL,(0,i._)("div",mL,[(0,i._)("input",{type:"text",value:(0,s.SU)(G)(d.value,2),maxlength:3,disabled:p.value,onMousedown:t[7]||(t[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:t[8]||(t[8]=e=>w(e,"second")),onKeydown:[t[9]||(t[9]=(0,n.iM)((()=>{}),["stop"])),t[10]||(t[10]=(0,n.D2)((0,n.iM)((e=>w(e,"second")),["stop"]),["enter"]))]},null,40,hL)])]),(0,i._)("div",{class:"close-btn",onClick:t[11]||(t[11]=e=>l("close"))},[(0,i.Wm)(a,{class:"icon"})])])),_:1},8,["left","top"])}}});const gL=(0,Vl.Z)(fL,[["__scopeId","data-v-83a589f0"]]);var yL=gL;const wL={class:"tools-left"},xL={class:"content"};var kL=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)($()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,autoPlayInterval:c,setAutoPlayInterval:d,loopPlay:p,setLoopPlay:v,mousewheelListener:m,touchStartListener:h,touchEndListener:f,turnPrevSlide:g,turnNextSlide:y,turnSlideToIndex:w,turnSlideToId:x,execPrev:k,execNext:b,animationIndex:_}=hC(),{slideWidth:I,slideHeight:S}=fC(),{exitScreening:C}=Ca(),{fullscreenState:L,manualExitFullscreen:T}=gC(),E=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>g()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>y()},{text:"第一页",disable:0===a.value,handler:()=>w(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>w(l.value.length-1)},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r,children:[{text:"2.5秒",subText:2500===c.value?"√":"",handler:()=>d(2500)},{text:"5秒",subText:5e3===c.value?"√":"",handler:()=>d(5e3)},{text:"7.5秒",subText:7500===c.value?"√":"",handler:()=>d(7500)},{text:"10秒",subText:1e4===c.value?"√":"",handler:()=>d(1e4)}]},{text:"循环放映",subText:p.value?"√":"",handler:()=>v(!p.value)},{divider:!0},{text:"显示工具栏",handler:()=>E.value=!0},{text:"查看所有幻灯片",handler:()=>W.value=!0},{text:"画笔工具",handler:()=>M.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:"结束放映",subText:"ESC",handler:C}];return(e,t)=>{const n=(0,i.up)("IconLeftTwo"),o=(0,i.up)("IconRightTwo"),r=(0,i.up)("IconWrite"),u=(0,i.up)("IconMagic"),c=(0,i.up)("IconStopwatchStart"),d=(0,i.up)("IconListView"),p=(0,i.up)("IconOffScreenOne"),v=(0,i.up)("IconFullScreenOne"),g=(0,i.up)("IconPower"),y=(0,i.Q2)("contextmenu"),F=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["base-view",{"laser-pen":D.value}])},[(0,i.wy)((0,i.Wm)(AC,{slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(_),turnSlideToId:(0,s.SU)(x),manualExitFullscreen:(0,s.SU)(T),onWheel:t[0]||(t[0]=e=>(0,s.SU)(m)(e)),onTouchstart:t[1]||(t[1]=e=>(0,s.SU)(h)(e)),onTouchend:t[2]||(t[2]=e=>(0,s.SU)(f)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[y,H]]),W.value?((0,i.wg)(),(0,i.j4)(BC,{key:0,turnSlideToIndex:(0,s.SU)(w),onClose:t[3]||(t[3]=e=>W.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),M.value?((0,i.wg)(),(0,i.j4)(sL,{key:1,slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),onClose:t[4]||(t[4]=e=>M.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(yL,{key:2,onClose:t[5]||(t[5]=e=>U.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",wL,[(0,i.Wm)(n,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[6]||(t[6]=e=>(0,s.SU)(k)())}),(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[7]||(t[7]=e=>(0,s.SU)(b)())})]),(0,i._)("div",{class:(0,oe.C_)(["tools-right",{visible:E.value}]),onMouseleave:t[16]||(t[16]=e=>E.value=!1),onMouseenter:t[17]||(t[17]=e=>E.value=!0)},[(0,i._)("div",xL,[(0,i._)("div",{class:"tool-btn page-number",onClick:t[8]||(t[8]=e=>W.value=!0)},"幻灯片 "+(0,oe.zw)((0,s.SU)(a)+1)+" / "+(0,oe.zw)((0,s.SU)(l).length),1),(0,i.wy)((0,i.Wm)(r,{class:"tool-btn",onClick:t[9]||(t[9]=e=>M.value=!0)},null,512),[[F,"画笔工具"]]),(0,i.wy)((0,i.Wm)(u,{class:(0,oe.C_)(["tool-btn",{active:D.value}]),onClick:t[10]||(t[10]=e=>D.value=!D.value)},null,8,["class"]),[[F,"激光笔"]]),(0,i.wy)((0,i.Wm)(c,{class:(0,oe.C_)(["tool-btn",{active:U.value}]),onClick:t[11]||(t[11]=e=>U.value=!U.value)},null,8,["class"]),[[F,"计时器"]]),(0,i.wy)((0,i.Wm)(d,{class:"tool-btn",onClick:t[12]||(t[12]=t=>e.changeViewMode("presenter"))},null,512),[[F,"演讲者视图"]]),(0,s.SU)(L)?(0,i.wy)(((0,i.wg)(),(0,i.j4)(p,{key:0,class:"tool-btn",onClick:t[13]||(t[13]=e=>(0,s.SU)(T)())},null,512)),[[F,"退出全屏"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(v,{key:1,class:"tool-btn",onClick:t[14]||(t[14]=e=>(0,s.SU)(_a)())},null,512)),[[F,"进入全屏"]]),(0,i.wy)((0,i.Wm)(g,{class:"tool-btn",onClick:t[15]||(t[15]=e=>(0,s.SU)(C)())},null,512),[[F,"结束放映"]])])],34)],2)}}});const bL=(0,Vl.Z)(kL,[["__scopeId","data-v-e9c1efea"]]);var _L=bL;const IL=e=>((0,i.dD)("data-v-77a65275"),e=e(),(0,i.Cn)(),e),SL={class:"presenter-view"},CL={class:"toolbar"},LL=IL((()=>(0,i._)("span",null,"普通视图",-1))),TL=IL((()=>(0,i._)("span",null,"画笔",-1))),EL=IL((()=>(0,i._)("span",null,"激光笔",-1))),ML=IL((()=>(0,i._)("span",null,"计时器",-1))),UL=IL((()=>(0,i._)("span",null,"结束放映",-1))),WL={class:"content"},DL=["onClick"],HL={class:"remark"},FL={class:"header"},AL=IL((()=>(0,i._)("span",null,"演讲者备注",-1))),$L=["innerHTML"],ZL={class:"remark-scale"};var OL=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)($()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)(!1),{mousewheelListener:h,touchStartListener:f,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:k,animationIndex:b}=hC(),{slideWidth:_,slideHeight:I}=fC(c),{exitScreening:S}=Ca(),{slidesLoadLimit:C}=Cm(),{fullscreenState:L,manualExitFullscreen:T}=gC(),E=(0,s.iH)(16),M=(0,i.Fl)((()=>la(u.value.remark||"无备注"))),U=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},W=e=>{e<12||e>40||(E.value=e)};(0,i.YP)(a,(()=>{(0,i.Y3)((()=>{if(!d.value)return;const e=d.value.querySelector(".thumbnail.active");if(!e)return;const t=d.value.offsetWidth,l=e.offsetLeft;d.value.scrollTo({left:l-t/2,behavior:"smooth"})}))}));const D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>y()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>w()},{text:"第一页",disable:0===a.value,handler:()=>x(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>x(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>p.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:S}];return(e,t)=>{const o=(0,i.up)("IconListView"),u=(0,i.up)("IconWrite"),y=(0,i.up)("IconMagic"),w=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),F=(0,i.up)("IconPower"),A=(0,i.up)("IconMinus"),$=(0,i.up)("IconPlus"),Z=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",SL,[(0,i._)("div",CL,[(0,i._)("div",{class:"tool-btn",onClick:t[0]||(t[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(o,{class:"tool-icon"}),LL]),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:p.value}]),onClick:t[1]||(t[1]=e=>p.value=!p.value)},[(0,i.Wm)(u,{class:"tool-icon"}),TL],2),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:m.value}]),onClick:t[2]||(t[2]=e=>m.value=!m.value)},[(0,i.Wm)(y,{class:"tool-icon"}),EL],2),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:v.value}]),onClick:t[3]||(t[3]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),ML],2),(0,i._)("div",{class:"tool-btn",onClick:t[4]||(t[4]=()=>(0,s.SU)(L)?(0,s.SU)(T)():(0,s.SU)(_a)())},[(0,s.SU)(L)?((0,i.wg)(),(0,i.j4)(H,{key:0,class:"tool-icon"})):((0,i.wg)(),(0,i.j4)(H,{key:1,class:"tool-icon"})),(0,i._)("span",null,(0,oe.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)(Zc,{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:t[5]||(t[5]=e=>(0,s.SU)(S)())},[(0,i.Wm)(F,{class:"tool-icon"}),UL])]),(0,i._)("div",WL,[(0,i._)("div",{class:(0,oe.C_)(["slide-list-wrap",{"laser-pen":m.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(AC,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),animationIndex:(0,s.SU)(b),turnSlideToId:(0,s.SU)(k),manualExitFullscreen:(0,s.SU)(T),onWheel:t[6]||(t[6]=e=>(0,s.SU)(h)(e)),onTouchstart:t[7]||(t[7]=e=>(0,s.SU)(f)(e)),onTouchend:t[8]||(t[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[Z,D]]),p.value?((0,i.wg)(),(0,i.j4)(sL,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),left:-365,top:-155,onClose:t[9]||(t[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),v.value?((0,i.wg)(),(0,i.j4)(yL,{key:1,left:75,onClose:t[10]||(t[10]=e=>v.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:t[11]||(t[11]=(0,n.iM)((e=>U(e)),["prevent"]))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(Jd,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(C)},null,8,["slide","size","visible"])],10,DL)))),128))],544)]),(0,i._)("div",HL,[(0,i._)("div",FL,[AL,(0,i._)("span",null,"P "+(0,oe.zw)((0,s.SU)(a)+1)+" / "+(0,oe.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content ProseMirror-static",style:(0,oe.j5)({fontSize:E.value+"px"}),innerHTML:M.value},null,12,$L),(0,i._)("div",ZL,[(0,i._)("div",{class:(0,oe.C_)(["scale-btn",{disable:12===E.value}]),onClick:t[12]||(t[12]=e=>W(E.value-2))},[(0,i.Wm)(A)],2),(0,i._)("div",{class:(0,oe.C_)(["scale-btn",{disable:40===E.value}]),onClick:t[13]||(t[13]=e=>W(E.value+2))},[(0,i.Wm)($)],2)])])])}}});const RL=(0,Vl.Z)(OL,[["__scopeId","data-v-77a65275"]]);var zL=RL;const PL={class:"pptist-screen"};var BL=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=Ca(),n=e=>{const t=e.key.toUpperCase();t===ne.ESC&&a()};return(0,i.bv)((()=>document.addEventListener("keydown",n))),(0,i.Ah)((()=>document.removeEventListener("keydown",n))),(e,a)=>((0,i.wg)(),(0,i.iD)("div",PL,["base"===t.value?((0,i.wg)(),(0,i.j4)(_L,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(zL,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const NL=(0,Vl.Z)(BL,[["__scopeId","data-v-6bf3d190"]]);var jL=NL,YL=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:$o,[sa.TEXT]:ls,[sa.SHAPE]:ys,[sa.LINE]:Es,[sa.CHART]:As,[sa.TABLE]:lr,[sa.LATEX]:rr,[sa.VIDEO]:Zr,[sa.AUDIO]:ou};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}});const VL=YL;var JL=VL,qL=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),a=(0,i.Fl)((()=>t.elementInfo.width*t.canvasScale)),o=(0,i.Fl)((()=>t.elementInfo.height*t.canvasScale)),{borderLines:r,resizeHandlers:u,textElementResizeHandlers:c}=Ou(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u,p=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,oe.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${l.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128)),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Qu,{key:0,class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onTouchstart:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)],4))}});const XL=(0,Vl.Z)(qL,[["__scopeId","data-v-fd451ff6"]]);var GL=XL;const KL={class:"mobile-thumbnails"},QL=["onClick"],eT={class:"label"};var tT=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=$(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=ha(),{slidesLoadLimit:r}=Cm(),u=e=>{t.updateSlideIndex(e)},c=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&n(t,l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",KL,[(0,i.Wm)((0,s.SU)(Dm()),{class:"thumbnail-list",modelValue:(0,s.SU)(l),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:c},{item:(0,i.w5)((({element:e,index:t})=>[(0,i._)("div",{class:(0,oe.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",eT,(0,oe.zw)(t+1),1),(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,QL)])),_:1},8,["modelValue"])]))}});const lT=(0,Vl.Z)(tT,[["__scopeId","data-v-2c80920e"]]);var aT=lT;const nT={class:"slide-toolbar"},oT={class:"remark"},iT=["value"],sT={class:"toolbar"};var rT=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=$(),{viewportRatio:l,currentSlide:a}=(0,o.Jk)(t),{createSlide:n,copyAndPasteSlide:r,deleteSlide:u}=ha(),{createTextElement:c,createImageElement:d,createShapeElement:p}=pa(),v=()=>{const e=400,t=56;c({left:(oa-e)/2,top:(oa*l.value-t)/2,width:e,height:t},{content:"<p>新添加文本</p>"})},m=e=>{e&&e[0]&&na(e[0]).then((e=>d(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},a={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:a},o=200;p({left:(oa-o)/2,top:(oa*l.value-o)/2,width:o,height:o},n[e])},f=(0,i.Fl)((()=>a.value?.remark||"")),g=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),c=(0,i.up)("IconFontSize"),d=(0,i.up)("IconPicture"),p=(0,i.up)("IconSquare"),y=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",nT,[(0,i._)("div",oT,[(0,i._)("textarea",{value:f.value,placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>g(e))},null,40,iT)]),(0,i._)("div",sT,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Pa,{onChange:t[5]||(t[5]=e=>m(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)(aT)])}}});const uT=(0,Vl.Z)(rT,[["__scopeId","data-v-24150aba"]]);var cT=uT;const dT=e=>((0,i.dD)("data-v-f3d1ac70"),e=e(),(0,i.Cn)(),e),pT={class:"element-toolbar"},vT={class:"content"},mT={key:0,class:"style"},hT={class:"row-block"},fT=dT((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),gT={class:"colors"},yT=["onClick"],wT={class:"row-block"},xT=dT((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),kT={class:"colors"},bT=["onClick"],_T={key:1,class:"common"};var IT=(0,i.aZ)({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=R(),a=$(),{handleElement:n,handleElementId:r,richTextAttrs:u}=(0,o.Jk)(l),{addHistorySnapshot:c}=da(),d=(e,t)=>{a.updateElement({id:e,props:t}),c()},p=[{key:"style",label:"样式"},{key:"common",label:"布局"}],v=(0,s.iH)("common"),{orderElement:m}=ba(),{alignElementToCanvas:h}=qn(),{addElementsFromData:f}=va(),{deleteElement:g}=ga(),y=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},w=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&n.value.text?.content)&&Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l<t.length;l++)for(let a=0;a<t[l].length;a++){const n=t[l][a].style||{};t[l][a].style={...n,color:e}}d(r.value,{data:t})}"latex"===n.value.type&&d(r.value,{color:e})}},k=e=>{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||d(r.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l<t.length;l++)for(let a=0;a<t[l].length;a++){const n=t[l][a].style||{};t[l][a].style={...n,backcolor:e}}d(r.value,{data:t})}"audio"===n.value.type&&d(r.value,{color:e})}};return(e,l)=>{const a=(0,i.up)("IconTextBold"),o=(0,i.up)("IconTextItalic"),r=(0,i.up)("IconTextUnderline"),c=(0,i.up)("IconStrikethrough"),d=(0,i.up)("IconFontSize"),f=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),_=(0,i.up)("IconAlignTextRight"),I=(0,i.up)("IconCopy"),S=(0,i.up)("IconDelete"),C=(0,i.up)("IconSendToBack"),L=(0,i.up)("IconBringToFrontOne"),T=(0,i.up)("IconBringToFront"),E=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),U=(0,i.up)("IconAlignVertically"),W=(0,i.up)("IconAlignRight"),D=(0,i.up)("IconAlignTop"),H=(0,i.up)("IconAlignHorizontally"),F=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",pT,[(0,i.Wm)(Kd,{tabs:p,value:v.value,"onUpdate:value":l[0]||(l[0]=e=>v.value=e),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["value"]),(0,i._)("div",vT,["style"===v.value?((0,i.wg)(),(0,i.iD)("div",mT,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[1]||(l[1]=e=>w("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[2]||(l[2]=e=>w("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[3]||(l[3]=e=>w("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[4]||(l[4]=e=>w("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[5]||(l[5]=e=>w("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[6]||(l[6]=e=>w("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[7]||(l[7]=e=>w("align",e))},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1}),(0,i.Wm)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1}),(0,i.Wm)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["value"]),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i._)("div",hT,[fT,(0,i._)("div",gT,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>x(e)},[(0,i._)("div",{class:"color-block",style:(0,oe.j5)({backgroundColor:e})},null,4)],8,yT))),64))])]),(0,i._)("div",wT,[xT,(0,i._)("div",kT,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>k(e)},[(0,i._)("div",{class:"color-block",style:(0,oe.j5)({backgroundColor:e})},null,4)],8,bT))),64))])])])):(0,i.kq)("",!0),"common"===v.value?((0,i.wg)(),(0,i.iD)("div",_T,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(I,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(S,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>(0,s.SU)(h)((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>(0,s.SU)(h)((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>(0,s.SU)(h)((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>(0,s.SU)(h)((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>(0,s.SU)(h)((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[19]||(l[19]=e=>(0,s.SU)(h)((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const ST=(0,Vl.Z)(IT,[["__scopeId","data-v-f3d1ac70"]]);var CT=ST;const LT={class:"mobile-editor-header"},TT={class:"history"};var ET=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(J()),{redo:a,undo:r}=da();return(e,o)=>{const u=(0,i.up)("IconBack"),c=(0,i.up)("IconNext"),d=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",LT,[(0,i._)("div",TT,[(0,i._)("div",{class:(0,oe.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:o[0]||(o[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(u),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,oe.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:o[1]||(o[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:o[2]||(o[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(d),(0,i.Uk)(" 退出编辑")])])}}});const MT=(0,Vl.Z)(ET,[["__scopeId","data-v-5c34ab81"]]);var UT=MT;const WT={class:"mobile-editor"};var DT=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=$(),l=R(),{slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),{activeElementIdList:u,handleElement:c}=(0,o.Jk)(l),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:h}=yu(m),f=(0,i.Fl)((()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/oa:(t-20)/r.value/oa}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const g=(0,i.Fl)((()=>({width:oa*f.value+"px",height:oa*r.value*f.value+"px"}))),y=(0,s.iH)([]),w=()=>{y.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(w);const{dragElement:x}=jn(y,v,f),{scaleElement:k}=Bn(y,v,f),{rotateElement:b}=An(y,p,f),_=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&x(e,t)},I=()=>{l.setActiveElementIdList([])};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",WT,[(0,i.Wm)(UT,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:t[0]||(t[0]=e=>I())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,oe.j5)(g.value)},[(0,i._)("div",{class:"background",style:(0,oe.j5)((0,s.SU)(h))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((e,t)=>((0,i.wg)(),(0,i.j4)(Iu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:f.value},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(GL,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:f.value,scaleElement:(0,s.SU)(k),rotateElement:(0,s.SU)(b)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:(0,oe.j5)({transform:`scale(${f.value})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.j4)(JL,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:_},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(cT),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(CT,{key:0})):(0,i.kq)("",!0)]))}});const HT=(0,Vl.Z)(DT,[["__scopeId","data-v-3756d058"]]);var FT=HT;const AT={class:"header"};var $T=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=$(),{slides:l,slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),u=(0,s.iH)(!1),c=(0,s.iH)({width:0,height:0});(0,i.bv)((()=>{0!==a.value&&t.updateSlideIndex(0),c.value={width:document.body.clientHeight,height:document.body.clientWidth}}));const d=(0,i.Fl)((()=>{const e=c.value.height/c.value.width;let t=0,l=0;return e>=r.value?(t=c.value.width,l=t*r.value):(l=c.value.height,t=l/r.value),{width:t,height:l}})),p=(0,s.iH)(null),v=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},m=e=>{if(!p.value)return;const n=Math.abs(p.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-p.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(p.value=null,o<0&&a.value>0&&t.updateSlideIndex(a.value-1),o>0&&a.value<l.value.length-1&&t.updateSlideIndex(a.value+1))};return(e,t)=>{const o=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,oe.j5)({width:c.value.width+"px",height:c.value.height+"px",transform:`rotate(90deg) translateY(-${c.value.height}px)`})},[(0,i._)("div",{class:"screen-slide-list",onClick:t[0]||(t[0]=e=>u.value=!u.value),onTouchstart:t[1]||(t[1]=e=>v(e)),onTouchend:t[2]||(t[2]=e=>m(e))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slide-item",`turning-mode-${e.turningMode||"slideY"}`,{current:t===(0,s.SU)(a),before:t<(0,s.SU)(a),after:t>(0,s.SU)(a),hide:(t===(0,s.SU)(a)-1||t===(0,s.SU)(a)+1)&&e.turningMode!==(0,s.SU)(n).turningMode}]),key:e.id},[Math.abs((0,s.SU)(a)-t)<2?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,oe.j5)({width:d.value.width+"px",height:d.value.height+"px"})},[(0,i.Wm)(Jd,{slide:e,size:d.value.width},null,8,["slide","size"])],4)):(0,i.kq)("",!0)],2)))),128))],32),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",AT,[(0,i._)("div",{class:"back",onClick:t[3]||(t[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(o),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)(aT,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const ZT=(0,Vl.Z)($T,[["__scopeId","data-v-62f26eba"]]);var OT=ZT;const RT={class:"thumbnail-list"},zT={class:"menu"};var PT=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=(0,o.Jk)($()),{slidesLoadLimit:l}=Cm(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",RT,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-item",key:e.id},[(0,i.Wm)(Jd,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",zT,[(0,i._)("div",{class:"menu-item",onClick:o[0]||(o[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(r,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)(Zc,{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:o[1]||(o[1]=t=>e.changeMode("player"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const BT=(0,Vl.Z)(PT,[["__scopeId","data-v-53dd42dc"]]);var NT=BT;const jT={class:"mobile"};var YT=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("preview"),l=e=>t.value=e,a=(0,i.Fl)((()=>{const e={editor:FT,player:OT,preview:NT};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jT,[((0,i.wg)(),(0,i.j4)((0,i.LL)(a.value),{changeMode:l}))]))}});const VT=(0,Vl.Z)(YT,[["__scopeId","data-v-9826ff08"]]);var JT=VT,qT=(0,i.aZ)({__name:"App",setup(e){const t=K(),l=R(),a=J(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(X());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await j(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(B),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(B,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(jL,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(mC,{key:1})):((0,i.wg)(),(0,i.j4)(JT,{key:2}))}});const XT=qT;var GT=XT,KT=l(5205);(0,KT.z)("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l(9744),l(9091);const QT={class:"menu-content"},eE=["onClick"],tE={class:"text"},lE={key:0,class:"sub-text"};var aE=(0,i.aZ)({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(e,t)=>{const l=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",QT,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,a)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||a},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,oe.C_)(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:(0,n.iM)((l=>e.handleClickMenuItem(t)),["stop"])},[t.divider?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",tE,(0,oe.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",lE,(0,oe.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(l,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,eE))],64)))),128))])}}});const nE=(0,Vl.Z)(aE,[["__scopeId","data-v-77e74b43"]]);var oE=nE,iE=(0,i.aZ)({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=170,l=30,a=11,n=5,{x:o,y:i}=t.axis,s=t.menus.filter((e=>!(e.divider||e.hide))).length,r=t.menus.filter((e=>e.divider)).length,u=e,c=s*l+r*a+2*n,d=document.body.clientWidth,p=document.body.clientHeight;return{left:d<=o+u?o-u:o,top:p<=i+c?i-c:i}})),a=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:t[0]||(t[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:t[1]||(t[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,oe.j5)({left:l.value.left+"px",top:l.value.top+"px"}),onContextmenu:t[2]||(t[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)(oE,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const sE=iE;var rE=sE;const uE="CTX_CONTEXTMENU_HANDLER",cE=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const a=l.value(e);if(!a)return;let o=null;const s=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",s),window.removeEventListener("resize",s)},r={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:s};o=document.createElement("div");const u=(0,i.Wm)(rE,r,null);(0,n.sY)(u,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",s),window.addEventListener("resize",s)},dE={mounted(e,t){e[uE]=l=>cE(e,l,t),e.addEventListener("contextmenu",e[uE])},unmounted(e){e&&e[uE]&&(e.removeEventListener("contextmenu",e[uE]),delete e[uE])}};var pE=dE;const vE="CTX_CLICK_OUTSIDE_HANDLER",mE=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},hE={mounted(e,t){e[vE]=l=>mE(e,l,t),setTimeout((()=>{document.addEventListener("click",e[vE])}),0)},unmounted(e){e[vE]&&(document.removeEventListener("click",e[vE]),delete e[vE])}};var fE=hE;const gE="TOOLTIP_INSTANCE",yE={mounted(e,t){let l="",a="top",n=[300,0];"string"===typeof t.value?l=t.value:(l=t.value.content,void 0!==t.value.placement&&(a=t.value.placement),void 0!==t.value.delay&&(n=t.value.delay)),e[gE]=(0,rn.ZP)(e,{content:l,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:n})},updated(e,t){let l="";l="string"===typeof t.value?t.value:t.value.content,e[gE]&&e[gE].setContent(l)},unmounted(e){e[gE]&&e[gE].destroy()}};var wE=yE,xE={install(e){e.directive("contextmenu",pE),e.directive("click-outside",fE),e.directive("tooltip",wE)}};const kE=(0,n.ri)(GT);kE.use(Ol),kE.use(xE),kE.use((0,o.WB)()),kE.mount("#app")},2480:function(){},3180:function(){},7687:function(){}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.m=e,function(){var e=[];l.O=function(t,a,n,o){if(!a){var i=1/0;for(c=0;c<e.length;c++){a=e[c][0],n=e[c][1],o=e[c][2];for(var s=!0,r=0;r<a.length;r++)(!1&o||i>=o)&&Object.keys(l.O).every((function(e){return l.O[e](a[r])}))?a.splice(r--,1):(s=!1,o<i&&(i=o));if(s){e.splice(c--,1);var u=n();void 0!==u&&(t=u)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,n,o]}}(),function(){l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,{a:t}),t}}(),function(){l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};l.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,o,i=a[0],s=a[1],r=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(r)var c=r(l)}for(t&&t(a);u<i.length;u++)o=i[u],l.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return l.O(c)},a=self["webpackChunkpptist"]=self["webpackChunkpptist"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var a=l.O(void 0,[998],(function(){return l(8277)}));a=l.O(a)})();
//# sourceMappingURL=app.9b709042.js.map