mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
2 lines
540 KiB
JavaScript
2 lines
540 KiB
JavaScript
(function(){var e={6935: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={}));const u=[{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"}],c=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}];var d=l(5804);const p=e=>{const{empty:t}=e.state.selection;t&&(0,d.td)(e.state,e.dispatch)},m=(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}}},f=(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}}},g=e=>t=>h(t.$from,e),y=e=>t=>g((t=>f(e,t)))(t),w=(e,t)=>{const l=t.schema.nodes[e];return!!y(l)(t.selection)},x=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n?.lastChild&&(n=n.lastChild),n?.marks||[]},S=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},k=(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)},b=(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},I={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},U=(e,t={})=>{const l={...I,...t},a=x(e),n=k(a,"strong"),o=k(a,"em"),i=k(a,"underline"),s=k(a,"strikethrough"),r=k(a,"superscript"),u=k(a,"subscript"),c=k(a,"code"),d=S(a,"forecolor","color")||l.color,p=S(a,"backcolor","backcolor")||l.backcolor,m=S(a,"fontsize","fontsize")||l.fontsize,v=S(a,"fontname","fontname")||l.fontname,f=S(a,"link","href")||"",h=b(e,"align")||l.align,g=w("bullet_list",e.state),y=w("ordered_list",e.state),_=w("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:m,fontname:v,link:f,align:h,bulletList:g,orderedList:y,blockquote:_}},L=e=>{const t=x(e),l=S(t,"fontsize","fontsize")||I.fontsize;return parseInt(l)},C={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=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");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 D=l(7234),W=l(6486);const Z=[{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"}}],M={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff"},T=[{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}}"}}],H=(0,o.Q_)("slides",{state:()=>({theme:M,slides:Z,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,D.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(T).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{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}=e,a="string"===typeof t?[t]:t,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>a.includes(e.id)?{...e,...l}:e));this.slides[n].elements=i},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,W.omit)(e,a):e));this.slides[n].elements=i}}}),O=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),F=O(10),A=(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,availableFonts:u,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:C,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:F,textFormatPainter:null,showSelectPanel:!1}),getters:{activeElementList(e){const t=H(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=H(),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},setAvailableFonts(){this.availableFonts=u.filter((e=>E(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},setSelectPanelState(e){this.showSelectPanel=e}}});var P=l(2482),$=l(8134);const N="PPTIST_DISCARDED_DB",z="PPTist",R=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(N),l=t?JSON.parse(t):[],a=await $.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(z))return!1;const[a,n,o]=t.split("_");return a!==z||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)$.Z["delete"](o);localStorage.removeItem(N)};class B extends $.Z{constructor(){super(`${z}_${F}_${(new Date).getTime()}`),(0,P.Z)(this,"snapshots",void 0),(0,P.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const j=new B,q=(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=H(),t={index:e.slideIndex,slides:e.slides};await j.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=H(),t=await j.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 j.snapshots.add(a);let n=t.length-l.length+1;const o=20;n>o&&(l.push(t[0]),n--),n>=2&&j.snapshots.update(t[n-2],{index:e.slideIndex}),await j.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=H(),t=A(),l=this.snapshotCursor-1,a=await j.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=H(),t=A(),l=this.snapshotCursor+1,a=await j.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([])}}}),Y=(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}}}),V=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),J=(e,t)=>(0,W.padStart)(""+e,t,"0"),G=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);l(7986);var K,X,Q,ee,te,le,ae=l(9290),ne=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(K||(K={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(X||(X={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(Q||(Q={})),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"}(ee||(ee={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(te||(te={})),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"}(le||(le={}));const oe=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + 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 + 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"}]},{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 + D"}]}];l(4310);var ie=l(9995),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(),me=e=>{const t=ce().AES.decrypt(e,de);return t.toString(ce().enc.Utf8)},ve=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)})),fe=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),he=e=>{let t;try{t=JSON.parse(me(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)],m=[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(...m),Math.max(...m)]}},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}},Se=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}},ke=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},be=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}},Ie=e=>{const t=(0,D.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ue=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=>{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},Ce=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}})),Ee=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),De=1e3;var We,Ze;(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"})(We||(We={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(Ze||(Ze={}));const Me={[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.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`}},[We.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[We.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[We.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[We.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[We.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`}},[We.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>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`}}},Te=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},{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:We.ROUND_RECT},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:We.CUT_RECT_SINGLE},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:We.CUT_RECT_SAMESIDE},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:We.CUT_RECT_DIAGONAL},{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:We.CUT_ROUND_RECT},{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:We.ROUND_RECT_SINGLE},{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:We.ROUND_RECT_SAMESIDE},{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:We.ROUND_RECT_DIAGONAL}]},{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"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:We.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:We.PARALLELOGRAM_LEFT},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:We.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:We.TRAPEZOID},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:We.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:We.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"},{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"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z"},{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"},{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"},{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:We.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:We.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:We.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:We.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:We.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"},{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"},{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"},{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"},{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"},{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"},{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"},{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"},{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"},{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"},{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"},{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}]}],He={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var Oe=()=>{const e=q(),t=(0,W.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,W.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,W.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},Fe=()=>{const e=A(),t=H(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=Oe(),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=>{Ce(e).then((({width:t,height:l})=>{const a=l/t;a<n.value&&t>De?(t=De,l=t*a):l>De*n.value&&(l=De*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(De-t)/2,top:(De*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:He[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]]}};let l={};"horizontalBar"===e?l={horizontalBars:!0}:"area"===e?l={showArea:!0}:"scatter"===e?l={showLine:!1}:"ring"===e&&(l={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:(De-d)/2,top:(De*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)}))},m=(e,t)=>{const{left:l,top:n,width:o,height:i}=e,u={type:"shape",id:(0,r.x0)(10),left:l,top:n,width:o,height:i,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(u.special=!0),t.pathFormula){u.pathFormula=t.pathFormula,u.viewBox=[o,i];const e=Me[t.pathFormula];"editable"in e?(u.path=e.formula(o,i,e.defaultValue),u.keypoint=e.defaultValue):u.path=e.formula(o,i)}s(u)},v=(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)},f=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(De-e.w)/2,top:(De*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},h=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(De-500)/2,top:(De*n.value-300)/2,src:e})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(De-50)/2,top:(De*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:m,createLineElement:v,createLatexElement:f,createVideoElement:h,createAudioElement:g}},Ae=()=>{const e=A(),t=H(),{currentSlide:l}=(0,o.Jk)(t),{addHistorySnapshot:a}=Oe(),n=n=>{const{groupIdMap:o,elIdMap:i}=be(n),s=l.value.elements.map((e=>e.id));for(const e of n){const t=s.includes(e.id);e.id=i[e.id],t&&(e.left=e.left+10,e.top=e.top+10),e.groupId&&(e.groupId=o[e.groupId])}t.addElement(n),e.setActiveElementIdList(Object.values(i)),a()},i=e=>{const l=_e(e),n=e.map((e=>{const{groupIdMap:t,elIdMap:a}=be(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(n),a()};return{addElementsFromData:n,addSlidesFromData:i}},Pe=()=>{const{createTextElement:e}=Fe(),{addElementsFromData:t,addSlidesFromData:l}=Ae(),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=he(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=Le(s);a(e)}};return{pasteTextClipboardData:n}},$e=()=>{const e=A(),t=H(),{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))))),m=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:v}=Pe(),{addSlidesFromData:f}=Ae(),{addHistorySnapshot:h}=Oe(),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===le.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===le.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}));ve(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{fe().then((e=>{v(e,{onlySlide:!0})})).catch((e=>ie.ZP.warning(e)))},S=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),h()},k=l=>{const{groupIdMap:a,elIdMap:n}=be(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),h()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},b=(l=m.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),h()},I=()=>{const e=[...m.value];w(),b(e)},U=()=>{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:S,createSlideByTemplate:k,copyAndPasteSlide:_,deleteSlide:b,cutSlide:I,selectAllSlide:U,sortSlides:L}},Ne=()=>{const e=A(),t=H(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=Oe(),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}},ze=()=>{const e=A(),t=H(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=Oe(),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}},Re=()=>{const e=A(),t=H(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=Oe(),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}},Be=()=>{const e=A(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=Pe(),{deleteElement:n}=ze(),i=()=>{if(!t.value.length)return;const a=pe(JSON.stringify({type:"elements",data:l.value}));ve(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{fe().then((e=>{a(e)})).catch((e=>ie.ZP.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},je=()=>{const e=A(),{currentSlide:t}=(0,o.Jk)(H()),{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}},qe=()=>{const e=H(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)(A()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=Oe(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case le.LEFT:t-=i;break;case le.RIGHT:t+=i;break;case le.UP:l-=i;break;case le.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}},Ye=(l(541),()=>{const e=H(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=Oe(),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===K.UP?u=n(t.value.elements,a):o===K.DOWN?u=i(t.value.elements,a):o===K.TOP?u=s(t.value.elements,a):o===K.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const Ve=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},Je=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},Ge=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var Ke=()=>{const e=V(),t=H(),l=()=>{Ve(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),Ge()&&Je()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},Xe=()=>{const e=A(),{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}},Qe=()=>{const e=A(),t=Y(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u}=(0,o.Jk)(e),{currentSlide:c}=(0,o.Jk)(H()),{ctrlKeyState:d,shiftKeyState:p,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:v,copySlide:f,createSlide:h,deleteSlide:g,cutSlide:y,copyAndPasteSlide:w,selectAllSlide:x}=$e(),{combineElements:S,uncombineElements:k}=Re(),{deleteElement:_}=ze(),{lockElement:b}=Ne(),{copyElement:I,cutElement:U,quickCopyElement:L}=Be(),{selectAllElement:C}=je(),{moveElement:E}=qe(),{orderElement:D}=Ye(),{redo:W,undo:Z}=Oe(),{enterScreening:M,enterScreeningFromStart:T}=Ke(),{scaleCanvas:O,resetCanvas:F}=Xe(),P=()=>{l.value.length?I():u.value&&f()},$=()=>{l.value.length?U():u.value&&y()},N=()=>{l.value.length?L():u.value&&w()},z=()=>{r.value&&C(),u.value&&x()},R=()=>{r.value&&b()},B=()=>{r.value&&S()},j=()=>{r.value&&k()},q=()=>{l.value.length?_():u.value&&g()},V=e=>{l.value.length?E(e):e!==le.UP&&e!==le.DOWN||v(e)},J=e=>{e===le.PAGEUP?v(le.UP):e===le.PAGEDOWN&&v(le.DOWN)},G=e=>{n.value&&D(n.value,e)},X=()=>{u.value&&h()},Q=()=>{if(!c.value.elements.length)return;if(!s.value){const t=c.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=c.value.elements.findIndex((e=>e.id===s.value)),l=t>=c.value.elements.length-1?0:t+1,a=c.value.elements[l].id;e.setActiveElementIdList([a])},ee=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,c=n||s,m=l.key.toUpperCase();if(c&&!d.value&&t.setCtrlKeyState(!0),o&&!p.value&&t.setShiftKeyState(!0),a.value||m!==le.SPACE||t.setSpaceKeyState(!0),c&&m===le.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===le.F5)return l.preventDefault(),M(),void t.setShiftKeyState(!1);if(m===le.F5)return l.preventDefault(),void T();if(r.value||u.value){if(c&&m===le.C){if(a.value)return;l.preventDefault(),P()}if(c&&m===le.X){if(a.value)return;l.preventDefault(),$()}if(c&&m===le.D){if(a.value)return;l.preventDefault(),N()}if(c&&m===le.Z){if(a.value)return;l.preventDefault(),Z()}if(c&&m===le.Y){if(a.value)return;l.preventDefault(),W()}if(c&&m===le.A){if(a.value)return;l.preventDefault(),z()}if(c&&m===le.L){if(a.value)return;l.preventDefault(),R()}if(!o&&c&&m===le.G){if(a.value)return;l.preventDefault(),B()}if(o&&c&&m===le.G){if(a.value)return;l.preventDefault(),j()}if(i&&m===le.F){if(a.value)return;l.preventDefault(),G(K.TOP)}if(i&&m===le.B){if(a.value)return;l.preventDefault(),G(K.BOTTOM)}if(m===le.DELETE||m===le.BACKSPACE){if(a.value)return;l.preventDefault(),q()}if(m===le.UP){if(a.value)return;l.preventDefault(),V(le.UP)}if(m===le.DOWN){if(a.value)return;l.preventDefault(),V(le.DOWN)}if(m===le.LEFT){if(a.value)return;l.preventDefault(),V(le.LEFT)}if(m===le.RIGHT){if(a.value)return;l.preventDefault(),V(le.RIGHT)}if(m===le.PAGEUP){if(a.value)return;l.preventDefault(),J(le.PAGEUP)}if(m===le.PAGEDOWN){if(a.value)return;l.preventDefault(),J(le.PAGEDOWN)}if(m===le.ENTER){if(a.value)return;l.preventDefault(),X()}if(m===le.MINUS){if(a.value)return;l.preventDefault(),O("-")}if(m===le.EQUAL){if(a.value)return;l.preventDefault(),O("+")}if(m===le.DIGIT_0){if(a.value)return;l.preventDefault(),F()}if(m===le.TAB){if(a.value)return;l.preventDefault(),Q()}}},te=()=>{d.value&&t.setCtrlKeyState(!1),p.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",ee),document.addEventListener("keyup",te),window.addEventListener("blur",te)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",ee),document.removeEventListener("keyup",te),window.removeEventListener("blur",te)}))},et=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)(A()),{pasteTextClipboardData:a}=Pe(),{createImageElement:n}=Fe(),s=e=>{Ee(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)}))},tt=(l(5378),l(2616)),lt=(l(7283),l(904)),at=(l(7485),l(9165)),nt=(l(5057),l(6081)),ot=l(3162),it=l(3907),st=l(6459);const rt=["style","script","template"],ut=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],ct={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},dt=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],pt=(e,t)=>{const l=t-e.position;mt(e,l)},mt=(e,t)=>{e.position=e.position+t},vt=(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},ft=e=>{const{str:t}=e;let l=vt(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);pt(e,l),e.tokens.push({type:"text",content:a})},ht=e=>{const{str:t}=e;mt(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);pt(e,a),e.tokens.push({type:"comment",content:n})},gt=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++}pt(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},yt=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++}pt(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,W.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,W.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})}},wt=(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){ft(t);break}const o={str:l,position:t.position,tokens:[]};pt(o,e);const s=xt(o);if(n===s.toLowerCase()){if(e!==t.position){const n=t.position;pt(t,e),a.push({type:"text",content:l.slice(n,e)})}a.push(...o.tokens),pt(t,o.position);break}i=o.position}},xt=e=>{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;mt(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=gt(e);yt(e);const o=t.charAt(e.position),i="/"===o;return mt(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},St=e=>{const t=e.str,l=t.length;while(e.position<l){const l=e.position;if(ft(e),e.position===l){const a=(0,W.startsWith)(t,"!--",l+1);if(a)ht(e);else{const t=xt(e),l=t.toLowerCase();rt.includes(l)&&wt(t,e)}}}},kt=e=>{const t={str:e,position:0,tokens:[]};return St(t),t.tokens},_t=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return Ut(l),t.children},bt=(e,t)=>{const l=ct[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(l.includes(n))return!0;a--}}return!1},It=(e,t)=>{e.splice(t)},Ut=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){It(t,e);break}continue}const r=ut.includes(s);let u=r;if(u&&(u=!bt(s,t)),u){let e=t.length-1;while(e>0){if(s===t[e].tagName){It(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=[],m={type:"element",tagName:i.content,attributes:c,children:p};n.push(m);const v=!(d.close||dt.includes(s));if(v){t.push({tagName:s,children:p});const e={tokens:l,cursor:a,stack:t};Ut(e),a=e.cursor}}e.cursor=a},Lt=(e,t)=>{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},Ct=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},Et=e=>e.map((e=>{const t=Lt(e.trim(),"="),l=t[0],a="string"===typeof t[1]?Ct(t[1]):null;return{key:l,value:a}})),Dt=e=>e.map((e=>{if("element"===e.type){const t=Dt(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:Et(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),Wt=e=>{const t=kt(e),l=_t(t);return Dt(l)};var Zt=l(5851),Mt=l(7943);const Tt={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},Ht=e=>{const t=new Zt.OU(e),l=[];for(const a of t.commands){const e=Tt[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,Mt.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},Ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ft="data:image/svg+xml;base64,",At=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},Pt=e=>{let t,l,a,n,o,i,s,r="",u=0;e=At(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+Ot.charAt(n)+Ot.charAt(o)+Ot.charAt(i)+Ot.charAt(s);return r},$t=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return Ft+Pt(l)},Nt=100,zt=.75;var Rt=()=>{const e=H(),{slides:t,theme:l,viewportRatio:a}=(0,o.Jk)(e),{addSlidesFromData:n}=Ae(),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const n="png"===t?st.YM:st.hi,o=e.querySelectorAll("foreignObject [xmlns]");o.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const o={quality:l,width:1600};a&&(o.fontEmbedCSS=""),n(e,o).then((e=>{i.value=!1,(0,ot.saveAs)(e,`pptist_slides.${t}`)})).catch((()=>{i.value=!1,ie.ZP.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([pe(JSON.stringify(e))],{type:""});(0,ot.saveAs)(t,"pptist_slides.pptist")},c=(t,l=!1)=>{const a=t[0],o=new FileReader;o.addEventListener("load",(()=>{try{const t=JSON.parse(me(o.result));l?e.setSlides(t):n(t)}catch{ie.ZP.error("无法正确读取 / 解析该文件")}})),o.readAsText(a)},d=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,ot.saveAs)(e,"pptist_slides.json")},p=e=>{const t=(0,D.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},m=e=>{const t=Wt(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,W.trim)(e),(0,W.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(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*zt),s["color"]&&(t.color=p(s["color"]).color),s["background-color"]&&(t.highlight=p(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:20*zt},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:20*zt},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/Nt*t.x,y:e.y/Nt*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/Nt*t.x,y:e.y/Nt*t.y,curve:{type:"cubic",x1:e.curve.x1/Nt*t.x,y1:e.curve.y1/Nt*t.y,x2:e.curve.x2/Nt*t.x,y2:e.curve.y2/Nt*t.y}};if("quadratic"===e.curve.type)return{x:e.x/Nt*t.x,y:e.y/Nt*t.y,curve:{type:"quadratic",x1:e.curve.x1/Nt*t.x,y1:e.curve.y1/Nt*t.y}}}return{x:e.x/Nt*t.x,y:e.y/Nt*t.y}})),f=e=>{const t=p(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*zt,offset:n,angle:o}},h=e=>{const t=p(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*zt,dashType:"solid"===e.style?"solid":"dash"}},g=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},y=(e,t)=>{i.value=!0;const n=new it.Z;if(.625===a.value?n.layout="LAYOUT_16x10":.75===a.value?n.layout="LAYOUT_4x3":.70710678===a.value?(n.defineLayout({name:"A3",width:10,height:7.0710678}),n.layout="A3"):n.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=p(l.value.backgroundColor);n.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=n.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=p(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=D.Z.mix(l,a).toHexString(),o=p(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=m(t.content),a={x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt,fontSize:20*zt,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*zt,paraSpaceBefore:5*zt,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*zt),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=p(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=p(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=f(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*zt),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=g(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)/Nt),u=t.height/((s-o)/Nt);l.w=r/Nt,l.h=u/Nt,l.sizing={type:"crop",x:n/Nt*r/Nt,y:o/Nt*u/Nt,w:(i-n)/Nt*r/Nt,h:(s-o)/Nt*u/Nt}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=$t(l),n={data:a,x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=g(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(Ht(t.path),l),n=p(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt,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=f(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.link){const e=g(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=m(t.text.content),a={x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt,fontSize:20*zt,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*zt,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=p(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ue(t),a=v(Ht(l)),{minX:n,maxX:o,minY:i,maxY:s}=xe(t),r=p(t.color),u={x:t.left/Nt,y:t.top/Nt,w:(o-n)/Nt,h:(s-i)/Nt,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*zt,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=f(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=>p(e).color));else if(1===t.themeColor.length)a=(0,D.Z)(t.themeColor[0]).analogous(10).map((e=>p(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,D.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>p(e).color))}const o={x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(o.plotArea={fill:{color:p(t.fill).color}}),t.legend&&(o.showLegend=!0,o.legendPos="top"===t.legend?"t":"b",o.legendColor=p(t.gridColor||"#000000").color,o.legendFontSize=14*zt);let i=n.ChartType.bar;"bar"===t.chartType?(i=n.ChartType.bar,o.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?i=n.ChartType.area:!1===t.options?.showLine?(i=n.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),o.lineSize=0):i=n.ChartType.line,t.options?.lineSmooth&&(o.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(i=n.ChartType.doughnut,o.holeSize=75):i=n.ChartType.pie),e.addChart(i,l,o)}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=p(n.color),i=Ie(n.color).map((e=>p(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)*zt};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=p(u.style.backcolor);c.fill={color:e.color,transparency:100*(1-e.alpha)}}u.style?.color&&(c.color=p(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/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt,colW:t.colWidths.map((e=>t.width*e/Nt))};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*zt,color:p(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=$t(l),n={data:a,x:t.left/Nt,y:t.top/Nt,w:t.width/Nt,h:t.height/Nt};if(t.link){const e=g(t.link);e&&(n.hyperlink=e)}e.addImage(n)}}setTimeout((()=>{n.writeFile({fileName:"pptist.pptx"}).then((()=>i.value=!1)).catch((()=>{i.value=!1,ie.ZP.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:d,importSpecificFile:c,exportSpecificFile:u,exportPPTX:y}};const Bt={class:"hotkey-doc"},jt={class:"title"},qt={class:"label"},Yt={class:"value"};var Vt=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Bt,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(oe),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",jt,(0,ne.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",qt,(0,ne.zw)(e.label),1),(0,i._)("div",Yt,(0,ne.zw)(e.value),1)])))),128))],64)))),128))]))}}),Jt=l(3744);const Gt=(0,Jt.Z)(Vt,[["__scopeId","data-v-4b1afc5f"]]);var Kt=Gt;const Xt=["accept"];var Qt=(0,i.aZ)({__name:"FileInput",props:{accept:{type:String,default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=(0,s.iH)(),a=()=>{l.value&&(l.value.value="",l.value.click())},n=e=>{const l=e.target.files;l&&t("change",l)};return(t,o)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:o[1]||(o[1]=e=>a())},[(0,i.WI)(t.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:l,accept:e.accept,onChange:o[0]||(o[0]=e=>n(e))},null,40,Xt)]))}});const el=(0,Jt.Z)(Qt,[["__scopeId","data-v-cdb026e2"]]);var tl=el;const ll=e=>((0,i.dD)("data-v-76222f8e"),e=e(),(0,i.Cn)(),e),al={class:"editor-header"},nl={class:"left"},ol={class:"menu-item"},il=ll((()=>(0,i._)("span",{class:"text"},"文件",-1))),sl={class:"menu-item"},rl=ll((()=>(0,i._)("span",{class:"text"},"编辑",-1))),ul={class:"menu-item"},cl=ll((()=>(0,i._)("span",{class:"text"},"演示",-1))),dl={class:"menu-item"},pl=ll((()=>(0,i._)("span",{class:"text"},"帮助",-1))),ml={class:"right"},vl={href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},fl={class:"menu-item"};var hl=(0,i.aZ)({__name:"index",setup(e){const t=nt.ZP.Item,l=A(),{gridLineSize:a,showRuler:n,showSelectPanel:r}=(0,o.Jk)(l),{enterScreening:u,enterScreeningFromStart:c}=Ke(),{createSlide:d,deleteSlide:p,resetSlides:m}=$e(),{redo:v,undo:f}=Oe(),{importSpecificFile:h}=Rt(),g=l.setDialogForExport,y=()=>{l.setGridLineSize(a.value?0:50)},w=()=>{l.setRulerState(!n.value)},x=()=>{r.value?l.setSelectPanelState(!1):l.setSelectPanelState(!0)},S=(0,s.iH)(!1),k=e=>window.open(e);return(e,l)=>{const o=(0,i.up)("IconFolderClose"),_=(0,i.up)("IconEdit"),b=(0,i.up)("IconPpt"),I=(0,i.up)("IconHelpcenter"),U=(0,i.up)("IconShare"),L=(0,i.up)("IconGithub");return(0,i.wg)(),(0,i.iD)("div",al,[(0,i._)("div",nl,[(0,i.Wm)((0,s.SU)(at.ZP),{trigger:["click"]},{overlay:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(nt.ZP),null,{default:(0,i.w5)((()=>[(0,i.Wm)(tl,{accept:".pptist",onChange:l[0]||(l[0]=e=>(0,s.SU)(h)(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[1]||(l[1]=e=>(0,s.SU)(g)("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1})])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",ol,[(0,i.Wm)(o),(0,i.Uk)(),il])])),_:1}),(0,i.Wm)((0,s.SU)(at.ZP),{trigger:["click"]},{overlay:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(nt.ZP),null,{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{onClick:l[2]||(l[2]=e=>(0,s.SU)(f)())},{default:(0,i.w5)((()=>[(0,i.Uk)("撤销")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[3]||(l[3]=e=>(0,s.SU)(v)())},{default:(0,i.w5)((()=>[(0,i.Uk)("重做")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[4]||(l[4]=e=>(0,s.SU)(d)())},{default:(0,i.w5)((()=>[(0,i.Uk)("添加页面")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[5]||(l[5]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("删除页面")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[6]||(l[6]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)((0,s.SU)(a)?"关闭网格线":"打开网格线"),1)])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[7]||(l[7]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)((0,s.SU)(n)?"关闭标尺":"打开标尺"),1)])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[8]||(l[8]=e=>(0,s.SU)(m)())},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[9]||(l[9]=e=>x())},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)((0,s.SU)(r)?"关闭选择面板":"打开选择面板"),1)])),_:1})])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",sl,[(0,i.Wm)(_),(0,i.Uk)(),rl])])),_:1}),(0,i.Wm)((0,s.SU)(at.ZP),{trigger:["click"]},{overlay:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(nt.ZP),null,{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{onClick:l[10]||(l[10]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[11]||(l[11]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",ul,[(0,i.Wm)(b),(0,i.Uk)(),cl])])),_:1}),(0,i.Wm)((0,s.SU)(at.ZP),{trigger:["click"]},{overlay:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(nt.ZP),null,{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{onClick:l[12]||(l[12]=e=>k("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[13]||(l[13]=e=>k("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)((0,s.SU)(t),{onClick:l[14]||(l[14]=e=>S.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",dl,[(0,i.Wm)(I),(0,i.Uk)(),pl])])),_:1})]),(0,i._)("div",ml,[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,title:"导出"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"menu-item",onClick:l[15]||(l[15]=e=>(0,s.SU)(g)("pptx"))},[(0,i.Wm)(U,{size:"18",fill:"#666"})])])),_:1}),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,title:"幻灯片放映"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"menu-item",onClick:l[16]||(l[16]=e=>(0,s.SU)(u)())},[(0,i.Wm)(b,{size:"19",fill:"#666",style:{"margin-top":"1px"}})])])),_:1}),(0,i._)("a",vl,[(0,i._)("div",fl,[(0,i.Wm)(L,{size:"18",fill:"#666"})])])]),(0,i.Wm)((0,s.SU)(tt.Z),{width:"320",placement:"right",closable:!1,visible:S.value,onClose:l[17]||(l[17]=e=>S.value=!1)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kt)])),_:1},8,["visible"])])}}});const gl=(0,Jt.Z)(hl,[["__scopeId","data-v-76222f8e"]]);var yl=gl;const wl=Symbol(),xl=Symbol(),Sl=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var kl=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=A(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)(H()),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/De),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(De*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/De):a.setCanvasScale(d/(De*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:De,height:De*u.value,left:t.value,top:l.value}))),m=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&m.observe(e.value)})),(0,i.Ah)((()=>{e.value&&m.unobserve(e.value)}));const v=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:v}},_l=(e,t)=>{const l=A(),{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,m=o.pageY,v=(p-c.x)/a.value,f=(m-c.y)/a.value;u.value={top:f,left:v,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-m)/a.value,c=Math.abs(n),v=Math.abs(o);if(c<d||v<d)return;let f=0;n>0&&o>0?f=4:n<0&&o<0?f=1:n>0&&o<0?f=2:n<0&&o>0&&(f=3),u.value={...u.value,width:c,height:v},i.value=!0,r.value=f},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:m,maxY:v}=xe(a);let f=!1;4===r.value?f=d>o&&p<o+s&&m>i&&v<i+c:1===r.value?f=d>o-s&&p<o-s+s&&m>i-c&&v<i-c+c:2===r.value?f=d>o&&p<o+s&&m>i-c&&v<i-c+c:3===r.value&&(f=d>o-s&&p<o-s+s&&m>i&&v<i+c),!f||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}},bl=e=>{const{disableHotkeys:t}=(0,o.Jk)(A()),{createImageElement:l,createTextElement:a}=Fe(),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&&Ee(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=Le(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 Il=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var Ul=(e,t)=>{const l=H(),{canvasScale:a}=(0,o.Jk)(A()),{addHistorySnapshot:n}=Oe(),i=o=>{let i=!0,s=0;const r=o.rotate||0,u=o.left,c=o.top,d=o.width,p=o.height,m=u+d/2,v=c+p/2;if(!t.value)return;const f=t.value.getBoundingClientRect();document.onmousemove=t=>{if(!i)return;const l=(t.pageX-f.left)/a.value,n=(t.pageY-f.top)/a.value,r=l-m,u=v-n;s=Il(r,u);const c=5;Math.abs(s)<=c?s=0:s>0&&Math.abs(s-45)<=c?s-=s-45:s<0&&Math.abs(s+45)<=c?s-=s+45:s>0&&Math.abs(s-90)<=c?s-=s-90:s<0&&Math.abs(s+90)<=c?s-=s+90:s>0&&Math.abs(s-135)<=c?s-=s-135:s<0&&Math.abs(s+135)<=c?s-=s+135:s>0&&Math.abs(s-180)<=c?s-=s-180:s<0&&Math.abs(s+180)<=c&&(s-=s+180),e.value=e.value.map((e=>o.id===e.id?{...e,rotate:s}:e))},document.onmouseup=()=>{i=!1,document.onmousemove=null,document.onmouseup=null,r!==s&&(l.updateSlide({elements:e.value}),n())}};return{rotateElement:i}};const Ll={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Cl={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},El=(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,m=o/2,v=l+p,f=a+m,h={left:v+i*Math.cos(r),top:f-i*Math.sin(r)},g={left:v+m*Math.cos(c),top:f-m*Math.sin(c)},y={left:v+i*Math.cos(u),top:f-i*Math.sin(u)},w={left:v+p*Math.cos(d),top:f+p*Math.sin(d)},x={left:v-i*Math.cos(r),top:f+i*Math.sin(r)},S={left:v-m*Math.sin(d),top:f+m*Math.cos(d)},k={left:v-i*Math.cos(u),top:f+i*Math.sin(u)},_={left:v-p*Math.cos(d),top:f-p*Math.sin(d)};return{leftTopPoint:h,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:S,leftBottomPoint:k,leftPoint:_}},Dl=(e,t)=>{const l={[ee.RIGHT_BOTTOM]:t.leftTopPoint,[ee.LEFT_BOTTOM]:t.rightTopPoint,[ee.LEFT_TOP]:t.rightBottomPoint,[ee.RIGHT_TOP]:t.leftBottomPoint,[ee.TOP]:t.bottomPoint,[ee.BOTTOM]:t.topPoint,[ee.LEFT]:t.rightPoint,[ee.RIGHT]:t.leftPoint};return l[e]};var Wl,Zl,Ml=(e,t,l)=>{const a=A(),n=H(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(Y()),{addHistorySnapshot:c}=Oe(),d=(o,d,p)=>{const m=!(o instanceof MouseEvent);if(m&&(!o.changedTouches||!o.changedTouches[0]))return;let v=!0;a.setScalingState(!0);const f=d.left,h=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,S=Math.PI*x/180,k=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,b=m?o.changedTouches[0].pageX:o.pageX,I=m?o.changedTouches[0].pageY:o.pageY,U=Cl[d.type]||20,L=e=>e<U?U:e;let C,E=0,D=0,W=[],Z=[];if("rotate"in d&&d.rotate){const{left:e,top:t,width:l,height:a}=d;C=El({left:e,top:t,width:l,height:a},x);const n=Dl(p,C);E=n.left,D=n.top}else{const t=De,l=De*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]},m={value:o,range:[t,r]};W.push(u,c),Z.push(p,m)}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]},m={value:t/2,range:[0,l]};W.push(n,o,u),Z.push(c,p,m),W=ke(W),Z=ke(Z)}const M=(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<Z.length;t++){const{value:i,range:r}=Z[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},T=t=>{if(!v)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-b,i=n-I;let s=g,r=y,u=f,c=h;if(x){const e=(Math.cos(S)*o+Math.sin(S)*i)/l.value;let t=(Math.cos(S)*i-Math.sin(S)*o)/l.value;k&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM?(s=L(g+e),r=L(y+t)):p===ee.LEFT_BOTTOM?(s=L(g-e),r=L(y+t),u=f-(s-g)):p===ee.LEFT_TOP?(s=L(g-e),r=L(y-t),u=f-(s-g),c=h-(r-y)):p===ee.RIGHT_TOP?(s=L(g+e),r=L(y-t),c=h-(r-y)):p===ee.TOP?(r=L(y-t),c=h-(r-y)):p===ee.BOTTOM?r=L(y+t):p===ee.LEFT?(s=L(g-e),u=f-(s-g)):p===ee.RIGHT&&(s=L(g+e));const a=El({width:s,height:r,left:u,top:c},x),n=Dl(p,a),d=n.left,m=n.top,v=d-E,w=m-D;u-=v,c-=w}else{let e=o/l.value,t=i/l.value;if(k&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=M(f+g+e,h+y+t);e-=l,t-=a,k&&(a?e=t*_:t=e/_),s=L(g+e),r=L(y+t)}else if(p===ee.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=M(f+e,h+y+t);e-=l,t-=a,k&&(a?e=-t*_:t=-e/_),s=L(g-e),r=L(y+t),u=f-(s-g)}else if(p===ee.LEFT_TOP){const{offsetX:l,offsetY:a}=M(f+e,h+t);e-=l,t-=a,k&&(a?e=t*_:t=e/_),s=L(g-e),r=L(y-t),u=f-(s-g),c=h-(r-y)}else if(p===ee.RIGHT_TOP){const{offsetX:l,offsetY:a}=M(f+g+e,h+t);e-=l,t-=a,k&&(a?e=-t*_:t=-e/_),s=L(g+e),r=L(y-t),c=h-(r-y)}else if(p===ee.LEFT){const{offsetX:t}=M(f+e,null);e-=t,s=L(g-e),u=f-(s-g)}else if(p===ee.RIGHT){const{offsetX:t}=M(f+g+e,null);e-=t,s=L(g+e)}else if(p===ee.TOP){const{offsetY:e}=M(null,h+t);t-=e,r=L(y-t),c=h-(r-y)}else if(p===ee.BOTTOM){const{offsetY:e}=M(null,h+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=Me[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}}))},H=l=>{v=!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;b===o&&I===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};m?(document.ontouchmove=T,document.ontouchend=H):(document.onmousemove=T,document.onmouseup=H)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:m}=a,v=d-r,f=m-p,h=v/f,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!==ee.RIGHT_BOTTOM&&o!==ee.LEFT_TOP||(x=c/h),o!==ee.LEFT_BOTTOM&&o!==ee.RIGHT_TOP||(x=-c/h));let S=r,k=d,_=p,b=m;o===ee.RIGHT_BOTTOM?(k=d+c,b=m+x):o===ee.LEFT_BOTTOM?(S=r+c,b=m+x):o===ee.LEFT_TOP?(S=r+c,_=p+x):o===ee.RIGHT_TOP?(k=d+c,_=p+x):o===ee.TOP?_=p+x:o===ee.BOTTOM?b=m+x:o===ee.LEFT?S=r+c:o===ee.RIGHT&&(k=d+c);const I=k-S,U=b-_;let L=I/v,C=U/f;L<=0&&(L=0),C<=0&&(C=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*C,left:S+(t.left-r)*L,top:_+(t.top-p)*C}}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}},Tl=(e,t)=>{const l=A(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(Y()),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,W.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},Hl=(e,t,l)=>{const a=H(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)(A()),{shiftKeyState:s}=(0,o.Jk)(Y()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=Oe(),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 m=De,v=De*r.value,f=5,h=JSON.parse(JSON.stringify(e.value)),g=h.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,S="height"in c&&c.height?c.height:0,k="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,b=d?o.changedTouches[0].pageY:o.pageY;let I=null;const U=c.id===i.value;let L=[],C=[];for(const t of e.value){if("line"===t.type)continue;if(U&&t.id===c.id)continue;if(!U&&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]},m={value:r,range:[e,i]},v={value:e,range:[l,s]},f={value:i,range:[l,s]},h={value:u,range:[l,s]};L.push(d,p,m),C.push(v,f,h)}const E={value:0,range:[0,m]},D={value:v,range:[0,m]},W={value:v/2,range:[0,m]},Z={value:0,range:[0,v]},M={value:m,range:[0,v]},T={value:m/2,range:[0,v]};L.push(E,D,W),C.push(Z,M,T),L=ke(L),C=ke(C);const H=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==I&&(I=Math.abs(_-o)<f&&Math.abs(b-i)<f),!p||I)return;let r=(o-_)/l.value,u=(i-b)/l.value;s.value&&(Math.abs(r)>Math.abs(u)&&(u=0),Math.abs(r)<Math.abs(u)&&(r=0));let d,m,v,h,E=y+r,D=w+u;if(1===n.value.length||U)if(k){const{xRange:e,yRange:t}=ye({left:E,top:D,width:x,height:S,rotate:k});d=e[0],m=e[1],v=t[0],h=t[1]}else"line"===c.type?(d=E,m=E+Math.max(c.start[0],c.end[0]),v=D,h=D+Math.max(c.start[1],c.end[1])):(d=E,m=E+x,v=D,h=D+S);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),m=Math.max(...l),v=Math.min(...t),h=Math.max(...a)}const W=d+(m-d)/2,Z=v+(h-v)/2,M=[];let T=!1,H=!1;for(let e=0;e<L.length;e++){const{value:t,range:l}=L[e],a=Math.min(...l,d,m),n=Math.max(...l,d,m);Math.abs(v-t)<f&&!H&&(D-=v-t,H=!0,M.push({type:"horizontal",axis:{x:a-50,y:t},length:n-a+100})),Math.abs(h-t)<f&&!H&&(D-=h-t,H=!0,M.push({type:"horizontal",axis:{x:a-50,y:t},length:n-a+100})),Math.abs(Z-t)<f&&!H&&(D-=Z-t,H=!0,M.push({type:"horizontal",axis:{x:a-50,y:t},length:n-a+100}))}for(let e=0;e<C.length;e++){const{value:t,range:l}=C[e],a=Math.min(...l,v,h),n=Math.max(...l,v,h);Math.abs(d-t)<f&&!T&&(E-=d-t,T=!0,M.push({type:"vertical",axis:{x:t,y:a-50},length:n-a+100})),Math.abs(m-t)<f&&!T&&(E-=m-t,T=!0,M.push({type:"vertical",axis:{x:t,y:a-50},length:n-a+100})),Math.abs(W-t)<f&&!T&&(E-=W-t,T=!0,M.push({type:"vertical",axis:{x:t,y:a-50},length:n-a+100}))}if(t.value=M,1===n.value.length||U)e.value=e.value.map((e=>e.id===c.id?{...e,left:E,top:D}: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:D}:{...e,left:e.left+(E-t.left),top:e.top+(D-t.top)}:e))}},O=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&&b===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=H,document.ontouchend=O):(document.onmousemove=H,document.onmouseup=O)};return{dragElement:c}},Ol=e=>{const t=H(),{canvasScale:l}=(0,o.Jk)(A()),{addHistorySnapshot:a}=Oe(),n=(n,o,i)=>{let s=!0;const r=8,u=n.pageX,c=n.pageY,d=[];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,p={x:c,y:n},m={x:c,y:r},v={x:a,y:u},f={x:s,y:u},h={x:a,y:n},g={x:s,y:n},y={x:a,y:r},w={x:s,y:r};d.push(p,m,v,f,h,g,y,w)}document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,p=(a-u)/l.value,m=(n-c)/l.value;let v=o.left+o.start[0],f=o.top+o.start[1],h=o.left+o.end[0],g=o.top+o.end[1];const y=o.broken||o.curve||[0,0];let w=o.left+y[0],x=o.top+y[1];const[S,k]=o.cubic||[[0,0],[0,0]];let _=o.left+S[0],b=o.top+S[1],I=o.left+k[0],U=o.top+k[1];if(i===te.START){v+=p,f+=m,Math.abs(v-h)<r&&(v=h),Math.abs(f-g)<r&&(f=g);for(const e of d){const{x:t,y:l}=e;if(Math.abs(t-v)<r&&Math.abs(l-f)<r){v=t,f=l;break}}}else if(i===te.END){h+=p,g+=m,Math.abs(v-h)<r&&(h=v),Math.abs(f-g)<r&&(g=f);for(const e of d){const{x:t,y:l}=e;if(Math.abs(t-h)<r&&Math.abs(l-g)<r){h=t,g=l;break}}}else i===te.C?(w+=p,x+=m,Math.abs(w-v)<r&&(w=v),Math.abs(x-f)<r&&(x=f),Math.abs(w-h)<r&&(w=h),Math.abs(x-g)<r&&(x=g),Math.abs(w-(v+h)/2)<r&&Math.abs(x-(f+g)/2)<r&&(w=(v+h)/2,x=(f+g)/2)):i===te.C1?(_+=p,b+=m,Math.abs(_-v)<r&&(_=v),Math.abs(b-f)<r&&(b=f),Math.abs(_-h)<r&&(_=h),Math.abs(b-g)<r&&(b=g)):i===te.C2&&(I+=p,U+=m,Math.abs(I-v)<r&&(I=v),Math.abs(U-f)<r&&(U=f),Math.abs(I-h)<r&&(I=h),Math.abs(U-g)<r&&(U=g));const L=Math.min(v,h),C=Math.min(f,g),E=Math.max(v,h),D=Math.max(f,g),W=[0,0],Z=[E-L,D-C];v>h&&(W[0]=E-L,Z[0]=0),f>g&&(W[1]=D-C,Z[1]=0),e.value=e.value.map((e=>{if(e.id===o.id){const t={...e,left:L,top:C,start:W,end:Z};return i===te.START||i===te.END?(o.broken&&(t.broken=[(W[0]+Z[0])/2,(W[1]+Z[1])/2]),o.curve&&(t.curve=[(W[0]+Z[0])/2,(W[1]+Z[1])/2]),o.cubic&&(t.cubic=[[(W[0]+Z[0])/2,(W[1]+Z[1])/2],[(W[0]+Z[0])/2,(W[1]+Z[1])/2]])):i===te.C?(o.broken&&(t.broken=[w-L,x-C]),o.curve&&(t.curve=[w-L,x-C])):o.cubic&&(t.cubic=[[_-L,b-C],[I-L,U-C]]),t}return e}))},document.onmouseup=l=>{s=!1,document.onmousemove=null,document.onmouseup=null;const n=l.pageX,o=l.pageY;u===n&&c===o||(t.updateSlide({elements:e.value}),a())}};return{dragLineElement:n}},Fl=(e,t)=>{const l=H(),{addHistorySnapshot:a}=Oe(),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=Me[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}))},m=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=m):(document.onmousemove=p,document.onmouseup=m)};return{moveShapeKeypoint:n}},Al=e=>{const t=A(),{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),m=Math.max(s,u),v=(c-o.x)/l.value,f=(p-o.y)/l.value,h=(d-c)/l.value,g=(m-p)/l.value;return{left:v,top:f,width:h,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),m=Math.max(s,u),v=(c-o.x)/l.value,f=(p-o.y)/l.value,h=(d-c)/l.value,g=(m-p)/l.value,y=[i===c?0:h,s===p?0:g],w=[r===c?0:h,u===p?0:g];return{left:v,top:f,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=Fe(),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{insertElementFromCreateSelection:c}},Pl=()=>{const e=H(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(A()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=Oe(),s=o=>{const s=De,r=De*n.value,{minX:u,maxX:c,minY:d,maxY:p}=Se(l.value),m=JSON.parse(JSON.stringify(a.value.elements));for(const e of m)if(t.value.includes(e.id)){if(o===X.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===X.TOP){const t=d-0;e.top=e.top-t}else if(o===X.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===X.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===X.LEFT){const t=u-0;e.left=e.left-t}else if(o===X.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===X.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:m}),i()};return{alignElementToCanvas:s}},$l=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}},Nl=(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"})(Wl||(Wl={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(Zl||(Zl={}));const zl={rect:{name:"矩形",type:Wl.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:Wl.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:Wl.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:Wl.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:Wl.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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:Wl.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 Rl=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return zl.rect;const t=e.value.shape||Wl.RECT;return zl[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}},Bl=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";for(const l of Object.keys(e.value))t+=`${l}(${e.value[l]}) `;return t}));return{filter:t}},jl=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"));return{outlineWidth:t,outlineStyle:l,outlineColor:a}};const ql=["width","height"],Yl=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var Vl=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineStyle:a,outlineColor:n}=jl((0,s.Vh)(t,"outline"));return(t,o)=>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)(n),"stroke-width":(0,s.SU)(l),"stroke-dasharray":"dashed"===(0,s.SU)(a)?"10 6":"0 0"},null,8,Yl)],8,ql)):(0,i.kq)("",!0)}});const Jl=(0,Jt.Z)(Vl,[["__scopeId","data-v-b5bace06"]]);var Gl=Jl;const Kl=["width","height"],Xl=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var Ql=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:l,outlineStyle:a,outlineColor:n}=jl((0,s.Vh)(t,"outline"));return(t,o)=>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)(n),"stroke-width":(0,s.SU)(l),"stroke-dasharray":"dashed"===(0,s.SU)(a)?"10 6":"0 0"},null,8,Xl)],8,Kl)):(0,i.kq)("",!0)}});const ea=(0,Jt.Z)(Ql,[["__scopeId","data-v-71b17928"]]);var ta=ea;const la=["width","height"],aa=["d","stroke","stroke-width","stroke-dasharray"];var na=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},createPath:{type:Function,required:!0}},setup(e){const t=e,{outlineWidth:l,outlineStyle:a,outlineColor:n}=jl((0,s.Vh)(t,"outline"));return(t,o)=>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)(n),"stroke-width":(0,s.SU)(l),"stroke-dasharray":"dashed"===(0,s.SU)(a)?"10 6":"0 0"},null,8,aa)],8,la)):(0,i.kq)("",!0)}});const oa=(0,Jt.Z)(na,[["__scopeId","data-v-41071294"]]);var ia=oa;const sa={class:"image-outline"};var ra=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Rl(l);return(t,l)=>((0,i.wg)(),(0,i.iD)("div",sa,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(Gl,{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)(ta,{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)(ia,{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 ua=ra;var ca=ua;const da=e=>((0,i.dD)("data-v-3e0199ec"),e=e(),(0,i.Cn)(),e),pa=["src"],ma=["src"],va=["onMousedown"],fa=da((()=>(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))),ha=[fa],ga=["onMousedown"],ya=da((()=>(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))),wa=[ya];var xa=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{type:String,required:!0},clipData:{type:Object},clipPath:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},top:{type:Number,required:!0},left:{type:Number,required:!0},rotate:{type:Number,required:!0}},emits:["clip"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)(A()),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(Y()),u=(0,s.iH)({top:"0",left:"0"}),c=(0,s.iH)(!1),d=(0,s.iH)(null),p=()=>{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}=p();return{left:-l,top:-a,width:100/e,height:100/t}})),v=(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}),h=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=f.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),g=(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+"%"}})),y=()=>{const{left:e,top:t}=p();f.value={left:e,top:t,width:100,height:100},u.value={top:-t+"%",left:-e+"%"}},w=()=>{if(c.value)return;if(!d.value)return void t("clip",null);const{left:e,top:a}=p(),n={left:(f.value.left-e)/100*l.width,top:(f.value.top-a)/100*l.height,width:(f.value.width-100)/100*l.width,height:(f.value.height-100)/100*l.height},o={range:d.value,position:n};t("clip",o)},x=e=>{const t=e.key.toUpperCase();t===le.ENTER&&w()};(0,i.bv)((()=>{y(),document.addEventListener("keydown",x)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",x)}));const S=()=>{const e={left:parseInt(g.value.left),top:parseInt(g.value.top),width:parseInt(g.value.width),height:parseInt(g.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]];d.value=[a,n]},k=e=>{c.value=!0;let t=!0;const n=e.pageX,o=e.pageY,i=m.value,s={...f.value};document.onmousemove=e=>{if(!t)return;const r=e.pageX,u=e.pageY;let c=(r-n)/a.value/l.width*100,d=(u-o)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-o)/a.value/l.width*100,d=-(r-n)/a.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-o)/a.value/l.width*100,d=(r-n)/a.value/l.height*100);let p=s.left+c,m=s.top+d;p<0?p=0:p+s.width>i.width&&(p=i.width-s.width),m<0?m=0:m+s.height>i.height&&(m=i.height-s.height),f.value={...f.value,left:p,top:m}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,S(),setTimeout((()=>{c.value=!1}),0)}},_=(e,t)=>{c.value=!0;let n=!0;const o=50/l.width*100,i=50/l.height*100,s=e.pageX,u=e.pageY,d=m.value,p={...f.value},v=f.value.width/f.value.height;document.onmousemove=e=>{if(!n)return;const c=e.pageX,m=e.pageY;let h,g,y,w,x=(c-s)/a.value/l.width*100,S=(m-u)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(m-u)/a.value/l.width*100,S=-(c-s)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,S=-S),l.rotate>-135&&l.rotate<-45&&(x=-(m-u)/a.value/l.width*100,S=(c-s)/a.value/l.height*100),r.value&&(t!==ee.RIGHT_BOTTOM&&t!==ee.LEFT_TOP||(S=x/v),t!==ee.LEFT_BOTTOM&&t!==ee.RIGHT_TOP||(S=-x/v)),t===ee.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+S<0&&(S=-p.top),p.width-x<o&&(x=p.width-o),p.height-S<i&&(S=p.height-i),y=p.width-x,w=p.height-S,h=p.left+x,g=p.top+S):t===ee.RIGHT_TOP?(p.left+p.width+x>d.width&&(x=d.width-(p.left+p.width)),p.top+S<0&&(S=-p.top),p.width+x<o&&(x=o-p.width),p.height-S<i&&(S=p.height-i),y=p.width+x,w=p.height-S,h=p.left,g=p.top+S):t===ee.LEFT_BOTTOM?(p.left+x<0&&(x=-p.left),p.top+p.height+S>d.height&&(S=d.height-(p.top+p.height)),p.width-x<o&&(x=p.width-o),p.height+S<i&&(S=i-p.height),y=p.width-x,w=p.height+S,h=p.left+x,g=p.top):t===ee.RIGHT_BOTTOM?(p.left+p.width+x>d.width&&(x=d.width-(p.left+p.width)),p.top+p.height+S>d.height&&(S=d.height-(p.top+p.height)),p.width+x<o&&(x=o-p.width),p.height+S<i&&(S=i-p.height),y=p.width+x,w=p.height+S,h=p.left,g=p.top):t===ee.TOP?(p.top+S<0&&(S=-p.top),p.height-S<i&&(S=p.height-i),y=p.width,w=p.height-S,h=p.left,g=p.top+S):t===ee.BOTTOM?(p.top+p.height+S>d.height&&(S=d.height-(p.top+p.height)),p.height+S<i&&(S=i-p.height),y=p.width,w=p.height+S,h=p.left,g=p.top):t===ee.LEFT?(p.left+x<0&&(x=-p.left),p.width-x<o&&(x=p.width-o),y=p.width-x,w=p.height,h=p.left+x,g=p.top):(p.left+p.width+x>d.width&&(x=d.width-(p.left+p.width)),p.width+x<o&&(x=o-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=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,S(),setTimeout((()=>c.value=!1),0)}},b=(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})),I=[ee.LEFT_TOP,ee.RIGHT_TOP,ee.LEFT_BOTTOM,ee.RIGHT_BOTTOM],U=[ee.TOP,ee.BOTTOM,ee.LEFT,ee.RIGHT];return(t,l)=>{const a=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,ne.j5)(u.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,ne.j5)((0,s.SU)(v))},null,12,pa),(0,i._)("div",{class:"top-image-content",style:(0,ne.j5)({...(0,s.SU)(h),clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,ne.j5)((0,s.SU)(g))},null,12,ma)],4),(0,i._)("div",{class:"operate",style:(0,ne.j5)((0,s.SU)(h)),onMousedown:l[0]||(l[0]=(0,n.iM)((e=>k(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(I,(e=>(0,i._)("div",{class:(0,ne.C_)(["clip-point",e,(0,s.SU)(b)]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},ha,42,va))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(U,(e=>(0,i._)("div",{class:(0,ne.C_)(["clip-point",e,(0,s.SU)(b)]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},wa,42,ga))),64))],36)],4)),[[a,w]])}}});const Sa=(0,Jt.Z)(xa,[["__scopeId","data-v-3e0199ec"]]);var ka=Sa;const _a=["src"];var ba=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=A(),a=H(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=Oe(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=$l(d),m=(0,i.Fl)((()=>t.elementInfo.flipH)),v=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:f}=Nl(m,v),h=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Rl(h),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=Bl(w),S=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},k=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,m=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,m=-(o-l)}const v={clip:{...i,range:n},left:s+p,top:r+m,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:v}),c()};return(t,l)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,s.SU)(u)?((0,i.wg)(),(0,i.j4)(ka,{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:l[0]||(l[0]=e=>k(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,ne.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(f)}),onMousedown:l[2]||(l[2]=e=>S(e)),onTouchstart:l[3]||(l[3]=e=>S(e))},[(0,i.Wm)(ca,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ne.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ne.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:l[1]||(l[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,_a),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ne.j5)({backgroundColor:e.elementInfo.colorMask.color,opacity:e.elementInfo.colorMask.opacity})},null,4)):(0,i.kq)("",!0)],4)],36)),[[a,e.contextmenus]])],4)],6)}}});const Ia=(0,Jt.Z)(ba,[["__scopeId","data-v-963e3dfc"]]);var Ua=Ia;const La=["width","height"],Ca=["d","stroke","stroke-width","stroke-dasharray"];var Ea=(0,i.aZ)({__name:"ElementOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:l,outlineStyle:a,outlineColor:n}=jl((0,s.Vh)(t,"outline"));return(t,o)=>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)(n),"stroke-width":(0,s.SU)(l),"stroke-dasharray":"dashed"===(0,s.SU)(a)?"10 6":"0 0"},null,8,Ca)],8,La)):(0,i.kq)("",!0)}});const Da=(0,Jt.Z)(Ea,[["__scopeId","data-v-61b7d06a"]]);var Wa=Da,Za=l(2376),Ma=l(4348),Ta=l(2806),Ha=l(3225),Oa=l(5951),Fa=l(4251),Aa=l(915),Pa=l(3833),$a=l(6912);const Na=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",d.MI),l("Alt-ArrowDown",d.Ig),l("Ctrl-z",Oa.Yw),l("Ctrl-y",Oa.KX),l("Backspace",$a.dU),l("Escape",d.N0),l("Ctrl-b",(0,d.w9)(e.marks.strong)),l("Ctrl-i",(0,d.w9)(e.marks.em)),l("Ctrl-u",(0,d.w9)(e.marks.underline)),l("Ctrl-d",(0,d.w9)(e.marks.strikethrough)),l("Enter",(0,d.QF)((0,Pa.s6)(e.nodes.list_item),d.QK,d.mD,d.X0,d.$j)),l("Mod-[",(0,Pa.IB)(e.nodes.list_item)),l("Mod-]",(0,Pa.bw)(e.nodes.list_item)),t},za=e=>(0,$a.S0)(/^\s*>\s$/,e),Ra=e=>(0,$a.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),Ba=e=>(0,$a.S0)(/^\s*([-+*])\s$/,e),ja=e=>(0,$a.zK)(/^```$/,e),qa=e=>{const t=[...$a.yR,$a.LH,$a.pR];return t.push(za(e.nodes.blockquote)),t.push(Ra(e.nodes.ordered_list)),t.push(Ba(e.nodes.bullet_list)),t.push(ja(e.nodes.code_block)),(0,$a.Hw)({rules:t})},Ya=e=>[qa(e),(0,Ha.h)(Na(e)),(0,Ha.h)(d.YR),(0,Fa.q)(),(0,Aa.d)(),(0,Oa.m8)()];var Va=l(4073);const Ja={attrs:{order:{default:1},listStyleType:{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}=e.style;return a&&(l["listStyleType"]=a),l}}],toDOM:e=>{const{order:t,listStyleType:l}=e.attrs;let a="";l&&(a+=`list-style-type: ${l};`);const n={style:a};return 1!==t&&(n["start"]=t),["ol",n,0]}},Ga={attrs:{listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const{listStyleType:t}=e.style;return t?{listStyleType:t}:{}}}],toDOM:e=>{const{listStyleType:t}=e.attrs;let l="";return t&&(l+=`list-style-type: ${t};`),["ul",{style:l},0]}},Ka={...Pa.qb,content:"paragraph block*",group:"block"},Xa={attrs:{align:{default:""},indent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t}=e.style;let l=e.getAttribute("align")||t||"";l=/(left|right|center|justify)/.test(l)?l:"";const a=+(e.getAttribute("data-indent")||0);return{align:l,indent:a}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l}=e.attrs;let a="";t&&"left"!==t&&(a+=`text-align: ${t};`);const n={style:a};return l&&(n["data-indent"]=l),["p",n,0]}},{hard_break:Qa,...en}=Va.td;var tn={...en,ordered_list:Ja,bullet_list:Ga,list_item:Ka,paragraph:Xa};const ln={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},an={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},nn={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]},on={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]},sn={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]}},rn={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]}},un={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]}},cn={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]}},dn={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]};var pn={...Va.EI,fontsize:un,fontname:cn,forecolor:sn,backcolor:rn,subscript:ln,superscript:an,strikethrough:nn,underline:on,link:dn};const mn=tn,vn=pn,fn=new Ta.V_({nodes:mn,marks:vn}),hn=e=>{const t=`<div>${e}</div>`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return Ta.aw.fromSchema(fn).parse(a)},gn=(e,t,l={})=>new Ma.tk(e,{state:Za.yy.create({doc:hn(t),plugins:Ya(fn)}),...l});var yn,wn=l(9391);(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(yn||(yn={}));const xn=(0,wn.Z)();var Sn=xn;const kn=(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},_n=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=kn(l.tr.setSelection(n),a,t);e.dispatch(o)},bn=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,In=(e,t,l)=>(a,n)=>{const{schema:o,selection:i}=a,{$from:s,$to:r}=i,u=s.blockRange(r);if(!u)return!1;const c=g((e=>bn(e,o)))(i);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===e&&!l)return(0,Pa.IB)(t)(a,n);if(bn(c.node,o)&&e.validContent(c.node.content)){const{tr:t}=a;if(l){const a={...c.node.attrs,listStyleType:l};t.setNodeMarkup(c.pos,e,a)}else t.setNodeMarkup(c.pos,e);return n&&n(t),!1}}return l?(0,Pa.KI)(e,{listStyleType:l})(a,n):(0,Pa.KI)(e)(a,n)};function Un(e,t,l){if(!e.doc)return e;const a=e.doc.nodeAt(t);if(!a)return e;const n=0,o=7;let i=(a.attrs.indent||0)+l;if(i<n&&(i=n),i>o&&(i=o),i===a.attrs.indent)return e;const s={...a.attrs,indent:i};return e.setNodeMarkup(t,a.type,s,a.marks)}const Ln=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;if(!(a instanceof Za.Bs||a instanceof Za.C1))return e;const{from:o,to:i}=a;return n.nodesBetween(o,i,((a,n)=>{const o=a.type;return"paragraph"===o.name||"blockquote"===o.name?(e=Un(e,n,l),!1):!bn(a,t)})),e},Cn=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Ln(l.tr.setSelection(n),a,t);return!!o.docChanged&&(e.dispatch(o),!0)};var En=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{type:String,required:!0},defaultColor:{type:String,required:!0},defaultFontName:{type:String,required:!0},editable:{type:Boolean,default:!1},value:{type:String,required:!0},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=A(),{handleElementId:r,textFormatPainter:u}=(0,o.Jk)(n),c=(0,s.iH)();let f;const h=(0,W.debounce)((function(){l("update",f.dom.innerHTML)}),300,{trailing:!0}),g=()=>{n.setDisableHotkeysState(!0),l("focus")},y=()=>{n.setDisableHotkeysState(!1),l("blur")},w=(0,W.debounce)((function(){const e=U(f,{color:a.defaultColor,fontname:a.defaultFontName});n.setRichtextAttrs(e)}),30,{trailing:!0}),x=()=>{h(),w()},S=(0,i.Fl)((()=>a.value));(0,i.YP)(S,(()=>{if(!f)return;if(f.hasFocus())return;const{doc:e,tr:t}=f.state;f.dispatch(t.replaceRangeWith(0,e.content.size,hn(S.value)))})),(0,i.YP)((()=>a.editable),(()=>{f.setProps({editable:()=>a.editable})}));const k=()=>f.focus();t({focus:k});const b=({target:e,action:t})=>{if(!e&&r.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=f.state.schema.marks.fontname.create({fontname:a.value});p(f),m(f,e)}else if("fontsize"===a.command&&a.value){const e=f.state.schema.marks.fontsize.create({fontsize:a.value});p(f),m(f,e)}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;p(f);const t=L(f)+e+"px",l=f.state.schema.marks.fontsize.create({fontsize:t});m(f,l)}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;p(f);let t=L(f)-e;t<12&&(t=12);const l=f.state.schema.marks.fontsize.create({fontsize:t+"px"});m(f,l)}else if("color"===a.command&&a.value){const e=f.state.schema.marks.forecolor.create({color:a.value});p(f),m(f,e)}else if("backcolor"===a.command&&a.value){const e=f.state.schema.marks.backcolor.create({backcolor:a.value});p(f),m(f,e)}else if("bold"===a.command)p(f),(0,d.w9)(f.state.schema.marks.strong)(f.state,f.dispatch);else if("em"===a.command)p(f),(0,d.w9)(f.state.schema.marks.em)(f.state,f.dispatch);else if("underline"===a.command)p(f),(0,d.w9)(f.state.schema.marks.underline)(f.state,f.dispatch);else if("strikethrough"===a.command)p(f),(0,d.w9)(f.state.schema.marks.strikethrough)(f.state,f.dispatch);else if("subscript"===a.command)(0,d.w9)(f.state.schema.marks.subscript)(f.state,f.dispatch);else if("superscript"===a.command)(0,d.w9)(f.state.schema.marks.superscript)(f.state,f.dispatch);else if("blockquote"===a.command)(0,d.ym)(f.state.schema.nodes.blockquote)(f.state,f.dispatch);else if("code"===a.command)(0,d.w9)(f.state.schema.marks.code)(f.state,f.dispatch);else if("align"===a.command&&a.value)_n(f,a.value);else if("indent"===a.command&&a.value)Cn(f,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=f.state.schema.nodes;In(t,l,e)(f.state,f.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=f.state.schema.nodes;In(t,l,e)(f.state,f.dispatch)}else if("clear"===a.command){p(f);const{$from:e,$to:t}=f.state.selection;f.dispatch(f.state.tr.removeMark(e.pos,t.pos))}else if("link"===a.command){const e=f.state.schema.marks.link,{from:t,to:l}=f.state.selection,n=v(f.state.doc,t,l,e);if(n)if(a.value){const e=f.state.schema.marks.link.create({href:a.value,title:a.value});m(f,e,{from:n.from.pos,to:n.to.pos+1})}else f.dispatch(f.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(_(f.state,e))if(a.value){const e=f.state.schema.marks.link.create({href:a.value,title:a.value});m(f,e)}else(0,d.w9)(e)(f.state,f.dispatch);else a.value&&(p(f),(0,d.w9)(e,{href:a.value,title:a.value})(f.state,f.dispatch))}else"insert"===a.command&&a.value&&f.dispatch(f.state.tr.insertText(a.value));f.focus(),h(),w()},I=()=>{if(!u.value)return;const e=[{command:"clear"}];for(const t of Object.keys(u.value)){const l=t,a=u.value[t];a&&e.push({command:l,value:a})}b({action:e}),n.setTextFormatPainter(null)};return(0,i.bv)((()=>{f=gn(c.value,S.value,{handleDOMEvents:{focus:g,blur:y,keydown:x,click:w,mouseup:I},editable:()=>a.editable}),a.autoFocus&&f.focus()})),(0,i.Ah)((()=>{f&&f.destroy()})),Sn.on(yn.RICH_TEXT_COMMAND,b),(0,i.Ah)((()=>{Sn.off(yn.RICH_TEXT_COMMAND,b)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(u)}]),ref_key:"editorViewRef",ref:c,onMousedown:t[0]||(t[0]=e=>l("mousedown",e))},null,34))}});const Dn=(0,Jt.Z)(En,[["__scopeId","data-v-76d3203e"]]);var Wn=Dn;const Zn=e=>((0,i.dD)("data-v-3cccc232"),e=e(),(0,i.Cn)(),e),Mn=Zn((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Tn=Zn((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var Hn=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=A(),a=H(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=Oe(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=$l(d),m=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},v=(0,s.iH)(-1),f=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===v.value||(a.updateElement({id:t.elementInfo.id,props:{height:v.value}}),v.value=-1),t.elementInfo.vertical&&-1!==f.value&&(a.updateElement({id:t.elementInfo.id,props:{width:f.value}}),f.value=-1)))}));const h=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?v.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?f.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(h);(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,W.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()})),(t,l)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.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,ne.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:l[2]||(l[2]=e=>m(e)),onTouchstart:l[3]||(l[3]=e=>m(e))},[(0,i.Wm)(Wa,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Wn,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,ne.j5)({"--textIndent":`${e.elementInfo.textIndent||0}px`,"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:l[0]||(l[0]=e=>y(e)),onMousedown:l[1]||(l[1]=e=>m(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Mn,Tn],36)),[[a,e.contextmenus]])],4)],6)}}});const On=(0,Jt.Z)(Hn,[["__scopeId","data-v-3cccc232"]]);var Fn=On;const An=["id","gradientTransform"],Pn=["stop-color"],$n=["stop-color"],Nn=["id"],zn=["stop-color"],Rn=["stop-color"];var Bn=(0,i.aZ)({__name:"GradientDefs",props:{id:{type:String,required:!0},type:{type:String},color1:{type:String,required:!0},color2:{type:String,required:!0},rotate:{type:Number,default:0}},setup(e){return(t,l)=>"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,Pn),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,$n)],8,An)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,zn),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,Rn)],8,Nn))}});const jn=Bn;var qn=jn;const Yn=["width","height"],Vn={key:0},Jn=["transform"],Gn=["d","fill","stroke","stroke-width","stroke-dasharray"];var Kn=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=A(),a=H(),{handleElementId:n}=(0,o.Jk)(l),{addHistorySnapshot:r}=Oe(),u=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},c=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:d,outlineStyle:p,outlineColor:m}=jl(c),v=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:f}=$l(v),h=(0,i.Fl)((()=>t.elementInfo.flipH)),g=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:y}=Nl(h,g),w=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&w.value&&(w.value=!1)}));const x=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),S=e=>{const l={...x.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),r()},k=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),r())},_=(0,s.iH)(),b=()=>{w.value=!0,(0,i.Y3)((()=>_.value&&_.value.focus()))};return(t,l)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ne.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(f)?`drop-shadow(${(0,s.SU)(f)})`:"",transform:(0,s.SU)(y),color:(0,s.SU)(x).defaultColor,fontFamily:(0,s.SU)(x).defaultFontName}),onMousedown:l[3]||(l[3]=e=>u(e)),onTouchstart:l[4]||(l[4]=e=>u(e)),onDblclick:l[5]||(l[5]=e=>b())},[((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",Vn,[(0,i.Wm)(qn,{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)(d),"stroke-dasharray":"dashed"===(0,s.SU)(p)?"10 6":"0 0"},null,8,Gn)],8,Jn)],8,Yn)),(0,i._)("div",{class:(0,ne.C_)(["shape-text",[(0,s.SU)(x).align,{editable:w.value||(0,s.SU)(x).content}]])},[w.value||(0,s.SU)(x).content?((0,i.wg)(),(0,i.j4)(Wn,{key:0,ref_key:"prosemirrorEditorRef",ref:_,elementId:e.elementInfo.id,defaultColor:(0,s.SU)(x).defaultColor,defaultFontName:(0,s.SU)(x).defaultFontName,editable:!e.elementInfo.lock,value:(0,s.SU)(x).content,onUpdate:l[0]||(l[0]=e=>S(e)),onBlur:l[1]||(l[1]=e=>k()),onMousedown:l[2]||(l[2]=e=>u(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[a,e.contextmenus]])],4)],6)}}});const Xn=(0,Jt.Z)(Kn,[["__scopeId","data-v-486128e0"]]);var Qn=Xn;const eo=["id","markerWidth","markerHeight","refX","refY"],to=["d","fill","transform"];var lo=(0,i.aZ)({__name:"LinePointMarker",props:{id:{type:String,required:!0},position:{type:String,required:!0},type:{type:String,required:!0},color:{type:String},baseSize:{type:Number,required:!0}},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)),r=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(t,l)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*(0,s.SU)(r),markerHeight:3*(0,s.SU)(r),refX:1.5*(0,s.SU)(r),refY:1.5*(0,s.SU)(r)},[(0,i._)("path",{d:(0,s.SU)(n),fill:e.color,transform:`scale(${.3*(0,s.SU)(r)}, ${.3*(0,s.SU)(r)}) rotate(${(0,s.SU)(o)}, 5, 5)`},null,8,to)],8,eo))}});const ao=lo;var no=ao;const oo=["width","height"],io=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],so=["d"];var ro=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},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}=$l(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)((()=>"dashed"===t.elementInfo.style?"10 6":"0 0")),c=(0,i.Fl)((()=>Ue(t.elementInfo)));return(t,a)=>{const d=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,ne.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ne.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:a[0]||(a[0]=e=>l(e)),onTouchstart:a[1]||(a[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:(0,s.SU)(o),height:(0,s.SU)(r)},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(no,{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)(no,{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:(0,s.SU)(c),stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":(0,s.SU)(u),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,io),(0,i.wy)((0,i._)("path",{class:"line-path",d:(0,s.SU)(c),stroke:"transparent","stroke-width":"20",fill:"none"},null,8,so),[[d,e.contextmenus]])],8,oo))],36)],6)}}});const uo=(0,Jt.Z)(ro,[["__scopeId","data-v-6550e504"]]);var co=uo,po=l(7678),mo=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},type:{type:String,required:!0},data:{type:Object,required:!0},options:{type:Object},themeColor:{type:Array,required:!0},legends:{type:Array,required:!0},gridColor:{type:String},legend:{type:String}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(wl)||(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 po.vz(l.value,t.data,e)),"line"===t.type&&(n=new po.wW(l.value,t.data,e)),"pie"===t.type&&(n=new po.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,D.Z)(t.themeColor[0]).analogous(10).map((e=>e.toHexString()));else{const l=t.themeColor.length,a=(0,D.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toHexString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),m=()=>{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,m),(0,i.bv)(m);const v=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),v),(0,i.bv)(v),(t,n)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,ne.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,ne.j5)({width:e.width+"px",height:(0,s.SU)(o)+"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,ne.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,ne.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,ne.j5)({backgroundColor:(0,s.SU)(p)[l]})},null,4),(0,i.Uk)(" "+(0,ne.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const vo=(0,Jt.Z)(mo,[["__scopeId","data-v-1f8d633e"]]);var fo=vo,ho=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Sn.emit(yn.OPEN_CHART_DATA_EDITOR)};return(t,n)=>{const o=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ne.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:n[0]||(n[0]=e=>l(e)),onTouchstart:n[1]||(n[1]=e=>l(e)),onDblclick:n[2]||(n[2]=e=>a())},[(0,i.Wm)(Wa,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(fo,{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)),[[o,e.contextmenus]])],4)],6)}}});const go=(0,Jt.Z)(ho,[["__scopeId","data-v-f3c03862"]]);var yo=go;const wo=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"}},xo=e=>e.replace(/\n/g,"</br>").replace(/ /g," ");var So=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}},ko=e=>{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=Ie(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const _o=["innerHTML"];var bo=(0,i.aZ)({__name:"CustomTextarea",props:{value:{type:String,default:""},contenteditable:{type:[Boolean,String],default:!1}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(""),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{o.value||(n.value=l.value,a.value&&(a.value.innerHTML=l.value))}),{immediate:!0});const r=()=>{if(!a.value)return;const e=a.value.innerHTML;t("updateValue",e)},u=()=>{o.value=!0,a.value&&(a.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const l=e.clipboardData.items[0];l&&"string"===l.kind&&"text/plain"===l.type&&l.getAsString((e=>{const l=he(e);if("object"===typeof l)return;const n=ge(e);if(n)return t("insertExcelData",n),void(a.value&&(a.value.innerHTML=n[0][0]));t("updateValue",e),document.execCommand("insertText",!1,e)}))})},c=()=>{o.value=!1,a.value&&(a.value.onpaste=null)};return(0,i.Ah)((()=>{a.value&&(a.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:a,onFocus:u,onBlur:c,onInput:t[0]||(t[0]=e=>r()),innerHTML:n.value},null,40,_o))}});const Io=(0,Jt.Z)(bo,[["__scopeId","data-v-cdb58a1e"]]);var Uo=Io;const Lo={key:0,class:"handler"},Co=["onMousedown"],Eo=["width"],Do=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],Wo=["innerHTML"];var Zo=(0,i.aZ)({__name:"EditableTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)(A()),u=(0,s.iH)(!1),c=(0,s.iH)([]),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return l.data},set(e){t("change",e)}}),m=(0,i.Fl)((()=>l.theme)),{subThemeColor:v}=ko(m),f=(0,s.iH)([]),h=(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 g=()=>{c.value=[],d.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||g()}));const y=(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})),w=(0,i.Fl)((()=>l.data)),{hideCells:x}=So(w),S=(0,i.Fl)((()=>{if(!c.value.length)return[];const[e,t]=c.value;if(!d.value.length)return[`${e}_${t}`];const[l,a]=d.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<p.value.length;u++){const e=p.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)(S,((e,l)=>{(0,W.isEqual)(e,l)||t("changeSelectedCells",S.value)}));const k=(0,i.Fl)((()=>S.value.length>1?null:S.value[0])),_=()=>u.value=!1,b=(e,t,l)=>{0===e.button&&(d.value=[],u.value=!0,c.value=[t,l])},I=(e,t)=>{u.value&&(d.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",_)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",_)}));const U=(e,t)=>x.value.includes(`${e}_${t}`),L=e=>{const t=p.value.length-1;c.value=[0,e],d.value=[t,e]},C=e=>{const t=p.value[e].length-1;c.value=[e,0],d.value=[e,t]},E=()=>{const e=p.value.length-1,t=p.value[e].length-1;c.value=[0,0],d.value=[e,t]},D=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=p.value[e],a=[];for(let n=0;n<l.length;n++)U(e,n)&&a.push(n);for(const n of a)for(let l=e;l>=0;l--)if(!U(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),p.value=t},Z=e=>{const l=JSON.parse(JSON.stringify(p.value)),a=[];for(let t=0;t<p.value.length;t++)U(t,e)&&a.push(t);for(const t of a)for(let a=e;a>=0;a--)if(!U(t,a)){l[t][a].colspan=l[t][a].colspan-1;break}p.value=l.map((t=>(t.splice(e,1),t))),f.value.splice(e,1),t("changeColWidths",f.value)},M=e=>{const t=JSON.parse(JSON.stringify(p.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),p.value=t},T=e=>{p.value=p.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),t("changeColWidths",f.value)},H=(e,l)=>{let a=JSON.parse(JSON.stringify(p.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let l=0;l<e;l++){const e=[];for(let t=0;t<a[0].length;t++)e.push({...n,id:(0,r.x0)(10)});t.push(e)}a=[...a,...t]}l&&(a=a.map((e=>{const t=[];for(let a=0;a<l;a++){const e={...n,id:(0,r.x0)(10)};t.push(e)}return[...e,...t]})),f.value=[...f.value,...new Array(l).fill(100)],t("changeColWidths",f.value)),p.value=a},O=()=>{const[e,t]=c.value,[l,a]=d.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(p.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,p.value=r,g()},F=(e,t)=>{const l=JSON.parse(JSON.stringify(p.value));l[e][t].rowspan=1,l[e][t].colspan=1,p.value=l,g()},P=(e,l)=>{g();let n=!0;const o=f.value[l],i=e.pageX,s=50;document.onmousemove=e=>{if(!n)return;const t=(e.pageX-i)/a.value,r=o+t<s?s:Math.round(o+t);f.value[l]=r},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,t("changeColWidths",f.value)}},$=()=>{const e=JSON.parse(JSON.stringify(p.value));for(let t=0;t<e.length;t++)for(let l=0;l<e[t].length;l++)S.value.includes(`${t}_${l}`)&&(e[t][l].text="");p.value=e},N=()=>{const e=(t,l)=>p.value[t]?p.value[t][l]?U(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;d.value=[];const t=c.value[0],l=c.value[1]+1,a=e(t,l);a?c.value=a:(M(t+1),c.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},z=e=>{if(!l.editable||!S.value.length)return;const t=e.key.toUpperCase();if(S.value.length<2){if(t===le.TAB&&(e.preventDefault(),N()),e.ctrlKey&&t===le.UP){e.preventDefault();const t=+S.value[0].split("_")[0];M(t)}if(e.ctrlKey&&t===le.DOWN){e.preventDefault();const t=+S.value[0].split("_")[0];M(t+1)}if(e.ctrlKey&&t===le.LEFT){e.preventDefault();const t=+S.value[0].split("_")[1];T(t)}if(e.ctrlKey&&t===le.RIGHT){e.preventDefault();const t=+S.value[0].split("_")[1];T(t+1)}}else t===le.DELETE&&$()};(0,i.bv)((()=>{document.addEventListener("keydown",z)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",z)}));const R=(0,W.debounce)((function(e,l,a){p.value[l][a].text=e,t("change",p.value)}),300,{trailing:!0}),B=(e,l,a)=>{const n=e.length,o=e[0].length;let s=0,r=0;l+n>p.value.length&&(s=l+n-p.value.length),a+o>p.value[0].length&&(r=a+o-p.value[0].length),(s||r)&&H(s,r),(0,i.Y3)((()=>{for(let t=0;t<n;t++)for(let n=0;n<o;n++)p.value[l+t][a+n]&&(p.value[l+t][a+n].text=e[t][n]);t("change",p.value)}))},j=()=>{const e=[];for(let t=0;t<p.value.length;t++){const l=p.value[t],a=[];for(let e=0;e<l.length;e++)U(t,e)||a.push(l[e]);a.length&&e.push(a)}return e},q=()=>{const e=j(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},Y=(e,t)=>{const l=S.value.length>1,a=p.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},V=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];S.value.includes(`${l}_${a}`)||(c.value=[l,a],d.value=[]);const{canMerge:n,canSplit:o}=Y(l,a),{canDeleteRow:i,canDeleteCol:s}=q();return[{text:"插入列",children:[{text:"到左侧",handler:()=>T(a)},{text:"到右侧",handler:()=>T(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>M(l)},{text:"到下方",handler:()=>M(l+1)}]},{text:"删除列",disable:!s,handler:()=>Z(a)},{text:"删除行",disable:!i,handler:()=>D(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:O},{text:"取消合并单元格",disable:!o,handler:()=>F(l,a)},{divider:!0},{text:"选中当前列",handler:()=>L(a)},{text:"选中当前行",handler:()=>C(l)},{text:"选中全部单元格",handler:E}]};return(t,l)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,ne.j5)({width:(0,s.SU)(h)+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",Lo,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(y),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,ne.j5)({left:e+"px"}),onMousedown:e=>P(e,t)},null,44,Co)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,ne.C_)({theme:(0,s.SU)(m),"row-header":(0,s.SU)(m)?.rowHeader,"row-footer":(0,s.SU)(m)?.rowFooter,"col-header":(0,s.SU)(m)?.colHeader,"col-footer":(0,s.SU)(m)?.colFooter}),style:(0,ne.j5)(`--themeColor: ${(0,s.SU)(m)?.color}; --subThemeColor1: ${(0,s.SU)(v)[0]}; --subThemeColor2: ${(0,s.SU)(v)[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,Eo)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,ne.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,ne.C_)(["cell",{selected:(0,s.SU)(S).includes(`${l}_${o}`)&&(0,s.SU)(S).length>1,active:(0,s.SU)(k)===`${l}_${o}`}]),style:(0,ne.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(wo)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${l}_${o}`,onMousedown:e=>b(e,l,o),onMouseenter:e=>I(l,o)},[(0,s.SU)(k)===`${l}_${o}`?((0,i.wg)(),(0,i.j4)(Uo,{key:0,class:(0,ne.C_)(["cell-text",{active:(0,s.SU)(k)===`${l}_${o}`}]),style:(0,ne.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(R)(e,l,o),onInsertExcelData:e=>B(e,l,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,ne.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(xo)(t.text)},null,12,Wo))],46,Do)),[[n.F8,!(0,s.SU)(x).includes(`${l}_${o}`)],[a,e=>V(e)]]))),128))],4)))),128))])],6)],4)}}});const Mo=(0,Jt.Z)(Zo,[["__scopeId","data-v-a2ef535c"]]);var To=Mo;const Ho={class:"element-content"};var Oo=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=A(),a=H(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=Oe(),m=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},v=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(v.value=!1)})),(0,i.YP)(v,(()=>{l.setDisableHotkeysState(v.value)}));const f=()=>{t.elementInfo.lock||(v.value=!0)},h=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(v.value=!1),c.value||-1===h.value||(a.updateElement({id:t.elementInfo.id,props:{height:h.value}}),h.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?h.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()},S=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(t,l)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,ne.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Ho,[(0,i.Wm)(To,{onMousedown:l[0]||(l[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:v.value,onChange:l[1]||(l[1]=e=>w(e)),onChangeColWidths:l[2]||(l[2]=e=>x(e)),onChangeSelectedCells:l[3]||(l[3]=e=>S(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!v.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ne.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:l[4]||(l[4]=e=>f()),onMousedown:l[5]||(l[5]=e=>m(e)),onTouchstart:l[6]||(l[6]=e=>m(e))},[(0,i._)("div",{class:"mask-tip",style:(0,ne.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)],34)):(0,i.kq)("",!0)])),[[a,e.contextmenus]])],4)],6)}}});const Fo=(0,Jt.Z)(Oo,[["__scopeId","data-v-0b2b16da"]]);var Ao=Fo;const Po=["width","height","stroke","stroke-width"],$o=["transform"],No=["d"];var zo=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Sn.emit(yn.OPEN_LATEX_EDITOR)};return(t,n)=>{const o=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:n[0]||(n[0]=e=>l(e)),onTouchstart:n[1]||(n[1]=e=>l(e)),onDblclick:n[2]||(n[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,No)],8,$o)],8,Po))],32)),[[o,e.contextmenus]])],4)],6)}}});const Ro=(0,Jt.Z)(zo,[["__scopeId","data-v-31390388"]]);var Bo=Ro,jo=(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 qo=e=>((0,i.dD)("data-v-adfce55e"),e=e(),(0,i.Cn)(),e),Yo={key:0,class:"load-error"},Vo=["src","poster"],Jo={class:"bezel"},Go=qo((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),Ko={class:"controller"},Xo={class:"icons icons-left"},Qo={class:"icon-content"},ei={class:"volume"},ti={class:"icon-content"},li=qo((()=>(0,i._)("span",{class:"thumb"},null,-1))),ai=[li],ni={class:"time"},oi={class:"ptime"},ii={class:"dtime"},si={class:"icons icons-right"},ri={class:"speed"},ui={class:"icon speed-icon"},ci=["onClick"],di={class:"icon-content"},pi={class:"bar"},mi=qo((()=>(0,i._)("span",{class:"thumb"},null,-1))),vi=[mi];var fi=(0,i.aZ)({__name:"index",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},src:{type:String,required:!0},poster:{type:String,default:""},scale:{type:Number,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),m=(0,s.iH)(0),v=(0,s.iH)(!1),f=(0,s.iH)(!1),h=(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))),S=(0,i.Fl)((()=>l(p.value))),k=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>m.value/p.value*100+"%")),b=(0,i.Fl)((()=>100*u.value+"%")),I=(0,s.iH)(!1),U=[{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)},C=()=>{n.value&&(c.value=!1,n.value.play(),f.value=!0)},E=()=>{n.value&&(c.value=!0,n.value.pause(),f.value=!0)},D=()=>{c.value?C():E()},W=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))},Z=e=>{n.value&&(n.value.playbackRate=e),h.value=e},M=()=>{p.value=n.value?.duration||0},T=()=>{d.value=n.value?.currentTime||0},H=()=>{v.value?(L(0),C()):E()},O=()=>{m.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},F=(0,s.iH)(!1),A=()=>F.value=!0,P=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},$=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",P),document.removeEventListener("touchmove",P),document.removeEventListener("mouseup",$),document.removeEventListener("touchend",$)},N=()=>{document.addEventListener("mousemove",P),document.addEventListener("touchmove",P),document.addEventListener("mouseup",$),document.addEventListener("touchend",$)},z=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;W(l)},R=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("touchmove",z),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R)},B=()=>{document.addEventListener("mousemove",z),document.addEventListener("touchmove",z),document.addEventListener("mouseup",R),document.addEventListener("touchend",R)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;W(t)},q=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}},Y=()=>{n.value&&(n.value.muted?(n.value.muted=!1,W(.5)):(n.value.muted=!0,W(0)))},V=()=>{v.value=!v.value},J=(0,s.iH)(-1),G=(0,s.iH)(!1),K=()=>{G.value=!1,clearTimeout(J.value),J.value=setTimeout((()=>{n.value?.played.length&&(G.value=!0)}),3e3)};return jo(t.src,n),(t,l)=>{const a=(0,i.up)("IconPause"),d=(0,i.up)("IconPlayOne"),p=(0,i.up)("IconVolumeMute"),m=(0,i.up)("IconVolumeNotice"),L=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["video-player",{"hide-controller":G.value}]),style:(0,ne.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:l[22]||(l[22]=e=>K()),onClick:l[23]||(l[23]=e=>K())},[(0,i._)("div",{class:"video-wrap",onClick:l[8]||(l[8]=e=>D())},[F.value?((0,i.wg)(),(0,i.iD)("div",Yo,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:l[0]||(l[0]=e=>M()),onTimeupdate:l[1]||(l[1]=e=>T()),onEnded:l[2]||(l[2]=e=>H()),onProgress:l[3]||(l[3]=e=>O()),onPlay:l[4]||(l[4]=e=>K()),onPause:l[5]||(l[5]=e=>K()),onError:l[6]||(l[6]=e=>A())},null,40,Vo),(0,i._)("div",Jo,[(0,i._)("span",{class:(0,ne.C_)(["bezel-icon",{"bezel-transition":f.value}]),onAnimationend:l[7]||(l[7]=e=>f.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(d,{key:1}))],34)])]),Go,(0,i._)("div",Ko,[(0,i._)("div",Xo,[(0,i._)("div",{class:"icon play-icon",onClick:l[9]||(l[9]=e=>D())},[(0,i._)("span",Qo,[c.value?((0,i.wg)(),(0,i.j4)(d,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",ei,[(0,i._)("div",{class:"icon volume-icon",onClick:l[10]||(l[10]=e=>Y())},[(0,i._)("span",ti,[0===u.value?((0,i.wg)(),(0,i.j4)(p,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(m,{key:1})):((0,i.wg)(),(0,i.j4)(L,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:l[11]||(l[11]=e=>B()),onTouchstart:l[12]||(l[12]=e=>B()),onClick:l[13]||(l[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ne.j5)({width:(0,s.SU)(b)})},ai,4)],512)],32)]),(0,i._)("span",ni,[(0,i._)("span",oi,(0,ne.zw)((0,s.SU)(x)),1),(0,i.Uk)(" / "),(0,i._)("span",ii,(0,ne.zw)((0,s.SU)(S)),1)])]),(0,i._)("div",si,[(0,i._)("div",ri,[(0,i._)("div",ui,[(0,i._)("span",{class:"icon-content",onClick:l[14]||(l[14]=e=>I.value=!I.value)},(0,ne.zw)(1===h.value?"倍速":h.value+"x"),1),I.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:l[15]||(l[15]=e=>I.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(U,(e=>(0,i._)("div",{class:(0,ne.C_)(["speed-menu-item",{active:e.value===h.value}]),key:e.label,onClick:t=>Z(e.value)},(0,ne.zw)(e.label),11,ci))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:l[16]||(l[16]=e=>V())},[(0,i._)("div",{class:(0,ne.C_)(["icon loop-icon",{active:v.value}])},[(0,i._)("span",di,"循环"+(0,ne.zw)(v.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:l[17]||(l[17]=e=>N()),onTouchstart:l[18]||(l[18]=e=>N()),onMousemove:l[19]||(l[19]=e=>q(e)),onMouseenter:l[20]||(l[20]=e=>g.value=!0),onMouseleave:l[21]||(l[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,ne.C_)(["bar-time",{hidden:!g.value}]),style:(0,ne.j5)({left:w.value})},(0,ne.zw)(y.value),7),(0,i._)("div",pi,[(0,i._)("div",{class:"loaded",style:(0,ne.j5)({width:(0,s.SU)(_)})},null,4),(0,i._)("div",{class:"played",style:(0,ne.j5)({width:(0,s.SU)(k)})},vi,4)])],544)])],38)}}});const hi=(0,Jt.Z)(fi,[["__scopeId","data-v-adfce55e"]]);var gi=hi,yi=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(t,n)=>{const o=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:n[2]||(n[2]=e=>a(e,!1)),onTouchstart:n[3]||(n[3]=e=>a(e,!1))},[(0,i.Wm)(gi,{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,ne.C_)(["handler-border",e]),key:e,onMousedown:n[0]||(n[0]=e=>a(e)),onTouchstart:n[1]||(n[1]=e=>a(e))},null,34))),64))],32)),[[o,e.contextmenus]])],4)],6)}}});const wi=(0,Jt.Z)(yi,[["__scopeId","data-v-9d5469c6"]]);var xi=wi;const Si=e=>((0,i.dD)("data-v-121f3d11"),e=e(),(0,i.Cn)(),e),ki=["src","autoplay"],_i={class:"controller"},bi={class:"icons"},Ii={class:"icon-content"},Ui={class:"volume"},Li={class:"icon-content"},Ci=Si((()=>(0,i._)("span",{class:"thumb"},null,-1))),Ei=[Ci],Di={class:"time"},Wi={class:"ptime"},Zi={class:"dtime"},Mi={class:"bar"},Ti=Si((()=>(0,i._)("span",{class:"thumb"},null,-1))),Hi=[Ti];var Oi=(0,i.aZ)({__name:"AudioPlayer",props:{src:{type:String,required:!0},loop:{type:Boolean,required:!0},autoplay:{type:Boolean,default:!1},scale:{type:Number,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),m=(0,s.iH)(0),v=(0,s.iH)(0),f=(0,s.iH)(!1),h=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(m.value))),x=(0,i.Fl)((()=>p.value/m.value*100+"%")),S=(0,i.Fl)((()=>v.value/m.value*100+"%")),k=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,m.value),o.value.currentTime=e,p.value=e)},b=()=>{o.value&&(d.value=!1,o.value.play())},I=()=>{o.value&&(d.value=!0,o.value.pause())},U=()=>{d.value?b():I()},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))},C=()=>{m.value=o.value?.duration||0},E=()=>{p.value=o.value?.currentTime||0},D=()=>{d.value=!1},W=()=>{l.loop?(_(0),b()):I()},Z=()=>{v.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},M=()=>ie.ZP.error("视频加载失败"),T=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*m.value;o.value.currentTime=a,p.value=a},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*m.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",T),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",H),document.removeEventListener("touchend",H)},O=()=>{document.addEventListener("mousemove",T),document.addEventListener("touchmove",T),document.addEventListener("mouseup",H),document.addEventListener("touchend",H)},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)},A=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("touchmove",F),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A)},P=()=>{document.addEventListener("mousemove",F),document.addEventListener("touchmove",F),document.addEventListener("mouseup",A),document.addEventListener("touchend",A)},$=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},N=e=>{if(m.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=m.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",h.value=a(n),f.value=!0}},z=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:U}),(t,l)=>{const a=(0,i.up)("IconPlayOne"),n=(0,i.up)("IconPause"),p=(0,i.up)("IconVolumeMute"),m=(0,i.up)("IconVolumeNotice"),v=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,ne.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:l[0]||(l[0]=e=>C()),onTimeupdate:l[1]||(l[1]=e=>E()),onPlay:l[2]||(l[2]=e=>D()),onEnded:l[3]||(l[3]=e=>W()),onProgress:l[4]||(l[4]=e=>Z()),onError:l[5]||(l[5]=e=>M())},null,40,ki),(0,i._)("div",_i,[(0,i._)("div",bi,[(0,i._)("div",{class:"icon play-icon",onClick:l[6]||(l[6]=e=>U())},[(0,i._)("span",Ii,[d.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(n,{key:1}))])]),(0,i._)("div",Ui,[(0,i._)("div",{class:"icon volume-icon",onClick:l[7]||(l[7]=e=>z())},[(0,i._)("span",Li,[0===c.value?((0,i.wg)(),(0,i.j4)(p,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(m,{key:1})):((0,i.wg)(),(0,i.j4)(v,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:l[8]||(l[8]=e=>P()),onTouchstart:l[9]||(l[9]=e=>P()),onClick:l[10]||(l[10]=e=>$(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ne.j5)({width:(0,s.SU)(k)})},Ei,4)],512)],32)])]),(0,i._)("span",Di,[(0,i._)("span",Wi,(0,ne.zw)((0,s.SU)(y)),1),(0,i.Uk)(" / "),(0,i._)("span",Zi,(0,ne.zw)((0,s.SU)(w)),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:l[11]||(l[11]=e=>O()),onTouchstart:l[12]||(l[12]=e=>O()),onMousemove:l[13]||(l[13]=e=>N(e)),onMouseenter:l[14]||(l[14]=e=>f.value=!0),onMouseleave:l[15]||(l[15]=e=>f.value=!1)},[(0,i._)("div",{class:(0,ne.C_)(["bar-time",{hidden:!f.value}]),style:(0,ne.j5)({left:g.value})},(0,ne.zw)(h.value),7),(0,i._)("div",Mi,[(0,i._)("div",{class:"loaded",style:(0,ne.j5)({width:(0,s.SU)(S)})},null,4),(0,i._)("div",{class:"played",style:(0,ne.j5)({width:(0,s.SU)(x)})},Hi,4)])],544)])],4)}}});const Fi=(0,Jt.Z)(Oi,[["__scopeId","data-v-121f3d11"]]);var Ai=Fi,Pi=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)(A()),{viewportRatio:r}=(0,o.Jk)(H()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=De,a=De*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(t,o)=>{const r=(0,i.up)("IconVolumeNotice"),p=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:o[1]||(o[1]=e=>d(e)),onTouchstart:o[2]||(o[2]=e=>d(e))},[(0,i.Wm)(r,{class:"audio-icon",style:(0,ne.j5)({fontSize:(0,s.SU)(u),color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(Ai,{key:0,class:"audio-player",style:(0,ne.j5)({...(0,s.SU)(c)}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:o[0]||(o[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[p,e.contextmenus]])],4)],6)}}});const $i=(0,Jt.Z)(Pi,[["__scopeId","data-v-001bfbc4"]]);var Ni=$i;const zi=["id"];var Ri=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[Ze.IMAGE]:Ua,[Ze.TEXT]:Fn,[Ze.SHAPE]:Qn,[Ze.LINE]:co,[Ze.CHART]:yo,[Ze.TABLE]:Ao,[Ze.LATEX]:Bo,[Ze.VIDEO]:xi,[Ze.AUDIO]:Ni};return e[t.elementInfo.type]||null})),{orderElement:a}=Ye(),{alignElementToCanvas:n}=Pl(),{combineElements:o,uncombineElements:r}=Re(),{deleteElement:u}=ze(),{lockElement:c,unlockElement:d}=Ne(),{copyElement:p,pasteElement:m,cutElement:v}=Be(),{selectAllElement:f}=je(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>d(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:p},{text:"粘贴",subText:"Ctrl + V",handler:m},{divider:!0},{text:"水平居中",handler:()=>n(X.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(X.CENTER)},{text:"水平居中",handler:()=>n(X.HORIZONTAL)},{text:"左对齐",handler:()=>n(X.LEFT)},{text:"右对齐",handler:()=>n(X.RIGHT)}]},{text:"垂直居中",handler:()=>n(X.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(X.CENTER)},{text:"垂直居中",handler:()=>n(X.VERTICAL)},{text:"顶部对齐",handler:()=>n(X.TOP)},{text:"底部对齐",handler:()=>n(X.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,K.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,K.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,K.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,K.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,K.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,K.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?r:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:f},{text:"锁定",subText:"Ctrl + L",handler:c},{text:"删除",subText:"Delete",handler:u}];return(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,ne.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(l)),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,zi))}});const Bi=Ri;var ji=Bi,qi=(0,i.aZ)({__name:"MouseSelection",props:{top:{type:Number,required:!0},left:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},quadrant:{type:Number,required:!0,validator(e){return[1,2,3,4].includes(e)}}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,ne.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const Yi=(0,Jt.Z)(qi,[["__scopeId","data-v-0d6c0f73"]]);var Vi=Yi;const Ji={class:"grid-lines"},Gi=["d","stroke"];var Ki=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)(A()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(H()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return D.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=De,t=De*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",Ji,[(0,i._)("path",{style:(0,ne.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:(0,s.SU)(c),fill:"none",stroke:(0,s.SU)(u),"stroke-width":"0.3","stroke-dasharray":"5"},null,12,Gi)]))}});const Xi=(0,Jt.Z)(Ki,[["__scopeId","data-v-aebac580"]]);var Qi=Xi,es=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}},ts=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)(A()),{currentSlide:l}=(0,o.Jk)(H()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=es(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,ne.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(Qi,{key:0})):(0,i.kq)("",!0)],4))}});const ls=(0,Jt.Z)(ts,[["__scopeId","data-v-61c4db4a"]]);var as=ls,ns=(0,i.aZ)({__name:"AlignmentLine",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0},canvasScale:{type:Number,required:!0}},setup(e){const t=e,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(t,o)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,ne.j5)({left:(0,s.SU)(l),top:(0,s.SU)(a)})},[(0,i._)("div",{class:(0,ne.C_)(["line",e.type]),style:(0,ne.j5)((0,s.SU)(n))},null,6)],4))}});const os=(0,Jt.Z)(ns,[["__scopeId","data-v-37fa6068"]]);var is=os;const ss={class:"ruler"};var rs=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{type:Object,required:!0}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(t,n)=>((0,i.wg)(),(0,i.iD)("div",ss,[(0,i._)("div",{class:"h",style:(0,ne.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,ne.C_)(["ruler-marker-100",{hide:(0,s.SU)(a)<36,omit:(0,s.SU)(a)<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,ne.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,ne.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,ne.C_)(["ruler-marker-100",{hide:(0,s.SU)(a)<36,omit:(0,s.SU)(a)<72}]),key:e,style:(0,ne.j5)({height:(0,s.SU)(a)+"px"})},[(0,i._)("span",null,(0,ne.zw)(e),1)],6))),64))],4)]))}});const us=(0,Jt.Z)(rs,[["__scopeId","data-v-0f6bb088"]]);var cs=us;const ds=["width","height"],ps=["d"];var ms=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=A(),{creatingElement:a}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(Y()),u=(0,s.iH)(),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!d.value)return;const{x:e,y:t}=d.value.getBoundingClientRect();p.value={x:e,y:t}}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY;u.value=[o,i],document.onmousemove=e=>{if(!a.value||!n)return;let t=e.pageX,l=e.pageY;if(r.value){const e=t-o,n=l-i,s=Math.abs(e),r=Math.abs(n);if("shape"===a.value.type){const a=n>0&&e<0||n<0&&e>0;s>r?l=a?i-e:i+e:t=a?o-n:o+n}else"line"===a.value.type&&(s>r?l=i:t=o)}c.value=[t,l]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>l.setCreatingElement(null)),0);n=!1;const s=e.pageX,r=e.pageY,d=30;if("line"===a.value?.type&&(Math.abs(s-o)>=d||Math.abs(r-i)>=d))t("created",{start:u.value,end:c.value});else if("line"!==a.value?.type&&Math.abs(s-o)>=d&&Math.abs(r-i)>=d)t("created",{start:u.value,end:c.value});else{const e=200,l=Math.min(s,o),a=Math.min(r,i),n=Math.max(s,o),u=Math.max(r,i),c=n-l>=d?n-l:e,p=u-a>=d?u-a:e;t("created",{start:[l,a],end:[l+c,a+p]})}}},v=(0,i.Fl)((()=>{if(!u.value||!c.value)return null;if(!a.value||"line"!==a.value.type)return null;const[e,t]=u.value,[l,n]=c.value,o=Math.min(e,l),i=Math.max(e,l),s=Math.min(t,n),r=Math.max(t,n),d=i-o>=24?i-o:24,p=r-s>=24?r-s:24,m=e===o?0:i-o,v=t===s?0:r-s,f=l===o?0:i-o,h=n===s?0:r-s,g=`M${m}, ${v} L${f}, ${h}`;return{svgWidth:d,svgHeight:p,startX:m,startY:v,endX:f,endY:h,path:g}})),f=(0,i.Fl)((()=>{if(!u.value||!c.value)return{};const[e,t]=u.value,[l,a]=c.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,d=s-i;return{left:n-p.value.x+"px",top:i-p.value.y+"px",width:r+"px",height:d+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:d,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>m(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[u.value&&c.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ne.C_)(["selection",(0,s.SU)(a)?.type]),style:(0,ne.j5)((0,s.SU)(f))},["line"===(0,s.SU)(a)?.type&&(0,s.SU)(v)?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:(0,s.SU)(v).svgWidth,height:(0,s.SU)(v).svgHeight},[(0,i._)("path",{d:(0,s.SU)(v).path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,ps)],8,ds)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const vs=(0,Jt.Z)(ms,[["__scopeId","data-v-5a941f07"]]);var fs=vs,hs=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:ee.LEFT_TOP,style:{}},{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.RIGHT_TOP,style:{left:e.value+"px"}},{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:ee.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:ee.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:Q.T,style:{width:e.value+"px"}},{type:Q.B,style:{top:t.value+"px",width:e.value+"px"}},{type:Q.L,style:{height:t.value+"px"}},{type:Q.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},gs=(0,i.aZ)({__name:"ResizeHandler",props:{type:{type:String,default:""},rotate:{type:Number,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(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["resize-handler",(0,s.SU)(l),e.type])},null,2))}});const ys=(0,Jt.Z)(gs,[["__scopeId","data-v-881ee3f8"]]);var ws=ys,xs=(0,i.aZ)({__name:"BorderLine",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Ss=(0,Jt.Z)(xs,[["__scopeId","data-v-7170d1be"]]);var ks=Ss,_s=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)(A()),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:m}=hs(c,d),v=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=Se(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(v);const f=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,ne.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)(m),(e=>((0,i.wg)(),(0,i.j4)(ks,{key:e.type,type:e.type,style:(0,ne.j5)(e.style)},null,8,["type","style"])))),128)),(0,s.SU)(f)?(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)(ws,{key:t.direction,type:t.direction,style:(0,ne.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const bs=(0,Jt.Z)(_s,[["__scopeId","data-v-defbd922"]]);var Is=bs;const Us={class:"rotate-handler"};function Ls(e,t){return(0,i.wg)(),(0,i.iD)("div",Us)}const Cs={},Es=(0,Jt.Z)(Cs,[["render",Ls],["__scopeId","data-v-b99d8dae"]]);var Ds=Es;const Ws={inheritAttrs:!1};var Zs=(0,i.aZ)({...Ws,__name:"ImageElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)(A()),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}=hs(u,c);return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["image-element-operate",{cliping:(0,s.SU)(r)}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(ks,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ne.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)(ws,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ne.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)(Ds,{class:"operate-rotate-handler",style:(0,ne.j5)({left:(0,s.SU)(u)/2+"px"}),onMousedown:l[0]||(l[0]=(0,n.iM)((t=>e.rotateElement(e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const Ms=(0,Jt.Z)(Zs,[["__scopeId","data-v-46b250c2"]]);var Ts=Ms;const Hs={class:"text-element-operate"},Os={inheritAttrs:!1};var Fs=(0,i.aZ)({...Os,__name:"TextElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=hs(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",Hs,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ks,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ne.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)(p),(t=>((0,i.wg)(),(0,i.j4)(ws,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ne.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)(Ds,{class:"operate-rotate-handler",style:(0,ne.j5)({left:(0,s.SU)(a)/2+"px"}),onMousedown:l[0]||(l[0]=(0,n.iM)((t=>e.rotateElement(e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const As=Fs;var Ps=As;const $s={class:"shape-element-operate"},Ns={inheritAttrs:!1};var zs=(0,i.aZ)({...Ns,__name:"ShapeElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=hs(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||!t.elementInfo.keypoint)return{};const e=Me[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(t,l)=>((0,i.wg)(),(0,i.iD)("div",$s,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ks,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ne.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)(ws,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ne.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)(Ds,{class:"operate-rotate-handler",style:(0,ne.j5)({left:(0,s.SU)(a)/2+"px"}),onMousedown:l[0]||(l[0]=(0,n.iM)((t=>e.rotateElement(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,ne.j5)((0,s.SU)(d)),onMousedown:l[1]||(l[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const Rs=(0,Jt.Z)(zs,[["__scopeId","data-v-fd38df18"]]);var Bs=Rs;const js={class:"line-element-operate"},qs=["width","height","stroke"],Ys={key:0},Vs=["x1","y1","x2","y2"],Js=["x1","y1","x2","y2"],Gs=["x1","y1","x2","y2"],Ks=["x1","y1","x2","y2"],Xs={inheritAttrs:!1};var Qs=(0,i.aZ)({...Xs,__name:"LineElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),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:te.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:te.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:te.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:te.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:te.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(t,o)=>((0,i.wg)(),(0,i.iD)("div",js,[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)(ws,{class:"operate-resize-handler",key:t.handler,style:(0,ne.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:(0,s.SU)(a)||1,height:(0,s.SU)(r)||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,ne.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",Ys,[(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,Vs),(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,Js)])):(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,Gs)):(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,Ks)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,qs))],64)):(0,i.kq)("",!0)]))}});const er=(0,Jt.Z)(Qs,[["__scopeId","data-v-4659f395"]]);var tr=er;const lr={class:"table-element-operate"},ar={inheritAttrs:!1};var nr=(0,i.aZ)({...ar,__name:"TableElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),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}=hs(r,u);return(t,l)=>((0,i.wg)(),(0,i.iD)("div",lr,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ks,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ne.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)(ws,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ne.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)(Ds,{class:"operate-rotate-handler",style:(0,ne.j5)({left:(0,s.SU)(r)/2+"px"}),onMousedown:l[0]||(l[0]=(0,n.iM)((t=>e.rotateElement(e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const or=nr;var ir=or;const sr={class:"common-element-operate"},rr={inheritAttrs:!1};var ur=(0,i.aZ)({...rr,__name:"CommonElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(A()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=hs(a,r),d=(0,i.Fl)((()=>["video","audio"].includes(t.elementInfo.type)));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",sr,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ks,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ne.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)(ws,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ne.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,s.SU)(d)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Ds,{key:0,class:"operate-rotate-handler",style:(0,ne.j5)({left:(0,s.SU)(a)/2+"px"}),onMousedown:l[0]||(l[0]=(0,n.iM)((t=>e.rotateElement(e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const cr=ur;var dr=cr,pr=(l(446),l(6987)),mr=()=>{const e=H(),{addHistorySnapshot:t}=Oe(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return ie.ZP.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return ie.ZP.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}};const vr=["href"],fr={class:"btns"};var hr=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{type:Object,required:!0},link:{type:Object,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,l=A(),a=H(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=mr(),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(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,ne.j5)({top:(0,s.SU)(c)*(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,ne.zw)(e.link.target),9,vr)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:l[0]||(l[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,ne.zw)(e.link.target),1)),(0,i._)("div",fr,[(0,i._)("div",{class:"btn",onClick:l[1]||(l[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)((0,s.SU)(pr.Z),{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:l[2]||(l[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const gr=(0,Jt.Z)(hr,[["__scopeId","data-v-12300fd5"]]);var yr=gr;const wr={key:1,class:"animation-index"};var xr=(0,i.aZ)({__name:"index",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},isActive:{type:Boolean,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},dragLineElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)(A()),{formatedAnimations:r}=(0,o.Jk)(H()),u=(0,i.Fl)((()=>{const e={[Ze.IMAGE]:Ts,[Ze.TEXT]:Ps,[Ze.SHAPE]:Bs,[Ze.LINE]:tr,[Ze.TABLE]:ir,[Ze.CHART]:dr,[Ze.LATEX]:dr,[Ze.VIDEO]:dr,[Ze.AUDIO]:dr};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(t,o)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,ne.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${(0,s.SU)(d)}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${(0,s.SU)(p)*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(u)),{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)&&(0,s.SU)(c).length?((0,i.wg)(),(0,i.iD)("div",wr,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,ne.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)(yr,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:o[0]||(o[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Sr=(0,Jt.Z)(xr,[["__scopeId","data-v-26f9c48a"]]);var kr=Sr,_r=(l(149),l(5949)),br=(l(8049),l(1331)),Ir=(l(3963),l(1818));const Ur=["src"];var Lr=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=$l(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Nl(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Rl(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:m}=Bl(p);return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ne.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(ca,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ne.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ne.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)(m)}),alt:""},null,12,Ur),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ne.j5)({backgroundColor:e.elementInfo.colorMask.color,opacity:e.elementInfo.colorMask.opacity})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const Cr=(0,Jt.Z)(Lr,[["__scopeId","data-v-c874e65e"]]);var Er=Cr;const Dr=["innerHTML"];var Wr=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=$l(l),n=(0,i.Fl)((()=>({"--textIndent":`${t.elementInfo.textIndent||0}px`,"--paragraphSpace":`${void 0===t.elementInfo.paragraphSpace?5:t.elementInfo.paragraphSpace}px`})));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ne.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)(Wa,{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,ne.j5)((0,s.SU)(n)),innerHTML:e.elementInfo.content},null,12,Dr)],4)],4)],4))}});const Zr=(0,Jt.Z)(Wr,[["__scopeId","data-v-18d84242"]]);var Mr=Zr;const Tr=["width","height"],Hr={key:0},Or=["transform"],Fr=["d","fill","stroke","stroke-width","stroke-dasharray"],Ar=["innerHTML"];var Pr=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineStyle:n,outlineColor:o}=jl(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=$l(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Nl(c,d),m=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ne.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:(0,s.SU)(m).defaultColor,fontFamily:(0,s.SU)(m).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",Hr,[(0,i.Wm)(qn,{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)(o),"stroke-width":(0,s.SU)(a),"stroke-dasharray":"dashed"===(0,s.SU)(n)?"10 5":"0 0"},null,8,Fr)],8,Or)],8,Tr)),(0,i._)("div",{class:(0,ne.C_)(["shape-text",(0,s.SU)(m).align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:(0,s.SU)(m).content},null,8,Ar)],2)],4)],4)],4))}});const $r=(0,Jt.Z)(Pr,[["__scopeId","data-v-073084bf"]]);var Nr=$r;const zr=["width","height"],Rr=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var Br=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=$l(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)((()=>"dashed"===t.elementInfo.style?"10, 5":"0, 0")),u=(0,i.Fl)((()=>Ue(t.elementInfo)));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,ne.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ne.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:(0,s.SU)(n),height:(0,s.SU)(o)},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(no,{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)(no,{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:(0,s.SU)(u),stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":(0,s.SU)(r),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,Rr)],8,zr))],4)],4))}});const jr=(0,Jt.Z)(Br,[["__scopeId","data-v-340cdee8"]]);var qr=jr,Yr=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=(0,i.f3)(wl)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ne.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Wa,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(fo,{width:e.elementInfo.width*(0,s.SU)(a),height:e.elementInfo.height*(0,s.SU)(a),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,ne.j5)({zoom:1/(0,s.SU)(a)})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const Vr=(0,Jt.Z)(Yr,[["__scopeId","data-v-7d2e5c4e"]]);var Jr=Vr;const Gr=["width"],Kr=["rowspan","colspan"],Xr=["innerHTML"];var Qr=(0,i.aZ)({__name:"StaticTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},setup(e){const t=e,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}=So(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=ko(u);return(t,o)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,ne.j5)({width:(0,s.SU)(a)+"px"})},[(0,i._)("table",{class:(0,ne.C_)({theme:(0,s.SU)(u),"row-header":(0,s.SU)(u)?.rowHeader,"row-footer":(0,s.SU)(u)?.rowFooter,"col-header":(0,s.SU)(u)?.colHeader,"col-footer":(0,s.SU)(u)?.colFooter}),style:(0,ne.j5)(`--themeColor: ${(0,s.SU)(u)?.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,Gr)))),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,ne.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,ne.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(wo)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,ne.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(xo)(t.text)},null,12,Xr)],12,Kr)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const eu=(0,Jt.Z)(Qr,[["__scopeId","data-v-40e73d4e"]]);var tu=eu;const lu={class:"element-content"};var au=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,ne.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",lu,[(0,i.Wm)(tu,{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 nu=(0,Jt.Z)(au,[["__scopeId","data-v-6b8ce0be"]]);var ou=nu;const iu={class:"element-content"},su=["width","height","stroke","stroke-width"],ru=["transform"],uu=["d"];var cu=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",iu,[((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,uu)],8,ru)],8,su))])],4)],4))}});const du=(0,Jt.Z)(cu,[["__scopeId","data-v-9a47b5f4"]]);var pu=du,mu=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>{const a=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ne.j5)({backgroundImage:`url(${e.elementInfo.poster})`})},[(0,i.Wm)(a,{class:"icon"})],4)],4)],4)}}});const vu=(0,Jt.Z)(mu,[["__scopeId","data-v-56b7f716"]]);var fu=vu;const hu={class:"element-content"};var gu=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(t,a)=>{const n=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",hu,[(0,i.Wm)(n,{class:"audio-icon",style:(0,ne.j5)({fontSize:(0,s.SU)(l),color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const yu=(0,Jt.Z)(gu,[["__scopeId","data-v-5258e03b"]]);var wu=yu,xu=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[Ze.IMAGE]:Er,[Ze.TEXT]:Mr,[Ze.SHAPE]:Nr,[Ze.LINE]:qr,[Ze.CHART]:Jr,[Ze.TABLE]:ou,[Ze.LATEX]:pu,[Ze.VIDEO]:fu,[Ze.AUDIO]:wu};return e[t.elementInfo.type]||null}));return(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,ne.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(l)),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const Su=xu;var ku=Su;const _u={key:1,class:"placeholder"};var bu=(0,i.aZ)({__name:"index",props:{slide:{type:Object,required:!0},size:{type:Number,required:!0},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(H()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=es(a),r=(0,i.Fl)((()=>t.size/De));return(0,i.JJ)(wl,r),(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,ne.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,ne.j5)({width:(0,s.SU)(De)+"px",height:(0,s.SU)(De)*(0,s.SU)(l)+"px",transform:`scale(${(0,s.SU)(r)})`})},[(0,i._)("div",{class:"background",style:(0,ne.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)(ku,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",_u,"加载中 ..."))],4))}});const Iu=(0,Jt.Z)(bu,[["__scopeId","data-v-3f5170e8"]]);var Uu=Iu;const Lu=e=>((0,i.dD)("data-v-469f9b66"),e=e(),(0,i.Cn)(),e),Cu={class:"link-dialog"},Eu={class:"tabs"},Du=["onClick"],Wu={key:2,class:"preview"},Zu=Lu((()=>(0,i._)("div",null,"预览:",-1))),Mu={class:"btns"};var Tu=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const l=Ir.ZP.Option,{handleElement:a}=(0,o.Jk)(A()),{slides:n,currentSlide:r}=(0,o.Jk)(H()),u=(0,s.iH)("web"),c=(0,s.iH)(""),d=(0,s.iH)("");d.value=n.value.find((e=>e.id!==r.value.id))?.id||"";const p=(0,i.Fl)((()=>d.value&&n.value.find((e=>e.id===d.value))||null)),m=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:v}=mr();(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 l=v(a.value,e);l?t("close"):c.value=""}};return(e,a)=>((0,i.wg)(),(0,i.iD)("div",Cu,[(0,i._)("div",Eu,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(m,(e=>(0,i._)("div",{class:(0,ne.C_)(["tab",{active:u.value===e.key}]),key:e.key,onClick:t=>u.value=e.key},(0,ne.zw)(e.label),11,Du))),64))]),"web"===u.value?((0,i.wg)(),(0,i.j4)((0,s.SU)(br.ZP),{key:0,class:"input",value:c.value,"onUpdate:value":a[0]||(a[0]=e=>c.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===u.value?((0,i.wg)(),(0,i.j4)((0,s.SU)(Ir.ZP),{key:1,class:"input",value:d.value,"onUpdate:value":a[1]||(a[1]=e=>d.value=e)},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),((e,t)=>((0,i.wg)(),(0,i.j4)((0,s.SU)(l),{key:e.id,value:e.id,disabled:(0,s.SU)(r).id===e.id},{default:(0,i.w5)((()=>[(0,i.Uk)("幻灯片 "+(0,ne.zw)(t+1),1)])),_:2},1032,["value","disabled"])))),128))])),_:1},8,["value"])):(0,i.kq)("",!0),"slide"===u.value&&(0,s.SU)(p)?((0,i.wg)(),(0,i.iD)("div",Wu,[Zu,(0,i.Wm)(Uu,{class:"thumbnail",slide:(0,s.SU)(p),size:490},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",Mu,[(0,i.Wm)((0,s.SU)(_r.Z),{onClick:a[2]||(a[2]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{type:"primary",onClick:a[3]||(a[3]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const Hu=(0,Jt.Z)(Tu,[["__scopeId","data-v-469f9b66"]]);var Ou=Hu;const Fu={class:"operates"},Au={key:1,class:"drag-mask"};var Pu=(0,i.aZ)({__name:"index",setup(e){const t=A(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,showSelectPanel:m,creatingElement:v,canvasScale:f,textFormatPainter:h}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)(H()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(Y()),x=(0,s.iH)(),S=(0,s.iH)([]),k=(0,s.iH)(!1),_=()=>k.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const b=(0,s.iH)([]),I=()=>{b.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(I);const U=(0,s.iH)(),{dragViewport:L,viewportStyles:C}=kl(U);bl(U);const{mouseSelection:E,mouseSelectionVisible:D,mouseSelectionQuadrant:Z,updateMouseSelection:M}=_l(b,x),{dragElement:T}=Hl(b,S,f),{dragLineElement:O}=Ol(b),{selectElement:F}=Tl(b,T),{scaleElement:P,scaleMultiElement:$}=Ml(b,S,f),{rotateElement:N}=Ul(b,x),{moveShapeKeypoint:z}=Fl(b,f),{selectAllElement:R}=je(),{deleteAllElements:B}=ze(),{pasteElement:j}=Be(),{enterScreeningFromStart:q}=Ke(),{updateSlideIndex:V}=$e();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const J=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):M(e),c.value||t.setEditorareaFocus(!0),h.value&&t.setTextFormatPainter(null),Sl()};(0,i.Ah)((()=>{h.value&&t.setTextFormatPainter(null)}));const G=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:K}=Xe(),X=(0,W.throttle)(K,100,{leading:!0,trailing:!1}),Q=(0,W.throttle)(V,300,{leading:!0,trailing:!1}),ee=e=>{e.preventDefault(),y.value?e.deltaY>0?X("-"):e.deltaY<0&&X("+"):e.deltaY>0?Q(le.DOWN):e.deltaY<0&&Q(le.UP)},te=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:oe}=Al(x),ie=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:R},{text:"标尺",subText:p.value?"√":"",handler:te},{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:m.value?"关闭选择面板":"打开选择面板",handler:()=>{m.value?t.setSelectPanelState(!1):t.setSelectPanelState(!0)}},{text:"重置当前页",handler:B},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:q}];return(0,i.JJ)(wl,f),(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:U,onWheel:t[3]||(t[3]=e=>ee(e)),onMousedown:t[4]||(t[4]=e=>J(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(fs,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(oe)(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,ne.j5)({width:(0,s.SU)(C).width*(0,s.SU)(f)+"px",height:(0,s.SU)(C).height*(0,s.SU)(f)+"px",left:(0,s.SU)(C).left+"px",top:(0,s.SU)(C).top+"px"})},[(0,i._)("div",Fu,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(S.value,((e,t)=>((0,i.wg)(),(0,i.j4)(is,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(f)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(Is,{key:0,elementList:b.value,scaleMultiElement:(0,s.SU)($)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(b.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(kr,{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)(N),scaleElement:(0,s.SU)(P),openLinkDialog:_,dragLineElement:(0,s.SU)(O),moveShapeKeypoint:(0,s.SU)(z)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(as)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,ne.j5)({transform:`scale(${(0,s.SU)(f)})`})},[(0,s.SU)(D)?((0,i.wg)(),(0,i.j4)(Vi,{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)(Z)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(b.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(ji,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(F),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",Au)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(cs,{key:2,viewportStyles:(0,s.SU)(C)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)((0,s.SU)(ae.Z),{visible:k.value,"onUpdate:visible":t[2]||(t[2]=e=>k.value=e),footer:null,centered:"",width:540,destroyOnClose:""},{default:(0,i.w5)((()=>[(0,i.Wm)(Ou,{onClose:t[1]||(t[1]=e=>k.value=!1)})])),_:1},8,["visible"])],32)),[[o,ie],[c,G]])}}});const $u=(0,Jt.Z)(Pu,[["__scopeId","data-v-17dcff2c"]]);var Nu=$u,zu=(l(9397),l(8704));const Ru={class:"shape-item-thumbnail"},Bu={class:"shape-content"},ju={overflow:"visible",width:"18",height:"18"},qu=["transform"],Yu=["fill","stroke","d"];var Vu=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{type:Object,required:!0}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.iD)("div",Ru,[(0,i._)("div",Bu,[((0,i.wg)(),(0,i.iD)("svg",ju,[(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,ne.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,Yu)],8,qu)]))])]))}});const Ju=(0,Jt.Z)(Vu,[["__scopeId","data-v-09653543"]]);var Gu=Ju;const Ku={class:"shape-pool"},Xu={class:"category-name"},Qu={class:"shape-list"};var ec=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ku,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Te),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Xu,(0,ne.zw)(e.type),1),(0,i._)("div",Qu,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Gu,{class:"shape-item",key:t,shape:e,onClick:t=>l(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const tc=(0,Jt.Z)(ec,[["__scopeId","data-v-711a4fb1"]]);var lc=tc;const ac=[{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}]}],nc={class:"line-pool"},oc={class:"category-name"},ic={class:"line-list"},sc=["onClick"],rc={overflow:"visible",width:"20",height:"20"},uc=["d","stroke-dasharray","marker-start","marker-end"];var cc=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};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)(ac),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",oc,(0,ne.zw)(e.type),1),(0,i._)("div",ic,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:a},[(0,i._)("div",{class:"line-content",onClick:t=>l(e)},[((0,i.wg)(),(0,i.iD)("svg",rc,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(no,{key:0,class:"line-marker",id:`preset-line-${t}-${a}`,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)(no,{key:1,class:"line-marker",id:`preset-line-${t}-${a}`,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}-${a}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${a}-${e.points[1]}-end)`:""},null,8,uc)]))],8,sc)])))),128))])])))),128))]))}});const dc=(0,Jt.Z)(cc,[["__scopeId","data-v-bca68faa"]]);var pc=dc;const mc={class:"chart-pool"},vc=["onClick"];var fc=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=["bar","horizontalBar","line","area","scatter","pie","ring"],a=e=>{t("select",e)};return(e,t)=>{const n=(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",mc,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>a(e)},["line"===e?((0,i.wg)(),(0,i.j4)(n,{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,vc)]))),64))])}}});const hc=(0,Jt.Z)(fc,[["__scopeId","data-v-3870b42e"]]);var gc=hc,yc=(l(1838),l(6329));const wc=e=>((0,i.dD)("data-v-8fd9f34c"),e=e(),(0,i.Cn)(),e),xc={class:"table-generator"},Sc={class:"title"},kc={class:"lef"},_c=["onMouseenter"],bc={key:1,class:"custom"},Ic={class:"row"},Uc=wc((()=>(0,i._)("div",{class:"label",style:{flex:"1"}},"行数:",-1))),Lc={class:"row"},Cc=wc((()=>(0,i._)("div",{class:"label",style:{flex:"1"}},"列数:",-1))),Ec={class:"btns"};var Dc=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=(0,s.iH)([]),a=(0,s.iH)(3),n=(0,s.iH)(3),o=(0,s.iH)(!1),r=()=>{if(!l.value.length)return;const[e,a]=l.value;t("insert",{row:e,col:a})},u=()=>a.value<1||a.value>20||n.value<1||n.value>20?ie.ZP.warning("行数/列数必须在0~20之间!"):(t("insert",{row:a.value,col:n.value}),void(o.value=!1)),c=()=>{t("close"),o.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",xc,[(0,i._)("div",Sc,[(0,i._)("div",kc,"表格 "+(0,ne.zw)(l.value.length?`${l.value[0]} x ${l.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>o.value=!o.value)},(0,ne.zw)(o.value?"返回":"自定义"),1)]),o.value?((0,i.wg)(),(0,i.iD)("div",bc,[(0,i._)("div",Ic,[Uc,(0,i.Wm)((0,s.SU)(yc.Z),{min:1,max:20,value:a.value,"onUpdate:value":t[3]||(t[3]=e=>a.value=e),style:{flex:"3"}},null,8,["value"])]),(0,i._)("div",Lc,[Cc,(0,i.Wm)((0,s.SU)(yc.Z),{min:1,max:20,value:n.value,"onUpdate:value":t[4]||(t[4]=e=>n.value=e),style:{flex:"3"}},null,8,["value"])]),(0,i._)("div",Ec,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",onClick:t[5]||(t[5]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>l.value=[]),onClick:t[2]||(t[2]=e=>r())},[(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:a=>l.value=[e,t],key:t},[(0,i._)("div",{class:(0,ne.C_)(["cell",{active:l.value.length&&e<=l.value[0]&&t<=l.value[1]}])},null,2)],40,_c))),64))]))),64))])],32))]))}});const Wc=(0,Jt.Z)(Dc,[["__scopeId","data-v-8fd9f34c"]]);var Zc=Wc;const Mc={class:"media-input"},Tc={class:"tabs"},Hc=["onClick"],Oc={class:"btns"},Fc={class:"btns"};var Ac=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=(0,s.iH)("video"),a=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),n=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),o=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],r=()=>{if(!a.value)return ie.ZP.error("请先输入正确的视频地址");t("insertVideo",a.value)},u=()=>{if(!n.value)return ie.ZP.error("请先输入正确的音频地址");t("insertAudio",n.value)};return(e,c)=>((0,i.wg)(),(0,i.iD)("div",Mc,[(0,i._)("div",Tc,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(o,(e=>(0,i._)("div",{class:(0,ne.C_)(["tab",{active:l.value===e.key}]),key:e.key,onClick:t=>l.value=e.key},(0,ne.zw)(e.label),11,Hc))),64))]),"video"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)((0,s.SU)(br.ZP),{value:a.value,"onUpdate:value":c[0]||(c[0]=e=>a.value=e),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Oc,[(0,i.Wm)((0,s.SU)(_r.Z),{onClick:c[1]||(c[1]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{type:"primary",onClick:c[2]||(c[2]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)((0,s.SU)(br.ZP),{value:n.value,"onUpdate:value":c[3]||(c[3]=e=>n.value=e),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Fc,[(0,i.Wm)((0,s.SU)(_r.Z),{onClick:c[4]||(c[4]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{type:"primary",onClick:c[5]||(c[5]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Pc=(0,Jt.Z)(Ac,[["__scopeId","data-v-4e5f883a"]]);var $c=Pc,Nc=l(3576);Nc.kh.SUB_SUP_SCALE=.5;const zc=[{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"}],Rc=[{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"}]}],Bc=["width","height"],jc=["transform"],qc=["d"];var Yc=(0,i.aZ)({__name:"FormulaContent",props:{latex:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},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 Nc._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(${(0,s.SU)(n)}, ${(0,s.SU)(n)}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,qc)],8,jc)],8,Bc))}});const Vc=(0,Jt.Z)(Yc,[["__scopeId","data-v-1c41d9fe"]]);var Jc=Vc;const Gc=["innerHTML"];var Kc=(0,i.aZ)({__name:"SymbolContent",props:{latex:{type:String,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Nc._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:(0,s.SU)(l)},null,8,Gc))}});const Xc=Kc;var Qc=Xc;const ed={class:"latex-editor"},td={class:"container"},ld={class:"left"},ad={class:"input-area"},nd={class:"preview"},od={key:0,class:"placeholder"},id={key:1,class:"preview-content"},sd={class:"right"},rd={class:"tabs"},ud=["onClick"],cd={class:"content"},dd={key:0,class:"symbol"},pd={class:"symbol-tabs"},md=["onClick"],vd={class:"symbol-pool"},fd=["onClick"],hd={key:1,class:"formula"},gd={class:"formula-title"},yd=["onClick"],wd={class:"footer"};var xd=(0,i.aZ)({__name:"index",props:{value:{type:String,default:""}},emits:["update","close"],setup(e,{emit:t}){const l=e,a=br.ZP.TextArea,n=[{label:"常用符号",value:"symbol"},{label:"预置公式",value:"formula"}],o=zc,r=Rc,u=(0,s.iH)(""),c=(0,s.iH)("symbol"),d=(0,s.iH)(),p=(0,s.iH)(Rc[0].type),m=(0,i.Fl)((()=>{const e=Rc.find((e=>e.type===p.value));return e?.children||[]}));(0,i.bv)((()=>{l.value&&(u.value=l.value)}));const v=()=>{if(!u.value)return ie.ZP.error("公式不能为空");const e=new Nc._q(u.value),l=e.pathd({}),a=e.box({});t("update",{latex:u.value,path:l,w:a.w+32,h:a.h+32})},f=e=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,e))};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",ed,[(0,i._)("div",td,[(0,i._)("div",ld,[(0,i._)("div",ad,[(0,i.Wm)((0,s.SU)(a),{value:u.value,"onUpdate:value":l[0]||(l[0]=e=>u.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:d},null,8,["value"])]),(0,i._)("div",nd,[u.value?((0,i.wg)(),(0,i.iD)("div",id,[(0,i.Wm)(Jc,{width:518,height:138,latex:u.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",od,"公式预览"))])]),(0,i._)("div",sd,[(0,i._)("div",rd,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(n,(e=>(0,i._)("div",{class:(0,ne.C_)(["tab",{active:e.value===c.value}]),key:e.value,onClick:t=>c.value=e.value},(0,ne.zw)(e.label),11,ud))),64))]),(0,i._)("div",cd,["symbol"===c.value?((0,i.wg)(),(0,i.iD)("div",dd,[(0,i._)("div",pd,[((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,ne.C_)(["symbol-tab",{active:p.value===e.type}]),key:e.type,onClick:t=>p.value=e.type},(0,ne.zw)(e.label),11,md)))),128))]),(0,i._)("div",vd,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(m),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>f(e.latex)},[(0,i.Wm)(Qc,{latex:e.latex},null,8,["latex"])],8,fd)))),128))])])):((0,i.wg)(),(0,i.iD)("div",hd,[((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",gd,(0,ne.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>u.value=e.latex},[(0,i.Wm)(Jc,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,yd)])))),128))]))])])]),(0,i._)("div",wd,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",onClick:l[1]||(l[1]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",type:"primary",onClick:l[2]||(l[2]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const Sd=(0,Jt.Z)(xd,[["__scopeId","data-v-097b396c"]]);var kd=Sd;const _d={class:"canvas-tool"},bd={class:"left-handler"},Id={class:"add-element-handler"},Ud={class:"handler-item group-btn"},Ld={class:"right-handler"},Cd={class:"viewport-size-preset"},Ed=["onClick"],Dd={class:"text"};var Wd=(0,i.aZ)({__name:"index",setup(e){const t=A(),{creatingElement:l}=(0,o.Jk)(t),{canUndo:a,canRedo:n}=(0,o.Jk)(q()),{redo:r,undo:u}=Oe(),{scaleCanvas:c,setCanvasScalePercentage:d,resetCanvas:p,canvasScalePercentage:m}=Xe(),v=[200,150,100,80,50],f=(0,s.iH)(!1),h=e=>{d(e),f.value=!1},{createImageElement:g,createChartElement:y,createTableElement:w,createLatexElement:x,createVideoElement:S,createAudioElement:k}=Fe(),_=e=>{const t=e[0];t&&Ee(t).then((e=>g(e)))},b=(0,s.iH)(!1),I=(0,s.iH)(!1),U=(0,s.iH)(!1),L=(0,s.iH)(!1),C=(0,s.iH)(!1),E=(0,s.iH)(!1),D=(0,s.iH)(!1),W=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},Z=e=>{t.setCreatingElement({type:"shape",data:e}),b.value=!1},M=e=>{t.setCreatingElement({type:"line",data:e}),I.value=!1};return(e,t)=>{const o=(0,i.up)("IconBack"),d=(0,i.up)("IconNext"),g=(0,i.up)("IconFontSize"),T=(0,i.up)("IconTextRotationNone"),H=(0,i.up)("IconTextRotationDown"),O=(0,i.up)("IconDown"),F=(0,i.up)("IconPicture"),A=(0,i.up)("IconGraphicDesign"),P=(0,i.up)("IconConnection"),$=(0,i.up)("IconChartProportion"),N=(0,i.up)("IconInsertTable"),z=(0,i.up)("IconFormula"),R=(0,i.up)("IconVideoTwo"),B=(0,i.up)("IconMinus"),j=(0,i.up)("IconPlus"),q=(0,i.up)("IconFullScreen");return(0,i.wg)(),(0,i.iD)("div",_d,[(0,i._)("div",bd,[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"撤销"},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:(0,ne.C_)(["handler-item",{disable:!(0,s.SU)(a)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(u)())},null,8,["class"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"重做"},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:(0,ne.C_)(["handler-item",{disable:!(0,s.SU)(n)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(r)())},null,8,["class"])])),_:1},8,["mouseEnterDelay"])]),(0,i._)("div",Id,[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入文字"},{default:(0,i.w5)((()=>[(0,i._)("div",Ud,[(0,i.Wm)(g,{class:(0,ne.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[2]||(t[2]=e=>W())},null,8,["class"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:D.value,"onUpdate:visible":t[5]||(t[5]=e=>D.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"text-type-item",onClick:t[3]||(t[3]=()=>{W(),D.value=!1})},[(0,i.Wm)(T),(0,i.Uk)(" 横向文本框")]),(0,i._)("div",{class:"text-type-item",onClick:t[4]||(t[4]=()=>{W(!0),D.value=!1})},[(0,i.Wm)(H),(0,i.Uk)(" 竖向文本框")])])),default:(0,i.w5)((()=>[(0,i.Wm)(O,{class:"arrow"})])),_:1},8,["visible"])])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)(tl,{onChange:t[6]||(t[6]=e=>_(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图片"},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"handler-item"})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:b.value,"onUpdate:visible":t[8]||(t[8]=e=>b.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(lc,{onSelect:t[7]||(t[7]=e=>Z(e))})])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入形状"},{default:(0,i.w5)((()=>[(0,i.Wm)(A,{class:(0,ne.C_)(["handler-item",{active:"shape"===(0,s.SU)(l)?.type}])},null,8,["class"])])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:I.value,"onUpdate:visible":t[10]||(t[10]=e=>I.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(pc,{onSelect:t[9]||(t[9]=e=>M(e))})])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入线条"},{default:(0,i.w5)((()=>[(0,i.Wm)(P,{class:(0,ne.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"])])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:U.value,"onUpdate:visible":t[12]||(t[12]=e=>U.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(gc,{onSelect:t[11]||(t[11]=e=>{(0,s.SU)(y)(e),U.value=!1})})])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图表"},{default:(0,i.w5)((()=>[(0,i.Wm)($,{class:"handler-item"})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:L.value,"onUpdate:visible":t[15]||(t[15]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Zc,{onClose:t[13]||(t[13]=e=>L.value=!1),onInsert:t[14]||(t[14]=({row:e,col:t})=>{(0,s.SU)(w)(e,t),L.value=!1})})])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入表格"},{default:(0,i.w5)((()=>[(0,i.Wm)(N,{class:"handler-item"})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入公式"},{default:(0,i.w5)((()=>[(0,i.Wm)(z,{class:"handler-item",onClick:t[16]||(t[16]=e=>E.value=!0)})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:C.value,"onUpdate:visible":t[20]||(t[20]=e=>C.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)($c,{onClose:t[17]||(t[17]=e=>C.value=!1),onInsertVideo:t[18]||(t[18]=e=>{(0,s.SU)(S)(e),C.value=!1}),onInsertAudio:t[19]||(t[19]=e=>{(0,s.SU)(k)(e),C.value=!1})})])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入音视频"},{default:(0,i.w5)((()=>[(0,i.Wm)(R,{class:"handler-item"})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"])]),(0,i._)("div",Ld,[(0,i.Wm)(B,{class:"handler-item viewport-size",onClick:t[21]||(t[21]=e=>(0,s.SU)(c)("-"))}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:f.value,"onUpdate:visible":t[22]||(t[22]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",Cd,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(v,(e=>(0,i._)("div",{class:"preset-item",key:e,onClick:t=>h(e)},(0,ne.zw)(e)+"%",9,Ed))),64))])])),default:(0,i.w5)((()=>[(0,i._)("span",Dd,(0,ne.zw)((0,s.SU)(m)),1)])),_:1},8,["visible"]),(0,i.Wm)(j,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(c)("+"))}),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"适应屏幕"},{default:(0,i.w5)((()=>[(0,i.Wm)(q,{class:"handler-item viewport-size-adaptation",onClick:t[24]||(t[24]=e=>(0,s.SU)(p)())})])),_:1},8,["mouseEnterDelay"])]),(0,i.Wm)((0,s.SU)(ae.Z),{visible:E.value,"onUpdate:visible":t[27]||(t[27]=e=>E.value=e),footer:null,centered:"",width:880,destroyOnClose:""},{default:(0,i.w5)((()=>[(0,i.Wm)(kd,{onClose:t[25]||(t[25]=e=>E.value=!1),onUpdate:t[26]||(t[26]=e=>{(0,s.SU)(x)(e),E.value=!1})})])),_:1},8,["visible"])])}}});const Zd=(0,Jt.Z)(Wd,[["__scopeId","data-v-8a7bb5f0"]]);var Md=Zd,Td=()=>{const{slides:e}=(0,o.Jk)(H()),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}},Hd=l(1474),Od=(0,i.aZ)({__name:"Sortable",props:{options:{type:Object,default:()=>({})},list:{type:Array,required:!0},itemKey:{type:String,required:!0}},emits:["start","end","add","remove","update"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(!1),n=(0,s.iH)(null),o=(0,s.iH)(null);return(0,i.YP)(n,(e=>{e&&(o.value=new Hd.ZP(e,{...l.options,onStart:e=>{a.value=!0,t("start",e)},onEnd:e=>{setTimeout((()=>{a.value=!1,t("end",e)}))},onAdd:e=>t("add",e),onRemove:e=>t("remove",e),onUpdate:e=>t("update",e)}))})),(0,i.YP)((()=>l.options),(e=>{if(e&&o.value)for(const t in e){const l=t,a=e[t];o.value.option(l,a)}})),(0,i.Ah)((()=>{o.value&&(o.value.destroy(),n.value=null,o.value=null)})),(t,a)=>((0,i.wg)(),(0,i.iD)("div",{ref_key:"containerRef",ref:n,class:(0,ne.C_)(t.$props.class)},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.list,((e,a)=>(0,i.WI)(t.$slots,"item",{key:e[l.itemKey],element:e,index:a}))),128))],2))}});const Fd=Od;var Ad=Fd;const Pd={class:"layout-pool"},$d=["onClick"];var Nd=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const{layouts:l}=(0,o.Jk)(H()),a=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Pd,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>a(e)},[(0,i.Wm)(Uu,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,$d)))),128))]))}});const zd=(0,Jt.Z)(Nd,[["__scopeId","data-v-cc6b7dca"]]);var Rd=zd;const Bd={class:"add-slide"},jd={class:"select-btn"},qd=["onMousedown"],Yd={class:"page-number"};var Vd=(0,i.aZ)({__name:"index",setup(e){const t=A(),l=H(),a=Y(),{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:m}=Td(),v=(0,i.Fl)((()=>[...n.value,c.value])),f=(0,s.iH)(!1),{copySlide:h,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:S,cutSlide:k,selectAllSlide:_,sortSlides:b}=$e(),I=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},U=(e,l)=>{const a=v.value.length>1;if(!a||!v.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=v.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),I(v.value[0])}else if(v.value.includes(l)){const e=v.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...v.value,l];t.updateSelectedSlidesIndex(e),I(l)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...v.value),n=l;l<e&&(n=Math.max(...v.value),e=l);const o=[];for(let t=e;t<=n;t++)o.push(t);t.updateSelectedSlidesIndex(o),I(l)}else t.updateSelectedSlidesIndex([]),I(l)},L=e=>{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},C=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&b(t,l)},{enterScreening:E,enterScreeningFromStart:D}=Ke(),W=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:D}],Z=()=>[{text:"剪切",subText:"Ctrl + X",handler:k},{text:"复制",subText:"Ctrl + C",handler:h},{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:()=>S()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:E}];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[3]||(t[3]=()=>L(!0))},[(0,i._)("div",Bd,[(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)((0,s.SU)(zu.Z),{trigger:"click",placement:"bottomLeft",visible:f.value,"onUpdate:visible":t[2]||(t[2]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Rd,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),f.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",jd,[(0,i.Wm)(a)])])),_:1},8,["visible"])]),(0,i.Wm)(Ad,{class:"thumbnail-list",list:(0,s.SU)(u),options:{animation:200,scroll:!0,scrollSensitivity:50},onEnd:C,itemKey:"id"},{item:(0,i.w5)((({element:e,index:t})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["thumbnail-item",{active:(0,s.SU)(c)===t,selected:(0,s.SU)(v).includes(t)}]),onMousedown:e=>U(e,t)},[(0,i._)("div",{class:(0,ne.C_)(["label",{"offset-left":t>=99}])},(0,ne.zw)((0,s.SU)(J)(t+1,2)),3),(0,i.Wm)(Uu,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(m)},null,8,["slide","visible"])],42,qd)),[[n,Z]])])),_:1},8,["list"]),(0,i._)("div",Yd,"幻灯片 "+(0,ne.zw)((0,s.SU)(c)+1)+" / "+(0,ne.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>L(!1)],[n,W]])}}});const Jd=(0,Jt.Z)(Vd,[["__scopeId","data-v-dc3b3650"]]);var Gd=Jd,Kd=(l(8633),l(58)),Xd=()=>{const e=A(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=()=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({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{toggleFormatPainter:a}},Qd=(l(6969),l(8943));const ep=e=>((0,i.dD)("data-v-54aad0f0"),e=e(),(0,i.Cn)(),e),tp={class:"element-opacity"},lp={class:"row"},ap=ep((()=>(0,i._)("div",{style:{flex:"2"}},"不透明度:",-1)));var np=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=H(),{handleElement:l}=(0,o.Jk)(A()),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}=Oe(),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",tp,[(0,i._)("div",lp,[ap,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"slider",min:0,max:1,step:.1,value:a.value,onChange:t[0]||(t[0]=e=>r(e))},null,8,["step","value"])])]))}});const op=(0,Jt.Z)(np,[["__scopeId","data-v-54aad0f0"]]);var ip=op,sp=(l(2577),l(9937));const rp={class:"color-block"};var up=(0,i.aZ)({__name:"ColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,l)=>{const a=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)((0,s.SU)(_r.Z),{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",rp,[(0,i._)("div",{class:"content",style:(0,ne.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(a,{class:"color-btn-icon"})])),_:1})}}});const cp=(0,Jt.Z)(up,[["__scopeId","data-v-3b4a02d8"]]);var dp=cp,pp=(0,i.aZ)({__name:"Checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,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,ne.j5)((0,s.SU)(o))},null,4))}});const mp=(0,Jt.Z)(pp,[["__scopeId","data-v-7494636c"]]);var vp=mp;const fp=e=>((0,i.dD)("data-v-246b525c"),e=e(),(0,i.Cn)(),e),hp={class:"alpha"},gp={class:"alpha-checkboard-wrap"},yp=fp((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),wp=[yp];var xp=(0,i.aZ)({__name:"Alpha",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.value)),n=(0,i.Fl)((()=>{const e=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),o=(0,s.iH)(),r=e=>{if(e.preventDefault(),!o.value)return;const l=o.value.clientWidth,n=o.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s;s=i<0?0:i>l?1:Math.round(100*i/l)/100,a.value.a!==s&&t("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:s})},u=()=>{window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",u)},c=e=>{r(e),window.addEventListener("mousemove",r),window.addEventListener("mouseup",u)};return(0,i.Ah)(u),(e,t)=>((0,i.wg)(),(0,i.iD)("div",hp,[(0,i._)("div",gp,[(0,i.Wm)(vp)]),(0,i._)("div",{class:"alpha-gradient",style:(0,ne.j5)({background:(0,s.SU)(n)})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:o,onMousedown:t[0]||(t[0]=e=>c(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,ne.j5)({left:100*(0,s.SU)(a).a+"%"})},wp,4)],544)]))}});const Sp=(0,Jt.Z)(xp,[["__scopeId","data-v-246b525c"]]);var kp=Sp;const _p=e=>((0,i.dD)("data-v-60c3cca1"),e=e(),(0,i.Cn)(),e),bp={class:"hue"},Ip=_p((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),Up=[Ip];var Lp=(0,i.aZ)({__name:"Hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(""),o=(0,i.Fl)((()=>{const e=(0,D.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),r=(0,i.Fl)((()=>0===o.value.h&&"right"===n.value?"100%":100*o.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,D.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-a.value>0&&(n.value="right"),0!==t&&t-a.value<0&&(n.value="left"),a.value=t}));const u=(0,s.iH)(),c=e=>{if(e.preventDefault(),!u.value)return;const a=u.value.clientWidth,n=u.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s,r;i<0?s=0:i>a?s=360:(r=100*i/a,s=360*r/100),-1!==l.hue&&o.value.h===s||t("colorChange",{h:s,l:o.value.l,s:o.value.s,a:o.value.a})},d=()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},p=e=>{c(e),window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)};return(0,i.Ah)(d),(e,t)=>((0,i.wg)(),(0,i.iD)("div",bp,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:u,onMousedown:t[0]||(t[0]=e=>p(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,ne.j5)({left:(0,s.SU)(r)})},Up,4)],544)]))}});const Cp=(0,Jt.Z)(Lp,[["__scopeId","data-v-60c3cca1"]]);var Ep=Cp;const Dp=e=>((0,i.dD)("data-v-d230faf4"),e=e(),(0,i.Cn)(),e),Wp=Dp((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),Zp=Dp((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Mp=Dp((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Tp=[Mp];var Hp=(0,i.aZ)({__name:"Saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{const e=(0,D.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),n=(0,i.Fl)((()=>`hsl(${a.value.h}, 100%, 50%)`)),o=(0,i.Fl)((()=>-100*a.value.v+1+100+"%")),r=(0,i.Fl)((()=>100*a.value.s+"%")),u=(0,W.throttle)((function(e){t("colorChange",e)}),20,{leading:!0,trailing:!1}),c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,l=c.value.clientHeight,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=c.value.getBoundingClientRect().top+window.pageYOffset,i=(0,W.clamp)(e.pageX-n,0,t),s=(0,W.clamp)(e.pageY-o,0,l),r=i/t,d=(0,W.clamp)(-s/l+1,0,1);u({h:a.value.h,s:r,v:d,a:a.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},m=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",{class:"saturation",ref_key:"saturationRef",ref:c,style:(0,ne.j5)({background:(0,s.SU)(n)}),onMousedown:t[0]||(t[0]=e=>m(e))},[Wp,Zp,(0,i._)("div",{class:"saturation-pointer",style:(0,ne.j5)({top:(0,s.SU)(o),left:(0,s.SU)(r)})},Tp,4)],36))}});const Op=(0,Jt.Z)(Hp,[["__scopeId","data-v-d230faf4"]]);var Fp=Op;const Ap={class:"editable-input"},Pp=["value"];var $p=(0,i.aZ)({__name:"EditableInput",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,D.Z)(l.value).toHex8String().toUpperCase():(0,D.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),n=e=>{const l=e.target.value;l.length>=6&&t("colorChange",(0,D.Z)(l).toRgb())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ap,[(0,i._)("input",{class:"input-content",value:(0,s.SU)(a),onInput:t[0]||(t[0]=e=>n(e))},null,40,Pp)]))}});const Np=(0,Jt.Z)($p,[["__scopeId","data-v-2f428dde"]]);var zp=Np;const Rp={class:"color-picker"},Bp={class:"picker-saturation-wrap"},jp={class:"picker-controls"},qp={class:"picker-color-wrap"},Yp={class:"picker-sliders"},Vp={class:"picker-hue-wrap"},Jp={class:"picker-alpha-wrap"},Gp={class:"picker-field"},Kp={class:"picker-presets"},Xp=["onClick"],Qp={class:"picker-gradient-presets"},em=["onClick"],tm={class:"picker-presets"},lm=["onClick"],am={key:0,class:"recent-colors-title"},nm={class:"picker-presets"},om=["onClick"];var im=(0,i.aZ)({__name:"index",props:{modelValue:{type:String,default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a="RECENT_COLORS",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,D.Z)(e).toRgb(),n=(0,D.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,D.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)([]),m=(0,i.Fl)({get(){return(0,D.Z)(l.modelValue).toRgb()},set(e){const l=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;t("update:modelValue",l)}}),v=r(),f=(0,i.Fl)((()=>`rgba(${[m.value.r,m.value.g,m.value.b,m.value.a].join(",")})`)),h=e=>{d.value=(0,D.Z)(e).toHsl().h,t("update:modelValue",e)},g=(0,W.debounce)((function(){const e=(0,D.Z)(m.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(a);e&&(p.value=JSON.parse(e))})),(0,i.YP)(p,(()=>{const e=JSON.stringify(p.value);localStorage.setItem(a,e)}));const y=e=>{"h"in e?(d.value=e.h,m.value=(0,D.Z)(e).toRgb()):(d.value=(0,D.Z)(e).toHsl().h,m.value=e),g()},w=()=>{const e="EyeDropper"in window;e?x():S()},x=()=>{ie.ZP.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,D.Z)(e.sRGBHex);d.value=t.toHsl().h,m.value=t.toRgb(),g()})).catch((()=>{ie.ZP.success("关闭取色吸管")}))},S=()=>{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,st.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,m]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(m/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,D.Z)(i);d.value=e.toHsl().h,m.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((()=>{ie.ZP.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Rp,[(0,i._)("div",Bp,[(0,i.Wm)(Fp,{value:(0,s.SU)(m),hue:d.value,onColorChange:t[0]||(t[0]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",jp,[(0,i._)("div",qp,[(0,i._)("div",{class:"picker-current-color",style:(0,ne.j5)({background:(0,s.SU)(f)})},null,4),(0,i.Wm)(vp)]),(0,i._)("div",Yp,[(0,i._)("div",Vp,[(0,i.Wm)(Ep,{value:(0,s.SU)(m),hue:d.value,onColorChange:t[1]||(t[1]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",Jp,[(0,i.Wm)(kp,{value:(0,s.SU)(m),onColorChange:t[2]||(t[2]=e=>y(e))},null,8,["value"])])])]),(0,i._)("div",Gp,[(0,i.Wm)(zp,{class:"input",value:(0,s.SU)(m),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=>h("#00000000"))},[(0,i.Wm)(vp)])]),(0,i._)("div",Kp,[((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,ne.j5)({background:e}),onClick:t=>h(e)},null,12,Xp))),64))]),(0,i._)("div",Qp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),((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,ne.j5)({background:e}),onClick:t=>h(e)},null,12,em)))),128))])))),128))]),(0,i._)("div",tm,[((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,ne.j5)({background:e}),onClick:t=>h(e)},null,12,lm))),64))]),p.value.length?((0,i.wg)(),(0,i.iD)("div",am,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",nm,[((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=>h(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,ne.j5)({background:e})},null,4)],8,om)))),128))])])}}});const sm=(0,Jt.Z)(im,[["__scopeId","data-v-3d280c42"]]);var rm=sm;const um=e=>((0,i.dD)("data-v-49642f50"),e=e(),(0,i.Cn)(),e),cm={class:"element-outline"},dm={key:0,class:"row"},pm=um((()=>(0,i._)("div",{style:{flex:"2"}},"启用边框:",-1))),mm={class:"switch-wrapper",style:{flex:"3"}},vm={class:"row"},fm=um((()=>(0,i._)("div",{style:{flex:"2"}},"边框样式:",-1))),hm={class:"row"},gm=um((()=>(0,i._)("div",{style:{flex:"2"}},"边框颜色:",-1))),ym={class:"row"},wm=um((()=>(0,i._)("div",{style:{flex:"2"}},"边框粗细:",-1)));var xm=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=Ir.ZP.Option,l=H(),{handleElement:a}=(0,o.Jk)(A()),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}=Oe(),c=e=>{if(!a.value)return;const t={outline:{...n.value,...e}};l.updateElement({id:a.value.id,props:t}),u()},d=e=>{if(a.value){if(e){const e={width:2,color:"#000",style:"solid"};l.updateElement({id:a.value.id,props:{outline:e}})}else l.removeElementProps({id:a.value.id,propName:"outline"});u()}};return(l,a)=>((0,i.wg)(),(0,i.iD)("div",cm,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",dm,[pm,(0,i._)("div",mm,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:r.value,onChange:a[0]||(a[0]=e=>d(e))},null,8,["checked"])])])),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",vm,[fm,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:n.value.style,onChange:a[1]||(a[1]=e=>c({style:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:"solid"},{default:(0,i.w5)((()=>[(0,i.Uk)("实线边框")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"dashed"},{default:(0,i.w5)((()=>[(0,i.Uk)("虚线边框")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",hm,[gm,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:n.value.color,"onUpdate:modelValue":a[2]||(a[2]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:n.value.color||"#000",style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",ym,[wm,(0,i.Wm)((0,s.SU)(yc.Z),{value:n.value.width,onChange:a[3]||(a[3]=e=>c({width:e})),style:{flex:"3"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const Sm=(0,Jt.Z)(xm,[["__scopeId","data-v-49642f50"]]);var km=Sm;const _m=e=>((0,i.dD)("data-v-19c233fc"),e=e(),(0,i.Cn)(),e),bm={class:"element-shadow"},Im={class:"row"},Um=_m((()=>(0,i._)("div",{style:{flex:"2"}},"启用阴影:",-1))),Lm={class:"switch-wrapper",style:{flex:"3"}},Cm={class:"row"},Em=_m((()=>(0,i._)("div",{style:{flex:"2"}},"水平阴影:",-1))),Dm={class:"row"},Wm=_m((()=>(0,i._)("div",{style:{flex:"2"}},"垂直阴影:",-1))),Zm={class:"row"},Mm=_m((()=>(0,i._)("div",{style:{flex:"2"}},"模糊距离:",-1))),Tm={class:"row"},Hm=_m((()=>(0,i._)("div",{style:{flex:"2"}},"阴影颜色:",-1)));var Om=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=H(),{handleElement:l}=(0,o.Jk)(A()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="shadow"in l.value?l.value.shadow:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=Oe(),u=e=>{if(!l.value||!a.value)return;const n={...a.value,...e};t.updateElement({id:l.value.id,props:{shadow:n}}),r()},c=e=>{if(l.value){if(e){const e={h:1,v:1,blur:2,color:"#000"};t.updateElement({id:l.value.id,props:{shadow:e}})}else t.removeElementProps({id:l.value.id,propName:"shadow"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bm,[(0,i._)("div",Im,[Um,(0,i._)("div",Lm,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:n.value,onChange:t[0]||(t[0]=e=>c(e))},null,8,["checked"])])]),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Cm,[Em,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"slider",min:-10,max:10,step:1,value:a.value.h,onChange:t[1]||(t[1]=e=>u({h:e}))},null,8,["value"])]),(0,i._)("div",Dm,[Wm,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"slider",min:-10,max:10,step:1,value:a.value.v,onChange:t[2]||(t[2]=e=>u({v:e}))},null,8,["value"])]),(0,i._)("div",Zm,[Mm,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"slider",min:1,max:20,step:1,value:a.value.blur,onChange:t[3]||(t[3]=e=>u({blur:e}))},null,8,["value"])]),(0,i._)("div",Tm,[Hm,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:a.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:a.value.color,style:{flex:"3"}},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Fm=(0,Jt.Z)(Om,[["__scopeId","data-v-19c233fc"]]);var Am=Fm;const Pm={class:"text-color-block"};var $m=(0,i.aZ)({__name:"TextColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.j4)((0,s.SU)(_r.Z),{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(t.$slots,"default"),(0,i._)("div",Pm,[(0,i._)("div",{class:"text-color-block-content",style:(0,ne.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const Nm=(0,Jt.Z)($m,[["__scopeId","data-v-c90c8a28"]]);var zm=Nm,Rm=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,ne.C_)(["checkbox-button",{checked:e.checked}])},[(0,i.WI)(t.$slots,"default")],2))}});const Bm=(0,Jt.Z)(Rm,[["__scopeId","data-v-699cf016"]]);var jm=Bm;const qm={class:"checkbox-button-group"};function Ym(e,t){return(0,i.wg)(),(0,i.iD)("div",qm,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const Vm={},Jm=(0,Jt.Z)(Vm,[["render",Ym],["__scopeId","data-v-b8aa6eac"]]);var Gm=Jm;const Km=e=>((0,i.dD)("data-v-74237311"),e=e(),(0,i.Cn)(),e),Xm={class:"text-style-panel"},Qm={class:"preset-style"},ev=["onClick"],tv={class:"link-popover"},lv={class:"btns"},av={class:"row"},nv={class:"list-wrap"},ov=["onClick"],iv=Km((()=>(0,i._)("span",null,null,-1))),sv=[iv],rv=Km((()=>(0,i._)("div",{style:{flex:"1"}},null,-1))),uv={class:"list-wrap"},cv=["onClick"],dv=Km((()=>(0,i._)("span",null,null,-1))),pv=[dv],mv={class:"row"},vv=Km((()=>(0,i._)("div",{style:{flex:"2"}},"行间距:",-1))),fv={class:"row"},hv=Km((()=>(0,i._)("div",{style:{flex:"2"}},"段间距:",-1))),gv={class:"row"},yv=Km((()=>(0,i._)("div",{style:{flex:"2"}},"字间距:",-1))),wv={class:"row"},xv=Km((()=>(0,i._)("div",{style:{flex:"2"}},"首行缩进:",-1))),Sv={class:"row"},kv=Km((()=>(0,i._)("div",{style:{flex:"2"}},"文本框填充:",-1)));var _v=(0,i.aZ)({__name:"TextStylePanel",setup(e){const{Group:t,Button:l}=Kd.ZP,{OptGroup:a,Option:n}=Ir.ZP,r=br.ZP.Group,u=_r.Z.Group,d=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"48px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"36px"},{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"}]}],p=A(),m=H(),{handleElement:v,handleElementId:f,richTextAttrs:h,availableFonts:g,textFormatPainter:y}=(0,o.Jk)(p),{addHistorySnapshot:w}=Oe(),{toggleFormatPainter:x}=Xd(),S=e=>{m.updateElement({id:f.value,props:e}),w()},k=(0,s.iH)(!1),_=(0,s.iH)(!1),b=(0,s.iH)(["disc","circle","square"]),I=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),U=(0,s.iH)("#000"),L=(0,s.iH)(),C=(0,s.iH)(),E=(0,s.iH)(),D=(0,s.iH)();(0,i.YP)(v,(()=>{v.value&&"text"===v.value.type&&(U.value=v.value.fill||"#fff",L.value=v.value.lineHeight||1.5,C.value=v.value.wordSpace||0,E.value=v.value.textIndent||0,D.value=void 0===v.value.paragraphSpace?5:v.value.paragraphSpace)}),{deep:!0,immediate:!0});const W=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],Z=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],M=[0,1,2,3,4,5,6,8,10],T=[0,48,96,144,192,240,288,336],O=[0,5,10,15,20,25,30,40,50,80],F=e=>{S({lineHeight:e})},P=e=>{S({paragraphSpace:e})},$=e=>{S({wordSpace:e})},N=e=>{S({textIndent:e})},z=e=>{S({fill:e})},R=(e,t)=>{Sn.emit(yn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},B=e=>{Sn.emit(yn.RICH_TEXT_COMMAND,{action:e})},j=(0,s.iH)(""),q=(0,s.iH)(!1);(0,i.YP)(h,(()=>q.value=!1));const Y=()=>{j.value=h.value.link,q.value=!0},V=e=>{if(e){const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!t.test(e))return ie.ZP.error("不是正确的网页链接地址")}R("link",e),q.value=!1};return(e,o)=>{const p=(0,i.up)("IconFontSize"),m=(0,i.up)("IconAddText"),v=(0,i.up)("IconText"),f=(0,i.up)("IconHighLight"),w=(0,i.up)("IconTextBold"),S=(0,i.up)("IconTextItalic"),H=(0,i.up)("IconTextUnderline"),A=(0,i.up)("IconStrikethrough"),J=(0,i.up)("IconCode"),G=(0,i.up)("IconQuote"),K=(0,i.up)("IconFormat"),X=(0,i.up)("IconFormatBrush"),Q=(0,i.up)("IconLinkOne"),ee=(0,i.up)("IconAlignTextLeft"),te=(0,i.up)("IconAlignTextCenter"),le=(0,i.up)("IconAlignTextRight"),ae=(0,i.up)("IconList"),oe=(0,i.up)("IconDown"),ie=(0,i.up)("IconOrderedList"),se=(0,i.up)("IconIndentLeft"),re=(0,i.up)("IconIndentRight"),ue=(0,i.up)("IconRowHeight"),ce=(0,i.up)("IconVerticalSpacingBetweenItems"),de=(0,i.up)("IconFullwidth");return(0,i.wg)(),(0,i.iD)("div",Xm,[(0,i._)("div",Qm,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(d,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,ne.j5)(e.style),onClick:t=>B(e.cmd)},(0,ne.zw)(e.label),13,ev))),64))]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)((0,s.SU)(r),{compact:"",class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(Ir.ZP),{class:"font-select",style:{flex:"3"},value:(0,s.SU)(h).fontname,onChange:o[0]||(o[0]=e=>R("fontname",e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(p)])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{label:"系统字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(g),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",{style:(0,ne.j5)({fontFamily:e.value})},(0,ne.zw)(e.label),5)])),_:2},1032,["value"])))),128))])),_:1}),(0,i.Wm)((0,s.SU)(a),{label:"在线字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",null,(0,ne.zw)(e.label),1)])),_:2},1032,["value"])))),128))])),_:1})])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"2"},value:(0,s.SU)(h).fontsize,onChange:o[1]||(o[1]=e=>R("fontsize",e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(m)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(W,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e),1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])])),_:1}),(0,i.Wm)((0,s.SU)(u),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(h).color,"onUpdate:modelValue":o[2]||(o[2]=e=>R("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:(0,s.SU)(h).color,style:{flex:"3"}},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(h).backcolor,"onUpdate:modelValue":o[3]||(o[3]=e=>R("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:(0,s.SU)(h).backcolor,style:{flex:"3"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"font-size-btn",style:{flex:"2"},onClick:o[4]||(o[4]=e=>R("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p),(0,i.Uk)("+")])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"font-size-btn",style:{flex:"2"},onClick:o[5]||(o[5]=e=>R("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p),(0,i.Uk)("-")])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).bold,onClick:o[6]||(o[6]=e=>R("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).em,onClick:o[7]||(o[7]=e=>R("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(S)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).underline,onClick:o[8]||(o[8]=e=>R("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).strikethrough,onClick:o[9]||(o[9]=e=>R("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上标"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).superscript,onClick:o[10]||(o[10]=e=>R("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下标"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).subscript,onClick:o[11]||(o[11]=e=>R("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"行内代码"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).code,onClick:o[12]||(o[12]=e=>R("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"引用"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(h).blockquote,onClick:o[13]||(o[13]=e=>R("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},onClick:o[14]||(o[14]=e=>R("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"格式刷"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:!!(0,s.SU)(y),onClick:o[15]||(o[15]=e=>(0,s.SU)(x)())},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"超链接"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(zu.Z),{placement:"bottomRight",trigger:"click",visible:q.value,"onUpdate:visible":o[20]||(o[20]=e=>q.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",tv,[(0,i.Wm)((0,s.SU)(br.ZP),{value:j.value,"onUpdate:value":o[16]||(o[16]=e=>j.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",lv,[(0,i.Wm)((0,s.SU)(_r.Z),{size:"small",disabled:!(0,s.SU)(h).link,onClick:o[17]||(o[17]=e=>V()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)((0,s.SU)(_r.Z),{size:"small",type:"primary",onClick:o[18]||(o[18]=e=>V(j.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:!!(0,s.SU)(h).link,onClick:o[19]||(o[19]=e=>Y())},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["checked"])])),_:1},8,["visible"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)((0,s.SU)(t),{class:"row","button-style":"solid",value:(0,s.SU)(h).align,onChange:o[21]||(o[21]=e=>R("align",e.target.value))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["value"]),(0,i._)("div",av,[(0,i.Wm)((0,s.SU)(u),{style:{flex:"15"}},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"项目符号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{type:(0,s.SU)(h).bulletList?"primary":"default",style:{flex:"1"},onClick:o[22]||(o[22]=e=>R("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ae)])),_:1},8,["type"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:k.value,"onUpdate:visible":o[23]||(o[23]=e=>k.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",nv,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(b.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ne.j5)({listStyleType:e}),onClick:t=>R("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},sv))),64))],12,ov)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(oe)])),_:1})])),_:1},8,["visible"])])),_:1}),rv,(0,i.Wm)((0,s.SU)(u),{style:{flex:"15"}},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"编号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{type:(0,s.SU)(h).orderedList?"primary":"default",style:{flex:"1"},onClick:o[24]||(o[24]=e=>R("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ie)])),_:1},8,["type"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:_.value,"onUpdate:visible":o[25]||(o[25]=e=>_.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",uv,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ne.j5)({listStyleType:e}),onClick:t=>R("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},pv))),64))],12,cv)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(oe)])),_:1})])),_:1},8,["visible"])])),_:1})]),(0,i.Wm)((0,s.SU)(u),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小缩进"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[26]||(o[26]=e=>R("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(se)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大缩进"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[27]||(o[27]=e=>R("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(re)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",mv,[vv,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:L.value,onChange:o[28]||(o[28]=e=>F(e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(ue)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(Z,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e)+"倍",1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])]),(0,i._)("div",fv,[hv,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:D.value,onChange:o[29]||(o[29]=e=>P(e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(ce)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(O,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e)+"px",1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])]),(0,i._)("div",gv,[yv,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:C.value,onChange:o[30]||(o[30]=e=>$(e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(de)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(M,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e)+"px",1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])]),(0,i._)("div",wv,[xv,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:E.value,onChange:o[31]||(o[31]=e=>N(e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(re)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(T,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e)+"px",1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])]),(0,i._)("div",Sv,[kv,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:U.value,"onUpdate:modelValue":o[32]||(o[32]=e=>z(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:U.value,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(km),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Am),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(ip)])}}});const bv=(0,Jt.Z)(_v,[["__scopeId","data-v-74237311"]]);var Iv=bv;const Uv={class:"element-flip"};var Lv=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=H(),{handleElement:l}=(0,o.Jk)(A()),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}=Oe(),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",Uv,[(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{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)(jm,{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 Cv=(0,Jt.Z)(Lv,[["__scopeId","data-v-1b5a047e"]]);var Ev=Cv;const Dv=e=>((0,i.dD)("data-v-a99ef6ee"),e=e(),(0,i.Cn)(),e),Wv={class:"element-filter"},Zv={class:"row"},Mv=Dv((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Tv={class:"switch-wrapper",style:{flex:"3"}},Hv={key:0,class:"filter"},Ov={class:"name"};var Fv=(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=H(),{handleElement:a,handleElementId:n}=(0,o.Jk)(A()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=Oe();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>void 0!==e[t.key]?{...t,value:parseInt(e[t.key])}: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",Wv,[(0,i._)("div",Zv,[Mv,(0,i._)("div",Tv,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:u.value,onChange:t[0]||(t[0]=e=>p(e))},null,8,["checked"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",Hv,[((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",Ov,(0,ne.zw)(e.label),1),(0,i.Wm)((0,s.SU)(Qd.Z),{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,onChange:t=>d(e,t)},null,8,["max","step","value","onChange"])])))),128))])):(0,i.kq)("",!0)]))}});const Av=(0,Jt.Z)(Fv,[["__scopeId","data-v-a99ef6ee"]]);var Pv=Av;const $v=e=>((0,i.dD)("data-v-7e9086fc"),e=e(),(0,i.Cn)(),e),Nv={class:"element-color-mask"},zv={class:"row"},Rv=$v((()=>(0,i._)("div",{style:{flex:"1"}},"重新着色(蒙版):",-1))),Bv={class:"switch-wrapper",style:{flex:"1"}},jv={class:"row",style:{"margin-top":"15px"}},qv=$v((()=>(0,i._)("div",{style:{flex:"2"}},"蒙版颜色:",-1))),Yv={class:"row"},Vv=$v((()=>(0,i._)("div",{style:{flex:"2"}},"不透明度:",-1)));var Jv=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t={color:"transparent",opacity:.3},l=H(),{handleElement:a,handleElementId:n}=(0,o.Jk)(A()),r=(0,s.iH)(t),u=(0,s.iH)(!1),{addHistorySnapshot:c}=Oe();(0,i.YP)(a,(()=>{a.value&&"image"===a.value.type&&(a.value.colorMask?(r.value=a.value.colorMask,u.value=!0):u.value=!1)}),{deep:!0,immediate:!0});const d=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{colorMask:t}}):l.removeElementProps({id:a.value.id,propName:"colorMask"}),c())},p=e=>{const t={...r.value,...e};l.updateElement({id:n.value,props:{colorMask:t}}),c()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Nv,[(0,i._)("div",zv,[Rv,(0,i._)("div",Bv,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:u.value,onChange:t[0]||(t[0]=e=>d(e))},null,8,["checked"])])]),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",jv,[qv,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:r.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>p({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:r.value.color,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",Yv,[Vv,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"opacity-slider",max:1,min:0,step:.05,value:r.value.opacity,onChange:t[2]||(t[2]=e=>p({opacity:e}))},null,8,["step","value"])])],64)):(0,i.kq)("",!0)]))}});const Gv=(0,Jt.Z)(Jv,[["__scopeId","data-v-7e9086fc"]]);var Kv=Gv;const Xv=e=>((0,i.dD)("data-v-105f4640"),e=e(),(0,i.Cn)(),e),Qv={class:"image-style-panel"},ef={class:"clip"},tf=Xv((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),lf={class:"shape-clip"},af=["onClick"],nf={key:0,class:"title"};var of=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=_r.Z.Group,l=zl,a=[{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}]}],n=A(),r=H(),{handleElement:u,handleElementId:c}=(0,o.Jk)(n),{currentSlide:d}=(0,o.Jk)(r),p=u,m=(0,s.iH)(!1),{addHistorySnapshot:v}=Oe(),f=()=>{n.setClipingImageElementId(c.value),m.value=!1},h=()=>{const e=u.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),r=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:r,originTop:c}},g=(e,t=0)=>{const l=u.value,{originClipRange:a,originWidth:n,originHeight:o,originLeft:i,originTop:s}=h();if(t){const a=o/n,u=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[u,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,u],[d-e,d]]}r.updateElement({id:c.value,props:{clip:{...l.clip,shape:e,range:p},left:i+n*(p[0][0]/100),top:s+o*(p[0][1]/100),width:n*(p[1][0]-p[0][0])/100,height:o*(p[1][1]-p[0][1])/100}})}else r.updateElement({id:c.value,props:{clip:{...l.clip,shape:e,range:a}}});f(),v()},y=e=>{const t=e[0];t&&(Ee(t).then((e=>{const t={src:e};r.updateElement({id:c.value,props:t})})),v())},w=()=>{const e=u.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();r.updateElement({id:c.value,props:{left:l,top:a,width:e,height:t}})}r.removeElementProps({id:c.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},x=()=>{const e=u.value,t={...d.value.background,type:"image",image:e.src,imageSize:"cover"};r.updateSlide({background:t}),v()};return(e,n)=>{const o=(0,i.up)("IconTailoring"),r=(0,i.up)("IconDown"),u=(0,i.up)("IconTransform"),c=(0,i.up)("IconUndo"),d=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",Qv,[(0,i._)("div",{class:"origin-image",style:(0,ne.j5)({backgroundImage:`url(${(0,s.SU)(p).src})`})},null,4),(0,i.Wm)(Ev),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"5"},onClick:n[0]||(n[0]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:m.value,"onUpdate:visible":n[1]||(n[1]=e=>m.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",ef,[tf,(0,i._)("div",lf,[((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:"shape-clip-item",key:t,onClick:e=>g(t)},[(0,i._)("div",{class:"shape",style:(0,ne.j5)({clipPath:e.style})},null,4)],8,af)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(a,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",nf,"按"+(0,ne.zw)(e.label)+":",1)):(0,i.kq)("",!0),(0,i.Wm)((0,s.SU)(t),{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)((0,s.SU)(_r.Z),{style:{flex:"1"},key:e.key,onClick:t=>g("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"no-padding",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1})])),_:1},8,["visible"])])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Kv),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Pv),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(km),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Am),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(tl,{onChange:n[2]||(n[2]=e=>y(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"full-width-btn",onClick:n[3]||(n[3]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"full-width-btn",onClick:n[4]||(n[4]=e=>x())},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const sf=(0,Jt.Z)(of,[["__scopeId","data-v-105f4640"]]);var rf=sf;const uf=e=>((0,i.dD)("data-v-43498c62"),e=e(),(0,i.Cn)(),e),cf={class:"shape-style-panel"},df={class:"title"},pf=uf((()=>(0,i._)("span",null,"点击替换形状",-1))),mf={class:"shape-pool"},vf={class:"shape-list"},ff={class:"row"},hf=uf((()=>(0,i._)("div",{style:{flex:"1"}},null,-1))),gf={class:"row"},yf=uf((()=>(0,i._)("div",{style:{flex:"2"}},"起点颜色:",-1))),wf={class:"row"},xf=uf((()=>(0,i._)("div",{style:{flex:"2"}},"终点颜色:",-1))),Sf={key:0,class:"row"},kf=uf((()=>(0,i._)("div",{style:{flex:"2"}},"渐变角度:",-1)));var _f=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const{Group:t,Button:l}=Kd.ZP,{OptGroup:a,Option:n}=Ir.ZP,r=br.ZP.Group,u=_r.Z.Group,d=A(),p=H(),{handleElement:m,handleElementId:v,richTextAttrs:f,availableFonts:h,textFormatPainter:g}=(0,o.Jk)(d),y=m,w=(0,s.iH)("#000"),x=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),S=(0,s.iH)("fill"),k=(0,s.iH)("middle");(0,i.YP)(m,(()=>{m.value&&"shape"===m.value.type&&(w.value=m.value.fill||"#fff",x.value=m.value.gradient||{type:"linear",rotate:0,color:[w.value,"#fff"]},S.value=m.value.gradient?"gradient":"fill",k.value=m.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:_}=Oe(),{toggleFormatPainter:b}=Xd(),I=e=>{p.updateElement({id:v.value,props:e}),_()},U=e=>{"fill"===e?(p.removeElementProps({id:v.value,propName:"gradient"}),_()):I({gradient:x.value})},L=e=>{if(!x.value)return;const t={...x.value,...e};I({gradient:t})},C=e=>{I({fill:e})},E=e=>{const{width:t,height:l}=m.value,a={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){a.pathFormula=e.pathFormula,a.viewBox=[t,l];const n=Me[e.pathFormula];"editable"in n?(a.path=n.formula(t,l,n.defaultValue),a.keypoint=n.defaultValue):a.path=n.formula(t,l)}else a.pathFormula=void 0,a.keypoint=void 0;I(a)},D=e=>{const t=m.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},a=t.text||l;I({text:{...a,align:e}})},W=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],Z=(e,t)=>{Sn.emit(yn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,o)=>{const d=(0,i.up)("IconDown"),p=(0,i.up)("IconFontSize"),m=(0,i.up)("IconAddText"),v=(0,i.up)("IconText"),_=(0,i.up)("IconHighLight"),I=(0,i.up)("IconTextBold"),M=(0,i.up)("IconTextItalic"),T=(0,i.up)("IconTextUnderline"),H=(0,i.up)("IconStrikethrough"),O=(0,i.up)("IconFormat"),F=(0,i.up)("IconFormatBrush"),A=(0,i.up)("IconAlignTextLeft"),P=(0,i.up)("IconAlignTextCenter"),$=(0,i.up)("IconAlignTextRight"),N=(0,i.up)("IconAlignTextTopOne"),z=(0,i.up)("IconAlignTextMiddleOne"),R=(0,i.up)("IconAlignTextBottomOne");return(0,i.wg)(),(0,i.iD)("div",cf,[(0,i._)("div",df,[pf,(0,i.Wm)(d)]),(0,i._)("div",mf,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Te),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",vf,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Gu,{class:"shape-item",key:t,shape:e,onClick:t=>E(e)},null,8,["shape","onClick"])))),128))])])))),128))]),(0,i._)("div",ff,[(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"10"},value:S.value,onChange:o[0]||(o[0]=e=>U(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(n),{value:"fill"},{default:(0,i.w5)((()=>[(0,i.Uk)("纯色填充")])),_:1}),(0,i.Wm)((0,s.SU)(n),{value:"gradient"},{default:(0,i.w5)((()=>[(0,i.Uk)("渐变填充")])),_:1})])),_:1},8,["value"]),hf,"fill"===S.value?((0,i.wg)(),(0,i.j4)((0,s.SU)(zu.Z),{key:0,trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:w.value,"onUpdate:modelValue":o[1]||(o[1]=e=>C(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:w.value,style:{flex:"10"}},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)((0,s.SU)(Ir.ZP),{key:1,style:{flex:"10"},value:x.value.type,onChange:o[2]||(o[2]=e=>L({type:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(n),{value:"linear"},{default:(0,i.w5)((()=>[(0,i.Uk)("线性渐变")])),_:1}),(0,i.Wm)((0,s.SU)(n),{value:"radial"},{default:(0,i.w5)((()=>[(0,i.Uk)("径向渐变")])),_:1})])),_:1},8,["value"]))]),"gradient"===S.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",gf,[yf,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:x.value.color[0],"onUpdate:modelValue":o[3]||(o[3]=e=>L({color:[e,x.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:x.value.color[0],style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",wf,[xf,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:x.value.color[1],"onUpdate:modelValue":o[4]||(o[4]=e=>L({color:[x.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:x.value.color[1],style:{flex:"3"}},null,8,["color"])])),_:1})]),"linear"===x.value.type?((0,i.wg)(),(0,i.iD)("div",Sf,[kf,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"slider",min:0,max:360,step:15,value:x.value.rotate,onChange:o[5]||(o[5]=e=>L({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Ev),(0,i.Wm)((0,s.SU)(pr.Z)),(0,s.SU)(y).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)((0,s.SU)(r),{compact:"",class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(Ir.ZP),{class:"font-select",style:{flex:"3"},value:(0,s.SU)(f).fontname,onChange:o[6]||(o[6]=e=>Z("fontname",e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(p)])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{label:"系统字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(h),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",{style:(0,ne.j5)({fontFamily:e.value})},(0,ne.zw)(e.label),5)])),_:2},1032,["value"])))),128))])),_:1}),(0,i.Wm)((0,s.SU)(a),{label:"在线字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",null,(0,ne.zw)(e.label),1)])),_:2},1032,["value"])))),128))])),_:1})])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"2"},value:(0,s.SU)(f).fontsize,onChange:o[7]||(o[7]=e=>Z("fontsize",e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(m)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(W,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e),1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])])),_:1}),(0,i.Wm)((0,s.SU)(u),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(f).color,"onUpdate:modelValue":o[8]||(o[8]=e=>Z("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:(0,s.SU)(f).color,style:{flex:"3"}},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(f).backcolor,"onUpdate:modelValue":o[9]||(o[9]=e=>Z("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:(0,s.SU)(f).backcolor,style:{flex:"3"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"font-size-btn",style:{flex:"2"},onClick:o[10]||(o[10]=e=>Z("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p),(0,i.Uk)("+")])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"font-size-btn",style:{flex:"2"},onClick:o[11]||(o[11]=e=>Z("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p),(0,i.Uk)("-")])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(f).bold,onClick:o[12]||(o[12]=e=>Z("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(I)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(f).em,onClick:o[13]||(o[13]=e=>Z("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(f).underline,onClick:o[14]||(o[14]=e=>Z("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(f).strikethrough,onClick:o[15]||(o[15]=e=>Z("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},onClick:o[16]||(o[16]=e=>Z("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(O)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"格式刷"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:!!(0,s.SU)(g),onClick:o[17]||(o[17]=e=>(0,s.SU)(b)())},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)((0,s.SU)(t),{class:"row","button-style":"solid",value:(0,s.SU)(f).align,onChange:o[18]||(o[18]=e=>Z("align",e.target.value))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(P)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(t),{class:"row","button-style":"solid",value:k.value,onChange:o[19]||(o[19]=e=>D(e.target.value))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"顶对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(z)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"底对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(R)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(pr.Z))],64)):(0,i.kq)("",!0),(0,i.Wm)(km),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Am),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(ip)])}}});const bf=(0,Jt.Z)(_f,[["__scopeId","data-v-43498c62"]]);var If=bf;const Uf=e=>((0,i.dD)("data-v-0ca152b4"),e=e(),(0,i.Cn)(),e),Lf={class:"line-style-panel"},Cf={class:"row"},Ef=Uf((()=>(0,i._)("div",{style:{flex:"2"}},"线条样式:",-1))),Df={class:"row"},Wf=Uf((()=>(0,i._)("div",{style:{flex:"2"}},"线条颜色:",-1))),Zf={class:"row"},Mf=Uf((()=>(0,i._)("div",{style:{flex:"2"}},"线条宽度:",-1))),Tf={class:"row"},Hf=Uf((()=>(0,i._)("div",{style:{flex:"2"}},"起点样式:",-1))),Of={class:"row"},Ff=Uf((()=>(0,i._)("div",{style:{flex:"2"}},"终点样式:",-1)));var Af=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=Ir.ZP.Option,l=H(),{handleElement:a}=(0,o.Jk)(A()),n=a,{addHistorySnapshot:r}=Oe(),u=e=>{a.value&&(l.updateElement({id:a.value.id,props:e}),r())};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",Lf,[(0,i._)("div",Cf,[Ef,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:(0,s.SU)(n).style,onChange:l[0]||(l[0]=e=>u({style:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:"solid"},{default:(0,i.w5)((()=>[(0,i.Uk)("实线")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"dashed"},{default:(0,i.w5)((()=>[(0,i.Uk)("虚线")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",Df,[Wf,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(n).color,"onUpdate:modelValue":l[1]||(l[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(n).color,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",Zf,[Mf,(0,i.Wm)((0,s.SU)(yc.Z),{value:(0,s.SU)(n).width,onChange:l[2]||(l[2]=e=>u({width:e})),style:{flex:"3"}},null,8,["value"])]),(0,i._)("div",Tf,[Hf,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:(0,s.SU)(n).points[0],onChange:l[3]||(l[3]=e=>u({points:[e,(0,s.SU)(n).points[1]]}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:""},{default:(0,i.w5)((()=>[(0,i.Uk)("无")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"arrow"},{default:(0,i.w5)((()=>[(0,i.Uk)("箭头")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"dot"},{default:(0,i.w5)((()=>[(0,i.Uk)("圆点")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",Of,[Ff,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:(0,s.SU)(n).points[1],onChange:l[4]||(l[4]=e=>u({points:[(0,s.SU)(n).points[0],e]}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:""},{default:(0,i.w5)((()=>[(0,i.Uk)("无")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"arrow"},{default:(0,i.w5)((()=>[(0,i.Uk)("箭头")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"dot"},{default:(0,i.w5)((()=>[(0,i.Uk)("圆点")])),_:1})])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Am)]))}});const Pf=(0,Jt.Z)(Af,[["__scopeId","data-v-0ca152b4"]]);var $f=Pf,Nf=(l(9861),l(8051));const zf={class:"chart-data-editor"},Rf={class:"editor-content"},Bf={class:"range-box"},jf=["id","onFocus","onPaste"],qf={class:"btns"},Yf={class:"left"},Vf={class:"right"};var Jf=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{type:Object,required:!0}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=100,o=32,r=(0,s.iH)([0,0]),u=(0,s.iH)({width:0,height:0}),c=(0,s.iH)(null),d=(0,i.Fl)((()=>{const e=r.value[0]*a,t=r.value[1]*o;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"}}]})),p=(0,i.Fl)((()=>{const e=r.value[0]*a,t=r.value[1]*o;return{left:e+"px",top:t+"px"}})),m=()=>{const e=[],{labels:t,legends:a,series:n}=l.data,o=t.length,i=n.length;e.push(["",...a]);for(let l=0;l<o;l++){const a=[t[l]];for(let e=0;e<i;e++)a.push(n[e][l]+"");e.push(a)}for(let l=0;l<o+1;l++)for(let t=0;t<i+1;t++){const a=document.querySelector(`#cell-${l}-${t}`);a&&(a.value=e[l][t]+"")}r.value=[i+1,o+1]};(0,i.bv)(m);const v=()=>{if(!c.value)return;const[e,t]=c.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},f=e=>{const t=e.key.toUpperCase();t===le.ENTER&&v()};(0,i.bv)((()=>{document.addEventListener("keydown",f)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",f)}));const h=()=>{const[e,l]=r.value,a=[],n=[],o=[];for(let t=1;t<l;t++){let e=`类别${t}`;const l=document.querySelector(`#cell-${t}-0`);l&&l.value&&(e=l.value),a.push(e)}for(let t=1;t<e;t++){let e=`系列${t}`;const l=document.querySelector(`#cell-0-${t}`);l&&l.value&&(e=l.value),n.push(e)}for(let t=1;t<e;t++){const e=[];for(let a=1;a<l;a++){const l=document.querySelector(`#cell-${a}-${t}`);let n=0;l&&l.value&&+l.value&&(n=+l.value),e.push(n)}o.push(e)}t("save",{labels:a,legends:n,series:o})},g=()=>{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},y=(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=he(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])}}}))},w=()=>t("close"),x=e=>{let t=!0;const l=e.pageX,n=e.pageY,i=r.value[0]*a,s=r.value[1]*o;document.onmousemove=e=>{if(!t)return;const a=e.pageX,o=e.pageY,r=a-l,c=o-n,d=i+r,p=s+c;u.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const i=e.pageX,s=e.pageY;if(l===i&&n===s)return;let c=u.value.width,d=u.value.height;c%a>.5*a&&(c+=a-c%a),d%o>.5*o&&(d+=o-d%o);let p=Math.round(d/o),m=Math.round(c/a);p<3&&(p=3),m<2&&(m=2),r.value=[m,p],u.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",zf,[(0,i._)("div",Rf,[(0,i._)("div",Bf,[(0,i._)("div",{class:"temp-range",style:(0,ne.j5)({width:u.value.width+"px",height:u.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["range-line",e.type]),key:e.type,style:(0,ne.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,ne.j5)((0,s.SU)(p)),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>x(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,ne.C_)({head:1===t&&e<=r.value[1]||1===e&&t<=r.value[0]})},[(0,i._)("input",{class:(0,ne.C_)(["item",{selected:e<=r.value[1]&&t<=r.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>c.value=[e-1,t-1],onPaste:l=>y(l,e-1,t-1)},null,42,jf)],2))),64))]))),64))])])]),(0,i._)("div",qf,[(0,i._)("div",Yf,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",onClick:t[1]||(t[1]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",Vf,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",onClick:t[2]||(t[2]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>h()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const Gf=(0,Jt.Z)(Jf,[["__scopeId","data-v-1eab5a3a"]]);var Kf=Gf;const Xf=e=>((0,i.dD)("data-v-73760920"),e=e(),(0,i.Cn)(),e),Qf={class:"chart-style-panel"},eh={class:"row"},th={class:"row"},lh={key:1,class:"row"},ah={key:2,class:"row"},nh={class:"row"},oh=Xf((()=>(0,i._)("div",{style:{flex:"2"}},"图例:",-1))),ih={class:"row"},sh=Xf((()=>(0,i._)("div",{style:{flex:"2"}},"背景填充:",-1))),rh={class:"row"},uh=Xf((()=>(0,i._)("div",{style:{flex:"2"}},"网格颜色:",-1))),ch={style:{flex:"2"}},dh={class:"color-btn-wrap",style:{flex:"3"}},ph=["onClick"],mh={class:"preset-themes"},vh=["onClick","onMouseenter"];var fh=(0,i.aZ)({__name:"index",setup(e){const t=_r.Z.Group,l=Ir.ZP.Option,a=[["#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"]],r=A(),u=H(),{handleElement:c,handleElementId:d}=(0,o.Jk)(r),{theme:p}=(0,o.Jk)(u),m=c,v=(0,s.iH)(!1),f=(0,s.iH)(!1),h=(0,s.iH)([-1,-1]),{addHistorySnapshot:g}=Oe(),y=(0,s.iH)("#000"),w=(0,s.iH)([]),x=(0,s.iH)(""),S=(0,s.iH)(""),k=(0,s.iH)(!0),_=(0,s.iH)(!0),b=(0,s.iH)(!1),I=(0,s.iH)(!1),U=(0,s.iH)(!1),L=(0,s.iH)(!1);(0,i.YP)(c,(()=>{if(c.value&&"chart"===c.value.type){if(y.value=c.value.fill||"#fff",c.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=c.value.options;void 0!==e&&(k.value=e),void 0!==t&&(_.value=t),void 0!==l&&(b.value=l),void 0!==a&&(I.value=a),void 0!==n&&(U.value=n),void 0!==o&&(L.value=o)}w.value=c.value.themeColor,x.value=c.value.gridColor||"#333",S.value=c.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{u.updateElement({id:d.value,props:e}),g()},E=e=>{v.value=!1,C({data:e})},D=e=>{C({fill:e})},W=e=>{const t=c.value,l={...t.options,...e};C({options:l})},Z=(e,t)=>{const l={themeColor:w.value.map(((l,a)=>a===t?e:l))};C(l)},M=()=>{const e={themeColor:[...w.value,p.value.themeColor]};C(e)},T=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),f.value=!1},O=e=>{const t={themeColor:w.value.filter(((t,l)=>l!==e))};C(t)},F=e=>{C({gridColor:e})},P=e=>{C({legend:e})},$=()=>v.value=!0;return Sn.on(yn.OPEN_CHART_DATA_EDITOR,$),(0,i.Ah)((()=>{Sn.off(yn.OPEN_CHART_DATA_EDITOR,$)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconCloseSmall"),c=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",Qf,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"full-width-btn",onClick:o[0]||(o[0]=e=>v.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),"line"===(0,s.SU)(m).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",eh,[(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[1]||(o[1]=e=>W({showArea:e.target.checked})),checked:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["checked"]),(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[2]||(o[2]=e=>W({showLine:!e.target.checked})),checked:!_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["checked"])]),(0,i._)("div",th,[(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[3]||(o[3]=e=>W({lineSmooth:e.target.checked})),checked:k.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["checked"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(m).chartType?((0,i.wg)(),(0,i.iD)("div",lh,[(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[4]||(o[4]=e=>W({horizontalBars:e.target.checked})),checked:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["checked"]),(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[5]||(o[5]=e=>W({stackBars:e.target.checked})),checked:L.value},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["checked"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(m).chartType?((0,i.wg)(),(0,i.iD)("div",ah,[(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[6]||(o[6]=e=>W({donut:e.target.checked})),checked:U.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["checked"])])):(0,i.kq)("",!0),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",nh,[oh,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:S.value,onChange:o[7]||(o[7]=e=>P(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:""},{default:(0,i.w5)((()=>[(0,i.Uk)("不显示")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"top"},{default:(0,i.w5)((()=>[(0,i.Uk)("显示在上方")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"bottom"},{default:(0,i.w5)((()=>[(0,i.Uk)("显示在下方")])),_:1})])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",ih,[sh,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:y.value,"onUpdate:modelValue":o[8]||(o[8]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:y.value,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",rh,[uh,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:x.value,"onUpdate:modelValue":o[9]||(o[9]=e=>F(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:x.value,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i.Wm)((0,s.SU)(pr.Z)),((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:"row",key:t},[(0,i._)("div",ch,(0,ne.zw)(0===t?"主题配色:":""),1),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:e,"onUpdate:modelValue":e=>Z(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",dh,[(0,i.Wm)(dp,{color:e,style:{width:"100%"}},null,8,["color"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:(0,i.w5)((()=>[0!==t?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>O(t)),["stop"])},[(0,i.Wm)(u)],8,ph)):(0,i.kq)("",!0)])),_:2},1032,["mouseEnterDelay"])])])),_:2},1024)])))),128)),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:f.value,"onUpdate:visible":o[11]||(o[11]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",mh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(a,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((l,a)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["preset-theme-color",{select:h.value[0]===t&&a<=h.value[1]}]),key:l,style:(0,ne.j5)({backgroundColor:l}),onClick:t=>T(e,a),onMouseenter:e=>h.value=[t,a],onMouseleave:o[10]||(o[10]=e=>h.value=[-1,-1])},null,46,vh)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"no-padding",style:{flex:"2"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(_r.Z),{class:"no-padding",disabled:w.value.length>=10,style:{flex:"3"},onClick:o[12]||(o[12]=e=>M())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(km),(0,i.Wm)((0,s.SU)(ae.Z),{visible:v.value,"onUpdate:visible":o[15]||(o[15]=e=>v.value=e),footer:null,centered:"",closable:!1,width:648,destroyOnClose:""},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{data:(0,s.SU)(m).data,onClose:o[13]||(o[13]=e=>v.value=!1),onSave:o[14]||(o[14]=e=>E(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const hh=(0,Jt.Z)(fh,[["__scopeId","data-v-73760920"]]);var gh=hh;const yh=e=>((0,i.dD)("data-v-79a422e5"),e=e(),(0,i.Cn)(),e),wh={class:"table-style-panel"},xh={class:"row"},Sh=yh((()=>(0,i._)("div",{style:{flex:"2"}},"行数:",-1))),kh={class:"set-count",style:{flex:"3"}},_h={class:"count-text"},bh={class:"row"},Ih=yh((()=>(0,i._)("div",{style:{flex:"2"}},"列数:",-1))),Uh={class:"set-count",style:{flex:"3"}},Lh={class:"count-text"},Ch={class:"row theme-switch"},Eh=yh((()=>(0,i._)("div",{style:{flex:"2"}},"启用主题表格:",-1))),Dh={class:"switch-wrapper",style:{flex:"3"}},Wh={class:"row"},Zh={class:"row"},Mh={class:"row"},Th=yh((()=>(0,i._)("div",{style:{flex:"2"}},"主题颜色:",-1)));var Hh=(0,i.aZ)({__name:"TableStylePanel",setup(e){const{Group:t,Button:l}=Kd.ZP,{OptGroup:a,Option:n}=Ir.ZP,u=br.ZP.Group,d=_r.Z.Group,p=H(),{handleElement:m,handleElementId:v,selectedTableCells:f,availableFonts:h}=(0,o.Jk)(A()),g=(0,i.Fl)((()=>p.theme.themeColor)),y=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],w=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),x=(0,s.iH)(),S=(0,s.iH)(!1),k=(0,s.iH)(0),_=(0,s.iH)(0),b=(0,s.iH)(0),I=(0,s.iH)(0);(0,i.YP)(m,(()=>{m.value&&"table"===m.value.type&&(x.value=m.value.theme,S.value=!!x.value,k.value=m.value.data.length,_.value=m.value.data[0].length,b.value=m.value.data.length,I.value=m.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:U}=Oe(),L=()=>{if(!m.value||"table"!==m.value.type)return;let e=0,t=0;if(f.value.length){const l=f.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const l=m.value.data[e][t].style;w.value=l?{bold:!!l.bold,em:!!l.em,underline:!!l.underline,strikethrough:!!l.strikethrough,color:l.color||"#000",backcolor:l.backcolor||"",fontsize:l.fontsize||"12px",fontname:l.fontname||"微软雅黑",align:l.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{f.value.length&&L()})),(0,i.YP)(f,L);const C=e=>{p.updateElement({id:v.value,props:e}),U()},E=e=>{const t=m.value,l=JSON.parse(JSON.stringify(t.data));for(let a=0;a<l.length;a++)for(let t=0;t<l[a].length;t++)if(!f.value.length||f.value.includes(`${a}_${t}`)){const n=l[a][t].style||{};l[a][t].style={...n,...e}}C({data:l}),L()},D=e=>{if(!x.value)return;const t={...x.value,...e};C({theme:t})},W=e=>{if(e){const e={theme:{color:g.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};C(e)}else p.removeElementProps({id:v.value,propName:"theme"}),U()},Z=e=>{const t=m.value,l=t.data.length;if(e>l){const a=new Array(_.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-l).fill(a),o=JSON.parse(JSON.stringify(t.data));o.push(...n),C({data:o})}else{const l=t.data.slice(0,e);C({data:l})}},M=e=>{const t=m.value,l=t.data[0].length;let a=t.data,n=t.colWidths.map((e=>e*t.width));if(e>l){a=a.map((t=>{const a=new Array(e-l).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...a),t}));const t=new Array(e-l).fill(100);n.push(...t)}else a=a.map((t=>t.slice(0,e))),n=n.slice(0,e);const o=n.reduce(((e,t)=>e+t)),i=n.map((e=>e/o)),s={width:o,data:a,colWidths:i};C(s)};return(e,o)=>{const r=(0,i.up)("IconFontSize"),p=(0,i.up)("IconAddText"),m=(0,i.up)("IconText"),v=(0,i.up)("IconFill"),f=(0,i.up)("IconTextBold"),g=(0,i.up)("IconTextItalic"),b=(0,i.up)("IconTextUnderline"),I=(0,i.up)("IconStrikethrough"),U=(0,i.up)("IconAlignTextLeft"),L=(0,i.up)("IconAlignTextCenter"),C=(0,i.up)("IconAlignTextRight"),T=(0,i.up)("IconMinus"),H=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",wh,[(0,i.Wm)((0,s.SU)(u),{compact:"",class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:w.value.fontname,onChange:o[0]||(o[0]=e=>E({fontname:e}))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(r)])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{label:"系统字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(h),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",{style:(0,ne.j5)({fontFamily:e.value})},(0,ne.zw)(e.label),5)])),_:2},1032,["value"])))),128))])),_:1}),(0,i.Wm)((0,s.SU)(a),{label:"在线字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",null,(0,ne.zw)(e.label),1)])),_:2},1032,["value"])))),128))])),_:1})])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"2"},value:w.value.fontsize,onChange:o[1]||(o[1]=e=>E({fontsize:e}))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(p)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(y,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e),1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])])),_:1}),(0,i.Wm)((0,s.SU)(d),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:w.value.color,"onUpdate:modelValue":o[2]||(o[2]=e=>E({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:w.value.color,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:w.value.backcolor,"onUpdate:modelValue":o[3]||(o[3]=e=>E({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"单元格填充"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:w.value.backcolor,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1})])),_:1}),(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:w.value.bold,onClick:o[4]||(o[4]=e=>E({bold:!w.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:w.value.em,onClick:o[5]||(o[5]=e=>E({em:!w.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:w.value.underline,onClick:o[6]||(o[6]=e=>E({underline:!w.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:w.value.strikethrough,onClick:o[7]||(o[7]=e=>E({strikethrough:!w.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(I)])),_:1},8,["checked"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(t),{class:"row","button-style":"solid",value:w.value.align,onChange:o[8]||(o[8]=e=>E({align:e.target.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(C)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(km,{fixed:!0}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",xh,[Sh,(0,i._)("div",kh,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",disabled:k.value<=1,onClick:o[9]||(o[9]=e=>Z(k.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"]),(0,i._)("div",_h,(0,ne.zw)(k.value),1),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",disabled:k.value>=30,onClick:o[10]||(o[10]=e=>Z(k.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1},8,["disabled"])])]),(0,i._)("div",bh,[Ih,(0,i._)("div",Uh,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",disabled:_.value<=1,onClick:o[11]||(o[11]=e=>M(_.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"]),(0,i._)("div",Lh,(0,ne.zw)(_.value),1),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn",disabled:_.value>=30,onClick:o[12]||(o[12]=e=>M(_.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1},8,["disabled"])])]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",Ch,[Eh,(0,i._)("div",Dh,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:S.value,onChange:o[13]||(o[13]=e=>W(e))},null,8,["checked"])])]),x.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Wh,[(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[14]||(o[14]=e=>D({rowHeader:e.target.checked})),checked:x.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["checked"]),(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[15]||(o[15]=e=>D({rowFooter:e.target.checked})),checked:x.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["checked"])]),(0,i._)("div",Zh,[(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[16]||(o[16]=e=>D({colHeader:e.target.checked})),checked:x.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["checked"]),(0,i.Wm)((0,s.SU)(Nf.ZP),{onChange:o[17]||(o[17]=e=>D({colFooter:e.target.checked})),checked:x.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["checked"])]),(0,i._)("div",Mh,[Th,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:x.value.color,"onUpdate:modelValue":o[18]||(o[18]=e=>D({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:x.value.color,style:{flex:"3"}},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const Oh=(0,Jt.Z)(Hh,[["__scopeId","data-v-79a422e5"]]);var Fh=Oh;const Ah=e=>((0,i.dD)("data-v-79d8ab96"),e=e(),(0,i.Cn)(),e),Ph={class:"latex-style-panel"},$h={class:"row"},Nh={class:"row"},zh=Ah((()=>(0,i._)("div",{style:{flex:"2"}},"颜色:",-1))),Rh={class:"row"},Bh=Ah((()=>(0,i._)("div",{style:{flex:"2"}},"粗细:",-1)));var jh=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=H(),{handleElement:l}=(0,o.Jk)(A()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=Oe(),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 Sn.on(yn.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Sn.off(yn.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ph,[(0,i._)("div",$h,[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",Nh,[zh,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{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)(dp,{color:(0,s.SU)(a).color,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",Rh,[Bh,(0,i.Wm)((0,s.SU)(yc.Z),{min:1,max:3,value:(0,s.SU)(a).strokeWidth,onChange:t[2]||(t[2]=e=>u({strokeWidth:e})),style:{flex:"3"}},null,8,["value"])]),(0,i.Wm)((0,s.SU)(ae.Z),{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),footer:null,centered:"",width:880,destroyOnClose:""},{default:(0,i.w5)((()=>[(0,i.Wm)(kd,{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 qh=(0,Jt.Z)(jh,[["__scopeId","data-v-79d8ab96"]]);var Yh=qh;const Vh=e=>((0,i.dD)("data-v-802e1e06"),e=e(),(0,i.Cn)(),e),Jh={class:"video-style-panel"},Gh=Vh((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),Kh={class:"background-image-wrapper"},Xh={class:"background-image"},Qh={class:"row"};var eg=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=H(),{handleElement:l}=(0,o.Jk)(A()),a=l,{addHistorySnapshot:n}=Oe(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&Ee(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",Jh,[Gh,(0,i._)("div",Kh,[(0,i.Wm)(tl,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Xh,[(0,i._)("div",{class:"content",style:(0,ne.j5)({backgroundImage:`url(${(0,s.SU)(a).poster})`})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",Qh,[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})])])}}});const tg=(0,Jt.Z)(eg,[["__scopeId","data-v-802e1e06"]]);var lg=tg;const ag=e=>((0,i.dD)("data-v-1da06c97"),e=e(),(0,i.Cn)(),e),ng={class:"audio-style-panel"},og={class:"row"},ig=ag((()=>(0,i._)("div",{style:{flex:"2"}},"图标颜色:",-1))),sg={class:"row switch-row"},rg=ag((()=>(0,i._)("div",{style:{flex:"2"}},"自动播放:",-1))),ug={class:"switch-wrapper",style:{flex:"3"}},cg={class:"row switch-row"},dg=ag((()=>(0,i._)("div",{style:{flex:"2"}},"循环播放:",-1))),pg={class:"switch-wrapper",style:{flex:"3"}};var mg=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=H(),{handleElement:l}=(0,o.Jk)(A()),a=l,{addHistorySnapshot:n}=Oe(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ng,[(0,i._)("div",og,[ig,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{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)(dp,{color:(0,s.SU)(a).color,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",sg,[rg,(0,i._)("div",ug,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:(0,s.SU)(a).autoplay,onChange:t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["checked"])])]),(0,i._)("div",cg,[dg,(0,i._)("div",pg,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:(0,s.SU)(a).loop,onChange:t[2]||(t[2]=e=>r({loop:e}))},null,8,["checked"])])])]))}});const vg=(0,Jt.Z)(mg,[["__scopeId","data-v-1da06c97"]]);var fg=vg;const hg=e=>((0,i.dD)("data-v-de815ffa"),e=e(),(0,i.Cn)(),e),gg={class:"multi-style-panel"},yg={class:"row"},wg=hg((()=>(0,i._)("div",{style:{flex:"2"}},"填充颜色:",-1))),xg={class:"row"},Sg=hg((()=>(0,i._)("div",{style:{flex:"2"}},"边框样式:",-1))),kg={class:"row"},_g=hg((()=>(0,i._)("div",{style:{flex:"2"}},"边框颜色:",-1))),bg={class:"row"},Ig=hg((()=>(0,i._)("div",{style:{flex:"2"}},"边框粗细:",-1)));var Ug=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const{Button:t,Group:l}=Kd.ZP,{OptGroup:a,Option:n}=Ir.ZP,r=br.ZP.Group,u=_r.Z.Group,d=H(),{richTextAttrs:p,availableFonts:m,activeElementList:v}=(0,o.Jk)(A()),{addHistorySnapshot:f}=Oe(),h=(e,t)=>{d.updateElement({id:e,props:t}),f()},g=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],y=(0,s.iH)("#fff"),w=(0,s.iH)({width:0,color:"#fff",style:"solid"}),x=e=>{for(const t of v.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||h(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}}h(t.id,{data:l})}"audio"===t.type&&h(t.id,{color:e})}y.value=e},S=e=>{for(const t of v.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}};h(t.id,a)}"line"===t.type&&h(t.id,e)}w.value={...w.value,...e}},k=(e,t)=>{for(const l of v.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Sn.emit(yn.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}}h(l.id,{data:a})}"latex"===l.type&&"color"===e&&h(l.id,{color:t})}};return(e,o)=>{const d=(0,i.up)("IconFontSize"),v=(0,i.up)("IconAddText"),f=(0,i.up)("IconText"),h=(0,i.up)("IconHighLight"),_=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),I=(0,i.up)("IconAlignTextRight");return(0,i.wg)(),(0,i.iD)("div",gg,[(0,i._)("div",yg,[wg,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:y.value,"onUpdate:modelValue":o[0]||(o[0]=e=>x(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:y.value,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",xg,[Sg,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:w.value.style,onChange:o[1]||(o[1]=e=>S({style:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(n),{value:"solid"},{default:(0,i.w5)((()=>[(0,i.Uk)("实线边框")])),_:1}),(0,i.Wm)((0,s.SU)(n),{value:"dashed"},{default:(0,i.w5)((()=>[(0,i.Uk)("虚线边框")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",kg,[_g,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:w.value.color,"onUpdate:modelValue":o[2]||(o[2]=e=>S({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:w.value.color||"#000",style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",bg,[Ig,(0,i.Wm)((0,s.SU)(yc.Z),{value:w.value.width,onChange:o[3]||(o[3]=e=>S({width:e})),style:{flex:"3"}},null,8,["value"])]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)((0,s.SU)(r),{compact:"",class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:(0,s.SU)(p).fontname,onChange:o[4]||(o[4]=e=>k("fontname",e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(d)])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{label:"系统字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(m),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",{style:(0,ne.j5)({fontFamily:e.value})},(0,ne.zw)(e.label),5)])),_:2},1032,["value"])))),128))])),_:1}),(0,i.Wm)((0,s.SU)(a),{label:"在线字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(n),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",null,(0,ne.zw)(e.label),1)])),_:2},1032,["value"])))),128))])),_:1})])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"2"},value:(0,s.SU)(p).fontsize,onChange:o[5]||(o[5]=e=>k("fontsize",e))},{suffixIcon:(0,i.w5)((()=>[(0,i.Wm)(v)])),default:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(g,(e=>(0,i.Wm)((0,s.SU)(n),{key:e,value:e},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ne.zw)(e),1)])),_:2},1032,["value"]))),64))])),_:1},8,["value"])])),_:1}),(0,i.Wm)((0,s.SU)(u),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(p).color,"onUpdate:modelValue":o[6]||(o[6]=e=>k("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:(0,s.SU)(p).color,style:{flex:"3"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(p).backcolor,"onUpdate:modelValue":o[7]||(o[7]=e=>k("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:(0,i.w5)((()=>[(0,i.Wm)(zm,{color:(0,s.SU)(p).backcolor,style:{flex:"3"}},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1},8,["color"])])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"font-size-btn",style:{flex:"2"},onClick:o[8]||(o[8]=e=>k("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"font-size-btn",style:{flex:"2"},onClick:o[9]||(o[9]=e=>k("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(l),{class:"row","button-style":"solid",value:(0,s.SU)(p).align,onChange:o[10]||(o[10]=e=>k("align",e.target.value))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(I)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1},8,["value"])])}}});const Lg=(0,Jt.Z)(Ug,[["__scopeId","data-v-de815ffa"]]);var Cg=Lg;const Eg={class:"element-style-panel"};var Dg=(0,i.aZ)({__name:"index",setup(e){const t={[Ze.TEXT]:Iv,[Ze.IMAGE]:rf,[Ze.SHAPE]:If,[Ze.LINE]:$f,[Ze.CHART]:gh,[Ze.TABLE]:Fh,[Ze.LATEX]:Yh,[Ze.VIDEO]:lg,[Ze.AUDIO]:fg},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:r}=(0,o.Jk)(A()),u=(0,i.Fl)((()=>{if(l.value.length>1){if(!r.value)return Cg;const e=a.value.find((e=>e.id===r.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",Eg,[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(u))))]))}});const Wg=Dg;var Zg=Wg;const Mg=e=>((0,i.dD)("data-v-08d61819"),e=e(),(0,i.Cn)(),e),Tg={class:"element-positopn-panel"},Hg=Mg((()=>(0,i._)("div",{class:"title"},"层级:",-1))),Og=Mg((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),Fg={class:"row"},Ag=Mg((()=>(0,i._)("div",{style:{flex:"1"}},null,-1))),Pg={key:0,class:"row"},$g={key:1,style:{flex:"1"}},Ng={class:"row"},zg=Mg((()=>(0,i._)("div",{style:{flex:"1"}},null,-1)));var Rg=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=_r.Z.Group,l=H(),{handleElement:a,handleElementId:n}=(0,o.Jk)(A()),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(0),m=(0,s.iH)(!1),v=(0,i.Fl)((()=>a.value&&Cl[a.value.type]||20)),f=(0,i.Fl)((()=>"text"===a.value?.type&&!a.value.vertical)),h=(0,i.Fl)((()=>"text"===a.value?.type&&a.value.vertical));(0,i.YP)(a,(()=>{a.value&&(r.value=(0,W.round)(a.value.left,1),u.value=(0,W.round)(a.value.top,1),m.value="fixedRatio"in a.value&&!!a.value.fixedRatio,"line"!==a.value.type&&(c.value=(0,W.round)(a.value.width,1),d.value=(0,W.round)(a.value.height,1),p.value="rotate"in a.value&&void 0!==a.value.rotate?(0,W.round)(a.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:g}=Ye(),{alignElementToCanvas:y}=Pl(),{addHistorySnapshot:w}=Oe(),x=e=>{const t={left:e};l.updateElement({id:n.value,props:t}),w()},S=e=>{const t={top:e};l.updateElement({id:n.value,props:t}),w()},k=(e,t)=>{if(a.value&&"shape"===a.value.type&&"pathFormula"in a.value&&a.value.pathFormula){const l=Me[a.value.pathFormula];let n="";return n="editable"in l?l.formula(e,t,a.value.keypoint):l.formula(e,t),{viewBox:[e,t],path:n}}return null},_=e=>{let t={width:e};const a=k(e,d.value);a&&(t={...t,...a}),l.updateElement({id:n.value,props:t}),w()},b=e=>{let t={height:e};const a=k(c.value,e);a&&(t={...t,...a}),l.updateElement({id:n.value,props:t}),w()},I=e=>{const t={rotate:e};l.updateElement({id:n.value,props:t}),w()},U=e=>{const t={fixedRatio:e};l.updateElement({id:n.value,props:t}),w()},L=e=>{let t=45*Math.floor(p.value/45);"+"===e?t+=45:"-"===e&&(t-=45),t<-180&&(t=-180),t>180&&(t=180);const a={rotate:t};l.updateElement({id:n.value,props:a}),w()};return(e,l)=>{const n=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),w=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),C=(0,i.up)("IconAlignLeft"),E=(0,i.up)("IconAlignVertically"),D=(0,i.up)("IconAlignRight"),W=(0,i.up)("IconAlignTop"),Z=(0,i.up)("IconAlignHorizontally"),M=(0,i.up)("IconAlignBottom"),T=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),O=(0,i.up)("IconRotate");return(0,i.wg)(),(0,i.iD)("div",Tg,[Hg,(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[0]||(l[0]=e=>(0,s.SU)(g)((0,s.SU)(a),(0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[1]||(l[1]=e=>(0,s.SU)(g)((0,s.SU)(a),(0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[2]||(l[2]=e=>(0,s.SU)(g)((0,s.SU)(a),(0,s.SU)(K).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(w,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[3]||(l[3]=e=>(0,s.SU)(g)((0,s.SU)(a),(0,s.SU)(K).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),Og,(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[4]||(l[4]=e=>(0,s.SU)(y)((0,s.SU)(X).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(C)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[5]||(l[5]=e=>(0,s.SU)(y)((0,s.SU)(X).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[6]||(l[6]=e=>(0,s.SU)(y)((0,s.SU)(X).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[7]||(l[7]=e=>(0,s.SU)(y)((0,s.SU)(X).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[8]||(l[8]=e=>(0,s.SU)(y)((0,s.SU)(X).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(y)((0,s.SU)(X).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",Fg,[(0,i.Wm)((0,s.SU)(yc.Z),{prefix:"水平:",step:5,value:r.value,onChange:l[10]||(l[10]=e=>x(e)),style:{flex:"4"}},null,8,["value"]),Ag,(0,i.Wm)((0,s.SU)(yc.Z),{prefix:"垂直:",step:5,value:u.value,onChange:l[11]||(l[11]=e=>S(e)),style:{flex:"4"}},null,8,["value"])]),"line"!==(0,s.SU)(a).type?((0,i.wg)(),(0,i.iD)("div",Pg,[(0,i.Wm)((0,s.SU)(yc.Z),{prefix:"宽度:",min:(0,s.SU)(v),max:1500,step:5,disabled:(0,s.SU)(h),value:c.value,onChange:l[12]||(l[12]=e=>_(e)),style:{flex:"4"}},null,8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(a).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[m.value?((0,i.wg)(),(0,i.j4)((0,s.SU)(lt.Z),{key:0,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"解除宽高比锁定"},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{style:{flex:"1"},class:"icon-btn",onClick:l[13]||(l[13]=e=>U(!1))})])),_:1},8,["mouseEnterDelay"])):((0,i.wg)(),(0,i.j4)((0,s.SU)(lt.Z),{key:1,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"宽高比锁定"},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{style:{flex:"1"},class:"icon-btn",onClick:l[14]||(l[14]=e=>U(!0))})])),_:1},8,["mouseEnterDelay"]))],64)):((0,i.wg)(),(0,i.iD)("div",$g)),(0,i.Wm)((0,s.SU)(yc.Z),{prefix:"高度:",min:(0,s.SU)(v),max:800,step:5,disabled:(0,s.SU)(f)||"table"===(0,s.SU)(a).type,value:d.value,onChange:l[15]||(l[15]=e=>b(e)),style:{flex:"4"}},null,8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(a).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",Ng,[(0,i.Wm)((0,s.SU)(yc.Z),{prefix:"旋转:",min:-180,max:180,step:5,value:p.value,onChange:l[16]||(l[16]=e=>I(e)),style:{flex:"8"}},null,8,["value"]),zg,(0,i._)("div",{class:"text-btn",onClick:l[17]||(l[17]=e=>L("-")),style:{flex:"5"}},[(0,i.Wm)(O),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:l[18]||(l[18]=e=>L("+")),style:{flex:"5"}},[(0,i.Wm)(O,{style:(0,ne.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const Bg=(0,Jt.Z)(Rg,[["__scopeId","data-v-08d61819"]]);var jg=Bg;const qg=1e3,Yg="click",Vg="animate__",Jg=[{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"}]}],Gg=[{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"}]}],Kg=[{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"}]}],Xg=e=>((0,i.dD)("data-v-73644dee"),e=e(),(0,i.Cn)(),e),Qg={class:"element-animation-panel"},ey={key:0,class:"element-animation"},ty={class:"tabs"},ly=["onClick"],ay={class:"type-title"},ny={class:"pool-item-wrapper"},oy=["onMouseenter","onClick"],iy={key:0,class:"mask"},sy={key:1,class:"tip"},ry={class:"sequence-content"},uy={class:"index"},cy={class:"text"},dy={class:"handler"},py={key:0,class:"configs"},my={class:"config-item"},vy=Xg((()=>(0,i._)("div",{style:{flex:"3"}},"持续时长:",-1))),fy={class:"config-item"},hy=Xg((()=>(0,i._)("div",{style:{flex:"3"}},"触发方式:",-1))),gy={class:"config-item"};var yy=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t=Ir.ZP.Option,l={};for(const o of Jg)for(const e of o.children)l[e.value]=e.name;for(const o of Gg)for(const e of o.children)l[e.value]=e.name;for(const o of Kg)for(const e of o.children)l[e.value]=e.name;const a=["in","out","attention"],n=H(),{handleElement:u,handleElementId:c}=(0,o.Jk)(A()),{currentSlide:d,formatedAnimations:p,currentSlideAnimations:m}=(0,o.Jk)(n),v=[{key:"in",label:"入场"},{key:"out",label:"退场"},{key:"attention",label:"强调"}],f=(0,s.iH)("in");(0,i.YP)((()=>c.value),(()=>{g.value=!1}));const h=(0,s.iH)(""),g=(0,s.iH)(!1),{addHistorySnapshot:y}=Oe(),w=(0,i.Fl)((()=>{const e=[];for(let t=0;t<p.value.length;t++){const a=p.value[t];for(let n=0;n<a.animations.length;n++){const o=a.animations[n],i=d.value.elements.find((e=>e.id===o.elId));if(!i)continue;const s=Ll[i.type],r=l[o.effect];e.push({...o,index:0===n?t+1:"",elType:s,animationEffect:r})}}return e})),x=(0,i.Fl)((()=>{const e=m.value,t=e.filter((e=>e.elId===c.value));return t||[]})),S=e=>{const t=m.value.filter((t=>t.id!==e));n.updateSlide({animations:t}),y()},k=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const a=JSON.parse(JSON.stringify(m.value)),o=a[l];a.splice(l,1),a.splice(t,0,o),n.updateSlide({animations:a}),y()},_=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${Vg}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${Vg}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${Vg}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},b=(e,t)=>{if(t<100||t>5e3)return;const l=m.value.map((l=>l.id===e?{...l,duration:t}:l));n.updateSlide({animations:l}),y()},I=(e,t)=>{const l=m.value.map((l=>l.id===e?{...l,trigger:t}:l));n.updateSlide({animations:l}),y()},U=(e,t)=>{const l=m.value.map((l=>l.id===L.value?{...l,type:e,effect:t}:l));n.updateSlide({animations:l}),g.value=!1,y();const a=m.value.find((e=>e.elId===c.value)),o=a?.duration||qg;_(c.value,t,o)},L=(0,s.iH)(""),C=(e,t)=>{if(L.value)return void U(e,t);const l=JSON.parse(JSON.stringify(m.value));l.push({id:(0,r.x0)(10),elId:c.value,type:e,effect:t,duration:qg,trigger:Yg}),n.updateSlide({animations:l}),g.value=!1,y(),_(c.value,t,qg)},E=(0,s.iH)(!1),D=e=>{e?setTimeout((()=>E.value=!0),600):E.value=!1},W=e=>{g.value=!0,L.value=e,D(!0)},Z={in:Jg,out:Gg,attention:Kg};return(e,l)=>{const n=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),c=(0,i.up)("IconCloseSmall");return(0,i.wg)(),(0,i.iD)("div",Qg,[(0,s.SU)(u)?((0,i.wg)(),(0,i.iD)("div",ey,[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:g.value,"onUpdate:visible":l[2]||(l[2]=e=>g.value=e),onVisibleChange:l[3]||(l[3]=e=>D(e))},{content:(0,i.w5)((()=>[(0,i._)("div",ty,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(v,(e=>(0,i._)("div",{class:(0,ne.C_)(["tab",e.key,{active:f.value===e.key}]),key:e.key,onClick:t=>f.value=e.key},(0,ne.zw)(e.label),11,ly))),64))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(a,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[f.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(Z[e],(t=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:t.name},[(0,i._)("div",ay,(0,ne.zw)(t.name)+":",1),(0,i._)("div",ny,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t.children,(t=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:t.name,onMouseenter:e=>h.value=t.value,onMouseleave:l[0]||(l[0]=e=>h.value=""),onClick:l=>C(e,t.value)},[(0,i._)("div",{class:(0,ne.C_)(["animation-box",[`${(0,s.SU)(Vg)}animated`,`${(0,s.SU)(Vg)}fast`,h.value===t.value&&`${(0,s.SU)(Vg)}${t.value}`]])},(0,ne.zw)(t.name),3)],40,oy)))),128))])])))),128)),E.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",iy))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{class:"element-animation-btn",onClick:l[1]||(l[1]=e=>L.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["visible"])])):((0,i.wg)(),(0,i.iD)("div",sy,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)(Ad,{class:"animation-sequence",list:(0,s.SU)(w),options:{animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content"},itemKey:"id",onEnd:k},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,ne.C_)(["sequence-item",[e.type,{active:(0,s.SU)(u)?.id===e.elId}]])},[(0,i._)("div",ry,[(0,i._)("div",uy,(0,ne.zw)(e.index),1),(0,i._)("div",cy,"【"+(0,ne.zw)(e.elType)+"】"+(0,ne.zw)(e.animationEffect),1),(0,i._)("div",dy,[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"预览"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"handler-btn",onClick:t=>_(e.elId,e.effect,e.duration)},null,8,["onClick"])])),_:2},1032,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"handler-btn",onClick:t=>S(e.id)},null,8,["onClick"])])),_:2},1032,["mouseEnterDelay"])])]),(0,s.SU)(x)[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",py,[(0,i.Wm)((0,s.SU)(pr.Z),{style:{margin:"16px 0"}}),(0,i._)("div",my,[vy,(0,i.Wm)((0,s.SU)(yc.Z),{min:500,max:3e3,step:500,value:e.duration,onChange:t=>b(e.id,t),style:{flex:"5"}},null,8,["value","onChange"])]),(0,i._)("div",fy,[hy,(0,i.Wm)((0,s.SU)(Ir.ZP),{value:e.trigger,onChange:t=>I(e.id,t),style:{flex:"5"}},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{value:"click"},{default:(0,i.w5)((()=>[(0,i.Uk)("主动触发")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"meantime"},{default:(0,i.w5)((()=>[(0,i.Uk)("与上一动画同时")])),_:1}),(0,i.Wm)((0,s.SU)(t),{value:"auto"},{default:(0,i.w5)((()=>[(0,i.Uk)("上一动画之后")])),_:1})])),_:2},1032,["value","onChange"])]),(0,i._)("div",gy,[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:t=>W(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["list","options"])])}}});const wy=(0,Jt.Z)(yy,[["__scopeId","data-v-73644dee"]]);var xy=wy;const Sy=[{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 ky=()=>{const e=H(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=Oe(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,D.Z)(l.fill).getAlpha()){const e=(0,D.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,D.Z)(l.fill).getAlpha()){const e=(0,D.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,D.Z)(l.theme.color).getAlpha()){const e=(0,D.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,D.Z)(l.fill).getAlpha()){const e=(0,D.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,D.Z)(l.color).getAlpha()){const e=(0,D.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,D.Z)(l.color).getAlpha()){const e=(0,D.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,D.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,D.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,D.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,D.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,D.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,D.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,D.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=()=>{const l=JSON.parse(JSON.stringify(t.value)),{themeColor:o,backgroundColor:i,fontColor:s,fontName:r}=a.value;for(const e of l){e.background&&"image"===e.background.type||(e.background={type:"solid",color:i});for(const t of e.elements)if("shape"===t.type)t.fill=o;else if("line"===t.type)t.color=o;else if("text"===t.type)t.defaultColor=s,t.defaultFontName=r,t.fill&&(t.fill=o);else if("table"===t.type){t.theme&&(t.theme.color=o);for(const e of t.data)for(const t of e)t.style&&(t.style.color=s,t.style.fontname=r)}else"chart"===t.type?(t.themeColor=[o],t.gridColor=s):"latex"===t.type?t.color=s:"audio"===t.type&&(t.color=o)}e.setSlides(l),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const _y=e=>((0,i.dD)("data-v-93e8361c"),e=e(),(0,i.Cn)(),e),by={class:"slide-design-panel"},Iy=_y((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),Uy={class:"row"},Ly=_y((()=>(0,i._)("div",{style:{flex:"1"}},null,-1))),Cy={key:0,class:"background-image-wrapper"},Ey={class:"background-image"},Dy={key:1,class:"background-gradient-wrapper"},Wy={class:"row"},Zy=_y((()=>(0,i._)("div",{style:{flex:"2"}},"起点颜色:",-1))),My={class:"row"},Ty=_y((()=>(0,i._)("div",{style:{flex:"2"}},"终点颜色:",-1))),Hy={key:0,class:"row"},Oy=_y((()=>(0,i._)("div",{style:{flex:"2"}},"渐变角度:",-1))),Fy={class:"row"},Ay={class:"row"},Py=_y((()=>(0,i._)("div",{style:{flex:"2"}},"画布尺寸:",-1))),$y=_y((()=>(0,i._)("div",{class:"title"},"全局主题",-1))),Ny={class:"row"},zy=_y((()=>(0,i._)("div",{style:{flex:"2"}},"字体:",-1))),Ry={class:"row"},By=_y((()=>(0,i._)("div",{style:{flex:"2"}},"字体颜色:",-1))),jy={class:"row"},qy=_y((()=>(0,i._)("div",{style:{flex:"2"}},"背景颜色:",-1))),Yy={class:"row"},Vy=_y((()=>(0,i._)("div",{style:{flex:"2"}},"主题色:",-1))),Jy={class:"row"},Gy=_y((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),Ky={class:"theme-list"},Xy={class:"theme-item-content"},Qy={class:"colors"},ew={class:"btns"},tw=["onClick"],lw=["onClick"];var aw=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const{OptGroup:t,Option:l}=Ir.ZP,a=H(),{availableFonts:n}=(0,o.Jk)(A()),{slides:r,currentSlide:u,viewportRatio:d,theme:p}=(0,o.Jk)(a),m=(0,i.Fl)((()=>u.value.background?u.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:v}=Oe(),{applyPresetThemeToSingleSlide:f,applyPresetThemeToAllSlides:h,applyThemeToAllSlides:g}=ky(),y=e=>{if("solid"===e){const e={...m.value,type:"solid",color:m.value.color||"#fff"};a.updateSlide({background:e})}else if("image"===e){const e={...m.value,type:"image",image:m.value.image||"",imageSize:m.value.imageSize||"cover"};a.updateSlide({background:e})}else{const e={...m.value,type:"gradient",gradientType:m.value.gradientType||"linear",gradientColor:m.value.gradientColor||["#fff","#fff"],gradientRotate:m.value.gradientRotate||0};a.updateSlide({background:e})}v()},w=e=>{a.updateSlide({background:{...m.value,...e}}),v()},x=e=>{const t=e[0];t&&Ee(t).then((e=>w({image:e})))},S=()=>{const e=r.value.map((e=>({...e,background:u.value.background})));a.setSlides(e),v()},k=e=>{a.setTheme(e)},_=e=>{a.setViewportRatio(e)};return(e,a)=>{const o=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",by,[Iy,(0,i._)("div",Uy,[(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"10"},value:(0,s.SU)(m).type,onChange:a[0]||(a[0]=e=>y(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"solid"},{default:(0,i.w5)((()=>[(0,i.Uk)("纯色填充")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"image"},{default:(0,i.w5)((()=>[(0,i.Uk)("图片填充")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"gradient"},{default:(0,i.w5)((()=>[(0,i.Uk)("渐变填充")])),_:1})])),_:1},8,["value"]),Ly,"solid"===(0,s.SU)(m).type?((0,i.wg)(),(0,i.j4)((0,s.SU)(zu.Z),{key:0,trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(m).color,"onUpdate:modelValue":a[1]||(a[1]=e=>w({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(m).color||"#fff",style:{flex:"10"}},null,8,["color"])])),_:1})):"image"===(0,s.SU)(m).type?((0,i.wg)(),(0,i.j4)((0,s.SU)(Ir.ZP),{key:1,style:{flex:"10"},value:(0,s.SU)(m).imageSize||"cover",onChange:a[2]||(a[2]=e=>w({imageSize:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"contain"},{default:(0,i.w5)((()=>[(0,i.Uk)("缩放")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"repeat"},{default:(0,i.w5)((()=>[(0,i.Uk)("拼贴")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"cover"},{default:(0,i.w5)((()=>[(0,i.Uk)("缩放铺满")])),_:1})])),_:1},8,["value"])):((0,i.wg)(),(0,i.j4)((0,s.SU)(Ir.ZP),{key:2,style:{flex:"10"},value:(0,s.SU)(m).gradientType,onChange:a[3]||(a[3]=e=>w({gradientType:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"linear"},{default:(0,i.w5)((()=>[(0,i.Uk)("线性渐变")])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"radial"},{default:(0,i.w5)((()=>[(0,i.Uk)("径向渐变")])),_:1})])),_:1},8,["value"]))]),"image"===(0,s.SU)(m).type?((0,i.wg)(),(0,i.iD)("div",Cy,[(0,i.Wm)(tl,{onChange:a[4]||(a[4]=e=>x(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Ey,[(0,i._)("div",{class:"content",style:(0,ne.j5)({backgroundImage:`url(${(0,s.SU)(m).image})`})},[(0,i.Wm)(o)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===(0,s.SU)(m).type?((0,i.wg)(),(0,i.iD)("div",Dy,[(0,i._)("div",Wy,[Zy,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(m).gradientColor[0],"onUpdate:modelValue":a[5]||(a[5]=e=>w({gradientColor:[e,(0,s.SU)(m).gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(m).gradientColor[0],style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",My,[Ty,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(m).gradientColor[1],"onUpdate:modelValue":a[6]||(a[6]=e=>w({gradientColor:[(0,s.SU)(m).gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(m).gradientColor[1],style:{flex:"3"}},null,8,["color"])])),_:1})]),"linear"===(0,s.SU)(m).gradientType?((0,i.wg)(),(0,i.iD)("div",Hy,[Oy,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"slider",min:0,max:360,step:15,value:(0,s.SU)(m).gradientRotate,onChange:a[7]||(a[7]=e=>w({gradientRotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",Fy,[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:a[8]||(a[8]=e=>S())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i._)("div",Ay,[Py,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:(0,s.SU)(d),onChange:a[9]||(a[9]=e=>_(e))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:.5625},{default:(0,i.w5)((()=>[(0,i.Uk)("宽屏 16 : 9")])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(l),{value:.625},{default:(0,i.w5)((()=>[(0,i.Uk)("宽屏 16 : 10")])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(l),{value:.75},{default:(0,i.w5)((()=>[(0,i.Uk)("标准 4 : 3")])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(l),{value:.70710678},{default:(0,i.w5)((()=>[(0,i.Uk)("纸张 A3 / A4")])),_:1},8,["value"])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(pr.Z)),$y,(0,i._)("div",Ny,[zy,(0,i.Wm)((0,s.SU)(Ir.ZP),{style:{flex:"3"},value:(0,s.SU)(p).fontName,onChange:a[10]||(a[10]=e=>k({fontName:e}))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(t),{label:"系统字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(l),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",{style:(0,ne.j5)({fontFamily:e.value})},(0,ne.zw)(e.label),5)])),_:2},1032,["value"])))),128))])),_:1}),(0,i.Wm)((0,s.SU)(t),{label:"在线字体"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)((0,s.SU)(l),{key:e.value,value:e.value},{default:(0,i.w5)((()=>[(0,i._)("span",null,(0,ne.zw)(e.label),1)])),_:2},1032,["value"])))),128))])),_:1})])),_:1},8,["value"])]),(0,i._)("div",Ry,[By,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(p).fontColor,"onUpdate:modelValue":a[11]||(a[11]=e=>k({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(p).fontColor,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",jy,[qy,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(p).backgroundColor,"onUpdate:modelValue":a[12]||(a[12]=e=>k({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(p).backgroundColor,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",Yy,[Vy,(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click"},{content:(0,i.w5)((()=>[(0,i.Wm)(rm,{modelValue:(0,s.SU)(p).themeColor,"onUpdate:modelValue":a[13]||(a[13]=e=>k({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(dp,{color:(0,s.SU)(p).themeColor,style:{flex:"3"}},null,8,["color"])])),_:1})]),(0,i._)("div",Jy,[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:a[14]||(a[14]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)((0,s.SU)(pr.Z)),Gy,(0,i._)("div",Ky,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Sy),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,ne.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",Xy,[(0,i._)("div",{class:"text",style:(0,ne.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",Qy,[((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,ne.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",ew,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(f)(e)},"应用",8,tw),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(h)(e)},"应用全局",8,lw)])])],4)))),128))])])}}});const nw=(0,Jt.Z)(aw,[["__scopeId","data-v-93e8361c"]]);var ow=nw;const iw={class:"slide-animation-panel"},sw={class:"animation-pool"},rw=["onClick"],uw={class:"animation-text"};var cw=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=H(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=[{label:"无",value:"no"},{label:"淡入淡出",value:"fade"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"}],{addHistorySnapshot:u}=Oe(),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),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",iw,[(0,i._)("div",sw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(r,(e=>(0,i._)("div",{class:(0,ne.C_)(["animation-item",{active:(0,s.SU)(n)===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,ne.C_)(["animation-block",e.value])},null,2),(0,i._)("div",uw,(0,ne.zw)(e.label),1)],10,rw))),64))]),(0,i.Wm)((0,s.SU)(_r.Z),{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const dw=(0,Jt.Z)(cw,[["__scopeId","data-v-c4273212"]]);var pw=dw,mw=()=>{const e=H(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(A()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=Oe(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=Se(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]=Se(t)}if(o===X.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===X.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===X.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===X.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===X.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===X.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}},vw=()=>{const e=H(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(A()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=Oe(),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}=Se(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}=Se(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let m=0;for(const e of p){const t=e.max-e.min;m+=t}const v=(i-o-m)/(p.length-1),f=[],h=p[0];let g={min:h.min,max:h.max};if("el"in h)f.push({pos:h.min,el:h.el});else for(const e of h.els){const{minX:t}=xe(e);f.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+v,n=t.max-t.min;if(g={min:a,max:a+n},"el"in t)f.push({pos:a,el:t.el});else for(const e of t.els){const{minX:l}=xe(e),n=l-t.min;f.push({pos:a+n,el:e})}}for(const e of r)if(t.value.includes(e.id))for(const t of f)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}=Se(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}=Se(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let m=0;for(const e of p){const t=e.max-e.min;m+=t}const v=(i-o-m)/(p.length-1),f=[],h=p[0];let g={min:h.min,max:h.max};if("el"in h)f.push({pos:h.min,el:h.el});else for(const e of h.els){const{minY:t}=xe(e);f.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+v,n=t.max-t.min;if(g={min:a,max:a+n},"el"in t)f.push({pos:a,el:t.el});else for(const e of t.els){const{minY:l}=xe(e),n=l-t.min;f.push({pos:a+n,el:e})}}for(const e of r)if(t.value.includes(e.id))for(const t of f)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 fw={class:"multi-position-panel"};var hw=(0,i.aZ)({__name:"MultiPositionPanel",setup(e){const t=_r.Z.Group,{canCombine:l,combineElements:a,uncombineElements:n}=Re(),{alignActiveElement:o}=mw(),{alignElementToCanvas:r}=Pl(),{displayItemCount:u,uniformHorizontalDisplay:c,uniformVerticalDisplay:d}=vw(),p=e=>{l.value?o(e):r(e)};return(e,o)=>{const r=(0,i.up)("IconAlignLeft"),m=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),f=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),g=(0,i.up)("IconAlignBottom"),y=(0,i.up)("IconGroup"),w=(0,i.up)("IconUngroup");return(0,i.wg)(),(0,i.iD)("div",fw,[(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[0]||(o[0]=e=>p((0,s.SU)(X).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[1]||(o[1]=e=>p((0,s.SU)(X).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[2]||(o[2]=e=>p((0,s.SU)(X).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[3]||(o[3]=e=>p((0,s.SU)(X).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[4]||(o[4]=e=>p((0,s.SU)(X).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[5]||(o[5]=e=>p((0,s.SU)(X).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})])),_:1},8,["mouseEnterDelay"])])),_:1}),(0,s.SU)(u)>2?((0,i.wg)(),(0,i.j4)((0,s.SU)(t),{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[6]||(o[6]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[7]||(o[7]=e=>(0,s.SU)(d)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)((0,s.SU)(pr.Z)),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{disabled:!(0,s.SU)(l),onClick:o[8]||(o[8]=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"]),(0,i.Wm)((0,s.SU)(_r.Z),{disabled:(0,s.SU)(l),onClick:o[9]||(o[9]=e=>(0,s.SU)(n)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const gw=(0,Jt.Z)(hw,[["__scopeId","data-v-c88d31ba"]]);var yw=gw;const ww=[{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:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],xw={class:"symbol-panel"},Sw={class:"tabs"},kw=["onClick"],_w={class:"pool"},bw=["onClick"],Iw={class:"symbol"};var Uw=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(ww[0].key),l=(0,i.Fl)((()=>{const e=ww.find((e=>e.key===t.value));return e?.children||[]})),a=e=>{Sn.emit(yn.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,n)=>((0,i.wg)(),(0,i.iD)("div",xw,[(0,i._)("div",Sw,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ww),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["tab",{active:t.value===e.key}]),key:e.key,onClick:l=>t.value=e.key},(0,ne.zw)(e.label),11,kw)))),128))]),(0,i._)("div",_w,[((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:"symbol-item",key:t,onClick:t=>a(e)},[(0,i._)("div",Iw,(0,ne.zw)(e),1)],8,bw)))),128))])]))}});const Lw=(0,Jt.Z)(Uw,[["__scopeId","data-v-ba0c96fc"]]);var Cw=Lw;const Ew={class:"toolbar"},Dw={class:"tabs"},Ww=["onClick"],Zw={class:"content"};var Mw=(0,i.aZ)({__name:"index",setup(e){const t=A(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",value:a.EL_STYLE},{label:"符号",value:a.SYMBOL},{label:"位置",value:a.EL_POSITION},{label:"动画",value:a.EL_ANIMATION}]:[{label:"样式",value:a.EL_STYLE},{label:"位置",value:a.EL_POSITION},{label:"动画",value:a.EL_ANIMATION}])),c=[{label:"设计",value:a.SLIDE_DESIGN},{label:"切换",value:a.SLIDE_ANIMATION},{label:"动画",value:a.EL_ANIMATION}],d=[{label:"样式",value:a.EL_STYLE},{label:"位置",value:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},m=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(m,(()=>{const e=m.value.map((e=>e.value));e.includes(r.value)||t.setToolbarState(e[0])}));const v=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:Zg,[a.EL_POSITION]:jg,[a.EL_ANIMATION]:xy,[a.SLIDE_DESIGN]:ow,[a.SLIDE_ANIMATION]:pw,[a.MULTI_POSITION]:yw,[a.SYMBOL]:Cw};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ew,[(0,i._)("div",Dw,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(m),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["tab",{active:e.value===(0,s.SU)(r)}]),key:e.value,onClick:t=>p(e.value)},(0,ne.zw)(e.label),11,Ww)))),128))]),(0,i._)("div",Zw,[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(v))))])]))}});const Tw=(0,Jt.Z)(Mw,[["__scopeId","data-v-5303bd17"]]);var Hw=Tw;const Ow={class:"remark"},Fw=["value"];var Aw=(0,i.aZ)({__name:"index",props:{height:{type:Number,required:!0}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=H(),{currentSlide:n}=(0,o.Jk)(a),r=(0,i.Fl)((()=>n.value?.remark||"")),u=e=>{const t=e.target.value;a.updateSlide({remark:t})},c=e=>{let a=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!a)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>120&&(s=120),t("update:height",s)},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ow,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>c(e))},null,32),(0,i._)("textarea",{value:(0,s.SU)(r),placeholder:"点击输入演讲者备注",onInput:t[1]||(t[1]=e=>u(e))},null,40,Fw)]))}});const Pw=(0,Jt.Z)(Aw,[["__scopeId","data-v-82b674f6"]]);var $w=Pw;const Nw=e=>((0,i.dD)("data-v-5a56d59c"),e=e(),(0,i.Cn)(),e),zw={key:0,class:"fullscreen-spin"},Rw={class:"spin"},Bw=Nw((()=>(0,i._)("div",{class:"spinner"},null,-1))),jw={class:"text"};var qw=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{type:String,default:""}},setup(e){return(t,l)=>e.loading?((0,i.wg)(),(0,i.iD)("div",zw,[(0,i._)("div",Rw,[Bw,(0,i._)("div",jw,(0,ne.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const Yw=(0,Jt.Z)(qw,[["__scopeId","data-v-5a56d59c"]]);var Vw=Yw;const Jw=e=>((0,i.dD)("data-v-92a8f63e"),e=e(),(0,i.Cn)(),e),Gw={class:"export-img-dialog"},Kw={class:"thumbnails-view"},Xw={class:"configs"},Qw={class:"row"},ex=Jw((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),tx={class:"row"},lx=Jw((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),ax={key:0,class:"row"},nx=["data-range"],ox={class:"row"},ix=Jw((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),sx={class:"row"},rx=Jw((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),ux={class:"config-item"},cx={class:"btns"};var dx=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:a}=Kd.ZP,{slides:n,currentSlide:r}=(0,o.Jk)(H()),u=(0,s.iH)(),c=(0,s.iH)("all"),d=(0,s.iH)([1,n.value.length]),p=(0,s.iH)("jpeg"),m=(0,s.iH)(1),v=(0,s.iH)(!0),f=(0,i.Fl)((()=>"all"===c.value?n.value:"current"===c.value?[r.value]:n.value.filter(((e,t)=>{const[l,a]=d.value;return t>=l-1&&t<=a-1})))),{exportImage:h,exporting:g}=Rt(),y=()=>{u.value&&h(u.value,p.value,m.value,v.value)};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",Gw,[(0,i._)("div",Kw,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:u},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(f),(e=>((0,i.wg)(),(0,i.j4)(Uu,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",Xw,[(0,i._)("div",Qw,[ex,(0,i.Wm)((0,s.SU)(l),{class:"config-item",value:p.value,"onUpdate:value":o[0]||(o[0]=e=>p.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)((0,s.SU)(a),{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",tx,[lx,(0,i.Wm)((0,s.SU)(l),{class:"config-item",value:c.value,"onUpdate:value":o[1]||(o[1]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)((0,s.SU)(a),{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",ax,[(0,i._)("div",{class:"title","data-range":`(${d.value[0]} ~ ${d.value[1]})`},"自定义范围:",8,nx),(0,i.Wm)((0,s.SU)(Qd.Z),{class:"config-item",range:"",min:1,max:(0,s.SU)(n).length,step:1,value:d.value,"onUpdate:value":o[2]||(o[2]=e=>d.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",ox,[ix,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"config-item",min:0,max:1,step:.1,value:m.value,"onUpdate:value":o[3]||(o[3]=e=>m.value=e)},null,8,["step","value"])]),(0,i._)("div",sx,[rx,(0,i._)("div",ux,[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:v.value,"onUpdate:checked":o[4]||(o[4]=e=>v.value=e)},null,8,["checked"])])),_:1},8,["mouseEnterDelay"])])])]),(0,i._)("div",cx,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn export",type:"primary",onClick:o[5]||(o[5]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn close",onClick:o[6]||(o[6]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Vw,{loading:(0,s.SU)(g),tip:"正在导出..."},null,8,["loading"])]))}});const px=(0,Jt.Z)(dx,[["__scopeId","data-v-92a8f63e"]]);var mx=px;const vx={class:"export-json-dialog"},fx={class:"preview"},hx={class:"btns"};var gx=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const{slides:l}=(0,o.Jk)(H()),{exportJSON:a}=Rt();return(e,n)=>((0,i.wg)(),(0,i.iD)("div",vx,[(0,i._)("div",fx,[(0,i._)("pre",null,(0,ne.zw)((0,s.SU)(l)),1)]),(0,i._)("div",hx,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn export",type:"primary",onClick:n[0]||(n[0]=e=>(0,s.SU)(a)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn close",onClick:n[1]||(n[1]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const yx=(0,Jt.Z)(gx,[["__scopeId","data-v-0cc0995e"]]);var wx=yx;const xx=()=>{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},Sx=(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()},kx=(e,t)=>{const l=xx(),a=l.contentWindow;if(!l.contentDocument||!a)return;Sx(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)},_x=e=>((0,i.dD)("data-v-527855fb"),e=e(),(0,i.Cn)(),e),bx={class:"export-pdf-dialog"},Ix={class:"thumbnails-view"},Ux={class:"configs"},Lx={class:"row"},Cx=_x((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),Ex={class:"row"},Dx=_x((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),Wx={class:"row"},Zx=_x((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),Mx={class:"config-item"},Tx=_x((()=>(0,i._)("div",{class:"tip"}," 注意:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),Hx={class:"btns"};var Ox=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:a}=Kd.ZP,n=Ir.ZP.Option,{slides:r,currentSlide:u,viewportRatio:c}=(0,o.Jk)(H()),d=(0,s.iH)(),p=(0,s.iH)("all"),m=(0,s.iH)(1),v=(0,s.iH)(!0),f=()=>{if(!d.value)return;const e={width:1600,height:"all"===p.value?1600*c.value*m.value:1600*c.value,margin:v.value?50:0};kx(d.value,e)};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",bx,[(0,i._)("div",Ix,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:d},["current"===p.value?((0,i.wg)(),(0,i.j4)(Uu,{key:0,class:"thumbnail",slide:(0,s.SU)(u),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(r),((e,t)=>((0,i.wg)(),(0,i.j4)(Uu,{class:(0,ne.C_)(["thumbnail",{"break-page":(t+1)%m.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",Ux,[(0,i._)("div",Lx,[Cx,(0,i.Wm)((0,s.SU)(l),{class:"config-item",value:p.value,"onUpdate:value":o[0]||(o[0]=e=>p.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部幻灯片")])),_:1}),(0,i.Wm)((0,s.SU)(a),{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前幻灯片")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",Ex,[Dx,(0,i.Wm)((0,s.SU)(Ir.ZP),{class:"config-item",value:m.value,"onUpdate:value":o[1]||(o[1]=e=>m.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(n),{value:1},{default:(0,i.w5)((()=>[(0,i.Uk)("1")])),_:1}),(0,i.Wm)((0,s.SU)(n),{value:2},{default:(0,i.w5)((()=>[(0,i.Uk)("2")])),_:1}),(0,i.Wm)((0,s.SU)(n),{value:3},{default:(0,i.w5)((()=>[(0,i.Uk)("3")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",Wx,[Zx,(0,i._)("div",Mx,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:v.value,"onUpdate:checked":o[2]||(o[2]=e=>v.value=e)},null,8,["checked"])])]),Tx]),(0,i._)("div",Hx,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn export",type:"primary",onClick:o[3]||(o[3]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn close",onClick:o[4]||(o[4]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const Fx=(0,Jt.Z)(Ox,[["__scopeId","data-v-527855fb"]]);var Ax=Fx;const Px=e=>((0,i.dD)("data-v-018847a8"),e=e(),(0,i.Cn)(),e),$x={class:"export-pptx-dialog"},Nx={class:"configs"},zx={class:"row"},Rx=Px((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),Bx={key:0,class:"row"},jx=["data-range"],qx={class:"row"},Yx=Px((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),Vx={class:"config-item"},Jx={class:"btns"};var Gx=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:a}=Kd.ZP,{slides:n,currentSlide:r}=(0,o.Jk)(H()),{exportPPTX:u,exporting:c}=Rt(),d=(0,s.iH)("all"),p=(0,s.iH)([1,n.value.length]),m=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===d.value?n.value:"current"===d.value?[r.value]:n.value.filter(((e,t)=>{const[l,a]=p.value;return t>=l-1&&t<=a-1}))));return(e,o)=>((0,i.wg)(),(0,i.iD)("div",$x,[(0,i._)("div",Nx,[(0,i._)("div",zx,[Rx,(0,i.Wm)((0,s.SU)(l),{class:"config-item",value:d.value,"onUpdate:value":o[0]||(o[0]=e=>d.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===d.value?((0,i.wg)(),(0,i.iD)("div",Bx,[(0,i._)("div",{class:"title","data-range":`(${p.value[0]} ~ ${p.value[1]})`},"自定义范围:",8,jx),(0,i.Wm)((0,s.SU)(Qd.Z),{class:"config-item",range:"",min:1,max:(0,s.SU)(n).length,step:1,value:p.value,"onUpdate:value":o[1]||(o[1]=e=>p.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",qx,[Yx,(0,i._)("div",Vx,[(0,i.Wm)((0,s.SU)(sp.ZP),{checked:m.value,"onUpdate:checked":o[2]||(o[2]=e=>m.value=e)},null,8,["checked"])])])]),(0,i._)("div",Jx,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn export",type:"primary",onClick:o[3]||(o[3]=e=>(0,s.SU)(u)((0,s.SU)(v),m.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn close",onClick:o[4]||(o[4]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Vw,{loading:(0,s.SU)(c),tip:"正在导出..."},null,8,["loading"])]))}});const Kx=(0,Jt.Z)(Gx,[["__scopeId","data-v-018847a8"]]);var Xx=Kx;const Qx=e=>((0,i.dD)("data-v-40c1ae3a"),e=e(),(0,i.Cn)(),e),eS={class:"export-pptist-dialog"},tS={class:"configs"},lS={class:"row"},aS=Qx((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),nS={key:0,class:"row"},oS=["data-range"],iS=Qx((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),sS={class:"btns"};var rS=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:a}=Kd.ZP,{slides:n,currentSlide:r}=(0,o.Jk)(H()),{exportSpecificFile:u}=Rt(),c=(0,s.iH)("all"),d=(0,s.iH)([1,n.value.length]),p=(0,i.Fl)((()=>"all"===c.value?n.value:"current"===c.value?[r.value]:n.value.filter(((e,t)=>{const[l,a]=d.value;return t>=l-1&&t<=a-1}))));return(e,o)=>((0,i.wg)(),(0,i.iD)("div",eS,[(0,i._)("div",tS,[(0,i._)("div",lS,[aS,(0,i.Wm)((0,s.SU)(l),{class:"config-item",value:c.value,"onUpdate:value":o[0]||(o[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)((0,s.SU)(a),{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)((0,s.SU)(a),{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)((0,s.SU)(Qd.Z),{class:"config-item",range:"",min:1,max:(0,s.SU)(n).length,step:1,value:d.value,"onUpdate:value":o[1]||(o[1]=e=>d.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),iS]),(0,i._)("div",sS,[(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn export",type:"primary",onClick:o[2]||(o[2]=e=>(0,s.SU)(u)((0,s.SU)(p)))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{class:"btn close",onClick:o[3]||(o[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const uS=(0,Jt.Z)(rS,[["__scopeId","data-v-40c1ae3a"]]);var cS=uS;const dS={class:"export-dialog"},pS={class:"tabs"},mS=["onClick"],vS={class:"content"};var fS=(0,i.aZ)({__name:"index",setup(e){const t=A(),{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:mx,json:wx,pdf:Ax,pptx:Xx,pptist:cS};return e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",dS,[(0,i._)("div",pS,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(n,(e=>(0,i._)("div",{class:(0,ne.C_)(["tab",{active:e.key===(0,s.SU)(l)}]),key:e.key,onClick:t=>(0,s.SU)(a)(e.key)},(0,ne.zw)(e.label),11,mS))),64))]),(0,i._)("div",vS,[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(r)),{onClose:t[0]||(t[0]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const hS=(0,Jt.Z)(fS,[["__scopeId","data-v-1f8f1a8b"]]);var gS=hS;const yS={class:"title"},wS={class:"content"};var xS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},left:{type:Number,default:10},top:{type:Number,default:10},title:{type:String,default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(0);(0,i.bv)((()=>{l.left>=0?a.value=l.left:a.value=document.body.clientWidth+l.left-l.width,l.top>=0?n.value=l.top:n.value=document.body.clientHeight+l.top-l.height}));const o=e=>{if(!l.moveable)return;let t=!0;const o=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,r=e.pageY,u=a.value,c=n.value;document.onmousemove=e=>{if(!t)return;const d=e.pageX-s,p=e.pageY-r;let m=u+d,v=c+p;m<0&&(m=0),v<0&&(v=0),m+l.width>o&&(m=o-l.width),v+l.height>i&&(v=i-l.height),a.value=m,n.value=v},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(l,s)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",style:(0,ne.j5)({width:e.width+"px",height:e.height+"px",left:a.value+"px",top:n.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:s[1]||(s[1]=e=>o(e))},[(0,i._)("div",yS,(0,ne.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:s[0]||(s[0]=e=>t("close"))},[(0,i.Wm)(r)])],32),(0,i._)("div",wS,[(0,i.WI)(l.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:s[2]||(s[2]=e=>o(e))},[(0,i.WI)(l.$slots,"default")],32))],4)}}});const SS=(0,Jt.Z)(xS,[["__scopeId","data-v-68252e2c"]]);var kS=SS;const _S=e=>((0,i.dD)("data-v-64f9ccca"),e=e(),(0,i.Cn)(),e),bS={key:0,class:"handler"},IS={class:"btns"},US={key:0,class:"icon-btns"},LS={class:"element-list"},CS={key:0,class:"group-els"},ES=_S((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),DS=["onClick","onDblclick"],WS=["id","value","onBlur","onKeydown"],ZS={key:1,class:"name"},MS={class:"icons"},TS=["onClick","onDblclick"],HS=["id","value","onBlur","onKeydown"],OS={key:1,class:"name"},FS={class:"icons"};var AS=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=H(),l=A(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:m}=Ye(),v=(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})),f=(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)))},h=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)(""),S=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},k=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"),b=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(kS,{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)((()=>[(0,s.SU)(v).length?((0,i.wg)(),(0,i.iD)("div",bS,[(0,i._)("div",IS,[(0,i.Wm)((0,s.SU)(_r.Z),{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{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",US,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(m)((0,s.SU)(r),(0,s.SU)(K).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(m)((0,s.SU)(r),(0,s.SU)(K).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",LS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",CS,[ES,((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,ne.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>f(e,t.id),onDblclick:e=>k(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)(Ll)[t.type],class:"input",type:"text",onBlur:e=>S(e,t.id),onKeydown:(0,n.D2)((e=>S(e,t.id)),["enter"])},null,40,WS)):((0,i.wg)(),(0,i.iD)("div",ZS,(0,ne.zw)(t.name||(0,s.SU)(Ll)[t.type]),1)),(0,i._)("div",MS,[(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)(b,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,DS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,ne.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>h(e.id),onDblclick:t=>k(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)(Ll)[e.type],class:"input",type:"text",onBlur:t=>S(t,e.id),onKeydown:(0,n.D2)((t=>S(t,e.id)),["enter"])},null,40,HS)):((0,i.wg)(),(0,i.iD)("div",OS,(0,ne.zw)(e.name||(0,s.SU)(Ll)[e.type]),1)),(0,i._)("div",FS,[(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)(b,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,TS))],64)))),128))])])),_:1},8,["title"])}}});const PS=(0,Jt.Z)(AS,[["__scopeId","data-v-64f9ccca"]]);var $S=PS;const NS={class:"pptist-editor"},zS={class:"layout-content"},RS={class:"layout-content-center"};var BS=(0,i.aZ)({__name:"index",setup(e){const t=A(),{dialogForExport:l,showSelectPanel:a}=(0,o.Jk)(t),n=()=>t.setDialogForExport(""),r=(0,s.iH)(40);return Qe(),et(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",NS,[(0,i.Wm)(yl,{class:"layout-header"}),(0,i._)("div",zS,[(0,i.Wm)(Gd,{class:"layout-content-left"}),(0,i._)("div",RS,[(0,i.Wm)(Md,{class:"center-top"}),(0,i.Wm)(Nu,{class:"center-body",style:(0,ne.j5)({height:`calc(100% - ${r.value+40}px)`})},null,8,["style"]),(0,i.Wm)($w,{class:"center-bottom",height:r.value,"onUpdate:height":t[0]||(t[0]=e=>r.value=e),style:(0,ne.j5)({height:`${r.value}px`})},null,8,["height","style"])]),(0,i.Wm)(Hw,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)($S,{key:0})):(0,i.kq)("",!0),(0,i.Wm)((0,s.SU)(ae.Z),{visible:!!(0,s.SU)(l),footer:null,centered:"",closable:!1,width:680,destroyOnClose:"",onCancel:t[1]||(t[1]=e=>n())},{default:(0,i.w5)((()=>[(0,i.Wm)(gS)])),_:1},8,["visible"])],64))}});const jS=(0,Jt.Z)(BS,[["__scopeId","data-v-ed562e98"]]);var qS=jS,YS=()=>{const e=H(),{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=`${Vg}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(Vg)&&n.classList.remove(e,`${Vg}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${Vg}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${Vg}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(Vg)&&e.classList.remove(t,`${Vg}animated`)}}e.every((e=>"attention"===e.type))&&f()},p=(0,s.iH)(0),m=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(m);const v=(0,W.throttle)((function(e){ie.ZP.success(e)}),1e3,{leading:!0,trailing:!1}),f=()=>{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):v("已经是第一页了"),r.value=!1},h=()=>{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):(v("已经是最后一页了"),m(),r.value=!1)},g=()=>{m(),ie.ZP.success("开始自动放映"),p.value=setInterval(h,2500)},y=(0,W.throttle)((function(e){e.deltaY<0?f():e.deltaY>0&&h()}),500,{leading:!0,trailing:!1}),w=(0,s.iH)(null),x=e=>{w.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!w.value)return;const t=Math.abs(w.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-w.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(w.value=null,l>0?f():h())},k=e=>{const t=e.key.toUpperCase();t===le.UP||t===le.LEFT||t===le.PAGEUP?f():t!==le.DOWN&&t!==le.RIGHT&&t!==le.SPACE&&t!==le.ENTER&&t!==le.PAGEDOWN||h()};(0,i.bv)((()=>document.addEventListener("keydown",k))),(0,i.Ah)((()=>document.removeEventListener("keydown",k)));const _=()=>{e.updateSlideIndex(l.value-1),n.value=0},b=()=>{e.updateSlideIndex(l.value+1),n.value=0},I=t=>{e.updateSlideIndex(t),n.value=0},U=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlay:g,closeAutoPlay:m,mousewheelListener:y,touchStartListener:x,touchEndListener:S,turnPrevSlide:_,turnNextSlide:b,turnSlideToIndex:I,turnSlideToId:U,execPrev:f,execNext:h,animationIndex:n}},VS=e=>{const t=H(),{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}},JS=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=Ke(),a=()=>{e.value=Ge(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=Ge(),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,Je())};return{fullscreenState:e,manualExitFullscreen:n}},GS=(0,i.aZ)({__name:"ScreenChartElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>((0,i.wg)(),(0,i.j4)(Jr,{class:"screen-element-chart",elementInfo:e.elementInfo},null,8,["elementInfo"]))}});const KS=GS;var XS=KS;const QS={class:"element-content"};var ek=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const{currentSlide:t}=(0,o.Jk)(H()),l=(0,i.f3)(wl)||(0,s.iH)(1),a=(0,i.f3)(xl)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-element-video",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",QS,[(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)(gi,{key:0,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.kq)("",!0)])],4)],4))}});const tk=(0,Jt.Z)(ek,[["__scopeId","data-v-76457308"]]);var lk=tk;const ak={class:"element-content"};var nk=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)(H()),n=(0,i.f3)(wl)||(0,s.iH)(1),r=(0,i.f3)(xl)||(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=De,a=De*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)(),m=()=>{p.value&&p.value.toggle()};return(t,l)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"screen-element-audio",style:(0,ne.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,ne.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",ak,[(0,i.Wm)(a,{class:"audio-icon",style:(0,ne.j5)({fontSize:(0,s.SU)(c),color:e.elementInfo.color}),onClick:l[0]||(l[0]=e=>m())},null,8,["style"]),(0,s.SU)(u)?((0,i.wg)(),(0,i.j4)(Ai,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,ne.j5)({...(0,s.SU)(d)}),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 ok=(0,Jt.Z)(nk,[["__scopeId","data-v-1172b8ee"]]);var ik=ok;const sk=["id","title"];var rk=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[Ze.IMAGE]:Er,[Ze.TEXT]:Mr,[Ze.SHAPE]:Nr,[Ze.LINE]:qr,[Ze.CHART]:XS,[Ze.TABLE]:ou,[Ze.LATEX]:pu,[Ze.VIDEO]:lk,[Ze.AUDIO]:ik};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)(H()),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(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,ne.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:(0,s.SU)(r)?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:a[0]||(a[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(l)),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,sk))}});const uk=(0,Jt.Z)(rk,[["__scopeId","data-v-a15cc1d8"]]);var ck=uk,dk=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{type:Object,required:!0},scale:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(H()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=es(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(xl,r),(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,ne.j5)({width:(0,s.SU)(De)+"px",height:(0,s.SU)(De)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,ne.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)(ck,{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 pk=(0,Jt.Z)(dk,[["__scopeId","data-v-7cf7f9e7"]]);var mk=pk;const vk={class:"screen-slide-list"};var fk=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{type:Number,required:!0},slideHeight:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:a,currentSlide:n}=(0,o.Jk)(H()),r=(0,i.Fl)((()=>t.slideWidth/De));return(0,i.JJ)(wl,r),(t,o)=>((0,i.wg)(),(0,i.iD)("div",vk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["slide-item",`turning-mode-${t.turningMode||"slideY"}`,{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!==(0,s.SU)(n).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,ne.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(mk,{slide:t,scale:(0,s.SU)(r),animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const hk=(0,Jt.Z)(fk,[["__scopeId","data-v-77a3e620"]]);var gk=hk;const yk={class:"slide-thumbnails"},wk={class:"return-button"},xk={class:"slide-thumbnails-content"},Sk=["onClick"];var kk=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function,required:!0}},emits:["close"],setup(e,{emit:t}){const l=e,{slides:a,slideIndex:n}=(0,o.Jk)(H()),{slidesLoadLimit:r}=Td(),u=e=>{l.turnSlideToIndex(e),t("close")};return(e,l)=>{const o=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",yk,[(0,i._)("div",wk,[(0,i.Wm)(o,{class:"icon",onClick:l[0]||(l[0]=e=>t("close"))})]),(0,i._)("div",xk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["thumbnail",{active:t===(0,s.SU)(n)}]),key:e.id,onClick:e=>u(t)},[(0,i.Wm)(Uu,{slide:e,size:150,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,Sk)))),128))])])}}});const _k=(0,Jt.Z)(kk,[["__scopeId","data-v-b7c6c0cc"]]);var bk=_k;const Ik={key:0,class:"blackboard"};var Uk=(0,i.aZ)({__name:"WritingBoard",props:{color:{type:String,default:"#ffcc00"},model:{type:String,default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{type:Number,default:6},markSize:{type:Number,default:24},rubberSize:{type:Number,default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e;let n=null;const o=(0,s.iH)(),r=(0,s.iH)();let u={x:0,y:0},c=!1,d=0,p=-1;const m=(0,s.iH)({x:0,y:0}),v=(0,s.iH)(!1),f=(0,s.iH)(0),h=(0,s.iH)(0),g=(0,i.Fl)((()=>r.value?f.value/r.value.width:1)),y=(0,i.Fl)((()=>r.value?h.value/r.value.height:1)),w=()=>{o.value&&(f.value=o.value.clientWidth,h.value=o.value.clientHeight)},x=new ResizeObserver(w);(0,i.bv)((()=>{o.value&&x.observe(o.value)})),(0,i.Ah)((()=>{o.value&&x.unobserve(o.value)}));const S=()=>{r.value&&o.value&&(n=r.value.getContext("2d"),n&&(r.value.width=o.value.clientWidth,r.value.height=o.value.clientHeight,n.lineCap="round",n.lineJoin="round"))};(0,i.bv)(S);const k=()=>{n&&("mark"===a.model?(n.globalCompositeOperation="xor",n.globalAlpha=.5):"pen"===a.model&&(n.globalCompositeOperation="source-over",n.globalAlpha=1))};(0,i.YP)((()=>a.model),k);const _=(e,t,l)=>{if(!n)return;const o=u.x,i=u.y;n.lineWidth=l,n.strokeStyle=a.color,n.beginPath(),n.moveTo(o,i),n.lineTo(e,t),n.stroke(),n.closePath()},b=(e,t)=>{if(!n||!r.value)return;const l=u.x,o=u.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-o)/(e-l))),c=i*Math.cos(Math.atan((t-o)/(e-l))),d=[l+s,o-c],p=[l-s,o+c],m=[e+s,t-c],v=[e-s,t+c];n.save(),n.beginPath(),n.arc(e,t,i,0,2*Math.PI),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore(),n.save(),n.beginPath(),n.moveTo(...d),n.lineTo(...m),n.lineTo(...v),n.lineTo(...p),n.closePath(),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore()},I=(e,t)=>{const l=u.x,a=u.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},U=(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===p?r:1*r/3+2*p/3},L=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=I(e,t),n=l-d,o=U(a,n);_(e,t,o),p=o}else"mark"===a.model?_(e,t,a.markSize):b(e,t);u={x:e,y:t},d=(new Date).getTime()},C=e=>{if(!r.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=r.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},E=e=>{const[t,l]=C(e),a=t/g.value,n=l/y.value;c=!0,u={x:a,y:n},d=(new Date).getTime(),e instanceof MouseEvent||(m.value={x:t,y:l},v.value=!0)},D=e=>{const[t,l]=C(e),a=t/g.value,n=l/y.value;m.value={x:t,y:l},c&&L(a,n)},W=()=>{c&&(c=!1,l("end"))},Z=()=>{n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),l("end"))},M=()=>r.value?.toDataURL(),T=e=>{if(n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),e)){n.globalCompositeOperation="source-over",n.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{n.drawImage(t,0,0),k()}}};return t({clearCanvas:Z,getImageDataURL:M,setImageDataURL:T}),(t,l)=>{const a=(0,i.up)("IconWrite"),n=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:o},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",Ik)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:r,style:(0,ne.j5)({width:f.value+"px",height:h.value+"px"}),onMousedown:l[0]||(l[0]=e=>E(e)),onMousemove:l[1]||(l[1]=e=>D(e)),onMouseup:l[2]||(l[2]=e=>W()),onTouchstart:l[3]||(l[3]=e=>E(e)),onTouchmove:l[4]||(l[4]=e=>D(e)),onTouchend:l[5]||(l[5]=e=>{W(),v.value=!1}),onMouseleave:l[6]||(l[6]=e=>{W(),v.value=!1}),onMouseenter:l[7]||(l[7]=e=>v.value=!0)},null,36),v.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,ne.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,ne.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)(a,{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,ne.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)(n,{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 Lk=(0,Jt.Z)(Uk,[["__scopeId","data-v-3e9669a9"]]);var Ck=Lk;const Ek=e=>((0,i.dD)("data-v-52a2a3a6"),e=e(),(0,i.Cn)(),e),Dk={class:"writing-board-tool"},Wk={class:"tool-content"},Zk={class:"size"},Mk=Ek((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),Tk={class:"size"},Hk=Ek((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),Ok={class:"size"},Fk=Ek((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),Ak={class:"colors"},Pk=["onClick"];var $k=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{type:Number,required:!0},slideHeight:{type:Number,required:!0},left:{type:Number,default:-5},top:{type:Number,default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],{currentSlide:a}=(0,o.Jk)(H()),r=(0,s.iH)(),u=(0,s.iH)("#e2534d"),c=(0,s.iH)("pen"),d=(0,s.iH)(!1),p=(0,s.iH)(""),m=(0,s.iH)(6),v=(0,s.iH)(24),f=(0,s.iH)(80),h=e=>{c.value===e?p.value=p.value===e?"":e:(p.value&&(p.value=""),c.value=e)},g=()=>{r.value.clearCanvas()},y=e=>{"eraser"===c.value&&(c.value="pen"),u.value=e},w=()=>{t("close")};(0,i.YP)(a,(()=>{j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((e=>{const t=e[0];r.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const x=()=>{const e=r.value.getImageDataURL();j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((t=>{const l=t[0];l?j.writingBoardImgs.update(l,{dataURL:e}):j.writingBoardImgs.add({id:a.value.id,dataURL:e})}))};return(t,a)=>{const o=(0,i.up)("IconWrite"),S=(0,i.up)("IconHighLight"),k=(0,i.up)("IconErase"),_=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),I=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",Dk,[(0,i._)("div",{class:"writing-board-wrap",style:(0,ne.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(Ck,{ref_key:"writingBoardRef",ref:r,color:u.value,blackboard:d.value,model:c.value,penSize:m.value,markSize:v.value,rubberSize:f.value,onEnd:a[0]||(a[0]=e=>x())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(kS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===p.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:a[10]||(a[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",Wk,[(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:"pen"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",Zk,[Mk,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"size-slider",min:4,max:10,step:2,value:m.value,"onUpdate:value":a[1]||(a[1]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"画笔"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:(0,ne.C_)(["btn",{active:"pen"===c.value}]),onClick:a[2]||(a[2]=e=>h("pen"))},[(0,i.Wm)(o,{class:"icon"})],2)])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:"mark"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",Tk,[Hk,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"size-slider",min:16,max:40,step:4,value:v.value,"onUpdate:value":a[3]||(a[3]=e=>v.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"荧光笔"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:(0,ne.C_)(["btn",{active:"mark"===c.value}]),onClick:a[4]||(a[4]=e=>h("mark"))},[(0,i.Wm)(S,{class:"icon"})],2)])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(zu.Z),{trigger:"click",visible:"eraser"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",Ok,[Fk,(0,i.Wm)((0,s.SU)(Qd.Z),{class:"size-slider",min:20,max:200,step:20,value:f.value,"onUpdate:value":a[5]||(a[5]=e=>f.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"橡皮擦"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:(0,ne.C_)(["btn",{active:"eraser"===c.value}]),onClick:a[6]||(a[6]=e=>h("eraser"))},[(0,i.Wm)(k,{class:"icon"})],2)])),_:1},8,["mouseEnterDelay"])])),_:1},8,["visible"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"清除墨迹"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"btn",onClick:a[7]||(a[7]=e=>g())},[(0,i.Wm)(_,{class:"icon"})])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"黑板"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:(0,ne.C_)(["btn",{active:d.value}]),onClick:a[8]||(a[8]=e=>d.value=!d.value)},[(0,i.Wm)(b,{class:"icon"})],2)])),_:1},8,["mouseEnterDelay"]),(0,i._)("div",Ak,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,ne.C_)(["color",{active:e===u.value}]),key:e,style:(0,ne.j5)({backgroundColor:e}),onClick:t=>y(e)},null,14,Pk))),64))])]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"关闭画笔"},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"btn",onClick:a[9]||(a[9]=e=>w())},[(0,i.Wm)(I,{class:"icon"})])])),_:1},8,["mouseEnterDelay"])],32)])),_:1},8,["left","top","moveable"])])}}});const Nk=(0,Jt.Z)($k,[["__scopeId","data-v-52a2a3a6"]]);var zk=Nk;const Rk=e=>((0,i.dD)("data-v-5a82de11"),e=e(),(0,i.Cn)(),e),Bk={class:"header"},jk={class:"content"},qk={class:"timer"},Yk=["value","disabled"],Vk=Rk((()=>(0,i._)("div",{class:"colon"},":",-1))),Jk={class:"timer"},Gk=["value","disabled"];var Kk=(0,i.aZ)({__name:"CountdownTimer",props:{left:{type:Number,default:5},top:{type:Number,default:5}},emits:["close"],setup(e,{emit:t}){const l=(0,s.iH)(null),a=(0,s.iH)(!1),o=(0,s.iH)(!1),r=(0,s.iH)(0),u=(0,i.Fl)((()=>Math.floor(r.value/60))),c=(0,i.Fl)((()=>r.value%60)),d=(0,i.Fl)((()=>!o.value||a.value)),p=()=>{l.value&&clearInterval(l.value)};(0,i.Ah)(p);const m=()=>{p(),a.value=!1},v=()=>{p(),a.value=!1,o.value?r.value=600:r.value=0},f=()=>{p(),o.value?l.value=setInterval((()=>{r.value=r.value-1,r.value<=0&&v()}),1e3):l.value=setInterval((()=>{r.value=r.value+1,r.value>36e3&&m()}),1e3),a.value=!0},h=()=>{a.value?m():f()},g=()=>{o.value=!o.value,v()},y=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),r.value="minute"===t?60*+a+c.value:+a+60*u.value):l.value=J("minute"===t?u.value:c.value,2)};return(l,r)=>{const p=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(kS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",Bk,[(0,i._)("span",{class:"text-btn",onClick:r[0]||(r[0]=e=>h())},(0,ne.zw)(a.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:r[1]||(r[1]=e=>v())},"重置"),(0,i._)("span",{class:(0,ne.C_)(["text-btn",{active:o.value}]),onClick:r[2]||(r[2]=e=>g())},"倒计时",2)]),(0,i._)("div",jk,[(0,i._)("div",qk,[(0,i._)("input",{type:"text",value:(0,s.SU)(J)((0,s.SU)(u),2),maxlength:3,disabled:(0,s.SU)(d),onMousedown:r[3]||(r[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:r[4]||(r[4]=e=>y(e,"minute")),onKeydown:[r[5]||(r[5]=(0,n.iM)((()=>{}),["stop"])),r[6]||(r[6]=(0,n.D2)((0,n.iM)((e=>y(e,"minute")),["stop"]),["enter"]))]},null,40,Yk)]),Vk,(0,i._)("div",Jk,[(0,i._)("input",{type:"text",value:(0,s.SU)(J)((0,s.SU)(c),2),maxlength:3,disabled:(0,s.SU)(d),onMousedown:r[7]||(r[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:r[8]||(r[8]=e=>y(e,"second")),onKeydown:[r[9]||(r[9]=(0,n.iM)((()=>{}),["stop"])),r[10]||(r[10]=(0,n.D2)((0,n.iM)((e=>y(e,"second")),["stop"]),["enter"]))]},null,40,Gk)])]),(0,i._)("div",{class:"close-btn",onClick:r[11]||(r[11]=e=>t("close"))},[(0,i.Wm)(p,{class:"icon"})])])),_:1},8,["left","top"])}}});const Xk=(0,Jt.Z)(Kk,[["__scopeId","data-v-5a82de11"]]);var Qk=Xk;const e_={class:"tools-left"},t_={class:"content"};var l_=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(H()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,mousewheelListener:c,touchStartListener:d,touchEndListener:p,turnPrevSlide:m,turnNextSlide:v,turnSlideToIndex:f,turnSlideToId:h,execPrev:g,execNext:y,animationIndex:w}=YS(),{slideWidth:x,slideHeight:S}=VS(),{exitScreening:k}=Ke(),{fullscreenState:_,manualExitFullscreen:b}=JS(),I=(0,s.iH)(!1),U=(0,s.iH)(!1),L=(0,s.iH)(!1),C=(0,s.iH)(!1),E=(0,s.iH)(!1),D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>m()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>v()},{text:"第一页",disable:0===a.value,handler:()=>f(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>f(l.value.length-1)},{divider:!0},{text:"显示工具栏",handler:()=>I.value=!0},{text:"查看所有幻灯片",handler:()=>C.value=!0},{text:"画笔工具",handler:()=>U.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r},{text:"结束放映",subText:"ESC",handler:k}];return(t,n)=>{const o=(0,i.up)("IconLeftTwo"),r=(0,i.up)("IconRightTwo"),u=(0,i.up)("IconWrite"),m=(0,i.up)("IconMagic"),v=(0,i.up)("IconStopwatchStart"),W=(0,i.up)("IconListView"),Z=(0,i.up)("IconOffScreenOne"),M=(0,i.up)("IconFullScreenOne"),T=(0,i.up)("IconPower"),H=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ne.C_)(["base-view",{"laser-pen":E.value}])},[(0,i.wy)((0,i.Wm)(gk,{slideWidth:(0,s.SU)(x),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(w),turnSlideToId:(0,s.SU)(h),manualExitFullscreen:(0,s.SU)(b),onWheel:n[0]||(n[0]=e=>(0,s.SU)(c)(e)),onTouchstart:n[1]||(n[1]=e=>(0,s.SU)(d)(e)),onTouchend:n[2]||(n[2]=e=>(0,s.SU)(p)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[H,D]]),C.value?((0,i.wg)(),(0,i.j4)(bk,{key:0,turnSlideToIndex:(0,s.SU)(f),onClose:n[3]||(n[3]=e=>C.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(zk,{key:1,slideWidth:(0,s.SU)(x),slideHeight:(0,s.SU)(S),onClose:n[4]||(n[4]=e=>U.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),L.value?((0,i.wg)(),(0,i.j4)(Qk,{key:2,onClose:n[5]||(n[5]=e=>L.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",e_,[(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:n[6]||(n[6]=e=>(0,s.SU)(g)())}),(0,i.Wm)(r,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:n[7]||(n[7]=e=>(0,s.SU)(y)())})]),(0,i._)("div",{class:(0,ne.C_)(["tools-right",{visible:I.value}]),onMouseleave:n[16]||(n[16]=e=>I.value=!1),onMouseenter:n[17]||(n[17]=e=>I.value=!0)},[(0,i._)("div",t_,[(0,i._)("div",{class:"tool-btn page-number",onClick:n[8]||(n[8]=e=>C.value=!0)},"幻灯片 "+(0,ne.zw)((0,s.SU)(a)+1)+" / "+(0,ne.zw)((0,s.SU)(l).length),1),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"画笔工具"},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"tool-btn",onClick:n[9]||(n[9]=e=>U.value=!0)})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"激光笔"},{default:(0,i.w5)((()=>[(0,i.Wm)(m,{class:(0,ne.C_)(["tool-btn",{active:E.value}]),onClick:n[10]||(n[10]=e=>E.value=!E.value)},null,8,["class"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"计时器"},{default:(0,i.w5)((()=>[(0,i.Wm)(v,{class:(0,ne.C_)(["tool-btn",{active:L.value}]),onClick:n[11]||(n[11]=e=>L.value=!L.value)},null,8,["class"])])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"演讲者视图"},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"tool-btn",onClick:n[12]||(n[12]=t=>e.changeViewMode("presenter"))})])),_:1},8,["mouseEnterDelay"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:(0,s.SU)(_)?"退出全屏":"进入全屏"},{default:(0,i.w5)((()=>[(0,s.SU)(_)?((0,i.wg)(),(0,i.j4)(Z,{key:0,class:"tool-btn",onClick:n[13]||(n[13]=e=>(0,s.SU)(b)())})):((0,i.wg)(),(0,i.j4)(M,{key:1,class:"tool-btn",onClick:n[14]||(n[14]=e=>(0,s.SU)(Ve)())}))])),_:1},8,["mouseEnterDelay","title"]),(0,i.Wm)((0,s.SU)(lt.Z),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"结束放映"},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"tool-btn",onClick:n[15]||(n[15]=e=>(0,s.SU)(k)())})])),_:1},8,["mouseEnterDelay"])])],34)],2)}}});const a_=(0,Jt.Z)(l_,[["__scopeId","data-v-90ac59d8"]]);var n_=a_;const o_=e=>((0,i.dD)("data-v-f770d810"),e=e(),(0,i.Cn)(),e),i_={class:"presenter-view"},s_={class:"toolbar"},r_=o_((()=>(0,i._)("span",null,"普通视图",-1))),u_=o_((()=>(0,i._)("span",null,"画笔",-1))),c_=o_((()=>(0,i._)("span",null,"激光笔",-1))),d_=o_((()=>(0,i._)("span",null,"计时器",-1))),p_=o_((()=>(0,i._)("span",null,"结束放映",-1))),m_={class:"content"},v_=["onClick"],f_={class:"remark"},h_={class:"header"},g_=o_((()=>(0,i._)("span",null,"演讲者备注",-1))),y_=["innerHTML"],w_={class:"remark-scale"};var x_=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)(H()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),m=(0,s.iH)(!1),v=(0,s.iH)(!1),{mousewheelListener:f,touchStartListener:h,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:S,animationIndex:k}=YS(),{slideWidth:_,slideHeight:b}=VS(c),{exitScreening:I}=Ke(),{slidesLoadLimit:U}=Td(),{fullscreenState:L,manualExitFullscreen:C}=JS(),E=(0,s.iH)(16),D=(0,i.Fl)((()=>Le(u.value.remark||"无备注"))),W=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},Z=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 M=()=>[{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:I}];return(t,o)=>{const u=(0,i.up)("IconListView"),y=(0,i.up)("IconWrite"),w=(0,i.up)("IconMagic"),T=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),O=(0,i.up)("IconPower"),F=(0,i.up)("IconMinus"),A=(0,i.up)("IconPlus"),P=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",i_,[(0,i._)("div",s_,[(0,i._)("div",{class:"tool-btn",onClick:o[0]||(o[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(u,{class:"tool-icon"}),r_]),(0,i._)("div",{class:(0,ne.C_)(["tool-btn",{active:p.value}]),onClick:o[1]||(o[1]=e=>p.value=!p.value)},[(0,i.Wm)(y,{class:"tool-icon"}),u_],2),(0,i._)("div",{class:(0,ne.C_)(["tool-btn",{active:v.value}]),onClick:o[2]||(o[2]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),c_],2),(0,i._)("div",{class:(0,ne.C_)(["tool-btn",{active:m.value}]),onClick:o[3]||(o[3]=e=>m.value=!m.value)},[(0,i.Wm)(T,{class:"tool-icon"}),d_],2),(0,i._)("div",{class:"tool-btn",onClick:o[4]||(o[4]=()=>(0,s.SU)(L)?(0,s.SU)(C)():(0,s.SU)(Ve)())},[(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,ne.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)((0,s.SU)(pr.Z),{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:o[5]||(o[5]=e=>(0,s.SU)(I)())},[(0,i.Wm)(O,{class:"tool-icon"}),p_])]),(0,i._)("div",m_,[(0,i._)("div",{class:(0,ne.C_)(["slide-list-wrap",{"laser-pen":v.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(gk,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(b),animationIndex:(0,s.SU)(k),turnSlideToId:(0,s.SU)(S),manualExitFullscreen:(0,s.SU)(C),onWheel:o[6]||(o[6]=e=>(0,s.SU)(f)(e)),onTouchstart:o[7]||(o[7]=e=>(0,s.SU)(h)(e)),onTouchend:o[8]||(o[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[P,M]]),p.value?((0,i.wg)(),(0,i.j4)(zk,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(b),left:-365,top:-155,onClose:o[9]||(o[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),m.value?((0,i.wg)(),(0,i.j4)(Qk,{key:1,left:75,onClose:o[10]||(o[10]=e=>m.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:o[11]||(o[11]=(0,n.iM)((e=>W(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,ne.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(Uu,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(U)},null,8,["slide","size","visible"])],10,v_)))),128))],544)]),(0,i._)("div",f_,[(0,i._)("div",h_,[g_,(0,i._)("span",null,"P "+(0,ne.zw)((0,s.SU)(a)+1)+" / "+(0,ne.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content",style:(0,ne.j5)({fontSize:E.value+"px"}),innerHTML:(0,s.SU)(D)},null,12,y_),(0,i._)("div",w_,[(0,i._)("div",{class:(0,ne.C_)(["scale-btn",{disable:12===E.value}]),onClick:o[12]||(o[12]=e=>Z(E.value-2))},[(0,i.Wm)(F)],2),(0,i._)("div",{class:(0,ne.C_)(["scale-btn",{disable:40===E.value}]),onClick:o[13]||(o[13]=e=>Z(E.value+2))},[(0,i.Wm)(A)],2)])])])}}});const S_=(0,Jt.Z)(x_,[["__scopeId","data-v-f770d810"]]);var k_=S_;const __={class:"pptist-screen"};var b_=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=Ke(),n=e=>{const t=e.key.toUpperCase();t===le.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",__,["base"===t.value?((0,i.wg)(),(0,i.j4)(n_,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(k_,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const I_=(0,Jt.Z)(b_,[["__scopeId","data-v-6bf3d190"]]);var U_=I_,L_=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},selectElement:{type:Function,required:!0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[Ze.IMAGE]:Ua,[Ze.TEXT]:Fn,[Ze.SHAPE]:Qn,[Ze.LINE]:co,[Ze.CHART]:yo,[Ze.TABLE]:Ao,[Ze.LATEX]:Bo,[Ze.VIDEO]:xi,[Ze.AUDIO]:Ni};return e[t.elementInfo.type]||null}));return(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,ne.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(l)),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement","contextmenus"]))],4))}});const C_=L_;var E_=C_,D_=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},canvasScale:{type:Number,required:!0},scaleElement:{type:Function,required:!0}},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}=hs(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u;return(t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,ne.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${(0,s.SU)(l)}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)(ks,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ne.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)(ws,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ne.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128))],64)):(0,i.kq)("",!0)],4))}});const W_=(0,Jt.Z)(D_,[["__scopeId","data-v-7fdc6c04"]]);var Z_=W_;const M_={class:"mobile-thumbnails"},T_=["onClick"],H_={class:"label"};var O_=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=H(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=$e(),{slidesLoadLimit:r}=Td(),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",M_,[(0,i.Wm)(Ad,{class:"thumbnail-list",list:(0,s.SU)(l),options:{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,ne.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",H_,(0,ne.zw)(t+1),1),(0,i.Wm)(Uu,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,T_)])),_:1},8,["list"])]))}});const F_=(0,Jt.Z)(O_,[["__scopeId","data-v-46060f24"]]);var A_=F_;const P_={class:"slide-toolbar"},$_={class:"remark"},N_=["value"],z_={class:"toolbar"};var R_=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=_r.Z.Group,l=H(),{viewportRatio:a,currentSlide:n}=(0,o.Jk)(l),{createSlide:r,copyAndPasteSlide:u,deleteSlide:c}=$e(),{createTextElement:d,createImageElement:p,createShapeElement:m}=Fe(),v=()=>{const e=400,t=56;d({left:(De-e)/2,top:(De*a.value-t)/2,width:e,height:t},{content:"<p>新添加文本</p>"})},f=e=>{e&&e[0]&&Ee(e[0]).then((e=>p(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},l={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:l},o=200;m({left:(De-o)/2,top:(De*a.value-o)/2,width:o,height:o},n[e])},g=(0,i.Fl)((()=>n.value?.remark||"")),y=e=>{const t=e.target.value;l.updateSlide({remark:t})};return(e,l)=>{const a=(0,i.up)("IconPlus"),n=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),d=(0,i.up)("IconFontSize"),p=(0,i.up)("IconPicture"),m=(0,i.up)("IconSquare"),w=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",P_,[(0,i._)("div",$_,[(0,i._)("textarea",{value:(0,s.SU)(g),placeholder:"点击输入演讲者备注",onInput:l[0]||(l[0]=e=>y(e))},null,40,N_)]),(0,i._)("div",z_,[(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[1]||(l[1]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[2]||(l[2]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[3]||(l[3]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(t),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[4]||(l[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(tl,{onChange:l[5]||(l[5]=e=>f(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[6]||(l[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:l[7]||(l[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(w,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)(A_)])}}});const B_=(0,Jt.Z)(R_,[["__scopeId","data-v-1e17bcc7"]]);var j_=B_;const q_=e=>((0,i.dD)("data-v-2633262b"),e=e(),(0,i.Cn)(),e),Y_={class:"element-toolbar"},V_={class:"tabs"},J_=["onClick"],G_={class:"content"},K_={key:0,class:"style"},X_={class:"row-block"},Q_=q_((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),eb={class:"colors"},tb=["onClick"],lb={class:"row-block"},ab=q_((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),nb={class:"colors"},ob=["onClick"],ib={key:1,class:"common"};var sb=(0,i.aZ)({__name:"ElementToolbar",setup(e){const{Group:t,Button:l}=Kd.ZP,a=_r.Z.Group,n=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],r=A(),u=H(),{handleElement:c,handleElementId:d,richTextAttrs:p}=(0,o.Jk)(r),{addHistorySnapshot:m}=Oe(),v=(e,t)=>{u.updateElement({id:e,props:t}),m()},f=[{key:"style",label:"样式"},{key:"common",label:"布局"}],h=(0,s.iH)("common"),{orderElement:g}=Ye(),{alignElementToCanvas:y}=Pl(),{addElementsFromData:w}=Ae(),{deleteElement:x}=ze(),S=()=>{const e=JSON.parse(JSON.stringify(c.value));w([e])},k=(e,t)=>{Sn.emit(yn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},_=e=>{if(c.value){if(("text"===c.value.type||"shape"===c.value.type&&c.value.text?.content)&&Sn.emit(yn.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===c.value.type){const t=JSON.parse(JSON.stringify(c.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}}v(d.value,{data:t})}"latex"===c.value.type&&v(d.value,{color:e})}},b=e=>{if(c.value){if("text"!==c.value.type&&"shape"!==c.value.type&&"chart"!==c.value.type||v(d.value,{fill:e}),"table"===c.value.type){const t=JSON.parse(JSON.stringify(c.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}}v(d.value,{data:t})}"audio"===c.value.type&&v(d.value,{color:e})}};return(e,o)=>{const r=(0,i.up)("IconTextBold"),u=(0,i.up)("IconTextItalic"),d=(0,i.up)("IconTextUnderline"),m=(0,i.up)("IconStrikethrough"),v=(0,i.up)("IconFontSize"),w=(0,i.up)("IconAlignTextLeft"),I=(0,i.up)("IconAlignTextCenter"),U=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconCopy"),C=(0,i.up)("IconDelete"),E=(0,i.up)("IconSendToBack"),D=(0,i.up)("IconBringToFrontOne"),W=(0,i.up)("IconBringToFront"),Z=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),T=(0,i.up)("IconAlignVertically"),H=(0,i.up)("IconAlignRight"),O=(0,i.up)("IconAlignTop"),F=(0,i.up)("IconAlignHorizontally"),A=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",Y_,[(0,i._)("div",V_,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(f,(e=>(0,i._)("div",{class:(0,ne.C_)(["tab",{active:h.value===e.key}]),key:e.key,onClick:t=>h.value=e.key},(0,ne.zw)(e.label),11,J_))),64))]),(0,i._)("div",G_,["style"===h.value?((0,i.wg)(),(0,i.iD)("div",K_,[(0,i.Wm)(Gm,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(p).bold,onClick:o[0]||(o[0]=e=>k("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(p).em,onClick:o[1]||(o[1]=e=>k("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["checked"]),(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(p).underline,onClick:o[2]||(o[2]=e=>k("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d)])),_:1},8,["checked"]),(0,i.Wm)(jm,{style:{flex:"1"},checked:(0,s.SU)(p).strikethrough,onClick:o[3]||(o[3]=e=>k("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)((0,s.SU)(a),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"2"},onClick:o[4]||(o[4]=e=>k("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(v),(0,i.Uk)("+")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"2"},onClick:o[5]||(o[5]=e=>k("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(v),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z),{style:{margin:"20px 0"}}),(0,i.Wm)((0,s.SU)(t),{class:"row","button-style":"solid",value:(0,s.SU)(p).align,onChange:o[6]||(o[6]=e=>k("align",e.target.value))},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(l),{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(I)])),_:1}),(0,i.Wm)((0,s.SU)(l),{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})])),_:1},8,["value"]),(0,i.Wm)((0,s.SU)(pr.Z),{style:{margin:"20px 0"}}),(0,i._)("div",X_,[Q_,(0,i._)("div",eb,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(n,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>_(e)},[(0,i._)("div",{class:"color-block",style:(0,ne.j5)({backgroundColor:e})},null,4)],8,tb))),64))])]),(0,i._)("div",lb,[ab,(0,i._)("div",nb,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(n,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>b(e)},[(0,i._)("div",{class:"color-block",style:(0,ne.j5)({backgroundColor:e})},null,4)],8,ob))),64))])])])):(0,i.kq)("",!0),"common"===h.value?((0,i.wg)(),(0,i.iD)("div",ib,[(0,i.Wm)((0,s.SU)(a),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[7]||(o[7]=e=>S())},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[8]||(o[8]=e=>(0,s.SU)(x)())},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z),{style:{margin:"20px 0"}}),(0,i.Wm)((0,s.SU)(a),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[9]||(o[9]=e=>(0,s.SU)(g)((0,s.SU)(c),(0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[10]||(o[10]=e=>(0,s.SU)(g)((0,s.SU)(c),(0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[11]||(o[11]=e=>(0,s.SU)(g)((0,s.SU)(c),(0,s.SU)(K).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[12]||(o[12]=e=>(0,s.SU)(g)((0,s.SU)(c),(0,s.SU)(K).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(Z,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(pr.Z),{style:{margin:"20px 0"}}),(0,i.Wm)((0,s.SU)(a),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[13]||(o[13]=e=>(0,s.SU)(y)((0,s.SU)(X).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[14]||(o[14]=e=>(0,s.SU)(y)((0,s.SU)(X).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[15]||(o[15]=e=>(0,s.SU)(y)((0,s.SU)(X).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)((0,s.SU)(a),{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[16]||(o[16]=e=>(0,s.SU)(y)((0,s.SU)(X).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(O,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[17]||(o[17]=e=>(0,s.SU)(y)((0,s.SU)(X).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)((0,s.SU)(_r.Z),{style:{flex:"1"},onClick:o[18]||(o[18]=e=>(0,s.SU)(y)((0,s.SU)(X).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(A,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const rb=(0,Jt.Z)(sb,[["__scopeId","data-v-2633262b"]]);var ub=rb;const cb={class:"mobile-editor-header"},db={class:"history"};var pb=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function,required:!0}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(q()),{redo:a,undo:r}=Oe();return(o,u)=>{const c=(0,i.up)("IconBack"),d=(0,i.up)("IconNext"),p=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",cb,[(0,i._)("div",db,[(0,i._)("div",{class:(0,ne.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:u[0]||(u[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,ne.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:u[1]||(u[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(d),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:u[2]||(u[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(p),(0,i.Uk)(" 退出编辑")])])}}});const mb=(0,Jt.Z)(pb,[["__scopeId","data-v-8639f30e"]]);var vb=mb;const fb={class:"mobile-editor"};var hb=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function,required:!0}},setup(e){const t=H(),l=A(),{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)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:v}=es(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)/De:(t-20)/r.value/De}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const h=(0,i.Fl)((()=>({width:De*f.value+"px",height:De*r.value*f.value+"px"}))),g=(0,s.iH)([]),y=()=>{g.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(y);const{dragElement:w}=Hl(g,p,f),{scaleElement:x}=Ml(g,p,f),S=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&w(e,t)},k=()=>{l.setActiveElementIdList([])};return(t,l)=>((0,i.wg)(),(0,i.iD)("div",fb,[(0,i.Wm)(vb,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:l[0]||(l[0]=e=>k())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,ne.j5)((0,s.SU)(h))},[(0,i._)("div",{class:"background",style:(0,ne.j5)((0,s.SU)(v))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,((e,t)=>((0,i.wg)(),(0,i.j4)(is,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(f)},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(Z_,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:(0,s.SU)(f),scaleElement:(0,s.SU)(x)},null,8,["elementInfo","isSelected","canvasScale","scaleElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",style:(0,ne.j5)({transform:`scale(${(0,s.SU)(f)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.j4)(E_,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:S},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(j_),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(ub,{key:0})):(0,i.kq)("",!0)]))}});const gb=(0,Jt.Z)(hb,[["__scopeId","data-v-8cdcde82"]]);var yb=gb;const wb={class:"header"};var xb=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function,required:!0}},setup(e){const t=H(),{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),m=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},v=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(t,o)=>{const r=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,ne.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:o[0]||(o[0]=e=>u.value=!u.value),onTouchstart:o[1]||(o[1]=e=>m(e)),onTouchend:o[2]||(o[2]=e=>v(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,ne.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,ne.j5)({width:(0,s.SU)(d).width+"px",height:(0,s.SU)(d).height+"px"})},[(0,i.Wm)(Uu,{slide:e,size:(0,s.SU)(d).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",wb,[(0,i._)("div",{class:"back",onClick:o[3]||(o[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(r),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)(A_,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const Sb=(0,Jt.Z)(xb,[["__scopeId","data-v-5293de3b"]]);var kb=Sb;const _b={class:"thumbnail-list"},bb={class:"menu"};var Ib=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function,required:!0}},setup(e){const{slides:t}=(0,o.Jk)(H()),{slidesLoadLimit:l}=Td(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(o,r)=>{const u=(0,i.up)("IconEdit"),c=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",_b,[((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)(Uu,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",bb,[(0,i._)("div",{class:"menu-item",onClick:r[0]||(r[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)((0,s.SU)(pr.Z),{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:r[1]||(r[1]=t=>e.changeMode("player"))},[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const Ub=(0,Jt.Z)(Ib,[["__scopeId","data-v-1c8bce03"]]);var Lb=Ub;const Cb={class:"mobile"};var Eb=(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:yb,player:kb,preview:Lb};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Cb,[((0,i.wg)(),(0,i.j4)((0,i.LL)((0,s.SU)(a)),{changeMode:l}))]))}});const Db=(0,Jt.Z)(Eb,[["__scopeId","data-v-1fb24d48"]]);var Wb=Db,Zb=(0,i.aZ)({__name:"App",setup(e){const t=G(),l=A(),a=q(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(V());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await R(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(N),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(N,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(U_,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(qS,{key:1})):((0,i.wg)(),(0,i.j4)(Wb,{key:2}))}});const Mb=Zb;var Tb=Mb,Hb=l(5205);(0,Hb.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);var Ob=l(9015),Fb=l(5761),Ab=l(7559),Pb=l(4023),$b=l(4141),Nb=l(5010),zb=l(6492),Rb=l(1094),Bb=l(2677),jb=l(683),qb=l(7259),Yb=l(1258),Vb=l(9978),Jb=l(597),Gb=l(1874),Kb=l(6071),Xb=l(2489),Qb=l(9925),eI=l(5361),tI=l(3185),lI=l(139),aI=l(8461),nI=l(2882),oI=l(3862),iI=l(3764),sI=l(9371),rI=l(9912),uI=l(3935),cI=l(3735),dI=l(3542),pI=l(7537),mI=l(3552),vI=l(5314),fI=l(3325),hI=l(3275),gI=l(3317),yI=l(7712),wI=l(9370),xI=l(2778),SI=l(4422),kI=l(4957),_I=l(7872),bI=l(5356),II=l(8684),UI=l(9577),LI=l(887),CI=l(6866),EI=l(509),DI=l(7606),WI=l(4412),ZI=l(8814),MI=l(2057),TI=l(6048),HI=l(5114),OI=l(9917),FI=l(7747),AI=l(7425),PI=l(6717),$I=l(6302),NI=l(3060),zI=l(7107),RI=l(2100),BI=l(5460),jI=l(5268),qI=l(1432),YI=l(5193),VI=l(4566),JI=l(7091),GI=l(9602),KI=l(4891),XI=l(4012),QI=l(3681),eU=l(3482),tU=l(646),lU=l(8e3),aU=l(4628),nU=l(9141),oU=l(1060),iU=l(8389),sU=l(3467),rU=l(5421),uU=l(8666),cU=l(6453),dU=l(5957),pU=l(4467),mU=l(5547),vU=l(5650),fU=l(2790),hU=l(5620),gU=l(3339),yU=l(4666),wU=l(5215),xU=l(2692),SU=l(3650),kU=l(4296),_U=l(6519),bU=l(4790),IU=l(3260),UU=l(2146),LU=l(4057),CU=l(6755),EU=l(2849),DU=l(6940),WU=l(6116),ZU=l(5741),MU=l(2939),TU=l(9524),HU=l(6135),OU=l(6821),FU=l(6149);const AU={IconPlayOne:FU.Z,IconFullScreenPlay:OU.Z,IconLock:HU.Z,IconUnlock:TU.Z,IconPpt:MU.Z,IconFormat:ZU.Z,IconPicture:WU.Z,IconFullScreen:DU.Z,IconList:EU.Z,IconOrderedList:CU.Z,IconHelpcenter:LU.Z,IconFlipVertically:UU.Z,IconFlipHorizontally:IU.Z,IconFontSize:bU.Z,IconCode:_U.Z,IconTextBold:kU.Z,IconTextItalic:SU.Z,IconTextUnderline:xU.Z,IconStrikethrough:wU.Z,IconEdit:yU.Z,IconQuote:gU.Z,IconBackgroundColor:hU.Z,IconGroup:fU.Z,IconUngroup:vU.Z,IconBack:mU.Z,IconNext:pU.Z,IconFullwidth:dU.Z,IconAlignTop:cU.Z,IconAlignLeft:uU.Z,IconAlignRight:rU.Z,IconAlignBottom:sU.Z,IconAlignVertically:iU.Z,IconAlignHorizontally:oU.Z,IconBringToFront:nU.Z,IconSendToBack:aU.Z,IconAlignTextLeft:lU.Z,IconAlignTextRight:tU.Z,IconAlignTextCenter:eU.Z,IconRowHeight:QI.Z,IconWrite:XI.Z,IconInsertTable:KI.Z,IconAddText:GI.Z,IconFill:JI.Z,IconTailoring:VI.Z,IconEffects:YI.Z,IconColorFilter:qI.Z,IconUp:jI.Z,IconDown:BI.Z,IconPlus:RI.Z,IconMinus:zI.Z,IconConnection:NI.Z,IconBringToFrontOne:$I.Z,IconSentToBack:PI.Z,IconGithub:AI.Z,IconChartProportion:FI.Z,IconChartHistogram:OI.Z,IconChartHistogramOne:HI.Z,IconChartLineArea:TI.Z,IconChartRing:MI.Z,IconChartScatter:ZI.Z,IconChartLine:WI.Z,IconChartPie:DI.Z,IconText:EI.Z,IconRotate:CI.Z,IconLeftTwo:LI.Z,IconRightTwo:UI.Z,IconPlatte:II.Z,IconClose:bI.Z,IconCloseSmall:_I.Z,IconUndo:kI.Z,IconTransform:SI.Z,IconClick:xI.Z,IconTheme:wI.Z,IconArrowCircleLeft:yI.Z,IconGraphicDesign:gI.Z,IconLogout:hI.Z,IconErase:fI.Z,IconClear:vI.Z,IconFolderClose:mI.Z,IconAlignTextTopOne:pI.Z,IconAlignTextBottomOne:dI.Z,IconAlignTextMiddleOne:cI.Z,IconPause:uI.Z,IconVolumeMute:rI.Z,IconVolumeNotice:sI.Z,IconVolumeSmall:iI.Z,IconVideoTwo:oI.Z,IconFormula:nI.Z,IconLinkOne:aI.Z,IconFullScreenOne:lI.Z,IconOffScreenOne:tI.Z,IconPower:eI.Z,IconListView:Qb.Z,IconMagic:Xb.Z,IconHighLight:Kb.Z,IconShare:Gb.Z,IconIndentLeft:Jb.Z,IconIndentRight:Vb.Z,IconVerticalSpacingBetweenItems:Yb.Z,IconCopy:qb.Z,IconDelete:jb.Z,IconSquare:Bb.Z,IconRound:Rb.Z,IconNeedle:zb.Z,IconTextRotationNone:Nb.Z,IconTextRotationDown:$b.Z,IconFormatBrush:Pb.Z,IconPreviewOpen:Ab.Z,IconPreviewClose:Fb.Z,IconStopwatchStart:Ob.Z};var PU={install(e){for(const t of Object.keys(AU))e.component(t,AU[t])}};const $U={class:"menu-content"},NU=["onClick"],zU={class:"text"},RU={key:0,class:"sub-text"};var BU=(0,i.aZ)({__name:"MenuContent",props:{menus:{type:Array,required:!0},handleClickMenuItem:{type:Function,required:!0}},setup(e){return(t,l)=>{const a=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",$U,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,l)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||l},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,ne.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,ne.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",zU,(0,ne.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",RU,(0,ne.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(a,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,NU))],64)))),128))])}}});const jU=(0,Jt.Z)(BU,[["__scopeId","data-v-e470e712"]]);var qU=jU,YU=(0,i.aZ)({__name:"index",props:{axis:{type:Object,required:!0},el:{type:Object,required:!0},menus:{type:Array,required:!0},removeContextmenu:{type:Function,required:!0}},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(t,o)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:o[0]||(o[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:o[1]||(o[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,ne.j5)({left:(0,s.SU)(l).left+"px",top:(0,s.SU)(l).top+"px"}),onContextmenu:o[2]||(o[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)(qU,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const VU=YU;var JU=VU;const GU="CTX_CONTEXTMENU_HANDLER",KU=(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)(JU,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)},XU={mounted(e,t){e[GU]=l=>KU(e,l,t),e.addEventListener("contextmenu",e[GU])},unmounted(e){e&&e[GU]&&(e.removeEventListener("contextmenu",e[GU]),delete e[GU])}};var QU=XU;const eL="CTX_CLICK_OUTSIDE_HANDLER",tL=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},lL={mounted(e,t){e[eL]=l=>tL(e,l,t),setTimeout((()=>{document.addEventListener("click",e[eL])}),0)},unmounted(e){e[eL]&&(document.removeEventListener("click",e[eL]),delete e[eL])}};var aL=lL,nL={install(e){e.directive("contextmenu",QU),e.directive("click-outside",aL)}};const oL=(0,n.ri)(Tb);oL.use(PU),oL.use(nL),oL.use((0,o.WB)()),oL.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.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(6935)}));a=l.O(a)})();
|
||
//# sourceMappingURL=app.0d0607ad.js.map
|