@10yun/cv-pc-ui 0.3.39 → 0.3.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cv-ui.cjs +7 -7
- package/lib/cv-ui.js +950 -909
- package/package.json +3 -3
package/lib/cv-ui.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ma=Object.create;var Zo=Object.defineProperty;var Aa=Object.getOwnPropertyDescriptor;var Ra=Object.getOwnPropertyNames;var Ha=Object.getPrototypeOf,Ua=Object.prototype.hasOwnProperty;var Wa=(t,o,l,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of Ra(o))!Ua.call(t,n)&&n!==l&&Zo(t,n,{get:()=>o[n],enumerable:!(r=Aa(o,n))||r.enumerable});return t};var oo=(t,o,l)=>(l=t!=null?Ma(Ha(t)):{},Wa(o||!t||!t.__esModule?Zo(l,"default",{value:t,enumerable:!0}):l,t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("element-plus"),e=require("vue"),qa=require("codemirror"),_=require("@codemirror/state"),E=require("@codemirror/view"),Ga=require("@codemirror/commands"),x=require("@codemirror/language"),a=require("@lezer/highlight"),Yo=require("@codemirror/lang-javascript"),Ka=require("@codemirror/lang-html"),Qa=require("@codemirror/lang-json"),Za=require("@codemirror/lang-markdown"),Ya=require("@codemirror/lang-vue"),Ja=require("@codemirror/lang-php"),Xa=require("@codemirror/lang-java"),Jo=require("@codemirror/lang-sql"),en=require("@codemirror/lang-python"),tn=require("@codemirror/lang-xml"),on=require("@codemirror/lang-go"),ln=require("@codemirror/lang-css"),an=require("html-to-md"),C=(t,o)=>{const l=t.__vccOpts||t;for(const[r,n]of o)l[r]=n;return l},ke=C({name:"cvBadge",extends:{ExtendBadge:k.ElBadge},props:{...k.ElBadge.props},created(){},computed:{isShow(){return!this.value||!(this.value>0)}},data:()=>({})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-badge");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{hidden:i.isShow}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["hidden"])}]]);ke.install=function(t){t.component(ke.name,ke)};const ye=C({name:"cvRow",props:{gutter:{type:[Number,String],default:0},type:{type:[String],default:""},justify:{type:[String],default:"start"},align:{type:[String],default:"top"},tag:{type:[String],default:"div"}},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-row"},{type:l.type,justify:l.justify,align:l.align,tag:l.tag},{gutter:parseInt(l.gutter)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["gutter"])}]]),be=C({name:"cvCol",props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-col");return e.openBlock(),e.createBlock(c,{class:"cv-col",span:parseInt(l.span),offset:parseInt(l.offset)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["span","offset"])}]]);ye.install=function(t){t.component(ye.name,ye)},be.install=function(t){t.component(be.name,be)};const Ve=C({name:"cvBtnBase",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1}},data:()=>({loadingStatus:!1}),created(){},methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-btn"},t.$props,{loading:n.loadingStatus,onClick:i.handleClick}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["loading","onClick"])}]]),we=C({name:"cvBtnText",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1}},data:()=>({loadingStatus:!1}),methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-btn"},t.$props,{link:"",loading:n.loadingStatus,onClick:i.handleClick}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["loading","onClick"])}]]);Ve.install=function(t){t.component(Ve.name,Ve)},we.install=function(t){t.component(we.name,we)};const xe=C({name:"cvAutocompleteBase",props:{...k.ElAutocomplete.props},data:()=>({localVal:"",loadingStatus:!1}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createBlock(c,e.mergeProps({modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>n.localVal=s)},t.$props),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["modelValue"])}]]),Xt={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data:()=>({searchData:{},loadDataLoading:!1,loadDataList:[],loadDataTotal:0,loadPageCurr:1,loadPageLimit:10,loadConfigSetting:{},loadConfigDef:{pageCurr:1,pageLimit:10,isSkip:!1,url:null,apiFunc:null,mockData:null,where:{},response:{statusName:"status",statusCode:200,msgName:"msg",countName:"total",dataName:"data"},request:{pageName:"page",limitName:"pagesize"}}}),methods:{loadEnding(){this.loadDataLoading=!1,this.$nextTick(()=>{this.loadDataLoading=!1})},loadGetData(){if(this.loadDataLoading=!0,this.loadConfigSetting.apiFunc&&typeof this.loadConfigSetting.apiFunc=="function"){const t=this.loadConfigSetting;let o={...t.where};o[t.request.pageName]=this.loadPageCurr,o[t.request.limitName]=this.loadPageLimit,o=Object.assign(o,this.searchData),this.loadConfigSetting.apiFunc(o).then(l=>{this.loadPageCurr=o[t.request.pageName],this.loadEnding();let r=this.sortOutData(l);if(r.status!=t.response.statusCode)return void ExtendMessage({message:r.msg,type:"error",duration:1300});if(r.data.length===0)return void ExtendMessage({message:"没有更多数据了",type:"warning",duration:1300});let n=r[t.response.dataName]||[];this.dataParse&&typeof this.dataParse=="function"&&(n=this.dataParse.call(null,n)),this.loadDataList.push(...n),this.loadDataTotal=r[t.response.countName]||0}).catch(l=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(t){let o=this.loadConfigSetting.response,l={},r=[],n=[];l.status=t[o.statusName],l.msg=t[o.msgName],l.total=t[o.countName],r=t[o.dataName];for(let i in r)n[i]=r[i];return l.data=n,l}}},Be=C({name:"cvAutocompleteLoad",mixins:[Xt],emits:["update:modelValue","input"],props:{...k.ElAutocomplete.props,modelValue:null,placeholder:{type:[String],default:"请输入内容"},popperClass:{type:[String],default:"cv-autocomplete"},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default:()=>"cvAutocompleteLoad-"+ +new Date+(Math.random()/1e4).toFixed(0)},compConfig:{type:[Object],default:()=>({})}},data:()=>({localVal:"",searchList:[],compConfigDef:{searchField:["value"]},timeout:null}),directives:{autoScrollLoad:{created(t,o,l){let r=t.querySelector(".el-autocomplete-suggestion__wrap"),n=t.querySelector(".el-autocomplete-suggestion__wrap .el-autocomplete-suggestion__list");r.addEventListener("scroll",i=>{r.offsetHeight+r.scrollTop+10-n.offsetHeight>0&&!l.context.loading&&o.value()},!1)}},loadmore:{mount(t,o){function l(n){n.target.clientHeight+n.target.scrollTop==n.target.scrollHeight&&o.value()}let r=t.querySelector(".el-autocomplete-suggestion__wrap");t.__handleScroll__=l,t.__wrapDom__=r,r.addEventListener("scroll",l,!1)},unbind(t,o,l){t.__wrapDom__.removeEventListener("scroll",t.__handleScroll__,!1)}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||10,Object.assign(t.where,this.searchData),this.loadConfigSetting=t},getMoreData(){conosle.log("加载更多"),this.loadPageCurr++,this.loadGetData()},getData(){this.loadDataList=[],this.loadGetData()},async querySearchAsync(t,o){this.loadPageCurr=1,this.loadDataLoading=!0;var l=this.loadDataList||[];let r=[];const n=this.loadConfigSetting.searchField||["value"];if(r=(t=t.toLowerCase())?l.filter(this.createFilter(t,n)):l,r.length>0)o(r.map(i=>({...i,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadPageCurr++,this.searchData.keyword=t,this.loadDataList=[],await this.loadGetData();const i=this.loadDataList.map(c=>({...c,is_last_tip:!1}));i.push({is_last_tip:!0}),o(i)}catch{}finally{this.lookFlag=!0}},createFilter:(t,o)=>l=>o.some(r=>(l[r]+"").toLowerCase().indexOf(t)!==-1),selectLoadMore(){},handleChange(t){},handleSelect(t){this.$emit("update:modelValue",t)}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("cv-icons"),s=e.resolveComponent("el-autocomplete"),m=e.resolveDirective("loadmore");return e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[1]||(o[1]=d=>n.localVal=d),"fetch-suggestions":i.querySearchAsync,onChange:i.handleChange,onSelect:i.handleSelect}),{default:e.withCtx(({item:d})=>[d.is_last_tip?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",e.normalizeProps(e.mergeProps({key:0},{item:d}))),d.is_last_tip?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-autocomolete-nodata",onClick:o[0]||(o[0]=(...p)=>i.getData&&i.getData(...p)),disabled:""},[o[2]||(o[2]=e.createTextVNode(" 没有更多数据了 ")),e.createVNode(c,{type:"ElIconRefreshLeft"}),o[3]||(o[3]=e.createTextVNode(" 刷新按钮 "))])):e.createCommentVNode("",!0)]),_:3},16,["modelValue","fetch-suggestions","onChange","onSelect"])])),[[m,i.getMoreData]])}]]);xe.install=function(t){t.component(xe.name,xe)},Be.install=function(t){t.component(Be.name,Be)};const Ne=C({...k.ElForm,name:"cvFormBase",extends:k.ElForm,provide(){return{elForm:this}},props:{...k.ElForm.props,labelWidth:{type:String,default:"auto"},labelPosition:{type:String,default:"right"}},watch:{model(){}},data:()=>({})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-form-base"},{...t.$props,...t.$attrs},e.toHandlers(t.$attrs)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Se=C({name:"cvFormInline",provide(){return{elForm:this}},props:{...k.ElForm.props},watch:{},data:()=>({form:{}})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-form-base"},t.$props,e.toHandlers(t.$attrs),{inline:!0}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),nn={name:"cvFormItem",extends:k.ElFormItem,props:{},data:()=>({localLabelWidth:"",localError:""}),created(){},methods:{}},rn={key:0,class:"cv-form-item__tip"},Ee=C(nn,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-form-item");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default"),t.$slots.tip?(e.openBlock(),e.createElementBlock("div",rn,[e.renderSlot(t.$slots,"tip")])):e.createCommentVNode("",!0)]),_:3},16)}]]);Ne.install=function(t){t.component(Ne.name,Ne)},Se.install=function(t){t.component(Se.name,Se)},Ee.install=function(t){t.component(Ee.name,Ee)};const $={extends:k.ElInput,emits:["update:modelValue","change"],props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(t){this.localVal=t},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localRules:[]}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},handleBlur(){this._isCheckValue()},_showError(t){this.localError=t||"请输入正确的"+this.label},_diyValidate(){},_isCheckValue(){const o=this==null?void 0:this.rules.split("|");this.localError="";for(let l in o){let r=o[l].split(":"),n=r[0]||"",i=r[1]||"";switch(n){case"require":if(this.localVal=="")return void this._showError(this.label+"不能为空");break;case"max":if(this.localVal.length>i)return void this._showError(this.label+"最大长度不超过"+i);break;case"min":if(this.localVal.length<i)return void this._showError(this.label+"最小长度不小于"+i);break;default:this._diyValidate(n)}}}}},cn=C({name:"cvInputText",mixins:[$],props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.prepend?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),De=C({name:"cvInputMobile",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"number",oninput:"if(value.length>11)value=value.slice(0,11)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入11位大陆手机号",clearable:""}),e.createSlots({prepend:e.withCtx(()=>[o[1]||(o[1]=e.createTextVNode("+86"))]),_:2},[t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"0"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Te=C({name:"cvInputEmail",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入邮箱",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Ie=C({name:"cvInputPassword",mixins:[$],components:{},props:{showPassword:{type:Boolean,default:!1}},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"password"},{disabled:t.disabled,showPassword:l.showPassword},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入密码",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Le=C({name:"cvInputNumber",mixins:[$],props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-number",type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入整数",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Fe=C({name:"cvInputIdcard",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"text",oninput:"if(value.length>18)value=value.slice(0,18)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入身份证",clearable:"",maxlength:"18"}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),_e=C({name:"cvInputDigit",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),$e=C({name:"cvTextarea",mixins:[$],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:i.lastRow,autosize:l.autosize},{rows:i.lastRow,modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["rows","modelValue","onInput","placeholder"])}]]),sn={name:"cvTextareaBtn",mixins:[$],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:""},btnIcon:{type:[String],default:""},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},dn={class:"cv-textab-group"},mn={class:"cv-textab-group__append"},pn={class:"cv-textab_slot-wrap"},ze=C(sn,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input"),s=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",dn,[e.createVNode(c,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:i.lastRow,autosize:l.autosize},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>t.localVal=m),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["modelValue","onInput","placeholder"]),e.createElementVNode("div",mn,[e.createElementVNode("div",pn,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(s,{class:"cv-textab_slotbtn",type:"primary",size:t.size,onClick:i.onSubmit},{default:e.withCtx(()=>[l.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.btnText),1)]),_:1},8,["size","onClick"])])])])])}]]),un={class:"cv-input-group"},hn={class:"cv-input-group__append"},Pe=C({name:"cvInputBtn",mixins:[$],emits:["btnClick"],components:{},props:{btnText:{type:[Number,String],default:"确定"},btnIcon:{type:[String],default:""}},data:()=>({}),methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input"),s=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",un,[e.createVNode(c,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>t.localVal=m),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),null,16,["modelValue","onChange","onInput","placeholder"]),e.createElementVNode("div",hn,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(s,{class:"cv-input-btn__slotbtn",type:"primary",size:t.size,onClick:i.onSubmit},{default:e.withCtx(()=>[l.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.btnText),1)]),_:1},8,["size","onClick"])])])])}]]),lo=C({data:()=>({formData:{}})},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div")}]]);De.install=function(t){t.component(De.name,De)},Te.install=function(t){t.component(Te.name,Te)},Ie.install=function(t){t.component(Ie.name,Ie)},Le.install=function(t){t.component(Le.name,Le)},Fe.install=function(t){t.component(Fe.name,Fe)},_e.install=function(t){t.component(_e.name,_e)},$e.install=function(t){t.component($e.name,$e)},ze.install=function(t){t.component(ze.name,ze)},Pe.install=function(t){t.component(Pe.name,Pe)},lo.install=function(t){t.component(lo.name,lo)};const je=C({name:"cvInputCounter",extends:k.ElInputNumber,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data:()=>({localVal:0}),created(){},methods:{handleChange(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>n.localVal=s),onChange:i.handleChange,step:t.step}),null,16,["modelValue","onChange","step"])}]]);je.install=function(t){t.component(je.name,je)};const gn={class:"cv-show-text"},fn=["innerHTML"],Oe=C({name:"cvShowText",mixins:[],components:{},props:{text:{type:[Number,String,Object],default:""}},data:()=>({}),created(){},methods:{}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",gn,[l.text?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:l.text},null,8,fn)):e.createCommentVNode("",!0),l.text?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:1})])}]]),Cn={class:"cv-show-image"},Me=C({name:"cvShowImage",mixins:[],components:{},props:{url:{type:[String,Array,Object],default:""},width:{type:[String],default:"100px"},height:{type:[String],default:"100px"}},data:()=>({localUrl:""}),watch:{url:{handler(){this.localUrl=typeof this.url=="string"?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.localUrl,(s,m)=>(e.openBlock(),e.createBlock(c,{style:e.normalizeStyle("width:"+l.width+"; height:"+l.height+"; margin-right:10px"),key:m,src:s,"preview-src-list":n.localUrl},null,8,["style","src","preview-src-list"]))),128))])}]]),Ae=C({name:"cvShowTip",props:{borderColor:{type:[String],default:"#50bfff"},bgColor:{type:[String],default:"#ecf8ff"}},data:()=>({backgroundColor:"#ecf8ff",borderLeft:"5px solid #50bfff"}),created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:"cv-show-tip",style:e.normalizeStyle({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[e.renderSlot(t.$slots,"default")],4)}]]),vn={name:"cv-gallery-dialog",props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data:()=>({isShowCarousel:!1,sourceTitle:"",initialIndex:0,isShowPreview:!1}),methods:{startPreview(t){this.isShowPreview=!0,this.initialIndex=t,this.sourceTitle=this.sources[t].title},handleCarouselChange(t){this.sources[t]&&this.sources[t].title?this.sourceTitle=this.sources[t].title:this.sourceTitle=""}}},kn=["src"],yn={key:0,class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},bn=["src"],Vn=["src"],wn=["src"],xn={name:"gallery",components:{GalleryDialog:C(vn,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-carousel-item"),s=e.resolveComponent("el-carousel"),m=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(m,{visible:n.isShowPreview,"append-to-body":"",onOpen:o[0]||(o[0]=d=>n.isShowCarousel=!0),onClosed:o[1]||(o[1]=d=>n.isShowCarousel=!1),style:{"text-align":"center"}},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.sourceTitle||l.title),1)]),default:e.withCtx(()=>[l.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isShowPreview?(e.openBlock(),e.createElementBlock("video",{key:0,src:l.sources[n.initialIndex].src,autoplay:"autoplay",class:"cv-gallery-video",controls:"controls",width:"100%"},null,8,kn)):e.createCommentVNode("",!0)],64)):l.type==="iframe"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isShowPreview?(e.openBlock(),e.createElementBlock("div",yn,[e.createElementVNode("iframe",{src:l.sources[n.initialIndex].src,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,bn)])):e.createCommentVNode("",!0)],64)):l.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.sliceSingle&&l.sources[n.initialIndex]||l.sources.length===1?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.sources[n.initialIndex].src,class:"cv-gallery-image"},null,8,Vn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isShowCarousel?(e.openBlock(),e.createBlock(s,e.mergeProps({key:0,"initial-index":n.initialIndex,onChange:i.handleCarouselChange,"indicator-position":"outside"},l.carouselAttrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sources,(d,p)=>(e.openBlock(),e.createBlock(c,{key:p},{default:e.withCtx(()=>[e.createElementVNode("img",{src:d.src,class:"cv-gallery-image"},null,8,wn)]),_:2},1024))),128))]),_:1},16,["initial-index","onChange"])):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)]),_:1},8,["visible"])}]])},props:{type:{type:String,default:"image",validator:t=>["image","video","iframe"].includes(t)},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:String,thumbStyle:Object,carouselAttrs:Object,removeFn:Function,title:String,sliceSingle:{type:Boolean,default:!1}},data:()=>({}),computed:{viewIconClass(){return this.type==="video"||this.type==="iframe"?"ElIconVideoPlay":"ElIconZoomIn"},computedStyle(){let t=this.width||this.size,o=this.height||this.size;return this.type==="image"?(t=t?t+"px":"150px",o=o?o+"px":"150px"):(this.type==="video"||this.type==="iframe")&&(t=t?t+"px":"360px",o=o?o+"px":"auto"),Object.assign({},{width:t,height:o,display:"block"},this.thumbStyle)},thumbs(){return this.computedSources.map(t=>t.thumb)},computedSources(){const t=this.source;if(typeof t=="string")return[this.getStringSource(t)];if(t instanceof Array){const o=[];return t.forEach(l=>{l instanceof Object?o.push(this.getObjectSource(l)):typeof l=="string"&&o.push(this.getStringSource(l))}),o}return t instanceof Object?[this.getObjectSource(t)]:[]}},methods:{handlePreview(t){this.$refs.dialog.startPreview(t)},handleRemove(t){this.removeFn(t)},getStringSource(t){let o=t;return this.type==="image"&&this.thumbSuffix&&(o+=this.thumbSuffix),{type:this.type,src:t,thumb:o}},getObjectSource(t){return t.type=t.thumb?"image":this.type,t.thumb=t.thumb||t.src,t}}},Bn={key:0,class:"cv-gallery"},Nn={class:"el-upload-list el-upload-list--picture-card"},Sn=["src"],En=["src"],Dn={class:"el-upload-list__item-actions"},Tn=["onClick"],In=["onClick"],Re=C(xn,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-image"),s=e.resolveComponent("cv-icons"),m=e.resolveComponent("GalleryDialog");return l.source?(e.openBlock(),e.createElementBlock("div",Bn,[e.createElementVNode("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.computedSources,(d,p)=>(e.openBlock(),e.createElementBlock("li",{key:p,class:"el-upload-list__item"},[e.renderSlot(t.$slots,"default",e.mergeProps({ref_for:!0},{source:d,index:p}),()=>[d.type==="image"?(e.openBlock(),e.createBlock(c,{key:0,lazy:l.lazy,src:d.thumb,style:e.normalizeStyle(i.computedStyle),fit:"cover"},null,8,["lazy","src","style"])):d.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,src:d.thumb,style:e.normalizeStyle(i.computedStyle)},null,12,Sn)):d.type==="iframe"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(i.computedStyle),class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},[e.createElementVNode("iframe",{src:d.thumb,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,En)],4)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Dn,[e.createElementVNode("span",{onClick:f=>i.handlePreview(p,d)},[e.createVNode(s,{type:i.viewIconClass},null,8,["type"])],8,Tn),l.removeFn?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:f=>i.handleRemove(p)},[e.createVNode(s,{type:"ElIconDelete"})],8,In)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"action",e.mergeProps({ref_for:!0},{source:d,index:p}))])]))),128))]),e.createVNode(m,{carouselAttrs:l.carouselAttrs,sliceSingle:l.sliceSingle,sources:i.computedSources,title:l.title,type:l.type,ref:"dialog"},null,8,["carouselAttrs","sliceSingle","sources","title","type"])])):e.createCommentVNode("",!0)}]]);Oe.install=function(t){t.component(Oe.name,Oe)},Me.install=function(t){t.component(Me.name,Me)},Ae.install=function(t){t.component(Ae.name,Ae)},Re.install=function(t){t.component(Re.name,Re)};const He=C({name:"cvRadioOptBase"},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-radio");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ue=C({name:"cvRadioOptBtn"},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-radio-button");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),We=C({name:"cvRadioGroup",props:{...k.ElRadioGroup.props,modelValue:{default:""},type:{type:[String],default:"base"},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(t){this.localVal=t},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localText:[],localVal:this.modelValue,localOpt:[]}},created(){this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{t.push({label:r,value:r})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",l=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",i=r[l]===0?0:r[l]||"";i=i===0?0:i||n,t.push({label:n,value:i,disabled:!!r.disabled}),r.checked!="true"&&r.checked!=1||(typeof this.localVal=="string"?this.localVal=i:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(i))}),this.localOpt=t}}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-radio"),s=e.resolveComponent("el-radio-button"),m=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(m,{class:"cv-radio-group",modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>n.localVal=d)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[l.type=="base"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.localOpt,(d,p)=>(e.openBlock(),e.createBlock(c,{label:d.label,value:d.value,key:p,disabled:l.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","disabled"]))),128)):e.createCommentVNode("",!0),l.type=="button"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.localOpt,(d,p)=>(e.openBlock(),e.createBlock(s,{label:d.label,value:d.value,key:p,disabled:l.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","disabled"]))),128)):e.createCommentVNode("",!0)])]),_:3},8,["modelValue"])}]]);He.install=function(t){t.component(He.name,He)},Ue.install=function(t){t.component(Ue.name,Ue)},We.install=function(t){t.component(We.name,We)};const qe=C({name:"cvCheckboxOptBase",extends:k.ElCheckbox},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-checkbox");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ge=C({name:"cvCheckboxOptBtn",extends:k.ElCheckboxButton,props:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-checkbox-button");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),va={props:{...k.ElCheckboxGroup.props,modelValue:{type:[Array],default:()=>[]},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localVal:this.modelValue,localOpt:[]}},created(){this.handleChange(),this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{t.push({label:r,value:r})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",l=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",i=r[l]===0?0:r[l]||"";i=i===0?0:i||n,t.push({label:n,value:i,disabled:!!r.disabled}),r.checked!="true"&&r.checked!=1||(typeof this.localVal=="string"?this.localVal=i:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(i))}),this.localOpt=t}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}},Ln={class:"cv-checkbox-all"},Ke=C({name:"cvCheckboxAll",mixins:[va],components:{},data:()=>({checkAll:!1,isIndeterminate:!0,localOptAll:[]}),methods:{handleCheckAllChange(t){this.localVal=t?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(t){let o=t.length;this.checkAll=o===this.localOptAll.length,this.isIndeterminate=o>0&&o<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(t=>{t.disabled||this.localOptAll.push(t.label)})}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-checkbox"),s=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ln,[e.createVNode(c,{indeterminate:n.isIndeterminate,modelValue:n.checkAll,"onUpdate:modelValue":o[0]||(o[0]=m=>n.checkAll=m),onChange:i.handleCheckAllChange},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("全选")])),_:1},8,["indeterminate","modelValue","onChange"]),o[3]||(o[3]=e.createElementVNode("div",{style:{margin:"15px 0"}},null,-1)),e.createVNode(s,{modelValue:t.localVal,"onUpdate:modelValue":o[1]||(o[1]=m=>t.localVal=m),onChange:i.handleCheckedCitiesChange},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.localOpt,(m,d)=>(e.openBlock(),e.createBlock(c,{label:m.label,value:m.value,key:d,onChange:t.handleChange,disabled:t.disabled||m.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1032,["label","value","onChange","disabled"]))),128))])]),_:3},8,["modelValue","onChange"])])}]]),Qe=C({name:"cvCheckboxGroup",mixins:[va],components:{},props:{type:{type:[String],default:"base"}},data:()=>({})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-checkbox"),s=e.resolveComponent("el-checkbox-button"),m=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(m,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>t.localVal=d)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[l.type=="base"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.localOpt,(d,p)=>(e.openBlock(),e.createBlock(c,{label:d.label,value:d.value,key:p,onChange:t.handleChange,disabled:t.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","onChange","disabled"]))),128)):e.createCommentVNode("",!0),l.type=="button"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.localOpt,(d,p)=>(e.openBlock(),e.createBlock(s,{label:d.label,value:d.value,key:p,onChange:t.handleChange,disabled:t.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","onChange","disabled"]))),128)):e.createCommentVNode("",!0)])]),_:3},16,["modelValue"])}]]);function Fn(t,o,l){var r={}.atBegin;return function(n,i,c){var s,m=c||{},d=m.noTrailing,p=d!==void 0&&d,f=m.noLeading,g=f!==void 0&&f,h=m.debounceMode,v=h===void 0?void 0:h,u=!1,y=0;function b(){s&&clearTimeout(s)}function V(){for(var w=arguments.length,S=new Array(w),D=0;D<w;D++)S[D]=arguments[D];var z=this,L=Date.now()-y;function P(){y=Date.now(),i.apply(z,S)}function ae(){s=void 0}u||(g||!v||s||P(),b(),v===void 0&&L>n?g?(y=Date.now(),p||(s=setTimeout(v?ae:P,n))):P():p!==!0&&(s=setTimeout(v?ae:P,v===void 0?n-L:n)))}return V.cancel=function(w){var S=(w||{}).upcomingOnly,D=S!==void 0&&S;b(),u=!D},V}(t,o,{debounceMode:(r!==void 0&&r)!==!1})}function J(t,o=!1,l=!0){return new Promise((r,n)=>{const i=document.createElement("script");t=t.replace(/([^:]\/)\/+/g,"$1"),i.id=t,i.type="text/javascript",i.src=o?t+"?t="+new Date().getTime():t,document.getElementById(t)&&l?r():(document.body.appendChild(i),i.onload=()=>{r()})})}function _n(t){const o=t,l=document.createElement("textarea");l.value=o,document.body.appendChild(l),l.select(),document.execCommand("Copy"),k.ElMessage({message:"复制成功",type:"success"}),l.remove()}qe.install=function(t){t.component(qe.name,qe)},Ge.install=function(t){t.component(Ge.name,Ge)},Qe.install=function(t){t.component(Qe.name,Qe)},Ke.install=function(t){t.component(Ke.name,Ke)};const $n={name:"cvGeoCity",mixins:[],components:{},props:{modelValue:{type:[String,Array,Number],default:()=>[]},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1},initChoose:{type:[String,Array,Number],default:()=>[]},initStr:{type:[String,Array,Number],default:()=>[]}},watch:{modelValue(t){},initChoose:{deep:!0,immediate:!0,handler(t){this.initProvince(t)}}},data:()=>({provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],provinceCode:"",cityCode:"",districtCode:"",provinceFlag:!1,cityFlag:!1,districtFlag:!1,activeSelectArr:{}}),async mounted(){await J(this.CDN_URL_UI+"/dict/dict-area/area-province.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-city.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-district.js").then(()=>{this.initLoad()})},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.provinceFlag=!1,this.isCdnLoading=!1,this.getProvinces()},200)},initProvince(t){this.getProvinces();let o=t[0]||"";if(o!=""){let l=parseInt(o);this.provinceList.some((r,n)=>{if((isNaN(l)?r.provinceName:r.provinceCode)==o)return this.provinceCode=r.provinceCode,this.handleChoose("provinceCode",r,n),!0})}this.changeProvince(this.provinceCode),this.initCity(t)},initCity(t){let o=t[1]||"";if(o!=""){let l=parseInt(o);this.cityList.some((r,n)=>{if((isNaN(l)?r.cityName:r.cityCode)==o)return this.cityCode=r.cityCode,this.handleChoose("cityCode",r,n),!0})}this.changeCity(this.cityCode),this.initDistrict(t)},initDistrict(t){let o=t[2]||"";if(o!=""){let l=parseInt(o);this.districtList.some((r,n)=>{if((isNaN(l)?r.districtName:r.districtCode)==o)return this.districtCode=r.districtCode,this.handleChoose("districtCode",r,n),!0})}this.changeDistrict(this.districtCode)},handleChoose(t,o,l){switch(o.index=l,t){case"provinceCode":delete this.activeSelectArr.city,delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{province:{text:o.provinceName,value:o.provinceCode,index:o.index}}),this._getNeedDistrict();break;case"cityCode":delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{city:{text:o.cityName,value:o.cityCode,index:o.index}});break;case"districtCode":Object.assign(this.activeSelectArr,{district:{text:o.districtName,value:o.districtCode,index:o.index}})}this.$emit("onChoose",this.activeSelectArr)},getProvinces(){if(!this.provinceFlag&&typeof this.provinceCdnList=="object"){let t=[];for(let o in this.provinceCdnList)t.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=t,this.provinceFlag=!0}},changeProvince(t){let o;this._getNeedCity(),this.cityFlag=!0,this.cityCode="",this.districtCode="",this.provinceList.map(l=>{l.provinceCode==t&&(o=l.provinceName)}),this.$emit("addressSelect",[t,o])},_getNeedCity(){let t=[],o=this.provinceCode;for(let l in this.cityCdnList)l.substring(0,2)==o.substring(0,2)&&t.push({cityCode:l,cityName:this.cityCdnList[l]});this.cityList=t},getCities(){this.cityFlag||this.provinceCode&&(this._getNeedCity(),this.cityFlag=!0)},changeCity(t){let o;this._getNeedDistrict(),this.districtFlag=!0,this.districtCode="",this.cityList.map(l=>{l.cityCode==t&&(o=l.cityName)}),this.$emit("addressSelect",[t,o])},_getNeedDistrict(){let t=[],o=this.cityCode;for(let l in this.districtCdnList)l.substring(0,4)==o.substring(0,4)&&t.push({districtCode:l,districtName:this.districtCdnList[l]});this.districtList=t},getDistrict(){this.districtFlag||this.cityCode&&this._getNeedDistrict()},changeDistrict(t){let o;this.districtList.map(l=>{l.districtCode==t&&(o=l.districtName)}),this.$emit("addressSelect",[t,o])}}},zn={class:"cv-geo-city"},Pn={key:0},jn={key:1},Ze=C($n,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),m=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",zn,[e.createElementVNode("div",null,[e.createVNode(s,{modelValue:n.provinceCode,"onUpdate:modelValue":o[0]||(o[0]=d=>n.provinceCode=d),onFocus:i.getProvinces,onChange:i.changeProvince,placeholder:"省",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.provinceList,(d,p)=>(e.openBlock(),e.createBlock(c,{onClick:f=>i.handleChoose("provinceCode",d,p),key:d.provinceCode,label:d.provinceName,value:d.provinceCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),l.cityHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Pn,[e.createVNode(s,{modelValue:n.cityCode,"onUpdate:modelValue":o[1]||(o[1]=d=>n.cityCode=d),onFocus:i.getCities,onChange:i.changeCity,placeholder:"市",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.cityList,(d,p)=>(e.openBlock(),e.createBlock(c,{onClick:f=>i.handleChoose("cityCode",d,p),key:d.cityCode,label:d.cityName,value:d.cityCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])),l.cityHide||l.districtHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jn,[e.createVNode(s,{modelValue:n.districtCode,"onUpdate:modelValue":o[2]||(o[2]=d=>n.districtCode=d),onFocus:i.getDistrict,onChange:i.changeDistrict,placeholder:"区/县",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.districtList,(d,p)=>(e.openBlock(),e.createBlock(c,{onClick:f=>i.handleChoose("districtCode",d,p),key:d.districtCode,label:d.districtName,value:d.districtCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]))])),[[m,n.isCdnLoading]])}]]),On={name:"cvGeoCity2",mixins:[],components:{},props:{modelValue:{type:[String,Array,Number],default:()=>[]},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1},initChoose:{type:[String,Array,Number],default:()=>[]},initStr:{type:[String,Array,Number],default:()=>[]}},watch:{initChoose:{deep:!0,immediate:!0,handler(t){this.initProvince(t)}}},data:()=>({provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],provinceCode:"",cityCode:"",districtCode:"",hideMunicipality:!1,municipalities:["110000","120000","310000","500000","北京市","天津市","上海市","重庆市"],provinceFlag:!1,cityFlag:!1,districtFlag:!1,activeSelectArr:{}}),async mounted(){await J(this.CDN_URL_UI+"/dict/dict-area/area-province.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-city.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-district.js").then(()=>{this.initLoad()})},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.provinceFlag=!1,this.isCdnLoading=!1,this.getProvinces()},200)},initProvince(t){this.getProvinces();let o=t[0]||"";if(o!=""){let l=parseInt(o);this.provinceList.some((r,n)=>{if((isNaN(l)?r.provinceName:r.provinceCode)==o)return this.provinceCode=r.provinceCode,this.handleChoose("provinceCode",r,n),!0})}this.changeProvince(this.provinceCode),this.initCity(t)},initCity(t){let o=t[1]||"";if(o!=""){let l=parseInt(o);this.cityList.some((r,n)=>{if((isNaN(l)?r.cityName:r.cityCode)==o)return this.cityCode=r.cityCode,this.handleChoose("cityCode",r,n),!0})}this.changeCity(this.cityCode),this.initDistrict(t)},initDistrict(t){let o=t[2]||"";if(o!=""){let l=parseInt(o);this.districtList.some((r,n)=>{if((isNaN(l)?r.districtName:r.districtCode)==o)return this.districtCode=r.districtCode,this.handleChoose("districtCode",r,n),!0})}this.changeDistrict(this.districtCode)},handleChoose(t,o,l){switch(o.index=l,t){case"provinceCode":if(delete this.activeSelectArr.city,delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{province:{text:o.provinceName,value:o.provinceCode,index:o.index}}),this._getNeedDistrict(),this.municipalities.indexOf(o.provinceCode)>-1){this.cityList.length==0&&this._getNeedCity();const r=this.cityList[0];this.cityCode=r.cityCode,this.changeCity(r.cityCode),this.handleChoose("cityCode",r,0);break}break;case"cityCode":delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{city:{text:o.cityName,value:o.cityCode,index:o.index}});break;case"districtCode":Object.assign(this.activeSelectArr,{district:{text:o.districtName,value:o.districtCode,index:o.index}})}this.$emit("onChoose",this.activeSelectArr)},getProvinces(){if(!this.provinceFlag&&typeof this.provinceCdnList=="object"){let t=[];for(let o in this.provinceCdnList)t.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=t,this.provinceFlag=!0}},changeProvince(t){let o;this._getNeedCity(),this.cityFlag=!0,this.cityCode="",this.districtCode="",this.provinceList.map(l=>{l.provinceCode==t&&(o=l.provinceName)}),this.hideMunicipality=this.municipalities.indexOf(this.provinceCode)>-1,this.$emit("addressSelect",[t,o])},_getNeedCity(){let t=[],o=this.provinceCode;for(let l in this.cityCdnList)l.substring(0,2)==o.substring(0,2)&&t.push({cityCode:l,cityName:this.cityCdnList[l]});this.cityList=t},getCities(){this.cityFlag||this.provinceCode&&(this._getNeedCity(),this.cityFlag=!0)},changeCity(t){let o;this._getNeedDistrict(),this.districtFlag=!0,this.districtCode="",this.cityList.map(l=>{l.cityCode==t&&(o=l.cityName)}),this.$emit("addressSelect",[t,o])},_getNeedDistrict(){let t=[],o=this.cityCode;for(let l in this.districtCdnList)l.substring(0,4)==o.substring(0,4)&&t.push({districtCode:l,districtName:this.districtCdnList[l]}),o=="500100"&&l.substring(0,4)=="5002"&&t.push({districtCode:l,districtName:this.districtCdnList[l]});this.districtList=t},getDistrict(){this.districtFlag||this.cityCode&&this._getNeedDistrict()},changeDistrict(t){let o;this.districtList.map(l=>{l.districtCode==t&&(o=l.districtName)}),this.$emit("addressSelect",[t,o])}}},Mn={class:"cv-geo-city"},An=["hidden"],Rn={key:1},Ye=C(On,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),m=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",Mn,[e.createElementVNode("div",null,[e.createVNode(s,{modelValue:n.provinceCode,"onUpdate:modelValue":o[0]||(o[0]=d=>n.provinceCode=d),onFocus:i.getProvinces,onChange:i.changeProvince,placeholder:"省",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.provinceList,(d,p)=>(e.openBlock(),e.createBlock(c,{onClick:f=>i.handleChoose("provinceCode",d,p),key:d.provinceCode,label:d.provinceName,value:d.provinceCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),l.cityHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,hidden:n.hideMunicipality},[e.createVNode(s,{modelValue:n.cityCode,"onUpdate:modelValue":o[1]||(o[1]=d=>n.cityCode=d),onFocus:i.getCities,onChange:i.changeCity,placeholder:"市",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.cityList,(d,p)=>(e.openBlock(),e.createBlock(c,{onClick:f=>i.handleChoose("cityCode",d,p),key:d.cityCode,label:d.cityName,value:d.cityCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])],8,An)),l.cityHide||l.districtHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Rn,[e.createVNode(s,{modelValue:n.districtCode,"onUpdate:modelValue":o[2]||(o[2]=d=>n.districtCode=d),onFocus:i.getDistrict,onChange:i.changeDistrict,placeholder:"区/县",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.districtList,(d,p)=>(e.openBlock(),e.createBlock(c,{onClick:f=>i.handleChoose("districtCode",d,p),key:d.districtCode,label:d.districtName,value:d.districtCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]))])),[[m,n.isCdnLoading]])}]]);Ze.install=function(t){t.component(Ze.name,Ze)},Ye.install=function(t){t.component(Ye.name,Ye)};const Je={...k.ElOption,extends:k.ElOption,name:"cvSelectOpt"},Xe=C({name:"cvSelectBase",emits:["onChoose","change","update:modelValue"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({})},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"}},watch:{modelValue(t){this.localVal=t},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(t){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(t,o){this.$emit("onChoose",t,o)},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{t.push({label:r,value:r})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",l=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",i=r[l]===0?0:r[l]||"";if(i=i===0?0:i||n,this.dataDisabled.length>0)for(let c in this.dataDisabled)this.dataDisabled[c][l]==i&&(r.disabled=!0);t.push({label:n,value:i,disabled:!!r.disabled}),r.checked!="true"&&r.checked!=1||(typeof this.localVal=="string"?this.localVal=i:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(i))}),this.localOpt=t}}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-option"),s=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-select-base"},t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>n.localVal=m),size:t.size,filterable:"",clearable:""}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.localOpt,(m,d)=>(e.openBlock(),e.createBlock(c,{onClick:p=>i.handleChoose(m,d),disabled:m.disabled,label:m.label,value:m.value,key:d},null,8,["onClick","disabled","label","value"]))),128))])]),_:3},16,["modelValue","size"])}]]),et=C({name:"cvSelectTree",emits:["update:modelValue","change"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({value:"id",label:"title",children:"children"})},clearable:{type:Boolean,default:!0},accordion:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},refID:{type:[String],required:!1,default:()=>"cvSelectTree-"+ +new Date+(Math.random()/1e4).toFixed(0)}},watch:{modelValue(){this.localVal=this.modelValue,this.initHandle()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange()}},data:()=>({localVal:"",localOpt:[],localTitle:"",defaultExpandedKey:[]}),computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},mounted(){this.localVal=this.modelValue,this.initHandle()},methods:{initHandle(){if(this.localVal){var t=this.$refs[this.refID+"tree"].getNode(this.localVal);t&&(this.localTitle=t.data[this.dataField.label],this.$refs[this.refID+"tree"].setCurrentKey(this.localVal),this.defaultExpandedKey=[this.localVal])}else this.clearHandle();this.initScroll()},initScroll(){this.$nextTick(()=>{let t=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-select-dropdown__wrap")[0],o=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-scrollbar__bar");t.style.cssText="margin: 0px; max-height: none; overflow: hidden;",o.forEach(l=>l.style.width=0)})},handleNodeClick(t,o,l){t.disabled||(this.localTitle=t[this.dataField.label],this.localVal=t[this.dataField.value],this.defaultExpandedKey=[],this.$refs[this.refID].blur())},clearHandle(){this.localTitle="",this.localVal="",this.defaultExpandedKey=[],this.clearSelected()},clearSelected(){document.querySelectorAll(`#${this.refID}tree .el-tree-node`).forEach(t=>t.classList.remove("is-current"))},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists;this.dataField&&this.dataField.label;let o=this.dataField&&this.dataField.value||"value",l=this.dataField&&this.dataField.children||"children",r=this.dataDisabled;(function n(i){for(let c in i)r.map(s=>{i[c][o]==s[o]&&(i[c].disabled=!0)}),i[c][l]&&n(i[c][l])})(t),this.localOpt=t}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-tree"),s=e.resolveComponent("el-option"),m=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(m,e.mergeProps(t.$props,{ref:l.refID,"popper-class":"cv-select-tree",modelValue:n.localTitle,onClear:i.clearHandle}),{default:e.withCtx(()=>[e.createVNode(s,{value:n.localTitle,label:n.localTitle,class:"options"},{default:e.withCtx(()=>[e.createVNode(c,{"highlight-current":"",id:l.refID+"tree",ref:l.refID+"tree",accordion:l.accordion,showCheckbox:l.showCheckbox,data:n.localOpt,props:l.dataField,"node-key":l.dataField.value,onNodeClick:i.handleNodeClick,"default-expand-all":l.defaultExpandAll},null,8,["id","accordion","showCheckbox","data","props","node-key","onNodeClick","default-expand-all"])]),_:1},8,["value","label"])]),_:1},16,["modelValue","onClear"])}],["__scopeId","data-v-04a429fe"]]);Je.install=function(t){t.component(Je.name,Je)},Xe.install=function(t){t.component(Xe.name,Xe)},et.install=function(t){t.component(et.name,et)};const Hn={name:"cvCascaderBase",components:{},props:{...k.ElCascader.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default:()=>[]},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default:()=>({})},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localOpt:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists,o=this.dataField&&this.dataField.value||"value",l=this.dataDisabled;(function r(n){for(let i in n)l.map(c=>{n[i][o]==c[o]&&(n[i].disabled=!0)}),n[i].children&&r(n[i].children)})(t),this.localOpt=t},getCheckedNodes(){}}},Un={class:"cv-cascader-base block"},tt=C(Hn,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-cascader");return e.openBlock(),e.createElementBlock("div",Un,[e.createVNode(c,e.mergeProps(t.$props,{props:i.props2,modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>n.localVal=s),options:n.localOpt,onChange:i.handleChange,onGetCheckedNodes:i.getCheckedNodes}),null,16,["props","modelValue","options","onChange","onGetCheckedNodes"])])}]]);tt.install=function(t){t.component(tt.name,tt)};const ka={props:{...k.ElTimePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""}),created(){},methods:{}},ot=C({name:"cvTimeBase",mixins:[ka],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},placeholder:{type:[String,Number],default:"选择时间"}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-timePicker-base"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),format:l.format,"picker-options":{}}),null,16,["modelValue","format"])}]]),lt=C({name:"cvTimeRange",mixins:[ka],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始时间"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束时间"}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-timePicker-range"},t.$props,{"is-range":"",modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),format:l.format,"range-separator":l.rangeSeparator,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder}),null,16,["modelValue","format","range-separator","start-placeholder","end-placeholder"])}]]),at=C({name:"cvTimeSelect"},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-time-select");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-time-select"},t.$props),null,16)}]]),eo={props:{...k.ElDatePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""})},nt=C({name:"cvDateBase",mixins:[eo],props:{format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:[String,Number],default:"选择日期"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),type:"date","value-format":l.valueFormat,placeholder:l.placeholder,"picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),it=C({name:"cvDateRange",mixins:[eo],props:{valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,l=new Date;t.$emit("pick",[l,o])}},{text:"昨天",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[l,o])}},{text:"最近一周",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-6048e5),t.$emit("pick",[l,o])}},{text:"最近一个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-2592e6),t.$emit("pick",[l,o])}},{text:"最近三个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-7776e6),t.$emit("pick",[l,o])}},{text:"最近六个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-15552e6),t.$emit("pick",[l,o])}},{text:"最近一年",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-31536e6),t.$emit("pick",[l,o])}}]}})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),type:"daterange","value-format":l.valueFormat,"range-separator":l.rangeSeparator,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,"picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),rt=C({name:"cvDatetimeBase",mixins:[eo],props:{format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},placeholder:{type:[String,Number],default:"选择日期时间"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),type:"datetime","value-format":l.valueFormat,placeholder:l.placeholder,"picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),ct=C({name:"cvDatetimeRange",mixins:[eo],props:{valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,l=new Date;t.$emit("pick",[l,o])}},{text:"昨天",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[l,o])}},{text:"最近一周",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-6048e5),t.$emit("pick",[l,o])}},{text:"最近一个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-2592e6),t.$emit("pick",[l,o])}},{text:"最近三个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-7776e6),t.$emit("pick",[l,o])}},{text:"最近六个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-15552e6),t.$emit("pick",[l,o])}},{text:"最近一年",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-31536e6),t.$emit("pick",[l,o])}}]}})},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>t.localVal=s),type:"datetimerange","value-format":l.valueFormat,"range-separator":l.rangeSeparator,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,align:"right","picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]);ot.install=function(t){t.component(ot.name,ot)},lt.install=function(t){t.component(lt.name,lt)},at.install=function(t){t.component(at.name,at)},nt.install=function(t){t.component(nt.name,nt)},it.install=function(t){t.component(it.name,it)},rt.install=function(t){t.component(rt.name,rt)},ct.install=function(t){t.component(ct.name,ct)};const st=C({name:"cvSwitchBase",props:{...k.ElSwitch.props,activeColor:{type:[String],default:""},inactiveColor:{type:[String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){this.localVal=this.modelValue},methods:{}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-switch");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=s=>n.localVal=s)}),null,16,["modelValue"])}]]);st.install=function(t){t.component(st.name,st)};const dt=C({name:"cvCodeSms",mixins:[],components:{},props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:"请输入验证码"},disabled:{type:Boolean,default:!1},mobile:{type:[Number,String],default:""},mobileParam:{type:String,default:"mobile"},codeUrl:{type:String,default:""},codeSign:{type:Boolean,default:!1},codeApiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(t){this.localMobile=t},modelValue(t){this.localVal=t}},data(){return{localVal:this.modelValue,localMobile:"",nextTime:0,diyPlaceholder:"短信验证码",btnDisabled:!1,btnText:"获取验证码",btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(t){this.$message(t)},getSmsCode(){if(!this.localMobile)return this.showDiyMsg("手机号不正确"),void this.$emit("onGetSms",!1);if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile))return this.showDiyMsg("手机号格式不正确"),void this.$emit("onGetSms",!1);this.codeUrl||this.codeApiFunc?(this.btnDisabled=!0,this.btnIntervalObj||this.btnDisabled&&(this.btnText="请稍后...",this.codeApiFunc?this.codeApiFunc({postType:"sendSms",cto_sms_type:"alterMobile",sendCode:"发送验证码",[this.mobileParam]:this.localMobile}).then(t=>{let o=t;o.status==200?(this.showDiyMsg("发送成功!"),setTimeout(()=>{if(this.codeSign){let l=o.data&&o.data.sign||"";this.diyPlaceholder="识别码:"+l}this.smsCodeWaitTime()},500)):(this.showDiyMsg("短信获取失败,请检查网络"),this.btnDisabled=!1,this.btnText="获取验证码")}).catch(t=>{this.btnDisabled=!1,this.btnText="获取验证码"}):(this.btnDisabled=!1,this.btnText="重新获取验证码"))):this.showDiyMsg("短信接口地址不能为空")},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let t=this.nextTime-Date.parse(new Date)/1e3;t<=0?(clearInterval(this.btnIntervalObj),this.btnText="重新获取验证码",this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=t.toString()+"s")},100)},updateInput(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-button"),s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>n.localVal=m),clearable:"",placeholder:n.diyPlaceholder,onInput:i.updateInput}),{append:e.withCtx(()=>[e.createVNode(c,{onClick:i.getSmsCode,disabled:n.btnDisabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.btnText),1)]),_:1},8,["onClick","disabled"])]),_:1},16,["modelValue","placeholder","onInput"])}]]);function Wn(t){if(typeof XMLHttpRequest>"u")return;const o=new XMLHttpRequest,l=t.action;o.upload&&(o.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),t.onProgress(i)});const r=new FormData;t.data&&Object.keys(t.data).forEach(i=>{r.append(i,t.data[i])}),r.append(t.filename,t.file,t.file.name),o.onerror=function(i){t.onError(i)},o.onload=function(){if(o.status<200||o.status>=300)return t.onError(function(i,c,s){let m;m=s.response?`${s.response.error||s.response}`:s.responseText?`${s.responseText}`:`fail to post ${i} ${s.status}`;const d=new Error(m);return d.status=s.status,d.method="post",d.url=i,d}(l,0,o));t.onSuccess(function(i){const c=i.responseText||i.response;if(!c)return c;try{return JSON.parse(c)}catch{return c}}(o))},o.open("post",l,!0),t.withCredentials&&"withCredentials"in o&&(o.withCredentials=!0);const n=t.headers||{};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&n[i]!==null&&o.setRequestHeader(i,n[i]);return o.send(r),o}dt.install=function(t){t.component(dt.name,dt)};const to={inheritAttrs:!1,props:{valInit:{type:[String,Array],default:()=>""},drag:{type:Boolean,default:!1},withCredentials:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},httpRequest:Function,accept:String,beforeRemove:Function,upResponseFn:Function},data:()=>({}),computed:{upAction(){return this.mergeAttrs.upAction||""},upHeaders(){return this.mergeAttrs.upHeaders||{}},upData(){return this.mergeAttrs.upData||{}},upName(){return this.mergeAttrs.upName||"file"},componentName(){return this.$options.name},mergeAttrs(){let t=this.$cvUiParams||{},o=t.upload||{},l=Object.assign({},o,t[this.componentName]);return Object.assign({},l,this.$attrs)}},methods:{handleImageUpload(t,o){const l=this.mergeAttrs;if(!t)return void this.$message.error("文件不存在");if(l.fileSize&&!(t.size/1024/1024<l.fileSize))return void this.$message.error(`上传文件大小 ${l.fileSize} MB!`);t.type.includes("image")?l.upAction?Wn({action:l.upAction,file:t,headers:l.upHeaders,filename:l.upName,data:l.upData,onProgress:()=>!1,onSuccess:r=>{l.upResponseFn&&(t.url=URL.createObjectURL(t),r=l.upResponseFn(r,t)),o(r)},onError:r=>{this.$message.error("上传错误")}}):this.$message.error("上传地址错误"):this.$message.error("上传类型错误")},beforeRemove2(){return new Promise((t,o)=>{this.$confirm("提示",{title:"确定删除??",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t(!0)}).catch(()=>{o(!1)})})},uploadRequestFn(t){let o=new FormData;o.append("file",t.file);let l="";l=t.file.type==="image/png"?"png":"jpg",axios({url:"http://api.10.com/v1sdk/ctofile.file_img_opt",methods:"post",data:o,headers:{"Content-Type":"multipart/form-data",...this.headers}}).then(r=>{})}}},qn={class:"cv-upload-avatar"},Gn=["src"],Kn={key:1,class:"cv-upload-avatar__ing"},mt=C({name:"cvUploadAvatar",mixins:[to],components:{},props:{fileSize:{type:[Number],default:1},src:{type:[String],default:""}},data:()=>({imageUrl:""}),mounted(){this.imageUrl=this.src||""},methods:{upAvatarBefore(t){var o=new Array;const l=(o=t.name.split("."))[o.length-1]==="jpg",r=o[o.length-1]==="png",n=o[o.length-1]==="gif",i=o[o.length-1]==="jpeg";if(!l&&!r&&!i&&n)return this.$message.error("只能上传jpg/png/gif/jpeg格式图片!"),!1;const c=t.size/1024/1024<this.fileSize;return c||this.$message.error(`上传头像图片大小不能超过 ${this.fileSize}MB!`),l||r||n||i&&c},upAvatarSuccess(t,o){this.imageUrl=URL.createObjectURL(o.raw)}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("cv-icons"),s=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",qn,[e.createVNode(s,e.mergeProps({action:t.upAction,withCredentials:t.withCredentials,showFileList:!1},{"before-upload":i.upAvatarBefore,"on-success":i.upAvatarSuccess}),{default:e.withCtx(()=>[n.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.imageUrl,class:"cv-upload-avatar__img"},null,8,Gn)):(e.openBlock(),e.createElementBlock("div",Kn,[e.createVNode(c,{type:"ElIconPlus",size:"35"})]))]),_:1},16,["before-upload","on-success"])])}]]),Qn={name:"cvUploadImage",mixins:[to],components:{ShowGallery:Re},props:{modelValue:{type:[String,Array,Object],default:()=>[]},galleryLabel:{type:String,default:""},fileSize:{type:Number,default:2},fileType:{type:Array,default:()=>["png","jpg","jpeg","gif"]},isShowSuccessTip:{type:Boolean,default:!0},thumbSuffix:{type:String,default:""},showSize:{type:Number,default:150},showTipState:{type:Boolean,default:!0},lazy:{type:Boolean,default:!1},drag:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},upAccept:{type:String,default:"image/*"}},mounted(){this.initShowList()},data:()=>({existFileList:[],existShowList:[],imageUrl:"",uploading:!1,dialogVisibleImg:!1,ImgName:"",dialogImageUrl:""}),computed:{showStyle(){return{width:this.showSize+"px",height:this.showSize+"px",lineHeight:this.showSize+"px"}},limit(){return this.multiple==0?1:5},showTipLastState(){return this.showTipState&&(this.fileType.length||this.fileSize)},computedValues(){return this.modelValue?typeof this.modelValue=="string"?[this.modelValue]:Object.prototype.toString.call(this.modelValue)==="[object Object]"?[]:[...this.modelValue]:[]},isShowUpload(){return!!this.multiple||this.computedValues.length===0},successFiles(){return this.fileList.filter(t=>t.status==="success")}},watch:{valInit(t){this.initShowList()}},methods:{getFileInfo(t){let o=t.lastIndexOf("/"),l=t.substring(o+1,t.length),r="";return l.lastIndexOf(".")>-1&&(r=l.slice(l.lastIndexOf(".")+1),r="image/"+r),{name:l,url:t,type:r}},initShowList(){if(!this.valInit)return[];{const t=this.valInit;let o=[];if(typeof t=="string")this.imageUrl=t;else if(Object.prototype.toString.call(t)==="[object Object]")t.name&&t.url&&o.push(t);else if(Object.prototype.toString.call(t)==="[object Array]")for(let l in t){let r=t[l];typeof r=="string"?o.push(this.getFileInfo(r)):Object.prototype.toString.call(r)==="[object Object]"&&r.name&&r.url&&o.push(r)}this.existFileList=o,this.existFileList=o}},upImageBefore(t){let o=!1;if(this.fileType.length){let l="";t.name.lastIndexOf(".")>-1&&(l=t.name.slice(t.name.lastIndexOf(".")+1)),o=this.fileType.some(r=>t.type.indexOf(r)>-1||!!(l&&l.indexOf(r)>-1))}else o=t.type.indexOf("image")>-1;return o?this.fileSize&&!(t.size/1024/1024<this.fileSize)?(this.$message.error(`上传图片大小不能超过 ${this.fileSize} MB!`),!1):(this.uploading=!0,!0):(this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`),!1)},upImageChange(t,o){this.uploading=!1,this.existFileList=o},upImageExceed(){this.$message.error(`最多上传${this.limit}张图片`)},upImageError(t){this.uploading=!1,this.$message.error("上传失败, 请重试"),this.$emit("error",t)},upImageSuccess(t,o,l){let r=t;this.uploading=!1,this.isShowSuccessTip&&this.$message.success("上传成功");const n=this.mergeAttrs;let i=null;n&&typeof n.upResponseFn=="function"&&(i=n.upResponseFn(t,o)),this.upResponseFn&&(i=this.upResponseFn(t,o,this.successFiles)),Object.prototype.toString.call(i)==="[object String]"?r=i:Object.prototype.toString.call(i)==="[object Object]"&&(r=i.value||""),this.multiple?Array.isArray(this.modelValue)?this.$emit("update:modelValue",[...this.modelValue,r]):this.$emit("update:modelValue",[r]):this.$emit("update:modelValue",r)},handlePictureCardPreview(t){var r,n,i;let o=t.raw||t,l="";l=o.type?o.type.split("/")[0]:(i=(n=(r=t==null?void 0:t.response)==null?void 0:r.body)==null?void 0:n.type)==null?void 0:i.split("/")[0],l=="image"?(this.dialogImageUrl=t.url,this.dialogVisibleImg=!0,this.ImgName=t.name):window.open(t.url)},doRemove(t){if(this.multiple){const o=[...this.computedValues];o.splice(t,1),this.$emit("update:modelValue",o||[])}else this.existFileList=[],this.$emit("update:modelValue","")},handleRemoveDiy(t){if(this.beforeRemove){if(typeof this.beforeRemove=="function"){const o=this.multiple?this.computedValues[t]:this.computedValues,l=this.beforeRemove(o,this.computedValues);l&&l.then?l.then(()=>{this.doRemove(t)},()=>{}):l!==!1&&this.doRemove(t)}}else this.doRemove(t)},handleRemove(t,o){if(this.existFileList.length>0&&this.multiple)for(let l in this.existFileList)this.existFileList[l].uid==t.uid&&this.handleRemoveDiy(l);else this.handleRemoveDiy(t);this.existFileList=o||[]}}},Zn={class:"cv-upload-image"},Yn=["src"],Jn={class:"el-upload__tip"},Xn={style:{color:"#f56c6c"}},ei={style:{color:"#f56c6c"}},ti={style:{color:"#f56c6c"}},oi=["src"],pt=C(Qn,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("cv-icons"),s=e.resolveComponent("el-upload"),m=e.resolveComponent("el-dialog"),d=e.resolveComponent("ShowGallery"),p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Zn,[e.withDirectives(e.createVNode(s,e.mergeProps({ref:"upload",style:{marginBottom:l.multiple&&i.computedValues.length?"20px":"0px"}},{action:t.upAction,headers:t.upHeaders,data:t.upData,name:t.upName,accept:l.upAccept,withCredentials:t.withCredentials,limit:i.limit,multiple:l.multiple,drag:!!l.drag,listType:l.drag?"picture":"picture-card",disabled:n.uploading,showFileList:!0},{"file-list":n.existFileList,"before-upload":i.upImageBefore,"on-change":i.upImageChange,"on-exceed":i.upImageExceed,"on-error":i.upImageError,"on-success":i.upImageSuccess,"http-request":t.httpRequest,"on-remove":i.handleRemove,"on-preview":i.handlePictureCardPreview}),{tip:e.withCtx(()=>[e.createElementVNode("div",Jn,[o[4]||(o[4]=e.createTextVNode(" 请上传 ")),e.createElementVNode("b",Xn,e.toDisplayString(l.fileType.length?l.fileType.join("/"):"图片"),1),o[5]||(o[5]=e.createTextVNode(" 格式文件 ")),l.fileSize?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[2]||(o[2]=e.createTextVNode(" ,且大小不超过 ")),e.createElementVNode("b",ei,e.toDisplayString(l.fileSize)+"MB",1)],64)):e.createCommentVNode("",!0),l.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o[3]||(o[3]=e.createTextVNode(" ,多图上传默认 ")),e.createElementVNode("b",ti,e.toDisplayString(i.limit)+"张",1)],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[l.drag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将文件拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.imageUrl,class:"cv-upload-img__perview",style:e.normalizeStyle(i.showStyle)},null,12,Yn)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-upload-img__ing",style:e.normalizeStyle(i.showStyle)},[e.createVNode(c,{type:"ElIconPlus",size:l.showSize/3},null,8,["size"])],4))],64))])),[[p,n.uploading]])]),_:1},16,["style","file-list","before-upload","on-change","on-exceed","on-error","on-success","http-request","on-remove","on-preview"]),[[e.vShow,i.isShowUpload]]),e.createVNode(m,{modelValue:n.dialogVisibleImg,"onUpdate:modelValue":o[0]||(o[0]=f=>n.dialogVisibleImg=f),title:n.ImgName,"append-to-body":!0,style:{"text-align":"center"}},{default:e.withCtx(()=>[e.createElementVNode("img",{width:"100%",src:n.dialogImageUrl,alt:"",style:{"max-width":"300px"}},null,8,oi)]),_:1},8,["modelValue","title"]),e.renderSlot(t.$slots,"gallery"),i.isShowUpload?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,lazy:l.lazy,"remove-fn":i.handleRemove,size:l.showSize,sliceSingle:!0,source:n.existShowList,thumbSuffix:l.thumbSuffix,title:l.galleryLabel},null,8,["lazy","remove-fn","size","source","thumbSuffix","title"]))])}]]),li={mdb:"access",accdb:"access",ai:"ai",html:"html",htm:"html",asp:"web",pdf:"pdf",psd:"photoshop",psb:"photoshop",mpo:"photoshop",eps:"photoshop",avi:"video",wmv:"video",rm:"video",rmvb:"video",mp4:"video","3gp":"video",asf:"video",mov:"video",m4v:"video",flv:"video",f4v:"video",mkv:"video",mts:"video",swf:"flash",ts:"video",mp3:"audio",wav:"audio",wma:"audio",ape:"audio",aac:"audio",zip:"zip",rar:"zip",gz:"zip","7z":"zip",z:"zip",bmp:"image",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",txt:"txt",rtf:"txt",xls:"excel",xlsx:"excel",xlsm:"excel",xltx:"excel",doc:"word",docx:"word",docm:"word",wps:"word",dotx:"word",dotm:"word",ppt:"powerpoint",pptx:"powerpoint",mdf:"db",db:"db",dbf:"db",wdb:"db",vue:"vue",php:"php",jar:"jar",ini:"ini",bat:"bat",config:"config",fla:"fla",eot:"font",otf:"font",fon:"font",font:"font",ttf:"font",ttc:"font",woff:"font",woff2:"font",js:"js",md:"markdown",one:"onenote",jsx:"reactjs",xfl:"xfl",file:"file",css:"css"};function ao(t){return`https://10ui.cn/icon_ext/${li[t]}.svg`}const ai={name:"uploadList",props:{files:{type:Array,default:()=>[]},isShowDeleteConfim:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(t){return t.lastIndexOf(".")>-1&&ao[t.slice(t.lastIndexOf(".")+1).toLowerCase()]||ao.file},getSize:t=>t&&!isNaN(Number(t))?t:"",parsePercentage:t=>parseInt(t,10),handleDownload(t){t.url},handleDelete(t,o){this.isShowDeleteConfim?this.$confirm("确认删除该文件吗? ").then(()=>{this.$emit("remove",t,o)}).catch(()=>{}):this.$emit("remove",t,o)}}},ni=["src"],ii={class:"cv-upload-list__item-content-action"},ri={inheritAttrs:!1,name:"cvUploadFile",mixins:[to],components:{uploadList:C(ai,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(e.TransitionGroup,{class:"cv-upload-file-list el-upload-list el-upload-list--text",name:"el-list",tag:"ul"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,(s,m)=>(e.openBlock(),e.createElementBlock("li",{key:s.uid,class:"el-upload-list__item cv-upload-list__item-content"},[e.createVNode(c,{href:s.url,underline:!1,target:"_blank"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:i.getExtension(s.name),class:"el-upload-list__item-content-name-icon"},null,8,ni),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),_:2},1032,["href"]),e.createElementVNode("div",ii,[e.createVNode(c,{underline:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.getSize(s.size)),1)]),_:2},1024),l.isCanDownload?(e.openBlock(),e.createBlock(c,{key:0,underline:!1,onClick:d=>i.handleDownload(s)},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("下载")])),_:2},1032,["onClick"])):e.createCommentVNode("",!0),!l.disabled&&l.isCanDelete?(e.openBlock(),e.createBlock(c,{key:1,underline:!1,onClick:d=>i.handleDelete(m,s),type:"danger"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode(" 删除 ")])),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]))),128))]),_:1})}]])},props:{modelValue:[String,Object,Array],fileSize:{type:Number,default:5},fileType:Array,placeholder:String,disabled:Boolean,isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0},isShowDeleteConfim:{type:Boolean,default:!0},isCanUploadSame:{type:Boolean,default:!0},isShowTip:{type:Boolean,default:!0},isShowSuccessTip:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},limit:Number},data:()=>({fileList:[]}),computed:{btnText(){return this.placeholder?this.placeholder:this.multiple?"上传文件":"上传单个文件"},showTip(){return this.isShowTip&&(this.fileType||this.fileSize)},list(){let t=1;return this.modelValue?(Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]).map(o=>(typeof o=="string"&&(o={name:o,url:o}),o.uid=o.uid||new Date().getTime()+t++,o)):[]}},methods:{upFileChange(t,o){this.fileList=o},upFileBefore(t){if(this.fileType){let o="";if(t.name.lastIndexOf(".")>-1&&(o=t.name.slice(t.name.lastIndexOf(".")+1)),!this.fileType.some(l=>t.type.indexOf(l)>-1||!!(o&&o.indexOf(l)>-1)))return this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`),!1}return this.fileSize&&!(t.size/1024/1024<this.fileSize)?(this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`),!1):!this.isCanUploadSame&&this.list.some(o=>o.name+o.size===t.name+t.size)?(this.$message.error("此文件已上传!"),!1):!0},upFileExceed(){this.$message.error(`最多上传${this.limit}个文件`)},upFileError(t){this.$message.error("上传失败, 请重试"),this.$emit("error",t)},upFileSuccess(t,o){this.isShowSuccessTip&&this.$message.success("上传成功"),this.upResponseFn&&(t=this.upResponseFn(t,o,this.list)),this.multiple?this.$emit("update:modelValue",[...this.list,t]):this.$emit("update:modelValue",t),this.$emit("success",t,this.list)},handleRemove(t){if(this.beforeRemove){if(typeof this.beforeRemove=="function"){const o=this.beforeRemove(this.list[t],this.list);o&&o.then?o.then(()=>{this.doRemove(t)},()=>{}):o!==!1&&this.doRemove(t)}}else this.doRemove(t)},doRemove(t){if(this.$emit("remove",this.list[t],this.list),this.fileList.splice(t,1),this.multiple){const o=[...this.list];o.splice(t,1),this.$emit("update:modelValue",o||[])}else this.$emit("update:modelValue",null)}},created(){this.fileList=this.list}},ci={class:"cv-upload-file"},si={key:0,class:"el-upload__tip"},di={style:{color:"#f56c6c"}},mi={style:{color:"#f56c6c"}},ut=C(ri,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-button"),s=e.resolveComponent("el-upload"),m=e.resolveComponent("upload-list");return e.openBlock(),e.createElementBlock("div",ci,[l.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,e.mergeProps({key:0,class:"cv-upload-file-uploader",ref:"upload"},{action:t.upAction,headers:t.upHeaders,data:t.upData,name:t.upName,drag:!1,limit:l.limit,multiple:l.multiple,showFileList:!0,fileList:n.fileList},{"before-upload":i.upFileBefore,"on-change":i.upFileChange,"on-exceed":i.upFileExceed,"on-error":i.upFileError,"on-success":i.upFileSuccess}),{tip:e.withCtx(()=>[i.showTip?(e.openBlock(),e.createElementBlock("div",si,[o[2]||(o[2]=e.createTextVNode(" 请上传 ")),l.fileSize?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[0]||(o[0]=e.createTextVNode(" 大小不超过 ")),e.createElementVNode("b",di,e.toDisplayString(l.fileSize)+"MB",1)],64)):e.createCommentVNode("",!0),l.fileType?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o[1]||(o[1]=e.createTextVNode(" 格式为 ")),e.createElementVNode("b",mi,e.toDisplayString(l.fileType.join("/")),1)],64)):e.createCommentVNode("",!0),o[3]||(o[3]=e.createTextVNode(" 的文件 "))])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(c,{type:"primary",icon:"ElIconUpload"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.btnText),1)]),_:1})]),_:1},16,["before-upload","on-change","on-exceed","on-error","on-success"])),e.createVNode(m,{disabled:l.disabled,files:i.list,isCanDelete:l.isCanDelete,isCanDownload:l.isCanDownload,isShowDeleteConfim:l.isShowDeleteConfim,onRemove:i.handleRemove},null,8,["disabled","files","isCanDelete","isCanDownload","isShowDeleteConfim","onRemove"])])}]]),pi={name:"cvUploadVideo",mixins:[to],components:{},props:{modelValue:{type:String},fileSize:{type:Number,default:10},fileType:{type:Array},width:{type:Number,default:360},height:{type:Number},isShowTip:{type:Boolean,default:!0},isShowSuccessTip:{type:Boolean,default:!0},upAccept:{type:String,default:"image/*"}},data:()=>({isShowVideo:!1,videoUploadPercent:0}),computed:{showTip(){return this.isShowTip&&(this.fileType||this.fileSize)}},methods:{upVideoBefore(t){let o=!1;if(Array.isArray(this.fileType)){const l=t.type.split("/");o=l[0]==="video"&&this.fileType.includes(l[1])}else o=t.type.includes("video");return o?this.fileSize&&!(t.size/1024/1024<this.fileSize)?(this.$message.error(`上传视频大小不能超过${this.fileSize}MB哦!`),!1):!0:(this.$message.error(`${t.name}格式不正确, 请上传格式正确的视频`),!1)},upVideoProcess(t,o){this.videoUploadPercent=Number(o.percentage.toFixed(0))},upVideoSuccess(t,o){this.videoUploadPercent=0,this.isShowSuccessTip&&this.$message.success("上传成功!"),this.upResponseFn?this.$emit("update:modelValue",this.upResponseFn(t,o)):this.$emit("update:modelValue",t)},upVideoError(t,o,l){this.$message.error("上传失败, 请重试!"),this.videoUploadPercent=0,this.$emit("error",t,o,l)},doRemove(){this.$emit("delete"),this.$emit("update:modelValue",null)},handleRemove(){if(this.beforeRemove){if(typeof this.beforeRemove=="function"){const t=this.beforeRemove(this.modelValue);t&&t.then?t.then(()=>{this.doRemove()},()=>{}):t!==!1&&this.doRemove()}}else this.doRemove()},handlePlayerVideo(){this.isShowVideo=!0},handleHoverClick(){this.$emit("click")}}},ui={class:"cv-upload-video"},hi={key:0,class:"el-upload__tip"},gi={style:{color:"#f56c6c"}},fi={style:{color:"#f56c6c"}},Ci={key:1,class:"vue-hover-mask"},vi=["src"],ki=["src"],ht=C(pi,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-progress"),s=e.resolveComponent("cv-icons"),m=e.resolveComponent("el-upload"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",ui,[l.modelValue?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,e.mergeProps({key:0},{action:t.upAction,headers:t.upHeaders,data:t.upData,name:t.upName,accept:l.upAccept,drag:!0,disabled:n.videoUploadPercent>0&&n.videoUploadPercent<100,showFileList:!1,withCredentials:t.withCredentials},{"before-upload":i.upVideoBefore,"on-error":i.upVideoError,"on-progress":i.upVideoProcess,"on-success":i.upVideoSuccess,httpRequest:t.httpRequest}),{default:e.withCtx(()=>[n.videoUploadPercent>0?(e.openBlock(),e.createBlock(c,{key:0,percentage:n.videoUploadPercent,style:{"margin-top":"20px"},type:"circle"},null,8,["percentage"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{type:"ElIconUpload",size:"24"}),o[7]||(o[7]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将视频拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1)),i.showTip?(e.openBlock(),e.createElementBlock("div",hi,[o[5]||(o[5]=e.createTextVNode(" 请上传 ")),e.createElementVNode("span",gi," "+e.toDisplayString(this.fileType?this.fileType.join("/"):"视频")+" ",1),o[6]||(o[6]=e.createTextVNode(" 格式文件 ")),l.fileSize?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[3]||(o[3]=e.createTextVNode(" ,且文件大小不超过 ")),e.createElementVNode("span",fi,e.toDisplayString(l.fileSize),1),o[4]||(o[4]=e.createTextVNode(" MB "))],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))]),_:1},16,["before-upload","on-error","on-progress","on-success","httpRequest"])),l.modelValue?(e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("video",{autoplay:!1,src:l.modelValue,style:e.normalizeStyle({width:l.width+"px",height:l.height?l.height+"px":"auto"})}," 您的浏览器不支持视频播放 ",12,vi),e.createElementVNode("span",{onClick:o[2]||(o[2]=(...p)=>i.handleHoverClick&&i.handleHoverClick(...p)),class:"vue-hover-mask_actions"},[e.createElementVNode("span",{onClick:o[0]||(o[0]=(...p)=>i.handlePlayerVideo&&i.handlePlayerVideo(...p)),class:"cv-upload-video_mask__item"},[e.createVNode(s,{type:"ElIconZoomIn"})]),e.createElementVNode("span",{onClick:o[1]||(o[1]=(...p)=>i.handleRemove&&i.handleRemove(...p)),class:"cv-upload-video_mask__item"},[e.createVNode(s,{type:"ElIconDelete"})])])])):e.createCommentVNode("",!0),e.createVNode(d,{visible:n.isShowVideo,"append-to-body":""},{default:e.withCtx(()=>[n.isShowVideo?(e.openBlock(),e.createElementBlock("video",{key:0,autoplay:!0,src:l.modelValue,controls:"controls",style:{width:"100%"}}," 您的浏览器不支持视频播放 ",8,ki)):e.createCommentVNode("",!0)]),_:1},8,["visible"])])}]]);mt.install=function(t){t.component(mt.name,mt)},pt.install=function(t){t.component(pt.name,pt)},ut.install=function(t){t.component(ut.name,ut)},ht.install=function(t){t.component(ht.name,ht)};const yi={class:"tabs-header"},gt=C({name:"cvTabsJump",props:{tabPosition:{type:String,default:"top"}},provide(){return{addChildComponents:t=>{this.childComponents.push(t)},clearChildClass:()=>{this.childComponents.map(t=>{t.className=null})}}},data:()=>({childComponents:[]}),computed:{tabPositionClass(){return this.tabPosition=="left"?"left":this.tabPosition=="right"?"right":this.tabPosition=="bottom"?"bottom":"top"}},created(){},mounted(){}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tabs-jump",i.tabPositionClass])},[e.createElementVNode("div",yi,[e.renderSlot(t.$slots,"default")])],2)}]]),bi={name:"cvTabPane",emits:["click"],inject:["addChildComponents","clearChildClass"],data:()=>({isshow:!0,className:null}),props:{label:{type:String,default:""},current:{type:Boolean,default:!1},name:{type:String}},mounted(){this.addChildComponents(this),this.initCurrent()},methods:{initCurrent(){this.current&&this.handleClick()},handleClick(){this.clearChildClass(),this.className="active",this.$emit("click")}}},Vi={key:1},ft=C(bi,[["render",function(t,o,l,r,n,i){return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tab-pane",n.className]),onClick:o[0]||(o[0]=(...c)=>i.handleClick&&i.handleClick(...c))},[t.$slots.label?e.renderSlot(t.$slots,"label",{key:0}):(e.openBlock(),e.createElementBlock("span",Vi,e.toDisplayString(l.label),1))],2)),[[e.vShow,n.isshow]])}]]);gt.install=function(t){t.component(gt.name,gt)},ft.install=function(t){t.component(ft.name,ft)};const wi={class:"cv-draw-captcha"},xi=["width","height"],Ct=C({name:"cvDrawCaptcha",props:{modelValue:{type:[String,Number],default:"1234"},baseCode:{type:String,default:"1234567890ABCDEFGHGKMNPQRSTUVWXY"},fontSizeMin:{type:Number,default:25},fontSizeMax:{type:Number,default:30},backgroundColorMin:{type:Number,default:255},backgroundColorMax:{type:Number,default:255},colorMin:{type:Number,default:0},colorMax:{type:Number,default:160},lineColorMin:{type:Number,default:100},lineColorMax:{type:Number,default:255},dotColorMin:{type:Number,default:0},dotColorMax:{type:Number,default:255},contentWidth:{type:Number,default:112},contentHeight:{type:Number,default:31},refreshNum:{type:Number,default:1}},data:()=>({localCode:""}),watch:{modelValue(t){this.localCode=t,this.drawPic()},refreshNum(){this.refreshCode(),this.drawPic()}},mounted(){this.modelValue==""&&(this.refreshCode(),this.drawPic())},created(){this.localCode=this.modelValue},methods:{refreshCode(){this.localCode="",this.makeCode(this.baseCode,4),this.$emit("update:modelValue",this.localCode)},makeCode(t,o){for(let l=0;l<o;l++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum:(t,o)=>Math.floor(Math.random()*(o-t)+t),randomColor(t,o){return"rgb("+this.randomNum(t,o)+","+this.randomNum(t,o)+","+this.randomNum(t,o)+")"},drawPic(){let t=document.getElementById("cv-draw-captcha").getContext("2d");t.textBaseline="bottom",t.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),t.fillRect(0,0,this.contentWidth,this.contentHeight);for(let o=0;o<this.localCode.length;o++)this.drawText(t,this.localCode[o],o);this.drawLine(t),this.drawDot(t)},drawText(t,o,l){t.fillStyle=this.randomColor(this.colorMin,this.colorMax),t.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let r=(l+1)*(this.contentWidth/(this.localCode.length+1)),n=this.randomNum(this.fontSizeMax,this.contentHeight-5);var i=this.randomNum(-45,45);t.translate(r,n),t.rotate(i*Math.PI/180),t.fillText(o,0,0),t.rotate(-i*Math.PI/180),t.translate(-r,-n)},drawLine(t){for(let o=0;o<5;o++)t.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),t.beginPath(),t.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.stroke()},drawDot(t){for(let o=0;o<80;o++)t.fillStyle=this.randomColor(0,255),t.beginPath(),t.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),t.fill()}}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",wi,[e.createElementVNode("canvas",{id:"cv-draw-captcha",width:l.contentWidth,height:l.contentHeight,onClick:o[0]||(o[0]=(...c)=>i.refreshCode&&i.refreshCode(...c))},null,8,xi)])}],["__scopeId","data-v-0a54a645"]]),vt=C({name:"cvDrawQrcode",data:()=>({})},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",null,"二维码")}]]);Ct.install=function(t){t.component(Ct.name,Ct)},vt.install=function(t){t.component(vt.name,vt)};const Bi={name:"cvTagBase",mixins:[],components:{},props:{...k.ElTag.props,modelValue:{type:Array,default:null},closable:{type:Boolean,default:!1},disableTransitions:{type:Boolean,default:!1},effect:{type:String,default:"light"},color:{type:String,default:""},hit:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){},methods:{addTag(){this.localVal.push("新标签"),this.$nextTick(()=>{let t=this.localVal.length,o=this.$refs["newTag"+(t-1)][0],l=document.createRange();l.selectNodeContents(o),window.getSelection().removeAllRanges(),window.getSelection().addRange(l)})},checkTag(t){let o=this.$refs[`newTag${t}`][0].innerText.trim();o.length==0?this.localVal.pop():this.localVal[t]=o},removeTag(t){this.localVal.splice(t,1)}}},Ni={class:"cv-tag-base"},Si=["onBlur"],kt=C(Bi,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-tag"),s=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.localVal,(m,d)=>(e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-tag-content",ref_for:!0},{closable:l.closable,disableTransitions:l.disableTransitions,effect:l.effect,type:t.type,color:l.color,hit:l.hit,size:t.size},{onClose:p=>i.removeTag(d),key:d}),{default:e.withCtx(()=>[e.createElementVNode("div",{contenteditable:"plaintext-only",ref_for:!0,ref:`newTag${d}`,onBlur:p=>i.checkTag(d)},e.toDisplayString(m),41,Si)]),_:2},1040,["onClose"]))),128)),e.createVNode(s,{type:"ElIconCirclePlus",size:"16",onClick:o[0]||(o[0]=m=>i.addTag())})])}]]);kt.install=function(t){t.component(kt.name,kt)};const Ei={name:"cvTransferTable",props:{modelValue:{type:[Array],default:()=>[]},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((t,o)=>{try{t({total:0,data:null})}catch{o()}})}},titleTexts:{type:Array,default:()=>["待选项","已选项"]},buttonTexts:{type:Array,default:()=>[]},queryTexts:{type:Array,default:()=>["查询","筛选"]},leftColumns:{type:Array,default:()=>[]},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:"300px"},maxHeight:{type:String,default:"500px"},tableRowKey:{type:Function,default:t=>t&&t&&t.id}},data:()=>({leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}),watch:{modelValue(t){this.rightTableData=t}},created(){this.rightTableData=this.modelValue,this.handlePaginationCallBack()},computed:{hasButtonTexts(){return this.buttonTexts.length===2},buttonClasses(){return["transfer-button",{"is-with-texts":this.hasButtonTexts}]},disabledLeftButton(){return!this.leftSelection.some(t=>!this.rightTableData.some(o=>this.checkObjectIsEqual(t,o)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){const t=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(o=>t.some(l=>{const r=o[l],n=this.rightConditionTemp[l].trim();return!r||String(r).indexOf(n)>-1}))}return this.rightTableData}},methods:{handleLeftSelectionChange(t){this.leftSelection=t},handleRightSelectionChange(t){this.rightSelection=t},handleLeftRowClick(t){this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.$refs.leftTable.toggleRowSelection(t)},handleRightRowClick(t){this.$refs.rightTable.toggleRowSelection(t)},handleSizeChange(t){this.pageSize=t,this.handlePaginationCallBack()},handleCurrentChange(t){this.pageIndex=t,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){const t={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,t).then(o=>{o&&Array.isArray(o.data)&&(this.leftTableData=o.data,this.totalSize=o.total),this.$nextTick(()=>{this.leftTableData.forEach(l=>{const r=this.rightTableData.some(n=>this.checkObjectIsEqual(n,l));this.$refs.leftTable.toggleRowSelection(l,r)})})})}},handleRowStyle({row:t}){return this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))?{color:"blue"}:{}},handleSelectable(t){return!this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))},addToRight(){for(const t of this.leftSelection)this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.rightTableData.push(t);this.$emit("update:modelValue",this.rightTableData)},addToLeft(){this.rightSelection.forEach(t=>{const o=this.rightTableData.findIndex(l=>this.checkObjectIsEqual(l,t));if(o!==-1){this.rightTableData.splice(o,1);const l=this.leftTableData.find(r=>this.checkObjectIsEqual(r,t));l&&this.$refs.leftTable.toggleRowSelection(l,!1)}}),this.$emit("update:modelValue",this.rightTableData)},onLeftQuerySubmit(){this.handlePaginationCallBack()},onRightQuerySubmit(){this.rightConditionTemp=JSON.parse(JSON.stringify(this.rightQueryCondition))},checkObjectIsEqual(t,o){return this.tableRowKey(t)===this.tableRowKey(o)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(const t in this.leftQueryCondition)this.leftQueryCondition[t]=void 0;for(const t in this.rightQueryCondition)this.rightQueryCondition[t]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},Di={class:"cv-transfer-table"},Ti={class:"transfer-panel"},Ii={class:"transfer-panel-header"},Li={key:0},Fi={style:{padding:"5px"}},_i={class:"transfer-buttons"},$i={key:0,class:"button-text"},zi={key:0,class:"button-text"},Pi={class:"transfer-panel"},ji={class:"transfer-panel-header"},Oi={key:0},Mi={style:{padding:"5px"}},yt=C(Ei,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-button"),s=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-form"),d=e.resolveComponent("el-table-column"),p=e.resolveComponent("el-table"),f=e.resolveComponent("el-pagination"),g=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",Di,[e.createElementVNode("div",Ti,[e.createElementVNode("p",Ii,[e.createElementVNode("span",null,e.toDisplayString(l.titleTexts&&l.titleTexts[0]),1),e.createElementVNode("span",null,e.toDisplayString(n.leftSelection.length)+"/"+e.toDisplayString(n.leftTableData.length),1)]),l.showQuery?(e.openBlock(),e.createElementBlock("div",Li,[e.createVNode(m,{inline:!0,model:n.leftQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"leftCondition",{scope:n.leftQueryCondition},void 0,!0),e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(c,{type:"primary",onClick:o[0]||(o[0]=h=>i.onLeftQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"leftTable","max-height":l.maxHeight,height:l.minHeight,data:n.leftTableData,"row-key":l.tableRowKey,"row-style":i.handleRowStyle,onRowClick:i.handleLeftRowClick,onSelectionChange:i.handleLeftSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(d,{width:"40px",type:"selection",selectable:i.handleSelectable},null,8,["selectable"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.leftColumns,h=>(e.openBlock(),e.createBlock(d,{prop:h.id,key:h.id,label:h.label,width:h.width},{default:e.withCtx(v=>[e.renderSlot(t.$slots,"default",{scope:{row:v.row,col:h}},()=>[e.createElementVNode("span",null,e.toDisplayString(v.row[h.id]),1)],!0)]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","row-style","onRowClick","onSelectionChange"]),e.createElementVNode("div",Fi,[l.showPagination?(e.openBlock(),e.createBlock(f,{key:0,onSizeChange:i.handleSizeChange,onCurrentChange:i.handleCurrentChange,"current-page":n.pageIndex,"page-sizes":[10,20,50,100],"page-size":n.pageSize,"pager-count":5,total:n.totalSize,layout:"total, sizes, prev, pager, next"},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",_i,[e.createVNode(c,{type:"primary",class:e.normalizeClass(i.buttonClasses),disabled:i.disabledLeftButton,onClick:i.addToRight},{default:e.withCtx(()=>[l.buttonTexts[0]!==void 0?(e.openBlock(),e.createElementBlock("span",$i,e.toDisplayString(l.buttonTexts[0]),1)):e.createCommentVNode("",!0),e.createVNode(g,{type:"ElIconArrowRight"})]),_:1},8,["class","disabled","onClick"]),e.createVNode(c,{type:"primary",class:e.normalizeClass(i.buttonClasses),disabled:n.rightSelection.length===0,onClick:i.addToLeft},{default:e.withCtx(()=>[e.createVNode(g,{type:"ElIconArrowLeft"}),l.buttonTexts[1]!==void 0?(e.openBlock(),e.createElementBlock("span",zi,e.toDisplayString(l.buttonTexts[1]),1)):e.createCommentVNode("",!0)]),_:1},8,["class","disabled","onClick"])]),e.createElementVNode("div",Pi,[e.createElementVNode("p",ji,[e.createElementVNode("span",null,e.toDisplayString(l.titleTexts&&l.titleTexts[1]),1),e.createElementVNode("span",null,e.toDisplayString(n.rightSelection.length)+"/"+e.toDisplayString(n.rightTableData.length),1)]),l.showQuery?(e.openBlock(),e.createElementBlock("div",Oi,[e.createVNode(m,{inline:!0,model:n.rightQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"rightCondition",{scope:n.rightQueryCondition},void 0,!0),e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(c,{type:"primary",onClick:o[1]||(o[1]=h=>i.onRightQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"rightTable","max-height":l.maxHeight,height:l.minHeight,data:i.calcRightTableData,"row-key":l.tableRowKey,onRowClick:i.handleRightRowClick,onSelectionChange:i.handleRightSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(d,{width:"40px",type:"selection"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.rightColumns||l.leftColumns,h=>(e.openBlock(),e.createBlock(d,{prop:h.id,key:h.id,label:h.label,width:h.width},{default:e.withCtx(v=>[e.renderSlot(t.$slots,"default",{scope:{row:v.row,col:h}},()=>[e.createElementVNode("span",null,e.toDisplayString(v.row[h.id]),1)],!0)]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","onRowClick","onSelectionChange"]),e.createElementVNode("div",Mi,[l.showPagination?(e.openBlock(),e.createBlock(f,{key:0,total:n.rightTableData.length,layout:"total"},null,8,["total"])):e.createCommentVNode("",!0)])])])}],["__scopeId","data-v-7edbc016"]]);yt.install=function(t){t.component(yt.name,yt)};const Uo={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...k.ElTable.props,modelValue:{type:[Array,Object],default:()=>[]},headerCellStyle:{type:[Function,Object],default:()=>({})}},data:()=>({loadDataList:[]}),watch:{modelValue(t){this.loadDataList=t},loadDataList(t){this.$emit("update:modelValue",t)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(t){this.loadPageCurr=t,this.getData()},handleSizeChange(t){this.loadPageLimit=t,this.getData()}}},Ai={name:"cvTableBase",mixins:[Xt,Uo],props:{align:{type:String,default:"left"},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default:()=>({})},tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}),watch:{tableRefresh(t,o){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||this.paginationGroup[0],Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},Ri={class:"cv-table-list"},Hi={key:0,class:"cv-tablie-list-page page"},bt=C(Ai,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table"),s=e.resolveComponent("cv-icons"),m=e.resolveComponent("el-button"),d=e.resolveComponent("el-pagination"),p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Ri,[e.withDirectives((e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:i.handleSelectionChange}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange"])),[[p,t.loadDataLoading]]),l.showPagebreak?e.withDirectives((e.openBlock(),e.createElementBlock("div",Hi,[e.createVNode(m,{onClick:i.refresh,style:{float:"left",margin:"0 10px 0 0",padding:"5px 10px"}},{default:e.withCtx(()=>[e.createVNode(s,{type:"ElIconRefresh",size:"14"})]),_:1},8,["onClick"]),e.createVNode(d,{background:"",onSizeChange:t.handleSizeChange,onCurrentChange:t.handleCurrentChange,"pager-count":n.paginationCount,"page-sizes":n.paginationGroup,"current-page":t.loadPageCurr,"page-size":t.loadPageLimit,layout:"total, sizes, prev, pager, next, jumper",total:t.loadDataTotal},null,8,["onSizeChange","onCurrentChange","pager-count","page-sizes","current-page","page-size","total"])],512)),[[e.vShow,t.loadDataLoading===!1]]):e.createCommentVNode("",!0)])}]]),Ui={class:"cv-table-tree"},Vt=C({name:"cvTableTree",mixins:[Xt,Uo],props:{tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({searchData:{},tableConfDef:{tablePrimary:"",childName:"children"},pager_count:7,page:1}),watch:{tableRefresh(t,o){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table"),s=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Ui,[e.withDirectives((e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:i.handleSelectionChange,"row-key":t.loadConfigSetting.tablePrimary,"tree-props":{children:t.loadConfigSetting.childName,hasChildren:"hasChildren"}}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange","row-key","tree-props"])),[[s,t.loadDataLoading]])])}]]),Wi={name:"cvTableEditor",mixins:[Xt,Uo],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default:()=>({})}},data:()=>({mergeRules:{},apiFunc:null,tableConfDef:{},cell_click_index:null,cell_click_label:""}),watch:{},created(){this.loadConfigSetting=Object.assign({},this.tableConfDef,this.tableConfig)},mounted(){},methods:{cell_click(t,o,l,r){switch(this.cell_click_index=t.index,this.cell_click_label=o.label,o.label){case"taskid":case"taskname":this.cell_click_index=t.index,this.cell_click_label=o.label;break;default:return}},handleChangeTData(t){}}},qi={class:"cv-table-editor"},wt=C(Wi,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table"),s=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",qi,[e.withDirectives((e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},"row-class-name":"cv-tbed-tr"}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data"])),[[s,t.loadDataLoading]])])}]]),xt=C({name:"cvTbColumnIndex",inject:{pageCurr:{default:1},pageLimit:{default:10}},props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:String,default:"center"},width:{type:[String,Number],default:55},continuity:{type:[Boolean,String],default:!1}},data:()=>({}),created(){},methods:{indexMethod(t){return this.continuity&&this.pageCurr&&this.pageLimit?t+1+(this.pageCurr-1)*this.pageLimit:t+1}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{type:"index",index:i.indexMethod}),null,16,["index"])}]]),Bt=C({name:"cvTbColumnCheck",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:[String],default:"center"},width:{type:[String,Number],default:55}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{type:"selection"}),null,16)}]]),Gi={name:"cvTbColumnText",props:{...k.ElTableColumn.props},data:()=>({}),created(){},methods:{getContentText(t){let o=t.row[this.prop];return this.formatter&&(o=this.formatter(t.row,t.column)),o}}},Ki={style:{display:"contents"}},Nt=C(Gi,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(s=>[e.createElementVNode("div",Ki,e.toDisplayString(s.row[t.prop]),1)]),_:1},16)}]]),Qi={name:"cvTbColumnImg",props:{...k.ElTableColumn.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data:()=>({localImgWidth:"50px",localImgHeight:"50px",localImgArr:[],localImgOne:""}),created(){this.imgWidth&&(this.localImgWidth=this.imgWidth.indexOf("px")!==-1?this.imgWidth:this.imgWidth+"px"),this.imgHeight&&(this.localImgHeight=this.imgHeight.indexOf("px")!==-1?this.imgHeight:this.imgHeight+"px")},methods:{handleImgOne(t){let o=t[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o[0];if(Object.prototype.toString.call(o)==="[object String]")return o}},handleImgArr(t){let o=t[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o;if(Object.prototype.toString.call(o)==="[object String]")return[o]}},handleImgLeng(t){let o=t[this.prop]||null;return o?Object.prototype.toString.call(o)==="[object Array]"?o.length:Object.prototype.toString.call(o)==="[object String]"?1:void 0:0}}},Zi={key:0,class:"cv-table-column-img-mark"},Yi={class:"cv-table-column-img-text"},St=C(Qi,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-image"),s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(m=>[e.createElementVNode("div",{class:"cv-table-column-img-box",style:e.normalizeStyle({width:n.localImgWidth,height:n.localImgHeight})},[e.createVNode(c,{style:e.normalizeStyle({width:n.localImgWidth,height:n.localImgHeight}),fit:"scale-down",lazy:"",src:i.handleImgOne(m.row),"preview-src-list":i.handleImgArr(m.row)},{error:e.withCtx(()=>o[0]||(o[0]=[e.createElementVNode("span",{class:"el-image__error cv-table-column-img-err"},[e.createTextVNode(" 暂无 "),e.createElementVNode("br"),e.createTextVNode(" 图片 ")],-1)])),_:2},1032,["style","src","preview-src-list"]),i.handleImgLeng(m.row)>1?(e.openBlock(),e.createElementBlock("p",Zi,[e.createElementVNode("span",Yi,e.toDisplayString(i.handleImgLeng(m.row))+"张",1)])):e.createCommentVNode("",!0)],4)]),_:1},16)}]]),Et=C({name:"cvTbColumnOpt",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"right"},label:{type:[String],default:"操作"}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(s=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:s.row,$index:s.$index,scope:s})))]),_:3},16)}]]),Dt=C({name:"cvTbColumnBase",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(s=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:s.row,$index:s.$index,scope:s})))]),_:3},16)}]]),Tt=C({name:"cvTbColumnExpand",props:{...k.ElTableColumn.props},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{type:"expand"}),{default:e.withCtx(s=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:s.row,$index:s.$index,props:s})))]),_:3},16)}]]),It=C({name:"cvTbColumnEnum",props:{...k.ElTableColumn.props,dataLists:{type:[Object,Array],default:()=>({})}},data:()=>({}),created(){},methods:{dealTypeEnum(t){let o=Object.keys(this.dataLists);return t[this.prop]?this.dataLists[t[this.prop]]||"":this.dataLists[o[0]]||""}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(s=>[e.createElementVNode("span",null,e.toDisplayString(i.dealTypeEnum(s.row)),1)]),_:1},16)}]]),Ji={name:"cvTbEditSearch",props:{...k.ElTableColumn.props,modelValue:{type:[String],default:""},align:{type:[String],default:"left"}},data:()=>({isEditIndex:null,localVal:"",autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:"",searchCurrTbIndex:0,searchIsSelect:!1}),watch:{modelValue(t){},localVal(t){this.$emit("update:modelValue",t)}},directives:{edfocus:{mounted:t=>{}}},created(){},methods:{searchEdit(t,o){this.isEditIndex=o,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${o}`].focus()})},searchSave(t,o){this.isEditIndex=null},searchSelect(t,o,l){this.searchIsSelect=!0,this.localTableData[l]=Object.assign(this.localTableData[l],t),this.localTableData[l].row_num=1,t.row_attr?this.localTableData[l].row_name=t.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${t.row_attr} ]</span>`:this.localTableData[l].row_name=t.row_name},searchFocus(t,o){this.searchCurrClass="cvtegac"+t,this.searchCurrTbIndex=t},searchBlur(t,o){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(t,o){this.searchIsSelect=!1,this.searchResList=[];const l=this.searchSett;if(l.searchMockData!=null&&l.searchMockData){if(!(typeof l.searchMockData!="Array"&&typeof l.searchMockData!="object")){const r=this.sortOutData(l.searchMockData);this.tableData=r,this.$message({message:r.msg||"",type:"warning",duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else l.searchFunc&&typeof l.searchFunc=="function"&&l.searchFunc({page:1,pagesize:20,keyword:t,...l.searchParam}).then(r=>{this.searchResList=[...r.data],this.searchParseData(t,o)})},searchParseData(t,o){var l=[],r=[];const n=this.searchSett;if(this.searchResList.length>0){for(let i in this.searchResList){let c=this.searchResList[i];const s=n.searchField.row_price;c.row_price=c[s];const m=n.searchField.row_stock;c.row_stock=c[m];const d=n.searchField.row_attr;c.row_attr=c[d];const p=n.searchField.row_name;c.row_name=c[p];const f=n.searchField.row_unit;c.row_unit=c[f];const g=n.searchField.row_id;c.row_id=c[g],c.value=c.row_name,r.push(c)}l=r}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{o(l)},600)},inputSearchFilter:t=>o=>o.value.toLowerCase().indexOf(t.toLowerCase())===0,searchIconClick(){this.isEditIndex=null}}},Xi={class:"name"},er={class:"addr"},tr={class:"addr"},or={class:"droplist-item"},lr={class:"name"},ar={key:0,class:"attr"},nr={class:"price"},ir={class:"rest"},rr=["onClick"],Lt=C(Ji,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("ElIconCircleClose"),s=e.resolveComponent("el-icon"),m=e.resolveComponent("el-autocomplete"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.mergeProps(t.$props,{"class-name":"cv-table-editor-search-column"}),{default:e.withCtx(p=>[n.isEditIndex==p.$index?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,ref:`cv-tbce-autocomplete${p.$index}`},n.autocompleteAttr,{modelValue:p.row[t.prop],"onUpdate:modelValue":f=>p.row[t.prop]=f,"popper-class":`cv-tbce-autocomplete cvtegac${p.$index}`,"fetch-suggestions":i.searchQuery,onSelect:f=>i.searchSelect(f,p.row,p.$index),onFocus:f=>i.searchFocus(p.$index,f),onBlur:f=>i.searchBlur(p.row,p.$index)}),{suffix:e.withCtx(()=>[e.createVNode(s,{onClick:f=>i.searchIconClick(p.row,p.$index)},{default:e.withCtx(()=>[e.createVNode(c)]),_:2},1032,["onClick"])]),default:e.withCtx(({item:f})=>[e.renderSlot(t.$slots,"default",{item:f},()=>[e.createElementVNode("div",Xi,e.toDisplayString(f.row_name),1),e.createElementVNode("span",er,"价格:"+e.toDisplayString(f.row_price),1),e.createElementVNode("span",tr,e.toDisplayString(f.row_rest),1),e.createElementVNode("div",or,[e.createElementVNode("div",lr,[e.createTextVNode(e.toDisplayString(f.row_name)+" ",1),f.row_attr?(e.openBlock(),e.createElementBlock("div",ar,"[ "+e.toDisplayString(f.row_attr)+"]",1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",nr,"¥ "+e.toDisplayString(f.row_price),1),e.createElementVNode("div",ir,e.toDisplayString(f.attr_stock),1)])])]),_:2},1040,["modelValue","onUpdate:modelValue","popper-class","fetch-suggestions","onSelect","onFocus","onBlur"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:f=>i.searchEdit(p.row,p.$index)},e.toDisplayString(p.row[t.prop]),9,rr))]),_:3},16)}]]),Ft=C({name:"cvTbEditOpt",props:{tableData:{type:[Array],default:()=>[]},...k.ElTableColumn.props,label:{type:[String],default:"操作"},align:{type:[String],default:"center"},width:{type:[String],default:"100"},fixed:{type:[String],default:"left"},btnAdd:{type:[Boolean,String],default:!0},btnDel:{type:[Boolean,String],default:!0}},data:()=>({localTbData:[]}),watch:{tableData(t){this.localTbData=t}},created(){this.localTbData=this.tableData},methods:{optHdDelete(t,o){this.localTbData.splice(t,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("cv-icons"),s=e.resolveComponent("el-button"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[l.btnAdd?(e.openBlock(),e.createBlock(s,{key:0,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:o[0]||(o[0]=p=>i.optHdAdd())},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconPlus"})]),_:1})):e.createCommentVNode("",!0),l.btnDel?(e.openBlock(),e.createBlock(s,{key:1,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:p=>i.optHdDelete(d.$index,d.row)},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconClose"})]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1},16)}]]),cr={name:"cvTbEditText",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""},editAttr:{type:[Object],default:()=>({placeholder:"请输入"})},editClearable:{type:[Boolean],default:!0},editStyle:{type:[Object],default:()=>({"--el-input-border":0,"--el-input-border-radius":0,"--el-input-height":"36px"})},editClass:{type:[Object],default:()=>({})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}},toFixed:{type:[String,Number],default:""}},data:()=>({currValue:"",isEditIndex:null,isErrIndex:[]}),directives:{edfocus:{mounted:t=>{t.querySelector("input").focus()},inserted:function(t){t.querySelector("input").focus()}}},created(){},methods:{textIsError(t){return this.isErrIndex&&this.isErrIndex[t]&&this.isErrIndex[t][this.prop]},textHdEdit(t,o){this.isEditIndex=o},textHdClear(t,o){},textHdSave(t,o){this.isEditIndex=null;let l=t[this.prop];if(this.toFixed!=""){let r=parseInt(this.toFixed);isNaN(l)||(t[this.prop]=parseFloat(l).toFixed(r))}else t[this.prop]=l}},render22(t,o){let l=this;return t("el-table-column",{props:{...this.$props},scopedSlots:{default:r=>{this.currValue=r.row[this.prop];let n=r.$index;return this.isEditIndex==n?t("el-input",{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:i=>{i.keyCode===13&&(this.$emit("update:param",i.target.value),this.callback&&this.callback())}},on:{blur:i=>{this.$emit("update:param",i.target.value),this.callback&&this.callback()},input:function(i){l.currValue=i||i.target.value},blur:i=>{this.isEditIndex=null,l.currValue=i||i.target.value}}},this.currValue):t("span",{class:{showtext:!0},on:{click:()=>{this.isEditIndex=n}}},this.currValue)}}})}},sr=["onClick"],_t=C(cr,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-input"),s=e.resolveComponent("el-table-column"),m=e.resolveDirective("edfocus");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{"class-name":"cv-table-editor-text-column"}),{default:e.withCtx(d=>[n.isEditIndex!=d.$index||l.editAttr.disabled?(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:p=>i.textHdEdit(d.row,d.$index)},e.toDisplayString(d.row[t.prop]),9,sr)):e.withDirectives((e.openBlock(),e.createBlock(c,e.mergeProps({key:0},l.editAttr,{clearable:l.editClearable,style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p,onBlur:e.withModifiers(p=>i.textHdSave(d.row,d.$index),["prevent"]),onClear:p=>i.textHdClear(d.row,d.$index)}),null,16,["clearable","style","class","modelValue","onUpdate:modelValue","onBlur","onClear"])),[[m]])]),_:1},16)}]]),$t=C({name:"cvTbEditRadio",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-radio"),s=e.resolveComponent("el-radio-group"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[e.createVNode(s,e.mergeProps({style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p},l.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataLists,(p,f)=>(e.openBlock(),e.createBlock(c,{key:f,label:p[l.dataField.label],value:p[l.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p[l.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:2},1040,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]),zt=C({name:"cvTbEditCheckbox",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data:()=>({localVal:[]}),created(){},methods:{handleParseValue(t){this.localVal=[]}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-checkbox"),s=e.resolveComponent("el-checkbox-group"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[d.row[t.prop]?(e.openBlock(),e.createBlock(s,e.mergeProps({key:0,style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p},l.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataLists,(p,f)=>(e.openBlock(),e.createBlock(c,{key:f,label:p[l.dataField.label],value:p[l.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p[l.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:2},1040,["style","class","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},16)}]]),Pt=C({name:"cvTbEditSelect",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[e.createVNode(s,e.mergeProps({style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p},l.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataLists,(p,f)=>(e.openBlock(),e.createBlock(c,{key:f,label:p[l.dataField.label],value:p[l.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p[l.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:2},1040,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]);function te(t){return function(o){return typeof Array.isArray=="function"?Array.isArray(o):Object.prototype.toString.call(o)==="[object Array]"}(t)?t.length===0:function(o){return Object.prototype.toString.call(o)==="[object Object]"}(t)?Object.keys(t).length===0:t===""||t==null}bt.install=function(t){t.component(bt.name,bt)},Vt.install=function(t){t.component(Vt.name,Vt)},wt.install=function(t){t.component(wt.name,wt)},xt.install=function(t){t.component(xt.name,xt)},Bt.install=function(t){t.component(Bt.name,Bt)},Nt.install=function(t){t.component(Nt.name,Nt)},St.install=function(t){t.component(St.name,St)},Et.install=function(t){t.component(Et.name,Et)},Dt.install=function(t){t.component(Dt.name,Dt)},Tt.install=function(t){t.component(Tt.name,Tt)},It.install=function(t){t.component(It.name,It)},Lt.install=function(t){t.component(Lt.name,Lt)},Ft.install=function(t){t.component(Ft.name,Ft)},_t.install=function(t){t.component(_t.name,_t)},$t.install=function(t){t.component($t.name,$t)},zt.install=function(t){t.component(zt.name,zt)},Pt.install=function(t){t.component(Pt.name,Pt)};const le=(t,o)=>te(t)?o:t;function Y(t){return t==null?"":String(t)}function dr(t){let o=t.lastIndexOf("."),l=t.substring(o+1);return["png","jpg","jpeg","gif","webp","svg"].indexOf(l.toLowerCase())!=-1}function mr(t){var o=new Date,l=new Date(t),r=o-l,n=Math.floor(r/1e3),i=Math.floor(n/60),c=Math.floor(i/60);if(i<1)var s=n+"秒前";else c<1?s=i+"分钟前":c<24?s=c+"小时前":s=l.toLocaleString();return s}const pr={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ur=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",pr,o[0]||(o[0]=[e.createElementVNode("rect",{width:"12",height:"12",rx:"2",fill:"#86909C"},null,-1),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.98095 5.49307L8.22012 3.25389C8.28521 3.18881 8.39074 3.18881 8.45582 3.25389L8.69153 3.4896C8.75661 3.55468 8.75661 3.66021 8.69153 3.7253L6.45235 5.96447L8.69153 8.20364C8.75661 8.26873 8.75661 8.37426 8.69153 8.43934L8.45582 8.67505C8.39074 8.74013 8.28521 8.74013 8.22012 8.67505L5.98095 6.43587L3.74178 8.67505C3.67669 8.74013 3.57116 8.74013 3.50608 8.67505L3.27037 8.43934C3.20529 8.37426 3.20529 8.26873 3.27037 8.20364L5.50954 5.96447L3.27037 3.7253C3.20529 3.66021 3.20529 3.55468 3.27037 3.4896L3.50608 3.25389C3.57116 3.18881 3.67669 3.18881 3.74178 3.25389L5.98095 5.49307Z",fill:"white"},null,-1)]))}]]),hr={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},gr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",hr,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"},null,-1)]))}]]),fr={class:"comment-common-icon"},Cr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",fr,o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.createElementVNode("path",{d:"M4.88933 0.613974C4.92947 0.616946 4.96831 0.629568 5.00253 0.650767C6.67348 1.68589 7.55141 3.13884 7.63632 5.00962C7.947 5.00962 8.2245 4.65999 8.46882 3.96072L8.49487 3.88447C8.53862 3.75351 8.68025 3.68282 8.8112 3.72656C8.83398 3.73417 8.85554 3.74502 8.87522 3.75878C9.96316 4.5193 10.5048 5.50231 10.5 6.70782C10.4999 6.73762 10.4982 6.76675 10.495 6.7952C10.4985 6.86294 10.5 6.93131 10.5 7.00005C10.5 9.48533 8.48528 11.5 6 11.5C3.51472 11.5 1.5 9.48533 1.5 7.00005C1.5 6.90255 1.5031 6.80578 1.50921 6.70983C1.5062 6.70917 1.5031 6.70849 1.5 6.70782C1.50864 6.60849 1.52139 6.50994 1.53824 6.41219C1.54515 6.35775 1.55321 6.30373 1.56222 6.25003L1.57017 6.24983C1.7622 5.3813 2.28426 4.57601 3.13635 3.83394C4.00892 3.07405 4.50079 2.11523 4.61198 0.957499L4.62156 0.844839C4.63175 0.707146 4.75163 0.603784 4.88933 0.613974Z"})],-1)]))}]]),vr={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},kr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",vr,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 1.3335C14.3514 1.3335 14.6394 1.60546 14.6648 1.95041L14.6666 2.00016V14.0002C14.6666 14.3516 14.3947 14.6396 14.0497 14.665L14 14.6668H1.99998C1.64853 14.6668 1.36059 14.3949 1.33514 14.0499L1.33331 14.0002V2.00016C1.33331 1.64871 1.60527 1.36077 1.95023 1.33532L1.99998 1.3335H14ZM13.3333 2.66618H2.66664V13.3328H13.3333V2.66618ZM11.9219 6.7879C11.9719 6.83791 12 6.90574 12 6.97647V11.7993C12 11.9098 11.9104 11.9993 11.8 11.9993H6.81615C6.7975 11.9993 6.77945 11.9968 6.76232 11.992L3.91042 11.9847C3.79996 11.9844 3.71063 11.8947 3.7109 11.7842C3.71102 11.7313 3.73209 11.6807 3.76948 11.6433L6.52468 8.88807C6.62882 8.78393 6.79766 8.78393 6.9018 8.88807L8.17297 10.1593L11.5447 6.7879C11.6489 6.68376 11.8177 6.68376 11.9219 6.7879ZM5.99997 3.99951V5.99951H3.99997V3.99951H5.99997Z"},null,-1)]))}]]),yr={class:"comment-common-icon"},br=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",yr,o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M586.624 234.624a74.624 74.624 0 1 1-149.184 0 74.624 74.624 0 0 1 149.12 0z m0 554.624a74.624 74.624 0 1 1-149.248 0 74.624 74.624 0 0 1 149.248 0zM512 586.624a74.624 74.624 0 1 0 0-149.248 74.624 74.624 0 0 0 0 149.248z",fill:"currentColor"})],-1)]))}]]),Vr={class:"comment-common-icon",style:{color:"#1e80ff"}},wr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Vr,o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1534"},[e.createElementVNode("path",{d:"M668.928 166.912c-20.48-53.504-47.9744-84.7872-82.0224-94.9248-33.5872-10.0352-61.952 4.096-76.032 13.9776-27.5456 19.3536-41.216 49.664-50.0224 74.1376-3.3792 9.3184-6.4512 19.0976-9.216 27.9552l-2.6624 8.3968a227.8912 227.8912 0 0 1-10.3936 27.9552c-25.344 52.9408-47.4112 84.5312-66.7648 104.96-18.944 19.968-36.4544 30.464-55.1936 39.7824a45.3632 45.3632 0 0 0-25.088 40.5504l-0.1024 480.7168c0 24.9344 20.2752 45.2096 45.2096 45.2096h423.0656c21.7088 0 38.144-6.912 50.0224-16.9984a72.192 72.192 0 0 0 14.4896-16.896l0.2048-0.2048 0.0512-0.1536 0.8192-1.024 1.2288-1.8944c39.424-63.7952 66.7648-114.688 88.2176-175.616 24.4224-69.4784 36.8128-129.6896 42.0352-176.64 5.12-45.6704 3.7888-81.664-1.5872-101.376a77.9776 77.9776 0 0 0-45.568-52.3264 116.5824 116.5824 0 0 0-45.4144-8.6016l-192.8192-2.6624c28.1088-115.0976 10.0864-181.6064-2.4576-214.3744zM64.0512 413.9008a45.2096 45.2096 0 0 1 45.1584-47.36H176.128c24.9344 0 45.2096 20.2752 45.2096 45.2096v480.6144a45.2096 45.2096 0 0 1-45.2096 45.2096h-44.288a45.2096 45.2096 0 0 1-45.1584-43.0592L64 413.952z","p-id":"1535"})],-1)]))}]]),xr={class:"comment-common-icon"},Br=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",xr,o[0]||(o[0]=[e.createElementVNode("svg",{t:"1650360973068",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1168",width:"200",height:"200"},[e.createElementVNode("path",{d:"M547.968 138.88c6.656-4.672 14.08-6.976 20.48-5.056 6.08 1.792 22.848 10.752 40.192 56.128 8.576 22.4 27.264 81.536-5.632 197.504a45.44 45.44 0 0 0 42.88 57.984l217.6 3.008h0.448a53.12 53.12 0 0 1 20.096 3.328 16.256 16.256 0 0 1 5.568 3.648 14.464 14.464 0 0 1 3.264 6.4c2.176 7.808 4.608 33.984-0.256 77.248-4.672 41.984-15.936 97.408-38.784 162.368-19.136 54.336-43.52 100.48-81.472 161.792a56.384 56.384 0 0 0-1.664 2.496l-0.128 0.128-1.408 2.112a7.872 7.872 0 0 1-1.28 1.472 3.84 3.84 0 0 1-1.28 0.64 20.48 20.48 0 0 1-6.848 0.96H356.032V421.44c19.712-10.624 40.704-24.576 62.592-47.616 25.472-26.88 51.008-64.768 78.208-121.6 5.568-11.584 9.856-24.384 13.632-36.032l3.072-9.856c2.688-8.448 5.184-16.384 8.064-24.32 8.064-22.4 16.128-36.032 26.368-43.136z m120.96 27.968c-20.48-53.44-48-84.736-81.984-94.912-33.6-9.984-61.952 4.16-76.032 14.08-27.584 19.264-41.28 49.6-50.048 74.048-3.392 9.344-6.464 19.2-9.216 27.968l-2.688 8.448a227.84 227.84 0 0 1-10.432 27.904c-25.28 52.928-47.36 84.544-66.752 104.96-18.944 19.968-36.48 30.464-55.168 39.808a45.376 45.376 0 0 0-25.088 40.576l-0.064 480.64c0 24.96 20.224 45.248 45.184 45.248h423.04c21.76 0 38.144-6.912 50.048-16.96a71.808 71.808 0 0 0 14.528-16.896l0.128-0.256 0.128-0.128 0.832-0.96 1.152-1.92c39.424-63.872 66.816-114.688 88.256-175.68a810.24 810.24 0 0 0 42.048-176.64c5.12-45.632 3.776-81.664-1.6-101.376a77.952 77.952 0 0 0-45.568-52.288 116.544 116.544 0 0 0-45.44-8.64l-192.768-2.688c28.096-115.072 10.048-181.568-2.496-214.336z m-604.864 247.04a45.184 45.184 0 0 1 45.12-47.296h67.008c24.96 0 45.184 20.288 45.184 45.248v480.64c0 24.96-20.224 45.12-45.184 45.12H131.84a45.184 45.184 0 0 1-45.12-43.072l-22.656-480.64z","p-id":"1169"})],-1)]))}]]),Nr={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},Sr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",Nr,o[0]||(o[0]=[e.createElementVNode("path",{"data-v-d6f79dbc":"","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99976 7.93206L10.0656 3.86619C10.1633 3.76856 10.3215 3.76856 10.4192 3.86619L10.7727 4.21975C10.8704 4.31738 10.8704 4.47567 10.7727 4.5733L6.35331 8.99272C6.15805 9.18798 5.84147 9.18798 5.6462 8.99272L1.22679 4.5733C1.12916 4.47567 1.12916 4.31738 1.22679 4.21975L1.58034 3.86619C1.67797 3.76856 1.83626 3.76856 1.93389 3.86619L5.99976 7.93206Z"},null,-1)]))}]]),Er={class:"comment-common-icon"},Dr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Er,o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99951 0.5C9.03708 0.5 11.4995 2.96243 11.4995 6C11.4995 9.03757 9.03708 11.5 5.99951 11.5C2.96195 11.5 0.499512 9.03757 0.499512 6C0.499512 2.96243 2.96195 0.5 5.99951 0.5ZM6.25 3.49988C6.38807 3.49988 6.5 3.61181 6.5 3.74988V5.49988H8.25C8.38807 5.49988 8.5 5.61181 8.5 5.74988V6.24988C8.5 6.38795 8.38807 6.49988 8.25 6.49988H5.75C5.61193 6.49988 5.5 6.38795 5.5 6.24988V3.74988C5.5 3.61181 5.61193 3.49988 5.75 3.49988H6.25Z"})],-1)]))}]]),Tr={class:"comment-common-icon"},Ir=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Tr,o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1320",width:"200",height:"200"},[e.createElementVNode("path",{d:"M147.264 647.296V220.928c0-49.536 40.128-89.728 89.6-89.728H793.6c49.536 0 89.728 40.192 89.728 89.728v426.368c0 49.536-40.128 89.728-89.6 89.728h-145.216a47.04 47.04 0 0 0-28.16 9.408l-194.56 145.792a3.392 3.392 0 0 1-5.12-1.984l-26.752-116.672a47.04 47.04 0 0 0-45.824-36.544H236.992a89.728 89.728 0 0 1-89.728-89.728zM236.864 64A156.928 156.928 0 0 0 80 220.928l0.064 426.368a156.928 156.928 0 0 0 156.928 156.928h94.976l23.232 101.312 0.064 0.448a70.592 70.592 0 0 0 109.696 40.832l190.208-142.592H793.6a156.928 156.928 0 0 0 156.928-156.928l-0.064-426.368A156.928 156.928 0 0 0 793.536 64H236.928z m69.44 442.496a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z m268.8-65.344a65.344 65.344 0 1 1-130.752 0 65.344 65.344 0 0 1 130.752 0z m138.368 65.344a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z","p-id":"1321"})],-1)]))}]]),Lr={class:"cv-comment-emoji"},Fr={class:"face-tooltip-head select-none"},_r=["onClick"],$r=["src"],zr={class:"emoji-body select-none"},Pr={style:{padding:"0 5px"}},jr=["onClick"],Or={class:"emoji-btn select-none"},Mr={key:0},Ar=C(Object.assign({name:"CompInputEmoji"},{__name:"input-emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const l=t,r=e.ref(0),n=e.ref(0),i=e.ref(new Array(2)),{emojiList:c,faceList:s}=l.emoji;function m(){i.value[0]=c[0]}return(d,p)=>(e.openBlock(),e.createElementBlock("div",Lr,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:m},{reference:e.withCtx(()=>[e.createElementVNode("div",Or,[d.$slots.default?e.renderSlot(d.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",Mr,[e.createVNode(e.unref(gr)),p[0]||(p[0]=e.createElementVNode("span",null,"表情",-1))]))])]),default:e.withCtx(()=>[e.createElementVNode("div",Fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(f,g)=>(e.openBlock(),e.createElementBlock("label",{key:g,class:e.normalizeClass(r.value==g?"active":""),onClick:h=>function(v){switch(r.value=v,v){case 0:n.value=0;break;case 1:n.value=-50,i.value[1]=c[1]}}(g)},[e.createElementVNode("img",{src:f,alt:""},null,8,$r)],10,_r))),128))]),e.createElementVNode("div",zr,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${n.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",Pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,(h,v)=>(e.openBlock(),e.createElementBlock("span",{key:v,class:"emoji-item",onClick:u=>d.$emit("addEmoji",v)},[e.createVNode(e.unref(k.ElImage),{src:h,title:String(v),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,jr))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-2fb59975"]]),Rr={class:"cv-comment-editor"},Hr=["placeholder","innerHTML"],Ur=["src"],Wr=["onClick"],qr={key:0,class:"cv-comment-editor__action"},Gr={__name:"input-box",props:{placeholder:"",contentBtn:"",parentId:"",reply:""},emits:["hide","close"],setup(t,{expose:o,emit:l}){const r=t,n=e.ref(""),i=e.ref(),c=e.ref(!1),s=e.ref(!1),m=e.ref(),d=e.ref(!0),p=e.ref(),f=e.ref(),g=e.ref([]),h=e.ref([]),v=e.reactive({imgLength:0}),u=64,y=e.ref(),b=e.ref(!1),V=e.ref(),w=e.computed(()=>u+"px"),S=e.computed(()=>"8px 12px"),D=l,{upload:z,submit:L,focus:P}=e.inject("InjectInputBox"),ae=e.inject("InjectionEmojiApi");function Ko(){L({content:r.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${r.reply.user.username}:</span> ${n.value}`:n.value,parentId:le(r.parentId,null),reply:r.reply,files:h.value,clear:()=>{m.value&&(m.value.innerHTML="",n.value=m.value.innerHTML,c.value=!1),g.value.length=0,h.value=[],d.value=!0,D("close")}})}function _a(N){te(n.value)&&!v.imgLength&&(s.value=!1,D("hide",N))}function $a(N){b.value=!0,c.value=!0,s.value=!0,e.nextTick(()=>{p.value=document.querySelector("div[id^='el-popper-container']")}),P()}function za(N){var B,T;y.value=(B=window.getSelection())==null?void 0:B.getRangeAt(0),(T=m.value)!=null&&T.innerHTML||(c.value=!1),b.value=!1}function Pa(N){const{innerHTML:B}=(N==null?void 0:N.target)||N;n.value=B||"",te(n.value.replace(/ |<br>| /g,""))?d.value=!0:d.value=!1}function Qo(){e.nextTick(()=>{var N;(N=m.value)==null||N.focus()})}function ja(N){N.ctrlKey&&N.key=="Enter"&&(te(n.value.replace(/ |<br>| /g,""))?k.ElMessage({message:"内容不能为空",type:"info"}):Ko())}function Oa(N){var F;g.value.length=0,h.value.length=0;const B=(F=f.value)==null?void 0:F.files;if(v.imgLength=le(B==null?void 0:B.length,0),B)for(let I=0;I<B.length;I++){let Z=B[I].name,ne=(T=B[I],window.URL?window.URL.createObjectURL(T):window.webkitURL?window.webkitURL.createObjectURL(T):"");h.value.push(B[I]),dr(Z)?g.value.push(ne):k.ElMessage({type:"warn",message:"请选择图片类型文件!",duration:2500})}var T}return e.watch(()=>n.value,N=>{b.value||(i.value=N)}),e.onMounted(()=>{var N;(N=m.value)==null||N.addEventListener("keyup",B=>{const T=B.target;T.innerHTML=="<br>"&&(T.innerHTML="")})}),o({focus:()=>Qo()}),(N,B)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",Rr,[e.createElementVNode("div",{class:e.normalizeClass(["cv-comment-editor__box",{active:c.value,"input-active":s.value}])},[e.createElementVNode("div",{ref_key:"editorRef",ref:m,class:"rich-input",contenteditable:"true",placeholder:r.placeholder,onFocus:$a,onInput:Pa,onBlur:za,onKeydown:e.withKeys(ja,["enter"]),innerHTML:i.value,style:e.normalizeStyle({minHeight:w.value,padding:S.value})},null,44,Hr),e.createElementVNode("div",{ref_key:"imageRef",ref:V,class:"image-preview-box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(T,F)=>(e.openBlock(),e.createElementBlock("div",{key:F,class:"image-preview"},[e.createElementVNode("img",{src:T,alt:""},null,8,Ur),e.createElementVNode("div",{class:"clean-btn",onClick:I=>{var ne;return Z=F,void((ne=g==null?void 0:g.value)==null?void 0:ne.splice(Z,1));var Z}},[e.createVNode(e.unref(ur))],8,Wr)]))),128))],512)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",qr,[e.createElementVNode("div",null,[e.createVNode(Ar,{emoji:e.unref(ae),onAddEmoji:B[0]||(B[0]=T=>function(F){var Z;let I=window.getSelection();I&&(I.removeAllRanges(),y.value||(Qo(),y.value=I.getRangeAt(0)),y.value.deleteContents(),y.value.insertNode(y.value.createContextualFragment(F)),y.value.collapse(!1),I.addRange(y.value),n.value=((Z=m==null?void 0:m.value)==null?void 0:Z.innerHTML)||"",te(n.value.replace(/ |<br>| /g,""))?d.value=!0:d.value=!1)}(T))},null,8,["emoji"]),e.createElementVNode("div",{class:"picture",onClick:B[1]||(B[1]=(...T)=>{var F,I;return((F=f.value)==null?void 0:F.click)&&((I=f.value)==null?void 0:I.click(...T))})},[e.createVNode(e.unref(kr)),B[2]||(B[2]=e.createElementVNode("span",null,"图片",-1)),e.createElementVNode("input",{id:"comment-upload",ref_key:"inputRef",ref:f,type:"file",multiple:"",onChange:Oa},null,544)])]),e.createElementVNode("div",null,[B[3]||(B[3]=e.createElementVNode("span",{style:{"margin-right":"10px"}},[e.createTextVNode(" 文明上网理性发言,请遵守 "),e.createElementVNode("a",{href:"###",target:"_blank"},"《新闻评论服务协议》")],-1)),e.createVNode(e.unref(k.ElButton),{type:"primary",disabled:d.value,onClick:Ko},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.contentBtn),1)]),_:1},8,["disabled"])])])):e.createCommentVNode("",!0)]),_:1})])),[[e.unref(k.ClickOutside),_a,p.value]])}},ya=C(Gr,[["__scopeId","data-v-e6039cd3"]]),Kr={class:"u-fold"},Qr={class:"action-box select-none"},Zr=C(Object.assign({name:"UFold"},{__name:"fold",props:{line:{type:[Number,String],default:5}},setup(t){e.useCssVars(s=>({"15491e60":l.value}));const o=t,l=e.computed(()=>{let s=Math.trunc(Number(o.line));return s>0?s:1}),r=e.ref(!0),n=e.ref(!1),i=e.ref();let c;return e.onMounted(()=>{c=new ResizeObserver(s=>{r.value&&i.value&&(n.value=i.value.offsetHeight<i.value.scrollHeight)}),c.observe(i.value)}),e.onUnmounted(()=>{c.disconnect()}),(s,m)=>(e.openBlock(),e.createElementBlock("div",Kr,[e.createElementVNode("div",{class:e.normalizeClass(["txt-box",{"over-hidden":r.value}])},[e.createElementVNode("div",{ref_key:"divBox",ref:i},[e.renderSlot(s.$slots,"default",{},void 0,!0)],512)],2),e.createElementVNode("div",Qr,[n.value&&s.unfold?(e.openBlock(),e.createElementBlock("div",{key:0,class:"expand-btn",onClick:m[0]||(m[0]=d=>r.value=!r.value)},e.toDisplayString(r.value?"展开":"收起"),1)):e.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-94334818"]]),Xo={__name:"user-card",props:{uid:""},setup(t){const o=e.ref({}),{showInfo:l}=e.inject("InjectContentBox"),r=e.inject("InjectSlots"),n=()=>e.h("div",r.card(o.value));return(i,c)=>e.unref(r).card?(e.openBlock(),e.createBlock(e.unref(k.ElPopover),{key:0,placement:"top",width:300,"show-after":300,onBeforeEnter:c[0]||(c[0]=()=>e.unref(l)(t.uid,s=>o.value=s))},{reference:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),default:e.withCtx(()=>[e.createVNode(n)]),_:3})):e.renderSlot(i.$slots,"default",{key:1})}};function ba(t){return!!e.getCurrentScope()&&(e.onScopeDispose(t),!0)}const Wo=typeof window<"u"&&typeof document<"u";const Yr=Object.prototype.toString,Jr=t=>Yr.call(t)==="[object Object]";function no(t){return Array.isArray(t)?t:[t]}const Xr=Wo?window:void 0,Va=Wo?window.navigator:void 0;function wa(...t){const o=[],l=()=>{o.forEach(m=>m()),o.length=0},r=e.computed(()=>{const m=no(e.toValue(t[0])).filter(d=>d!=null);return m.every(d=>typeof d!="string")?m:void 0}),n=(i=()=>{var m,d;return[(d=(m=r.value)==null?void 0:m.map(p=>function(f){var g;const h=e.toValue(f);return(g=h==null?void 0:h.$el)!=null?g:h}(p)))!=null?d:[Xr].filter(p=>p!=null),no(e.toValue(r.value?t[1]:t[0])),no(e.unref(r.value?t[2]:t[1])),e.toValue(r.value?t[3]:t[2])]},c=([m,d,p,f])=>{if(l(),!(m!=null&&m.length)||!(d!=null&&d.length)||!(p!=null&&p.length))return;const g=Jr(f)?{...f}:f;o.push(...m.flatMap(h=>d.flatMap(v=>p.map(u=>((y,b,V,w)=>(y.addEventListener(b,V,w),()=>y.removeEventListener(b,V,w)))(h,v,u,g)))))},s={flush:"post"},e.watch(i,c,{...s,immediate:!0}));var i,c,s;return ba(l),()=>{n(),l()}}function xa(t){const o=function(){const l=e.shallowRef(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{l.value=!0},r),l}();return e.computed(()=>(o.value,!!t()))}function el(t,o={}){const{controls:l=!1,navigator:r=Va}=o,n=xa(()=>r&&"permissions"in r),i=e.shallowRef(),c=typeof t=="string"?{name:t}:t,s=e.shallowRef(),m=()=>{var p,f;s.value=(f=(p=i.value)==null?void 0:p.state)!=null?f:"prompt"};wa(i,"change",m,{passive:!0});const d=function(p){let f;function g(){return f||(f=p()),f}return g.reset=async()=>{const h=f;f=void 0,h&&await h},g}(async()=>{if(n.value){if(!i.value)try{i.value=await r.permissions.query(c)}catch{i.value=void 0}finally{m()}return l?e.toRaw(i.value):void 0}});return d(),l?{state:s,isSupported:n,query:d}:s}function ec(t={}){const{navigator:o=Va,read:l=!1,source:r,copiedDuring:n=1500,legacy:i=!1}=t,c=xa(()=>o&&"clipboard"in o),s=el("clipboard-read"),m=el("clipboard-write"),d=e.computed(()=>c.value||i),p=e.shallowRef(""),f=e.shallowRef(!1),g=function(v,u,y={}){const{immediate:b=!0,immediateCallback:V=!1}=y,w=e.shallowRef(!1);let S=null;function D(){S&&(clearTimeout(S),S=null)}function z(){w.value=!1,D()}function L(...P){V&&v(),D(),w.value=!0,S=setTimeout(()=>{w.value=!1,S=null,v(...P)},e.toValue(u))}return b&&(w.value=!0,Wo&&L()),ba(z),{isPending:e.readonly(w),start:L,stop:z}}(()=>f.value=!1,n,{immediate:!1});function h(v){return v==="granted"||v==="prompt"}return d.value&&l&&wa(["copy","cut"],async function(){let v=!(c.value&&h(s.value));if(!v)try{p.value=await o.clipboard.readText()}catch{v=!0}var u,y,b;v&&(p.value=(b=(y=(u=document==null?void 0:document.getSelection)==null?void 0:u.call(document))==null?void 0:y.toString())!=null?b:"")},{passive:!0}),{isSupported:d,text:p,copied:f,copy:async function(v=e.toValue(r)){if(d.value&&v!=null){let u=!(c.value&&h(m.value));if(!u)try{await o.clipboard.writeText(v)}catch{u=!0}u&&function(y){const b=document.createElement("textarea");b.value=y??"",b.style.position="absolute",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}(v),p.value=v,f.value=!0,g.start()}}}}const tc={class:"comment-list-actbox__right"},oc={class:"operation-warp"},lc={class:"dialog-footer"},ac={__name:"comment-operate",props:{data:{type:[Object],default:()=>({})}},setup(t){const{copy:o}=ec(),l=e.ref(!1),r=e.ref({report_type:"",report_content:""}),n=t;function i(){let c=n.data||{};l.value=!1,k.ElMessage({type:"info",message:"举报成功: "+c.id})}return(c,s)=>{const m=e.resolveComponent("el-dropdown-item"),d=e.resolveComponent("el-dropdown-menu"),p=e.resolveComponent("el-dropdown"),f=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-form-item"),v=e.resolveComponent("el-input"),u=e.resolveComponent("el-form"),y=e.resolveComponent("el-button"),b=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",tc,[e.createVNode(p,{trigger:"click",onCommand:s[0]||(s[0]=V=>function(w){let S=n.data||{};switch(w){case"remove":setTimeout(()=>{var D;(D=commentRef.value)==null||D.remove(S)},200);break;case"report":l.value=!0;break;case"copy":o(S.content),k.ElMessage({type:"info",message:"复制成功"})}}(V))},{dropdown:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(m,{command:"report"},{default:e.withCtx(()=>s[5]||(s[5]=[e.createTextVNode("举报")])),_:1}),e.createVNode(m,{command:"remove"},{default:e.withCtx(()=>s[6]||(s[6]=[e.createTextVNode("删除")])),_:1}),e.createVNode(m,{divided:"",command:"copy"},{default:e.withCtx(()=>s[7]||(s[7]=[e.createTextVNode("复制")])),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",oc,[e.createVNode(e.unref(br))])]),_:1}),e.createVNode(b,{title:"举报",modelValue:l.value,"onUpdate:modelValue":s[4]||(s[4]=V=>l.value=V),width:"400px",style:{width:"90%","max-width":"400px"}},{footer:e.withCtx(()=>[e.createElementVNode("span",lc,[e.createVNode(y,{onClick:s[3]||(s[3]=V=>l.value=!1)},{default:e.withCtx(()=>s[13]||(s[13]=[e.createTextVNode("取消")])),_:1}),e.createVNode(y,{type:"primary",onClick:i},{default:e.withCtx(()=>s[14]||(s[14]=[e.createTextVNode("提交")])),_:1})])]),default:e.withCtx(()=>[e.createVNode(u,{"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(h,{label:"您为什么要举报此信息?"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:r.value.report_type,"onUpdate:modelValue":s[1]||(s[1]=V=>r.value.report_type=V)},{default:e.withCtx(()=>[e.createVNode(f,{value:"色情淫秽"},{default:e.withCtx(()=>s[8]||(s[8]=[e.createTextVNode("色情淫秽")])),_:1}),e.createVNode(f,{value:"骚扰谩骂"},{default:e.withCtx(()=>s[9]||(s[9]=[e.createTextVNode("骚扰谩骂")])),_:1}),e.createVNode(f,{value:"广告欺诈"},{default:e.withCtx(()=>s[10]||(s[10]=[e.createTextVNode("广告欺诈")])),_:1}),e.createVNode(f,{value:"反动"},{default:e.withCtx(()=>s[11]||(s[11]=[e.createTextVNode("反动")])),_:1}),e.createVNode(f,{value:"其他"},{default:e.withCtx(()=>s[12]||(s[12]=[e.createTextVNode("其他")])),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"举报说明(可选):"},{default:e.withCtx(()=>[e.createVNode(v,{type:"textarea",modelValue:r.value.report_content,"onUpdate:modelValue":s[2]||(s[2]=V=>r.value.report_content=V),maxlength:"200",placeholder:"描述恶意行为",rows:"3"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},nc={class:"comment-sub"},ic=["href"],rc={class:"comment-primary"},cc={class:"comment-main"},sc={key:1,class:"user-info"},dc=["href"],mc={class:"username"},pc={class:"name",style:{"max-width":"10em"}},uc={blank:"true",class:"rank"},hc=["innerHTML"],gc={class:"address",style:{color:"#939393","font-size":"12px"}},fc={class:"time"},Cc={class:"content"},vc=["innerHTML"],kc={class:"imgbox",style:{display:"flex"}},yc={class:"comment-list-actbox select-none"},bc={class:"comment-list-actbox__left"},Vc={key:2},wc={class:"comment-list-actbox__right"},xc={key:2},Bc={__name:"content-box",props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:""}},setup(t){const o=t,l=e.reactive({active:!1}),r=e.ref(),n=e.ref(),i=e.computed(()=>{let y=o.data.contentImg;return te(y)?[]:y==null?void 0:y.split("||")}),{allEmoji:c}=e.inject("InjectionEmojiApi"),{like:s,user:m,relativeTime:d}=e.inject("InjectContentBox");function p(){l.active=!l.active,l.active&&e.nextTick(()=>{var y;(y=r.value)==null||y.focus()})}function f(y){var V;const b=y.target;(V=n.value)!=null&&V.contains(b)||(l.active=!1)}const g=e.inject("InjectSlots"),h=()=>e.h("div",g.info(o.data)),v=e.computed(()=>((y,b)=>(b=b.replace(/\[.+?\]/g,V=>{const w=y[V];return w?['<img src="',w,'" width="20" height="20" alt="',V,'" title="',V,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):V}),b))(c,o.data.content)),u=y=>{switch(y){case 1:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="831"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#8CDBF4" p-id="832"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="833"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m950.857143-365.714285l73.142857-73.142858v146.285715h-73.142857z m73.142857-73.142858h146.285715v146.285715h-146.285715z m0 146.285715h146.285715v438.857143h-146.285715z" fill="#FFFFFF"></path></svg>';case 2:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="765"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#6ECEFF" p-id="766"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="767"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v146.285714h-146.285714z m-219.428572 292.571428V512h146.285714v146.285714z" fill="#FFFFFF" p-id="768"></path><path d="M1097.142857 585.142857V438.857143h365.714286v146.285714z m0 73.142857h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 3:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="799"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#599DFF" p-id="800"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="801"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v73.142857h-146.285714z m0 219.428571h146.285714v73.142857h-146.285714z m-146.285715-146.285714h292.571429v146.285714h-292.571429z m-73.142857 219.428571h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 4:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="815"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#34D19B" p-id="816"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="817"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m975.213715-365.714285L1243.428571 219.428571v219.428572h-146.285714zM1097.142857 438.857143h146.285714v292.571428h-146.285714z m146.285714 146.285714h73.142858v146.285714h-73.142858z m0-365.714286h73.142858v146.285715h-73.142858z m73.142858 0h146.285714v585.142858h-146.285714z" fill="#FFFFFF"></path></svg>';case 5:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="782"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#FFA000" p-id="783"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="784"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-73.142857h146.285714v219.428572h-146.285714z m-219.428572-365.714286h365.714286v146.285715h-365.714286z m0 438.857143h219.428572v146.285715h-219.428572z m73.142857-219.428571h219.428572v146.285714h-219.428572z" fill="#FFFFFF" p-id="785"></path><path d="M1316.571429 438.857143h146.285714v146.285714h-146.285714z m-219.428572-73.142857h146.285714v219.428571h-146.285714z" fill="#FFFFFF"></path></svg>';case 6:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="748"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#F36262" p-id="749"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="750"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-146.285714h146.285714v292.571429h-146.285714z m-73.142858-292.571429h146.285715v146.285715h-146.285715z m-146.285714 146.285715h146.285714v438.857143h-146.285714z" fill="#FFFFFF" p-id="751"></path><path d="M1243.428571 438.857143h219.428572v146.285714h-219.428572z m-48.786285-170.642286L1243.428571 219.428571v146.285715h-146.285714zM1243.428571 658.285714h146.285715v146.285715h-146.285715z" fill="#FFFFFF"></path></svg>';default:return""}};return(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["comment",{reply:o.reply}])},[e.createElementVNode("div",nc,[e.createVNode(Xo,{uid:e.unref(Y)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createVNode(e.unref(k.ElAvatar),{style:{"margin-top":"5px"},size:40,fit:"cover",src:t.data.user.avatar},{default:e.withCtx(()=>b[2]||(b[2]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])),_:1},8,["src"])],8,ic)]),_:1},8,["uid"])]),e.createElementVNode("div",rc,[e.createElementVNode("div",cc,[e.unref(g).info?(e.openBlock(),e.createBlock(h,{key:0})):(e.openBlock(),e.createElementBlock("div",sc,[e.createVNode(Xo,{uid:e.unref(Y)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createElementVNode("div",mc,[e.createElementVNode("span",pc,e.toDisplayString(t.data.user.username),1),e.createElementVNode("span",uc,[e.createElementVNode("i",{class:"comment-common-icon",style:{"font-size":"24px"},innerHTML:u(t.data.user.level)},null,8,hc)])])],8,dc)]),_:1},8,["uid"]),e.createElementVNode("span",gc," "+e.toDisplayString(t.data.address),1),e.createElementVNode("time",fc,e.toDisplayString(e.unref(d)?e.unref(mr)(t.data.createTime):t.data.createTime),1)])),e.createElementVNode("div",Cc,[e.createVNode(Zr,{unfold:""},{default:e.withCtx(()=>[e.createElementVNode("div",{innerHTML:v.value},null,8,vc),e.createElementVNode("div",kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(V,w)=>(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:w,src:V,style:{height:"72px",padding:"8px 4px"},lazy:"","preview-src-list":i.value,"initial-index":w},null,8,["src","preview-src-list","initial-index"]))),128))])]),_:1})]),e.createElementVNode("div",yc,[e.createElementVNode("div",bc,[e.createElementVNode("div",{"data-tip":"点赞",class:"item",onClick:b[0]||(b[0]=V=>e.unref(s)(e.unref(Y)(t.data.id)))},[e.unref(m).likeIds.map(String).indexOf(e.unref(Y)(t.data.id))==-1?(e.openBlock(),e.createBlock(e.unref(Br),{key:0})):(e.openBlock(),e.createBlock(e.unref(wr),{key:1})),t.data.likes!=0?(e.openBlock(),e.createElementBlock("span",Vc,e.toDisplayString(t.data.likes),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{"data-tip":"回复",ref_key:"btnRef",ref:n,class:e.normalizeClass(["item",{active:l.active}]),onClick:p},[e.createVNode(e.unref(Ir)),e.createElementVNode("span",null,e.toDisplayString(l.active?"取消回复":"回复"),1)],2)]),e.createElementVNode("div",wc,[e.renderSlot(y.$slots,"operate",{},()=>[e.createVNode(ac,{data:o.data},null,8,["data"])],!0)])]),l.active?(e.openBlock(),e.createElementBlock("div",xc,[e.createVNode(ya,{ref_key:"commentRef",ref:r,"parent-id":e.unref(Y)(t.id),placeholder:`回复 @${t.data.user.username}...`,reply:t.data,"content-btn":"发布",style:{"margin-top":"12px"},onHide:f,onClose:b[1]||(b[1]=V=>l.active=!1)},null,8,["parent-id","placeholder","reply"])])):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"default",{},void 0,!0)])],2))}},Ba=C(Bc,[["__scopeId","data-v-d0b5b3d2"]]),Nc={key:0,class:"reply-box"},Sc={class:"reply-list"},Ec={key:0,class:"fetch-more"},Dc={key:0},Tc={key:1},Ic={key:0},Lc={key:1,class:"fetch-more"},Fc={__name:"reply-box",props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:""}},setup(t){const o=t,l=e.reactive({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:r,replyShowSize:n,comments:i,page:c}=e.inject("InjectReplyBox"),s=e.computed(()=>{let g={total:0,length:0,list:[]};if(o.data){let h=o.data.list.length;g={total:o.data.total,length:h,list:o.data.list}}if(!l.over){let h=g.list.slice(0,n);g.list=h}return c&&(g.list=g.list.slice(0,5)),g}),m=()=>{l.over=!0},d=g=>{i.value.forEach(h=>{h.id==o.id&&h.reply&&(h.reply=g)})},p=g=>{l.pageNum=g,r(o.id,g,l.pageSize,h=>d(h))},f=g=>{l.pageSize=g,r(o.id,l.pageNum,g,h=>d(h))};return(g,h)=>s.value.length>0?(e.openBlock(),e.createElementBlock("div",Nc,[e.createElementVNode("div",Sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value.list,(v,u)=>(e.openBlock(),e.createBlock(Ba,{id:t.id,key:u,data:v,reply:""},null,8,["id","data"]))),128)),s.value.length>e.unref(n)?(e.openBlock(),e.createElementBlock("div",Ec,[l.loading?(e.openBlock(),e.createElementBlock("span",Dc,"加载中...")):(e.openBlock(),e.createElementBlock("div",Tc,[l.over?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ic,[e.createTextVNode(" 共"+e.toDisplayString(s.value.total)+"条回复, ",1),e.createElementVNode("span",{class:"fetch-more-comment select-none",onClick:m},[h[0]||(h[0]=e.createTextVNode(" 点击查看 ")),e.createVNode(e.unref(Sr))])]))]))])):e.createCommentVNode("",!0),l.over&&e.unref(c)?(e.openBlock(),e.createElementBlock("div",Lc,[e.createVNode(e.unref(k.ElPagination),{small:"","hide-on-single-page":"",layout:"total, prev, pager, next",total:s.value.total,"page-size":l.pageSize,onCurrentChange:p,onSizeChange:f},null,8,["total","page-size"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}},_c=C(Fc,[["__scopeId","data-v-1726e7d1"]]),$c={key:0,class:"comment-list"},zc={__name:"comment-list",props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup:t=>(o,l)=>t.data?(e.openBlock(),e.createElementBlock("div",$c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(r,n)=>(e.openBlock(),e.createBlock(Ba,{id:e.unref(Y)(r.id),key:n,data:r},{default:e.withCtx(()=>[e.createVNode(_c,{id:e.unref(Y)(r.id),data:r.reply},null,8,["id","data"])]),_:2},1032,["id","data"]))),128))])):e.createCommentVNode("",!0)},Pc={class:"cv-comment-base"},jc={class:"cv-comment-form"},Oc={class:"cv-comment-form__content"},Mc={class:"cv-comment-form__avatar"},Ac={class:"cv-comment-list-wrapper"},jt=Object.assign({name:"cvCommentBase"},{__name:"comment",props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:["submit","like","replyPage","showInfo","focus"],setup(t,{expose:o,emit:l}){const r=t,{user:n,comments:i,showSize:c,replyShowSize:s,total:m}=e.toRefs(r.config),d=l,p={upload:r.upload,submit:({content:g,parentId:h,reply:v,files:u,clear:y})=>{d("submit",{content:g,parentId:h,reply:v,files:u,finish:b=>{if(y(),h){let V=i.value.find(w=>w.id==h);if(V){let w=V.reply;w?(w.list.unshift(b),w.total++):V.reply={total:1,list:[b]}}}else i.value.unshift(b)}})},focus:()=>d("focus")};e.provide("InjectInputBox",p);const f=(g,h)=>{let v=null;i.value.forEach(u=>{var y;v=u.id==g?u:(y=u.reply)==null?void 0:y.list.find(b=>b.id==g),v&&(v.likes+=h)})};return e.provide("InjectContentBox",{user:n,like:g=>{const h=r.config.user.likeIds;d("like",g,()=>{if(h.findIndex(v=>v==g)==-1)h.push(g),f(g,1);else{let v=h.findIndex(u=>u==g);v!=-1&&(h.splice(v,1),f(g,-1))}})},relativeTime:le(r.relativeTime,!1),showInfo:(g,h)=>d("showInfo",g,h)}),e.provide("InjectReplyBox",{page:r.page,replyPage:(g,h,v,u)=>{d("replyPage",{parentId:g,pageNum:h,pageSize:v,finish:u})},replyShowSize:le(s,3),comments:i}),e.provide("InjectionEmojiApi",r.config.emoji),e.provide("InjectSlots",e.useSlots()),o({remove:g=>{const{parentId:h,id:v}=g;if(h){let u=i.value.find(b=>b.id==h),y=u==null?void 0:u.reply;if(y){let b=y.list.findIndex(V=>V.id==v);b!=-1&&(y.list.splice(b,1),y.total--)}}else{let u=i.value.findIndex(y=>y.id==v);u!=-1&&i.value.splice(u,1)}}}),(g,h)=>{const v=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock("div",Pc,[e.createElementVNode("div",jc,[h[1]||(h[1]=e.createElementVNode("div",{class:"cv-comment-form__header"},[e.createElementVNode("span",{class:"cv-comment-form__hdtitle"},"评论")],-1)),e.createElementVNode("div",Oc,[e.createElementVNode("div",Mc,[e.createVNode(v,{size:40,src:t.config.user.avatar},{default:e.withCtx(()=>h[0]||(h[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])),_:1},8,["src"])]),e.createVNode(ya,{placeholder:"输入评论(Enter换行,Ctrl + Enter发送)","content-btn":"发表评论"})])]),e.renderSlot(g.$slots,"default",{},()=>[h[2]||(h[2]=e.createElementVNode("div",{class:"title"},"全部评论",-1))]),e.createElementVNode("div",Ac,[e.createVNode(zc,{data:e.unref(i),total:e.unref(m),"show-size":e.unref(le)(e.unref(c),5)},null,8,["data","total","show-size"])])])}}}),Rc={class:"comment-scroll"},Hc=["infinite-scroll-disabled"],Uc={class:"scroll-btn"},Wc={key:1},qc={key:2},Ot=Object.assign({name:"cvCommentScroll"},{__name:"comment-scroll",props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:["more"],setup(t,{emit:o}){const l=t,r=e.ref(!1),n=e.ref(!1),i=o,c=e.computed(()=>n.value&&l.disable),s=e.computed(()=>!n.value||r.value||c.value),m=((p,f=200,g=!1)=>{let h=!1,v=null;const u=(...y)=>new Promise((b,V)=>{if(v&&clearTimeout(v),g&&!h){const w=p.apply(void 0,y);b(w),h=!0}else v=setTimeout(()=>{const w=p.apply(void 0,y);b(w),h=!1,v=null},f)});return u.cancel=()=>{v&&clearTimeout(v),h=!1},u})(()=>{i("more"),r.value=!1},500),d=()=>{r.value=!0,m()};return(p,f)=>{const g=e.resolveComponent("el-link"),h=e.resolveDirective("infinite-scroll");return e.openBlock(),e.createElementBlock("div",Rc,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{"infinite-scroll-disabled":s.value,"infinite-scroll-distance":"2"},[e.renderSlot(p.$slots,"default"),e.createElementVNode("div",Uc,[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:0,type:"primary",underline:!1,onClick:f[0]||(f[0]=v=>n.value=!n.value)},{default:e.withCtx(()=>f[1]||(f[1]=[e.createTextVNode("加载更多")])),_:1})),r.value?(e.openBlock(),e.createElementBlock("p",Wc,"加载中...")):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("p",qc,"没有更多了")):e.createCommentVNode("",!0)])],8,Hc)),[[h,d]])])}}}),Gc={class:"cv-comment-nav-wrap"},Kc={class:"cv-comment-nav__sort"},Mt=Object.assign({name:"cvCommentNav"},{__name:"comment-nav",props:{modelValue:!1},emits:["update:modelValue","sorted"],setup(t,{emit:o}){const l=t,r=o,n=e.computed({get:()=>l.modelValue,set(i){r("update:modelValue",i),r("sorted",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Gc,[c[4]||(c[4]=e.createElementVNode("span",{class:"cv-comment-nav__title"},"全部评论",-1)),e.createElementVNode("div",Kc,[e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:n.value}]),onClick:c[0]||(c[0]=s=>n.value=!0)},[e.createVNode(e.unref(Dr)),c[2]||(c[2]=e.createTextVNode(" 最新 "))],2),e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:!n.value}]),onClick:c[1]||(c[1]=s=>n.value=!1)},[e.createVNode(e.unref(Cr)),c[3]||(c[3]=e.createTextVNode(" 最热 "))],2)])]))}});jt.install=function(t){t.component(jt.name,jt)},Ot.install=function(t){t.component(Ot.name,Ot)},Mt.install=function(t){t.component(Mt.name,Mt)};const Qc={name:"cvSvgs",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data:()=>({}),computed:{svgType(){return"svg"+this.type},style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},Zc={key:0,"aria-hidden":"true"},Yc=["xlink:href"],At=C(Qc,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.svgType)))]),l.name?(e.openBlock(),e.createElementBlock("svg",Zc,[e.createElementVNode("use",{"xlink:href":l.name},null,8,Yc)])):e.createCommentVNode("",!0)]),_:3},16)}]]),Jc={name:"cvIcons",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data:()=>({}),computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},Xc={key:0,"aria-hidden":"true"},es=["xlink:href"],Rt=C(Jc,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.type)))]),l.name?(e.openBlock(),e.createElementBlock("svg",Xc,[e.createElementVNode("use",{"xlink:href":l.name},null,8,es)])):e.createCommentVNode("",!0)]),_:3},16)}]]);Rt.install=function(t){t.component(Rt.name,Rt)},At.install=function(t){t.component(At.name,At)};const ts={class:"u-emoji"},os={class:"face-tooltip-head select-none"},ls=["onClick"],as=["src"],ns={class:"emoji-body select-none"},is={style:{padding:"0 5px"}},rs=["onClick"],cs={class:"emoji-btn select-none"},ss={key:0},ds=C(Object.assign({name:"cvEmoji"},{__name:"emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const l=t,r=e.ref(0),n=e.ref(0),i=e.ref(new Array(2)),{emojiList:c,faceList:s}=l.emoji;function m(){i.value[0]=c[0]}return(d,p)=>(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:m},{reference:e.withCtx(()=>[e.createElementVNode("div",cs,[d.$slots.default?e.renderSlot(d.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",ss,p[0]||(p[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"})],-1),e.createElementVNode("span",null,"表情",-1)])))])]),default:e.withCtx(()=>[e.createElementVNode("div",os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(f,g)=>(e.openBlock(),e.createElementBlock("label",{key:g,class:e.normalizeClass(r.value==g?"active":""),onClick:h=>function(v){switch(r.value=v,v){case 0:n.value=0;break;case 1:n.value=-50,i.value[1]=c[1]}}(g)},[e.createElementVNode("img",{src:f,alt:""},null,8,as)],10,ls))),128))]),e.createElementVNode("div",ns,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${n.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,(h,v)=>(e.openBlock(),e.createElementBlock("span",{key:v,class:"emoji-item",onClick:u=>d.$emit("addEmoji",v)},[e.createVNode(e.unref(k.ElImage),{src:h,title:String(v),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,rs))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-da53b6ed"]]),ms={class:"cv-chat-message"},ps={class:"chat-list"},us={class:"content"},hs={key:0,class:"username"},gs=["innerHTML"],fs={__name:"message",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(t,{expose:o}){const{allEmoji:l}=e.inject("InjectionEmojiApi"),r=e.ref();o({scroll:()=>{e.nextTick(()=>{const i=document.querySelector(".chat-item:last-child");r.value.setScrollTop(i.offsetTop)})}});const n=(i,c)=>(c=c.replace(/\[.+?\]/g,s=>{const m=i[s];return m?['<img src="',m,'" width="20" height="20" alt="',s,'" title="',s,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):s}),c);return(i,c)=>(e.openBlock(),e.createElementBlock("div",ms,[e.createVNode(e.unref(k.ElScrollbar),{ref_key:"scrollbarRef",ref:r},{default:e.withCtx(()=>[e.createElementVNode("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(s,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass([{self:t.userId==s.id},"chat-item"])},[e.createElementVNode("div",null,[e.createVNode(e.unref(k.ElAvatar),null,{default:e.withCtx(()=>c[0]||(c[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])),_:1})]),e.createElementVNode("div",us,[t.userId!=s.id?(e.openBlock(),e.createElementBlock("div",hs,e.toDisplayString(s.username),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"card-box",innerHTML:n(e.unref(l),s.content)},null,8,gs)]),c[1]||(c[1]=e.createElementVNode("div",{class:"date"},null,-1))],2))),128))])]),_:1},512)]))}},Cs={class:"cv-chat-wrap"},vs={class:"header"},ks={id:"chat-footer",class:"footer"},Ht=Object.assign({name:"cvChat"},{__name:"chat",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:["submit"],setup(t,{emit:o}){const l=t,r=e.ref(!1),n=e.ref(""),i=e.ref(),{data:c}=l,s=o,m=g=>{const{ctrlKey:h,key:v}=g;h&&v=="Enter"&&p()},d=()=>{n.value="",i.value.scroll()},p=()=>{let g=n.value;g.trim()?(g=g.replace(/\n/g,"<br/>"),s("submit",{clear:d,content:g})):k.ElMessage({type:"error",message:"内容不能为空"})},f=g=>{let h=document.getElementById("emojiInput"),v=h.selectionStart,u=h.selectionEnd,y=h.value;if(v===null||u===null)return;let b=y.substring(0,v)+g+y.substring(u);h.value=b,h.focus(),h.selectionStart=v+g.length,h.selectionEnd=v+g.length,n.value=b};return e.provide("InjectionEmojiApi",l.emoji),(g,h)=>{const v=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",Cs,[e.createElementVNode("div",{class:e.normalizeClass([{active:r.value},"chat-container translate"])},[e.createElementVNode("div",vs,[e.createVNode(v,{size:"32"},{default:e.withCtx(()=>h[2]||(h[2]=[e.createElementVNode("svg",{viewBox:"0 0 1318 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1318.502489 432.779052c0-231.790522-209.29842-419.704826-467.458992-419.704826s-467.56979 188.357498-467.56979 419.704826 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319412-19.168145L1165.822116 742.350141C1259.336074 665.56676 1318.502489 555.433023 1318.502489 432.779052z",fill:"#612273","p-id":"10993"}),e.createElementVNode("path",{d:"M1034.304263 745.784895a509.673231 509.673231 0 0 1-183.482363 33.239559c-244.532352 0-445.077689-168.524562-465.353819-383.25211-1.107985 12.07704-1.883575 24.264878-1.883575 36.563514 0 231.790522 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319411-19.168145 25.262064 25.262064 0 0 0-7.5343-17.284571zM1165.822116 669.223112l2.769964 70.689461C1260.44406 663.239991 1318.502489 553.992642 1318.502489 432.779052a366.632331 366.632331 0 0 0-1.883575-36.785111 403.971435 403.971435 0 0 1-150.796798 273.229171z",fill:"#612273",opacity:".2","p-id":"10994"}),e.createElementVNode("path",{d:"M383.25211 432.779052a383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978C173.510496 258.160571 0 413.943302 0 606.178749c0 101.713049 48.97295 193.011037 126.421121 256.609392l-5.761524 148.470028a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696c-177.831638-59.388011-304.91755-212.733175-304.91755-393.113179z",fill:"#EB3D72","p-id":"10995"}),e.createElementVNode("path",{d:"M342.256654 391.672798c0 117.557239 53.958883 223.59143 140.714132 299.71002a391.008007 391.008007 0 0 1-99.718676-258.603766 383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978-7.091106 0-14.071413 0-21.05172 0.553993a375.939407 375.939407 0 0 0-24.375677 132.958234zM630.111231 802.181346a407.627786 407.627786 0 0 1-283.533434 110.798528 424.136767 424.136767 0 0 1-152.12638-27.699632l-71.686647 71.686648-2.105173 54.291279a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696 486.294741 486.294741 0 0 1-58.058429-23.710885zM85.425665 821.792686l-5.761523-4.985934c1.883575 2.215971 3.656351 4.431941 5.650725 6.647911z",fill:"#EB3D72",opacity:".5","p-id":"10996"}),e.createElementVNode("path",{d:"M833.426531 332.395585c64.263147-10.193465 64.041549-66.479117 62.601169-75.342999s-15.400995-54.291279-59.942004-47.200173S799.078987 254.836615 799.078987 254.836615a28.475222 28.475222 0 1 0 56.174854-8.97468s6.315516 3.323956 8.30989 20.27613-11.966241 29.029214-35.455529 33.239559-88.638823-19.943735-104.039819-115.452067C709.110582 96.39472 781.57282 28.253625 838.966457 13.185025a55.399264 55.399264 0 0 0-64.041549-5.318329c-56.064055 35.123134-97.170309 109.579745-85.536464 182.817571 14.957801 93.846354 79.664142 151.904783 144.038087 141.711318zM203.980091 573.825579a53.072495 53.072495 0 0 0 33.90435-67.919498c-2.659165-6.537113-21.162519-38.225492-53.51569-25.040467a30.026401 30.026401 0 0 0-19.832936 40.773858 22.159706 22.159706 0 1 0 40.773858-16.619779s5.318329 1.329582 9.861069 13.739017-3.988747 24.043281-21.05172 31.023588-70.02467 0.553993-98.832288-68.695087C68.916685 417.599654 110.798528 353.558104 151.904783 332.395585a42.879031 42.879031 0 0 0-48.97295 7.423502 146.918849 146.918849 0 0 0-32.574767 152.458775c27.810431 68.141095 86.866046 100.605064 133.623025 81.547717z",fill:"#FED150","p-id":"10997"})],-1)])),_:1}),h[3]||(h[3]=e.createElementVNode("div",{style:{"margin-left":"12px"}},[e.createElementVNode("div",null,"聊天室"),e.createElementVNode("div",{style:{"font-size":"12px"}},"当前2人在线")],-1))]),e.createVNode(fs,{ref_key:"messageRef",ref:i,data:e.unref(c),"user-id":t.userId},null,8,["data","user-id"]),e.createElementVNode("div",ks,[e.createVNode(e.unref(k.ElInput),{id:"emojiInput",modelValue:n.value,"onUpdate:modelValue":h[0]||(h[0]=u=>n.value=u),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"请输入内容",onKeydown:e.withKeys(m,["enter"])},null,8,["modelValue"]),e.createVNode(ds,{style:{margin:"0 8px 0"},emoji:t.emoji,placement:"top-end",onAddEmoji:f},{default:e.withCtx(()=>h[4]||(h[4]=[e.createElementVNode("svg",{width:"22",height:"22",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7186"},[e.createElementVNode("path",{d:"M510.944 960c-247.04 0-448-200.96-448-448s200.992-448 448-448c247.008 0 448 200.96 448 448S757.984 960 510.944 960zM510.944 128c-211.744 0-384 172.256-384 384 0 211.744 172.256 384 384 384 211.744 0 384-172.256 384-384C894.944 300.256 722.688 128 510.944 128zM512 773.344c-89.184 0-171.904-40.32-226.912-110.624-10.88-13.92-8.448-34.016 5.472-44.896 13.888-10.912 34.016-8.48 44.928 5.472 42.784 54.688 107.136 86.048 176.512 86.048 70.112 0 134.88-31.904 177.664-87.552 10.784-14.016 30.848-16.672 44.864-5.888 14.016 10.784 16.672 30.88 5.888 44.864C685.408 732.32 602.144 773.344 512 773.344zM368 515.2c-26.528 0-48-21.472-48-48l0-64c0-26.528 21.472-48 48-48s48 21.472 48 48l0 64C416 493.696 394.496 515.2 368 515.2zM656 515.2c-26.496 0-48-21.472-48-48l0-64c0-26.528 21.504-48 48-48s48 21.472 48 48l0 64C704 493.696 682.496 515.2 656 515.2z","p-id":"7187"})],-1)])),_:1},8,["emoji"]),e.createVNode(v,{size:"18",class:e.normalizeClass([{".cv-chat-wrap submit-btn":n.value.trim()!=""},"select-none cursor-pointer"]),style:{"padding-bottom":"5px"},onClick:p},{default:e.withCtx(()=>h[5]||(h[5]=[e.createElementVNode("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15072"},[e.createElementVNode("path",{d:"M1008.00076 6.285714q18.857143 13.714286 15.428571 36.571429l-146.285714 877.714286q-2.857143 16.571429-18.285714 25.714286-8 4.571429-17.714286 4.571429-6.285714 0-13.714286-2.857143l-258.857143-105.714286-138.285714 168.571429q-10.285714 13.142857-28 13.142857-7.428571 0-12.571429-2.285714-10.857143-4-17.428571-13.428571t-6.571429-20.857143l0-199.428571 493.714286-605.142857-610.857143 528.571429-225.714286-92.571429q-21.142857-8-22.857143-31.428571-1.142857-22.857143 18.285714-33.714286l950.857143-548.571429q8.571429-5.142857 18.285714-5.142857 11.428571 0 20.571429 6.285714z","p-id":"15073"})],-1)])),_:1},8,["class"])])],2),e.createVNode(e.unref(k.ElButton),{class:"chat-btn",onClick:h[1]||(h[1]=u=>r.value=!r.value)},{default:e.withCtx(()=>h[6]||(h[6]=[e.createTextVNode("chat")])),_:1})])}}});Ht.install=function(t){t.component(Ht.name,Ht)};const ys={key:0},bs=Object.assign({name:"cvNoticeBar"},{__name:"notice-bar",props:{data:{type:[String,Array],default:()=>[]},vertical:{type:[Boolean],default:!1},suffixIcon:{type:[String],default:""},prefixIcon:{type:[String],default:""},size:{type:[Number],default:14},height:{type:[Number],default:40},delay:{type:[Number],default:1e3},spped:{type:[Number],default:100},color:{type:[String],default:"--color-warning"},background:{type:[String],default:"var(--color-warning-light-9)"}},setup(t){const o=t,{data:l,vertical:r,suffixIcon:n,prefixIcon:i,size:c,height:s,delay:m,spped:d,color:p,background:f}=o,g=e.reactive({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),h=e.ref({}),v=e.ref({style:{cssText:""}}),u=e.computed(()=>o.delay>2e3?o.delay:2e3),y=()=>{g.oneTime=g.textWidth/o.spped,g.twoTime=(g.textWidth+g.boxWidth)/o.spped},b=()=>{g.order===1?(v.value.style.cssText=`animation: oneAnimation ${g.oneTime}s linear; opactity: 1;}`,g.order=2):v.value.style.cssText=`animation: twoAnimation ${g.twoTime}s linear infinite; opacity: 1;`};return e.onMounted(()=>{o.vertical||(e.nextTick(()=>{g.boxWidth=h.value.offsetWidth,g.textWidth=v.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${g.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${g.boxWidth}px;} 100% {left: -${g.textWidth}px;}}`),y(),setTimeout(()=>{b()},o.delay)}),v.value.addEventListener("animationend",()=>{b()},!1))}),(V,w)=>{const S=e.resolveComponent("el-carousel-item"),D=e.resolveComponent("el-carousel"),z=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",{class:"cv-notice-bar",style:e.normalizeStyle({background:e.unref(f),height:`${e.unref(s)}px`})},[e.unref(r)?(e.openBlock(),e.createElementBlock("div",ys,[e.createVNode(D,{height:"40px",direction:"vertical",autoplay:!0,"indicator-position":"none",interval:u.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),L=>(e.openBlock(),e.createBlock(S,{key:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1024))),128))]),_:1},8,["interval"])])):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle({color:e.unref(p),fontSize:`${e.unref(c)}px`}),class:"cv-notice-bar-wrap"},[e.unref(i)?(e.openBlock(),e.createBlock(z,{key:0,type:e.unref(i)},null,8,["type"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"boxRef",ref:h,class:"text-box"},[e.createElementVNode("div",{ref_key:"textRef",ref:v,class:"text"},e.toDisplayString(e.unref(l)),513)],512),e.unref(n)?(e.openBlock(),e.createBlock(z,{key:1,type:e.unref(n)},null,8,["type"])):e.createCommentVNode("",!0)],4))],4)}}}),Ut=C(bs,[["__scopeId","data-v-f231e77d"]]);Ut.install=function(t){t.component(Ut.name,Ut)};const Vs=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[qa.basicSetup]}),tl="change",ol="update",ll="focus",al="blur",nl="ready",il="update:modelValue",ws=({onUpdate:t,onChange:o,onFocus:l,onBlur:r,...n})=>_.EditorState.create({doc:n.doc,selection:n.selection,extensions:[...Array.isArray(n.extensions)?n.extensions:[n.extensions],E.EditorView.updateListener.of(i=>{t(i),i.docChanged&&o(i.state.doc.toString(),i),i.focusChanged&&(i.view.hasFocus?l(i):r(i))})]}),ee=t=>{const o=new _.Compartment;return{compartment:o,run:l=>{o.get(t.state)?t.dispatch({effects:o.reconfigure(l)}):t.dispatch({effects:_.StateEffect.appendConfig.of(o.of(l))})}}},rl=(t,o)=>{const{compartment:l,run:r}=ee(t);return n=>{const i=l.get(t.state);r(n??i!==o?o:[])}},xs=t=>{const o=()=>t.state.doc.toString(),{run:l}=ee(t),r=rl(t,[E.EditorView.editable.of(!1),_.EditorState.readOnly.of(!0)]),n=rl(t,E.keymap.of([Ga.indentWithTab])),{run:i}=ee(t),{run:c}=ee(t),{run:s}=ee(t),{run:m}=ee(t);return{focus:()=>t.focus(),getDoc:o,setDoc:d=>{d!==o()&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:d}})},reExtensions:l,toggleDisabled:r,toggleIndentWithTab:n,setTabSize:d=>{i([_.EditorState.tabSize.of(d),x.indentUnit.of(" ".repeat(d))])},setPhrases:d=>{c([_.EditorState.phrases.of(d)])},setPlaceholder:d=>{s(E.placeholder(d))},setStyle:(d={})=>{m(E.EditorView.theme({"&":{...d}}))}}},Bs=e.defineComponent({name:"VueCodemirror",props:{modelValue:{type:String,default:""},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indentWithTab:{type:Boolean,default:!1},tabSize:Number,placeholder:String,style:Object,autoDestroy:{type:Boolean,default:!1},phrases:Object,root:Object,extensions:Array,selection:Object},emits:{[tl]:(t,o)=>!0,[ol]:t=>!0,[ll]:t=>!0,[al]:t=>!0,[nl]:t=>!0,[il]:(t,o)=>!0},setup(t,o){const l=e.shallowRef(),r=e.shallowRef(),n=e.shallowRef(),i={...Vs},c=e.computed(()=>{const s={};return Object.keys(e.toRaw(t)).forEach(m=>{m!=="modelValue"&&(s[m]=t[m]??i[m])}),s});return e.onMounted(()=>{r.value=ws({doc:t.modelValue,selection:c.value.selection,extensions:i.extensions??[],onFocus:m=>o.emit(ll,m),onBlur:m=>o.emit(al,m),onUpdate:m=>o.emit(ol,m),onChange:(m,d)=>{m!==t.modelValue&&(o.emit(tl,m,d),o.emit(il,m,d))}}),n.value=new E.EditorView({state:r.value,parent:l.value,root:c.value.root}),n.value.contentDOM.addEventListener("scroll",m=>{});const s=xs(n.value);e.watch(()=>t.modelValue,m=>{m!==s.getDoc()&&s.setDoc(m)}),e.watch(()=>t.extensions,m=>s.reExtensions(m||[]),{immediate:!0}),e.watch(()=>c.value.disabled,m=>s.toggleDisabled(m),{immediate:!0}),e.watch(()=>c.value.indentWithTab,m=>s.toggleIndentWithTab(m),{immediate:!0}),e.watch(()=>c.value.tabSize,m=>s.setTabSize(m),{immediate:!0}),e.watch(()=>c.value.phrases,m=>s.setPhrases(m||{}),{immediate:!0}),e.watch(()=>c.value.placeholder,m=>s.setPlaceholder(m),{immediate:!0}),e.watch(()=>c.value.style,m=>s.setStyle(m),{immediate:!0}),c.value.autofocus&&s.focus(),o.emit(nl,{state:r.value,view:n.value,container:l.value,editorTools:s})}),e.onBeforeUnmount(()=>{c.value.autoDestroy&&n.value&&n.value.destroy()}),()=>e.h("div",{class:"cv-editor-codemirror",ref:l})}}),cl="#e06c75",Wt="#abb2bf",Ho="#7d8799",sl="#d19a66",dl="#2c313a",ml="#282c34",io="#353a42",pl="#528bff",Ns=E.EditorView.theme({"&":{color:Wt,backgroundColor:ml},".cm-content":{caretColor:pl},".cm-cursor, .cm-dropCursor":{borderLeftColor:pl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:Wt},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:ml,color:Ho,border:"none"},".cm-activeLineGutter":{backgroundColor:dl},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:io},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:io,borderBottomColor:io},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:dl,color:Wt}}},{dark:!0}),Ss=x.HighlightStyle.define([{tag:a.tags.keyword,color:"#c678dd"},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.propertyName,a.tags.macroName],color:cl},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:"#61afef"},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:sl},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Wt},{tag:[a.tags.typeName,a.tags.className,a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:"#e5c07b"},{tag:[a.tags.operator,a.tags.operatorKeyword,a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link,a.tags.special(a.tags.string)],color:"#56b6c2"},{tag:[a.tags.meta,a.tags.comment],color:Ho},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.strikethrough,textDecoration:"line-through"},{tag:a.tags.link,color:Ho,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:cl},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:sl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted],color:"#98c379"},{tag:a.tags.invalid,color:"#ffffff"}]),Es=[Ns,x.syntaxHighlighting(Ss)],Ds=!1,ro="#FAFAFA",j="#90A4AE",ie="#80CBC440",ul="#272727",co="#FAFAFA",hl="#00000010",Ts="#c2c2c222",Is="#CFD8DC",Ls="#7E939E",Fs="#FAFAFA",gl="#7C4DFF",so="#90A4AE",fl="#6182B8",_s="#91B859",$s="#F76D47",Cl="#8796B0",zs="#FFB62C",Ps="#F76D47",js="#90A4AE",Os="#91B859",Ms="#E53935",As="#39ADB5",Rs=E.EditorView.theme({"&":{color:j,backgroundColor:ro},".cm-content":{caretColor:ul},".cm-cursor, .cm-dropCursor":{borderLeftColor:ul},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ie},".cm-panels":{backgroundColor:co,color:j},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:co,outline:`1px solid ${hl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ie},".cm-activeLine":{backgroundColor:Ts},".cm-selectionMatch":{backgroundColor:ie},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Fs,outline:"none"},".cm-gutters":{backgroundColor:ro,color:j,border:"none"},".cm-activeLineGutter":{backgroundColor:ro},".cm-lineNumbers .cm-gutterElement":{color:Is},".cm-lineNumbers .cm-activeLineGutter":{color:Ls},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:j},".cm-tooltip":{border:`1px solid ${hl}`,backgroundColor:co,color:j},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:j,borderBottomColor:j},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ie,color:j}}},{dark:Ds}),Hs=x.HighlightStyle.define([{tag:a.tags.keyword,color:gl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:so},{tag:[a.tags.propertyName],color:fl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:_s},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:fl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:$s},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:so},{tag:[a.tags.className],color:zs},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Ps},{tag:[a.tags.typeName],color:Cl,fontStyle:Cl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:gl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:As},{tag:[a.tags.meta,a.tags.comment],color:js},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Os},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:so},{tag:a.tags.invalid,color:Ms},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Us=[Rs,x.syntaxHighlighting(Hs)],Ws=!0,mo="#263238",O="#EEFFFF",re="#80CBC420",vl="#FFCC00",po="#263238",kl="#FFFFFF10",qs="#4c616c22",Gs="#37474F",Ks="#607a86",Qs="#263238",yl="#C792EA",uo="#EEFFFF",bl="#82AAFF",Zs="#C3E88D",Ys="#F78C6C",Vl="#B2CCD6",Js="#FFCB6B",Xs="#F78C6C",ed="#546E7A",td="#C3E88D",od="#FF5370",ld="#89DDFF",ad=E.EditorView.theme({"&":{color:O,backgroundColor:mo},".cm-content":{caretColor:vl},".cm-cursor, .cm-dropCursor":{borderLeftColor:vl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:re},".cm-panels":{backgroundColor:po,color:O},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:po,outline:`1px solid ${kl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:re},".cm-activeLine":{backgroundColor:qs},".cm-selectionMatch":{backgroundColor:re},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Qs,outline:"none"},".cm-gutters":{backgroundColor:mo,color:O,border:"none"},".cm-activeLineGutter":{backgroundColor:mo},".cm-lineNumbers .cm-gutterElement":{color:Gs},".cm-lineNumbers .cm-activeLineGutter":{color:Ks},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:O},".cm-tooltip":{border:`1px solid ${kl}`,backgroundColor:po,color:O},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:O,borderBottomColor:O},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:re,color:O}}},{dark:Ws}),nd=x.HighlightStyle.define([{tag:a.tags.keyword,color:yl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:uo},{tag:[a.tags.propertyName],color:bl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Zs},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:bl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Ys},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:uo},{tag:[a.tags.className],color:Js},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Xs},{tag:[a.tags.typeName],color:Vl,fontStyle:Vl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:yl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:ld},{tag:[a.tags.meta,a.tags.comment],color:ed},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:td},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:uo},{tag:a.tags.invalid,color:od},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),id=[ad,x.syntaxHighlighting(nd)],rd=!1,ho="#FDF6E3",M="#586E75",ce="#EEE8D5",wl="#657B83",go="#FDF6E3",xl="#D3AF86",cd="#d5bd5c22",sd="#586E75",dd="#567983",md="#EEE8D5",Bl="#859900",fo="#268BD2",Nl="#268BD2",pd="#2AA198",ud="#CB4B16",Sl="#CB4B16",hd="#CB4B16",gd="#D33682",fd="#93A1A1",Cd="#268BD2",vd="#DC322F",kd="#DC322F",yd=E.EditorView.theme({"&":{color:M,backgroundColor:ho},".cm-content":{caretColor:wl},".cm-cursor, .cm-dropCursor":{borderLeftColor:wl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ce},".cm-panels":{backgroundColor:go,color:M},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:go,outline:`1px solid ${xl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ce},".cm-activeLine":{backgroundColor:cd},".cm-selectionMatch":{backgroundColor:ce},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:md,outline:"none"},".cm-gutters":{backgroundColor:ho,color:M,border:"none"},".cm-activeLineGutter":{backgroundColor:ho},".cm-lineNumbers .cm-gutterElement":{color:sd},".cm-lineNumbers .cm-activeLineGutter":{color:dd},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:M},".cm-tooltip":{border:`1px solid ${xl}`,backgroundColor:go,color:M},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:M,borderBottomColor:M},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ce,color:M}}},{dark:rd}),bd=x.HighlightStyle.define([{tag:a.tags.keyword,color:Bl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:fo},{tag:[a.tags.propertyName],color:Nl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:pd},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Nl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:ud},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:fo},{tag:[a.tags.className],color:hd},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:gd},{tag:[a.tags.typeName],color:Sl,fontStyle:Sl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Bl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:kd},{tag:[a.tags.meta,a.tags.comment],color:fd},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Cd},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:fo},{tag:a.tags.invalid,color:vd},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Vd=[yd,x.syntaxHighlighting(bd)],wd=!0,Co="#002B36",A="#93A1A1",se="#274642",El="#D30102",vo="#002B36",Dl="#2AA19899",xd="#005b7022",Bd="#93A1A1",Nd="#949494",Sd="#073642",Tl="#859900",ko="#268BD2",Il="#268BD2",Ed="#2AA198",Dd="#CB4B16",Ll="#CB4B16",Td="#CB4B16",Id="#D33682",Ld="#586E75",Fd="#268BD2",_d="#DC322F",$d="#DC322F",zd=E.EditorView.theme({"&":{color:A,backgroundColor:Co},".cm-content":{caretColor:El},".cm-cursor, .cm-dropCursor":{borderLeftColor:El},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:se},".cm-panels":{backgroundColor:vo,color:A},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:vo,outline:`1px solid ${Dl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:se},".cm-activeLine":{backgroundColor:xd},".cm-selectionMatch":{backgroundColor:se},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Sd,outline:"none"},".cm-gutters":{backgroundColor:Co,color:A,border:"none"},".cm-activeLineGutter":{backgroundColor:Co},".cm-lineNumbers .cm-gutterElement":{color:Bd},".cm-lineNumbers .cm-activeLineGutter":{color:Nd},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:A},".cm-tooltip":{border:`1px solid ${Dl}`,backgroundColor:vo,color:A},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A,borderBottomColor:A},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:se,color:A}}},{dark:wd}),Pd=x.HighlightStyle.define([{tag:a.tags.keyword,color:Tl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:ko},{tag:[a.tags.propertyName],color:Il},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Ed},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Il},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Dd},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:ko},{tag:[a.tags.className],color:Td},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Id},{tag:[a.tags.typeName],color:Ll,fontStyle:Ll},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Tl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:$d},{tag:[a.tags.meta,a.tags.comment],color:Ld},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Fd},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:ko},{tag:a.tags.invalid,color:_d},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),jd=[zd,x.syntaxHighlighting(Pd)],Od=!0,yo="#282A36",R="#F8F8F2",de="#44475A",Fl="#F8F8F2",bo="#282A36",_l="#191A21",Md="#53576c22",Ad="#6272A4",Rd="#F8F8F2",Hd="#44475A",$l="#FF79C6",Vo="#F8F8F2",zl="#50FA7B",Ud="#F1FA8C",Wd="#BD93F9",Pl="#8BE9FD",qd="#8BE9FD",Gd="#BD93F9",Kd="#6272A4",Qd="#BD93F9",Zd="#FF5555",Yd="#F1FA8C",Jd=E.EditorView.theme({"&":{color:R,backgroundColor:yo},".cm-content":{caretColor:Fl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Fl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:de},".cm-panels":{backgroundColor:bo,color:R},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:bo,outline:`1px solid ${_l}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:de},".cm-activeLine":{backgroundColor:Md},".cm-selectionMatch":{backgroundColor:de},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Hd,outline:"none"},".cm-gutters":{backgroundColor:yo,color:R,border:"none"},".cm-activeLineGutter":{backgroundColor:yo},".cm-lineNumbers .cm-gutterElement":{color:Ad},".cm-lineNumbers .cm-activeLineGutter":{color:Rd},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:R},".cm-tooltip":{border:`1px solid ${_l}`,backgroundColor:bo,color:R},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:R,borderBottomColor:R},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:de,color:R}}},{dark:Od}),Xd=x.HighlightStyle.define([{tag:a.tags.keyword,color:$l},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Vo},{tag:[a.tags.propertyName],color:zl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Ud},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:zl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Wd},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Vo},{tag:[a.tags.className],color:qd},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Gd},{tag:[a.tags.typeName],color:Pl,fontStyle:Pl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:$l},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Yd},{tag:[a.tags.meta,a.tags.comment],color:Kd},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Qd},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Vo},{tag:a.tags.invalid,color:Zd},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),em=[Jd,x.syntaxHighlighting(Xd)],tm=!1,wo="#fff",H="#444d56",me="#0366d625",jl="#044289",xo="#fff",Ol="#e1e4e8",om="#c6c6c622",lm="#1b1f234d",am="#24292e",nm="#34d05840",Ml="#d73a49",Bo="#e36209",Al="#005cc5",im="#032f62",rm="#005cc5",Rl="#005cc5",cm="#6f42c1",sm="#005cc5",dm="#6a737d",mm="#005cc5",pm="#cb2431",um="#032f62",hm=E.EditorView.theme({"&":{color:H,backgroundColor:wo},".cm-content":{caretColor:jl},".cm-cursor, .cm-dropCursor":{borderLeftColor:jl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:me},".cm-panels":{backgroundColor:xo,color:H},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:xo,outline:`1px solid ${Ol}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:me},".cm-activeLine":{backgroundColor:om},".cm-selectionMatch":{backgroundColor:me},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:nm,outline:"none"},".cm-gutters":{backgroundColor:wo,color:H,border:"none"},".cm-activeLineGutter":{backgroundColor:wo},".cm-lineNumbers .cm-gutterElement":{color:lm},".cm-lineNumbers .cm-activeLineGutter":{color:am},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:H},".cm-tooltip":{border:`1px solid ${Ol}`,backgroundColor:xo,color:H},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:H,borderBottomColor:H},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:me,color:H}}},{dark:tm}),gm=x.HighlightStyle.define([{tag:a.tags.keyword,color:Ml},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Bo},{tag:[a.tags.propertyName],color:Al},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:im},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Al},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:rm},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Bo},{tag:[a.tags.className],color:cm},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:sm},{tag:[a.tags.typeName],color:Rl,fontStyle:Rl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Ml},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:um},{tag:[a.tags.meta,a.tags.comment],color:dm},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:mm},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Bo},{tag:a.tags.invalid,color:pm},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),fm=[hm,x.syntaxHighlighting(gm)],Cm=!0,No="#24292e",U="#d1d5da",pe="#3392FF44",Hl="#c8e1ff",So="#24292e",Ul="#1b1f23",vm="#4d566022",km="#444d56",ym="#e1e4e8",bm="#17E5E650",Wl="#f97583",Eo="#ffab70",ql="#79b8ff",Vm="#9ecbff",wm="#79b8ff",Gl="#79b8ff",xm="#b392f0",Bm="#79b8ff",Nm="#6a737d",Sm="#79b8ff",Em="#f97583",Dm="#9ecbff",Tm=E.EditorView.theme({"&":{color:U,backgroundColor:No},".cm-content":{caretColor:Hl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Hl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:pe},".cm-panels":{backgroundColor:So,color:U},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:So,outline:`1px solid ${Ul}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:pe},".cm-activeLine":{backgroundColor:vm},".cm-selectionMatch":{backgroundColor:pe},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:bm,outline:"none"},".cm-gutters":{backgroundColor:No,color:U,border:"none"},".cm-activeLineGutter":{backgroundColor:No},".cm-lineNumbers .cm-gutterElement":{color:km},".cm-lineNumbers .cm-activeLineGutter":{color:ym},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:U},".cm-tooltip":{border:`1px solid ${Ul}`,backgroundColor:So,color:U},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:U,borderBottomColor:U},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:pe,color:U}}},{dark:Cm}),Im=x.HighlightStyle.define([{tag:a.tags.keyword,color:Wl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Eo},{tag:[a.tags.propertyName],color:ql},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Vm},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:ql},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:wm},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Eo},{tag:[a.tags.className],color:xm},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Bm},{tag:[a.tags.typeName],color:Gl,fontStyle:Gl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Wl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Dm},{tag:[a.tags.meta,a.tags.comment],color:Nm},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Sm},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Eo},{tag:a.tags.invalid,color:Em},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Lm=[Tm,x.syntaxHighlighting(Im)],Fm=!0,Do="#21202e",W="#edecee",ue="#3d375e7f",Kl="#a277ff",To="#21202e",Ql="#3b334b",_m="#4d4b6622",$m="#a394f033",zm="#cdccce",Pm="#a394f033",Zl="#a277ff",Io="#edecee",Yl="#ffca85",jm="#61ffca",Om="#61ffca",Jl="#82e2ff",Mm="#82e2ff",Am="#61ffca",Rm="#6d6d6d",Hm="#a277ff",Um="#ff6767",Wm="#61ffca",qm=E.EditorView.theme({"&":{color:W,backgroundColor:Do},".cm-content":{caretColor:Kl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Kl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ue},".cm-panels":{backgroundColor:To,color:W},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:To,outline:`1px solid ${Ql}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ue},".cm-activeLine":{backgroundColor:_m},".cm-selectionMatch":{backgroundColor:ue},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Pm,outline:"none"},".cm-gutters":{backgroundColor:Do,color:W,border:"none"},".cm-activeLineGutter":{backgroundColor:Do},".cm-lineNumbers .cm-gutterElement":{color:$m},".cm-lineNumbers .cm-activeLineGutter":{color:zm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:W},".cm-tooltip":{border:`1px solid ${Ql}`,backgroundColor:To,color:W},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:W,borderBottomColor:W},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ue,color:W}}},{dark:Fm}),Gm=x.HighlightStyle.define([{tag:a.tags.keyword,color:Zl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Io},{tag:[a.tags.propertyName],color:Yl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:jm},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Yl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Om},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Io},{tag:[a.tags.className],color:Mm},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Am},{tag:[a.tags.typeName],color:Jl,fontStyle:Jl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Zl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Wm},{tag:[a.tags.meta,a.tags.comment],color:Rm},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Hm},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Io},{tag:a.tags.invalid,color:Um},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Km=[qm,x.syntaxHighlighting(Gm)],Qm=!0,Lo="#1a1b26",q="#787c99",he="#515c7e40",Xl="#c0caf5",Fo="#1a1b26",ea="#787c99",Zm="#43455c22",Ym="#363b54",Jm="#737aa2",Xm="#16161e",ta="#bb9af7",_o="#c0caf5",oa="#7aa2f7",ep="#9ece6a",tp="#bb9af7",la="#0db9d7",op="#c0caf5",lp="#ff9e64",ap="#444b6a",np="#89ddff",ip="#ff5370",rp="#b4f9f8",cp=E.EditorView.theme({"&":{color:q,backgroundColor:Lo},".cm-content":{caretColor:Xl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Xl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:he},".cm-panels":{backgroundColor:Fo,color:q},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Fo,outline:`1px solid ${ea}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:he},".cm-activeLine":{backgroundColor:Zm},".cm-selectionMatch":{backgroundColor:he},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Xm,outline:"none"},".cm-gutters":{backgroundColor:Lo,color:q,border:"none"},".cm-activeLineGutter":{backgroundColor:Lo},".cm-lineNumbers .cm-gutterElement":{color:Ym},".cm-lineNumbers .cm-activeLineGutter":{color:Jm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:q},".cm-tooltip":{border:`1px solid ${ea}`,backgroundColor:Fo,color:q},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:q,borderBottomColor:q},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:he,color:q}}},{dark:Qm}),sp=x.HighlightStyle.define([{tag:a.tags.keyword,color:ta},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:_o},{tag:[a.tags.propertyName],color:oa},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:ep},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:oa},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:tp},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:_o},{tag:[a.tags.className],color:op},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:lp},{tag:[a.tags.typeName],color:la,fontStyle:la},{tag:[a.tags.operator,a.tags.operatorKeyword],color:ta},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:rp},{tag:[a.tags.meta,a.tags.comment],color:ap},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:np},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:_o},{tag:a.tags.invalid,color:ip},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),dp=[cp,x.syntaxHighlighting(sp)],mp=!0,$o="#24283b",G="#7982a9",ge="#6f7bb630",aa="#c0caf5",zo="#24283b",na="#7982a9",pp="#4d547722",up="#3b4261",hp="#737aa2",gp="#1f2335",ia="#bb9af7",Po="#c0caf5",ra="#7aa2f7",fp="#9ece6a",Cp="#bb9af7",ca="#2ac3de",vp="#c0caf5",kp="#ff9e64",yp="#565f89",bp="#89ddff",Vp="#ff5370",wp="#b4f9f8",xp=E.EditorView.theme({"&":{color:G,backgroundColor:$o},".cm-content":{caretColor:aa},".cm-cursor, .cm-dropCursor":{borderLeftColor:aa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ge},".cm-panels":{backgroundColor:zo,color:G},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:zo,outline:`1px solid ${na}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ge},".cm-activeLine":{backgroundColor:pp},".cm-selectionMatch":{backgroundColor:ge},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:gp,outline:"none"},".cm-gutters":{backgroundColor:$o,color:G,border:"none"},".cm-activeLineGutter":{backgroundColor:$o},".cm-lineNumbers .cm-gutterElement":{color:up},".cm-lineNumbers .cm-activeLineGutter":{color:hp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:G},".cm-tooltip":{border:`1px solid ${na}`,backgroundColor:zo,color:G},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:G,borderBottomColor:G},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ge,color:G}}},{dark:mp}),Bp=x.HighlightStyle.define([{tag:a.tags.keyword,color:ia},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Po},{tag:[a.tags.propertyName],color:ra},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:fp},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:ra},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Cp},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Po},{tag:[a.tags.className],color:vp},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:kp},{tag:[a.tags.typeName],color:ca,fontStyle:ca},{tag:[a.tags.operator,a.tags.operatorKeyword],color:ia},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:wp},{tag:[a.tags.meta,a.tags.comment],color:yp},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:bp},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Po},{tag:a.tags.invalid,color:Vp},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Np=[xp,x.syntaxHighlighting(Bp)],Sp=!1,jo="#e1e2e7",K="#6a6f8e",fe="#8591b840",sa="#3760bf",Oo="#e1e2e7",da="#6a6f8e",Ep="#a7aaba22",Dp="#b3b6cd",Tp="#68709a",Ip="#e9e9ec",ma="#9854f1",Mo="#3760bf",pa="#2e7de9",Lp="#587539",Fp="#9854f1",ua="#07879d",_p="#3760bf",$p="#b15c00",zp="#9da3c2",Pp="#006a83",jp="#ff3e64",Op="#2e5857",Mp=E.EditorView.theme({"&":{color:K,backgroundColor:jo},".cm-content":{caretColor:sa},".cm-cursor, .cm-dropCursor":{borderLeftColor:sa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:fe},".cm-panels":{backgroundColor:Oo,color:K},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Oo,outline:`1px solid ${da}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:fe},".cm-activeLine":{backgroundColor:Ep},".cm-selectionMatch":{backgroundColor:fe},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Ip,outline:"none"},".cm-gutters":{backgroundColor:jo,color:K,border:"none"},".cm-activeLineGutter":{backgroundColor:jo},".cm-lineNumbers .cm-gutterElement":{color:Dp},".cm-lineNumbers .cm-activeLineGutter":{color:Tp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:K},".cm-tooltip":{border:`1px solid ${da}`,backgroundColor:Oo,color:K},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:K,borderBottomColor:K},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:fe,color:K}}},{dark:Sp}),Ap=x.HighlightStyle.define([{tag:a.tags.keyword,color:ma},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Mo},{tag:[a.tags.propertyName],color:pa},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Lp},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:pa},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Fp},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Mo},{tag:[a.tags.className],color:_p},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:$p},{tag:[a.tags.typeName],color:ua,fontStyle:ua},{tag:[a.tags.operator,a.tags.operatorKeyword],color:ma},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Op},{tag:[a.tags.meta,a.tags.comment],color:zp},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Pp},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Mo},{tag:a.tags.invalid,color:jp},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Rp=[Mp,x.syntaxHighlighting(Ap)],Hp={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:"input...",backgroundColor:"white",language:"markdown",theme:"oneDark",phrases:"en-us"},Na={emits:["update:config"],components:{CodemirrorEditor:Bs},data:()=>({codemrrConfig:{...Hp},codemrrThemes:{oneDark:Es,materialLight:Us,materialDark:id,solarizedLight:Vd,solarizedDark:jd,dracula:em,githubLight:fm,githubDark:Lm,aura:Km,tokyoNight:dp,tokyoNightStorm:Np,tokyoNightDay:Rp},codemrrLanguages:{javascript:Yo.javascript(),js:Yo.javascript(),html:Ka.html(),markdown:Za.markdown(),json:Qa.json(),vue:Ya.vue(),java:Xa.java(),php:Ja.php(),python:en.python(),go:on.go(),mysql:Jo.sql(),sql:Jo.sql(),xml:tn.xml(),css:ln.css()},codemrrPhrases:{"Control character":"Steuerzeichen","Selection deleted":"Auswahl gelöscht","Folded lines":"Eingeklappte Zeilen","Unfolded lines":"Ausgeklappte Zeilen",to:"bis","folded code":"eingeklappter Code",unfold:"ausklappen","Fold line":"Zeile einklappen","Unfold line":"Zeile ausklappen","Go to line":"Springe zu Zeile",go:"OK",Find:"Suchen",Replace:"Ersetzen",next:"nächste",previous:"vorherige",all:"alle","match case":"groß/klein beachten","by word":"ganze Wörter",replace:"ersetzen","replace all":"alle ersetzen",close:"schließen","current match":"aktueller Treffer","replaced $ matches":"$ Treffer ersetzt","replaced match on line $":"Treffer on Zeile $ ersetzt","on line":"auf Zeile",Completions:"Vervollständigungen",Diagnostics:"Diagnosen","No diagnostics":"Keine Diagnosen"},editorViewInst:null,editorStateInst:null}),computed:{optionTheme(){let t=Object.keys(this.codemrrThemes);return["default"].concat(t)},optionPhrases:()=>["en-us","de-de"],optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){const t=[];return t.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&t.push(this.codemrrThemes[this.codemrrConfig.theme]),t},codemrrBind(){return{theme:this.codemrrConfig.theme,language:this.codemrrConfig.language,autofocus:this.codemrrConfig.autofocus,placeholder:this.codemrrConfig.placeholder,indentWithTab:this.codemrrConfig.indentWithTab,tabSize:this.codemrrConfig.tabSize,disabled:this.codemrrConfig.disabled,phrases:this.codemrrConfig.phrases==="en-us"?{}:this.codemrrPhrases}}},watch:{codemrrConfig(t){this.$emit("update:config",t)}}},oe={props:{editorID:{type:[String],required:!1,default:()=>""}},data:()=>({editorRefEL:null}),computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((1e3*Math.random()).toFixed(0)+"")}}};function Sa(t,o){var l=document.createElement("a");if(l.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(t)),l.setAttribute("download",o),l.style.display="none",document.createEvent){const r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),l.dispatchEvent(r)}else l.click()}function Ce(t){return t<10?"0"+t:t}const Up={undo:!1,redo:!1,strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,hr:!0,quote:!0,ul:!0,ol:!0,notChecked:!0,checked:!0,link:!0,table:!0,image:!0,uploadImage:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,importmd:!0,exportmd:!0,code:!0,html_to_markdown:!0,split:!0,preview:!0,scrollSync:!0,save:!0,clear:!0,copy:!0,toc:!0,fullscreen:!0,theme:!0,backgroundColor:!1,language:!1,phrases:!1,disabled:!1,autofocus:!1,indentWithTab:!1},Wp={t:"1713021153946",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1924",width:"20",height:"20"},qp={t:"1599285632421",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"45640",width:"17",height:"17"},Gp={t:"1611551476626",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4615",width:"22",height:"22"},Kp={t:"1713097613984",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6856",width:"18",height:"18"},Qp={t:"1713109019954",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"13071",width:"18",height:"18"},qo={components:{SvgImgMap:C({name:"SvgImgMap"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Wp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M659.456 786.432l-114.688-188.416c-4.10112-8.192-8.19712-12.28288-16.384-12.28288-4.096 0-8.19712 4.096-12.288 4.096l-57.344 57.344-61.44-90.11712c-4.096-8.192-8.192-12.28288-16.384-12.28288s-12.288 4.096-16.384 8.192l-151.552 225.28c0 4.096-4.096 8.192-4.096 12.288 0 12.28288 8.192 20.48 20.48 20.48h413.696c12.288 0 20.48-8.19712 20.48-20.48l-4.096-4.10112zM286.72 512c40.96 0 73.728-32.768 73.728-73.728S327.68 364.544 286.72 364.544s-73.728 32.768-73.728 73.728C208.896 479.232 245.76 512 286.72 512zM851.968 98.304H323.584c-40.96 0-73.728 32.768-73.728 73.728v20.48c0 12.288 8.192 20.48 20.48 20.48s16.384-12.288 16.384-20.48v-20.48c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.85888 16.384 36.85888 36.864v528.384c0 20.48-16.37888 36.864-36.85888 36.864h-20.48c-12.288 0-20.48 8.192-20.48 20.48s8.192 20.48 20.48 20.48h20.48c40.96 0 73.72288-32.768 73.72288-73.728v-532.48c0.00512-40.96-32.76288-73.728-73.72288-73.728z","p-id":"1925"},null,-1),e.createElementVNode("path",{d:"M700.416 249.856H172.032c-40.96 0-73.728 32.768-73.728 73.728v528.384c0 40.96 32.768 73.72288 73.728 73.72288h528.384c40.96 0 73.728-32.76288 73.728-73.72288V323.584c0-40.96-32.768-73.728-73.728-73.728z m36.864 602.112c0 20.48-16.384 36.85888-36.864 36.85888H172.032c-20.48 0-36.864-16.37888-36.864-36.85888V323.584c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.864 16.384 36.864 36.864v528.384z","p-id":"1926"},null,-1)]))}]]),SvgUploadFile:C({name:"SvgUploadFile"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",qp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M127.519 892.879v-763.34h655.448V514.69h63.612V81.831c0-8.783-7.12-15.903-15.903-15.903H79.81c-8.783 0-15.903 7.12-15.903 15.903v858.757c0 8.783 7.12 15.903 15.903 15.903h493.993v-63.612H127.519z","p-id":"45641"},null,-1),e.createElementVNode("path",{d:"M231.608 228.388h447.269V292H231.608zM231.608 384.409h447.269v63.612H231.608zM231.608 540.43h245.141v63.612H231.608zM231.608 696.451h245.141v63.612H231.608zM923.269 762.938L745.315 584.984c-3.545-3.545-8.34-5.074-12.966-4.596a15.931 15.931 0 0 0-9.848 4.616L544.586 762.918c-6.248 6.248-6.248 16.379 0 22.627l22.353 22.353c6.248 6.248 16.379 6.248 22.627 0l112.555-112.555v245.148c0 8.837 7.163 16 16 16h31.612c8.837 0 16-7.163 16-16V695.363l112.555 112.555c6.248 6.248 16.379 6.248 22.627 0l22.353-22.353c6.249-6.248 6.249-16.378 0.001-22.627z","p-id":"45642"},null,-1)]))}]]),SvgToc:C({name:"SvgToc"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Gp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M370.1 371.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7zM370.1 712.4h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.2-2.6 5.7-5.7 5.7z m333.5-7.5H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.1-2.7 5.7-5.8 5.7zM370.1 542.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7z","p-id":"4616"},null,-1),e.createElementVNode("path",{d:"M847.1 560.4V250.1s0-24.7-14-46.4c-10.8-16.8-30-31.8-64.2-31.8h-261c-0.2 0-0.3 0-0.5 0.1H255s-78.1 0-78.1 78.1l0.1 213.4V774s0 24.7 13.9 46.3c10.8 16.8 30 31.8 64.2 31.8h261.1c0.2 0 0.3 0 0.5-0.1H769s78.1 0 78.1-78.1l-0.1-213.4 0.1-0.1z m-39 213.6c-1.3 38.5-38.9 39-38.9 39h-514c-1.3-0.1-2.5-0.2-3.8-0.3-5.4-1.1-15.7-4.1-23.9-11.7-9-9.7-11.2-22.3-11.7-26.1v-0.7l0.1-524.2c1.3-38.5 38.9-39 38.9-39h514c1.3 0.1 2.5 0.2 3.7 0.3 5.4 1.1 15.7 4.1 23.9 11.7 9 9.7 11.2 22.2 11.7 26 0 0.2 0 0.5 0.1 0.7l-0.1 524.3z","p-id":"4617"},null,-1)]))}]]),SvgCopy:C({name:"SvgCopy"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Kp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M857.373005 65.290005 469.604424 65.290005c-34.211173 0-62.044078 27.832905-62.044078 62.043055l0 10.340509-63.076594 0c-25.993001 0-48.228421 16.346293-57.001225 39.293935L166.626995 176.967504c-34.21015 0-62.043055 27.832905-62.043055 62.043055l0 657.655358c0 34.21015 27.832905 62.043055 62.043055 62.043055l550.115086 0c34.21015 0 62.043055-27.832905 62.043055-62.043055l0-49.634444 78.587869 0c34.21015 0 62.043055-27.832905 62.043055-62.043055L919.41606 127.33306C919.41606 93.122911 891.583155 65.290005 857.373005 65.290005zM344.483752 179.035606l194.402595 0c10.833743 0 19.646456 8.813736 19.646456 19.646456 0 10.833743-8.813736 19.646456-19.646456 19.646456L344.483752 218.328517c-10.833743 0-19.646456-8.813736-19.646456-19.646456C324.836273 187.849342 333.650009 179.035606 344.483752 179.035606zM737.423099 896.665917c0 11.402701-9.278317 20.681018-20.681018 20.681018L166.626995 917.346935c-11.403724 0-20.681018-9.278317-20.681018-20.681018L145.945977 239.010559c0-11.402701 9.277294-20.681018 20.681018-20.681018l120.111588 0c8.197706 24.02723 30.977525 41.362037 57.744145 41.362037l194.402595 0c26.767644 0 49.54644-17.334807 57.744145-41.362037l120.111588 0c11.402701 0 20.681018 9.278317 20.681018 20.681018L737.422076 896.665917zM878.054023 784.988418c0 11.402701-9.278317 20.681018-20.681018 20.681018l-78.587869 0L778.785136 239.010559c0-34.21015-27.832905-62.043055-62.043055-62.043055L595.886549 176.967504c-8.771781-22.947641-31.007201-39.293935-57.001225-39.293935l-89.963964 0L448.921359 127.33306c0-11.403724 9.278317-20.681018 20.683065-20.681018l387.768581 0c11.402701 0 20.681018 9.277294 20.681018 20.681018L878.054023 784.988418z","p-id":"6857"},null,-1),e.createElementVNode("path",{d:"M620.597347 334.252737 260.748652 334.252737c-11.422144 0-20.681018 9.259898-20.681018 20.681018s9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018S632.018467 334.252737 620.597347 334.252737z","p-id":"6858"},null,-1),e.createElementVNode("path",{d:"M620.597347 454.201619 260.748652 454.201619c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C641.278365 463.46254 632.018467 454.201619 620.597347 454.201619z","p-id":"6859"},null,-1),e.createElementVNode("path",{d:"M440.673511 574.151525 260.748652 574.151525c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l179.924859 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C461.35453 583.411423 452.093609 574.151525 440.673511 574.151525z","p-id":"6860"},null,-1)]))}]]),SvgLanguage:C({name:"SvgLanguage"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Qp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M200.313605 806.764028h487.993851v78.708685h-487.993851z",fill:"#6C7280","p-id":"13072"},null,-1),e.createElementVNode("path",{d:"M809.518832 136.166026H79.102229a78.708686 78.708686 0 0 0-78.708686 78.708686V944.504228a78.708686 78.708686 0 0 0 78.708686 78.708685h730.416603a78.708686 78.708686 0 0 0 78.708685-78.708685V214.874712a78.708686 78.708686 0 0 0-78.708685-78.708686z m0 848.479631V944.504228H79.102229V214.874712h730.416603V944.504228z","p-id":"13073"},null,-1),e.createElementVNode("path",{d:"M944.897771 0H171.978478v78.708686H944.897771v787.086856h78.708686V78.708686a78.708686 78.708686 0 0 0-78.708686-78.708686z","p-id":"13074"},null,-1),e.createElementVNode("path",{d:"M360.092237 609.205227h161.352805l44.863951 117.275941h58.244427l-157.417371-385.672559h-55.09608L263.280553 725.694081H315.228286z m57.45734-157.417372a487.206764 487.206764 0 0 0 20.464259-73.986164q8.657955 31.483474 27.548039 78.708686l40.14143 107.043812H375.046887z","p-id":"13075"},null,-1)]))}]])},emits:["on-action","on-act-copy","on-act-save","on-act-theme","on-act-custom","on-act-choose-image"],props:{exportFileName:{type:String,default:""},toolbars:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data:()=>({actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:""}),computed:{lastExpFileName(){let t=new Date,o=t.getFullYear(),l=t.getMonth()+1,r=t.getDate(),n=t.getHours(),i=t.getMinutes(),c=o+"-"+Ce(l)+"-"+Ce(r)+"_"+Ce(n)+"-"+Ce(i);return this.exportFileName||c},toolConfig(){const{toolbars:t={}}=this;return{...Up,...t}}},created(){this.actionPreview=this.isPreview||!1},methods:{actionPhrasesSet(t){this.codemrrConfig.phrases=t,this.actionPhrasesDropdown=!1},actionLanguageSet(t){this.codemrrConfig.language=t,this.actionLanguageDropdown=!1},actionBgColorSet(t){this.codemrrConfig.backgroundColor=t,this.actionBgColorDropdown=!1},actionThemesSet(t){this.codemrrConfig.theme=t,this.actionThemeDropdown=!1,this.$emit("on-act-theme",t)},actionFullscreenSet(t){this.actionFullscreen=t;let o=this.$refs[this.editorWrapRefID];t?o.classList.add("fullscreen"):o.classList.remove("fullscreen"),this.actionCurrent("fullscreen",t)},actionChooseImage(){const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const o=t.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),t.value="")},t.click()},actionInsBg(){const t=this.getLastPoint(),o=t.content||!1;o?this.insertContent("=="+o+"=="):(this.insertContent("===="),this.setCursor(t.line,t.ch+1))},actionUndo(){if(this.editorViewInst){const t=this.editorViewInst.state.behavior(_.EditorState.effect(_.EditorState.undo));this.editorViewInst.update([{changes:{from:0,to:t.doc.length,insert:t.doc},selection:_.EditorSelection.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:_.EditorState.redo()})},actionInsStrong(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="**"+o+"**",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="****",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsItalic(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="*"+o+"*",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="**",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsOverline(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="~~"+o+"~~",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="~~~~",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsUnderline(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="<u>"+o+"</u>",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="<u></u>",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsTitle(t){const o={1:"# ",2:"## ",3:"### ",4:"#### ",5:"##### ",6:"###### "}[t],l=this.getLastPoint(),r=l.content||!1;let n=`
|
|
1
|
+
"use strict";var Aa=Object.create;var Zo=Object.defineProperty;var Ra=Object.getOwnPropertyDescriptor;var Ha=Object.getOwnPropertyNames;var Ua=Object.getPrototypeOf,Wa=Object.prototype.hasOwnProperty;var qa=(t,o,l,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of Ha(o))!Wa.call(t,n)&&n!==l&&Zo(t,n,{get:()=>o[n],enumerable:!(r=Ra(o,n))||r.enumerable});return t};var lo=(t,o,l)=>(l=t!=null?Aa(Ua(t)):{},qa(o||!t||!t.__esModule?Zo(l,"default",{value:t,enumerable:!0}):l,t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("element-plus"),e=require("vue"),Ga=require("codemirror"),_=require("@codemirror/state"),E=require("@codemirror/view"),Ka=require("@codemirror/commands"),x=require("@codemirror/language"),a=require("@lezer/highlight"),Jo=require("@codemirror/lang-javascript"),Qa=require("@codemirror/lang-html"),Ya=require("@codemirror/lang-json"),Za=require("@codemirror/lang-markdown"),Ja=require("@codemirror/lang-vue"),Xa=require("@codemirror/lang-php"),en=require("@codemirror/lang-java"),Xo=require("@codemirror/lang-sql"),tn=require("@codemirror/lang-python"),on=require("@codemirror/lang-xml"),ln=require("@codemirror/lang-go"),an=require("@codemirror/lang-css"),nn=require("html-to-md"),C=(t,o)=>{const l=t.__vccOpts||t;for(const[r,n]of o)l[r]=n;return l},ke=C({name:"cvBadge",extends:{ExtendBadge:k.ElBadge},props:{...k.ElBadge.props},created(){},computed:{isShow(){return!this.value||!(this.value>0)}},data:()=>({})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-badge");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{hidden:i.isShow}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["hidden"])}]]);ke.install=function(t){t.component(ke.name,ke)};const ye=C({name:"cvRow",props:{gutter:{type:[Number,String],default:0},type:{type:[String],default:""},justify:{type:[String],default:"start"},align:{type:[String],default:"top"},tag:{type:[String],default:"div"}},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-row"},{type:l.type,justify:l.justify,align:l.align,tag:l.tag},{gutter:parseInt(l.gutter)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["gutter"])}]]),be=C({name:"cvCol",props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-col");return e.openBlock(),e.createBlock(s,{class:"cv-col",span:parseInt(l.span),offset:parseInt(l.offset)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["span","offset"])}]]);ye.install=function(t){t.component(ye.name,ye)},be.install=function(t){t.component(be.name,be)};const Ve=C({name:"cvBtnBase",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1}},data:()=>({loadingStatus:!1}),created(){},methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-btn"},t.$props,{loading:n.loadingStatus,onClick:i.handleClick}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["loading","onClick"])}]]),we=C({name:"cvBtnText",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1}},data:()=>({loadingStatus:!1}),methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-btn"},t.$props,{link:"",loading:n.loadingStatus,onClick:i.handleClick}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["loading","onClick"])}]]);Ve.install=function(t){t.component(Ve.name,Ve)},we.install=function(t){t.component(we.name,we)};const xe=C({name:"cvAutocompleteBase",props:{...k.ElAutocomplete.props},data:()=>({localVal:"",loadingStatus:!1}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createBlock(s,e.mergeProps({modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c)},t.$props),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["modelValue"])}]]),eo={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data:()=>({searchData:{},loadDataLoading:!1,loadDataList:[],loadDataTotal:0,loadPageCurr:1,loadPageLimit:10,loadConfigSetting:{},loadConfigDef:{pageCurr:1,pageLimit:10,isSkip:!1,url:null,apiFunc:null,mockData:null,where:{},response:{statusName:"status",statusCode:200,msgName:"msg",countName:"total",dataName:"data"},request:{pageName:"page",limitName:"pagesize"}}}),methods:{loadEnding(){this.loadDataLoading=!1,this.$nextTick(()=>{this.loadDataLoading=!1})},loadGetData(){if(this.loadDataLoading=!0,this.loadConfigSetting.apiFunc&&typeof this.loadConfigSetting.apiFunc=="function"){const t=this.loadConfigSetting;let o={...t.where};o[t.request.pageName]=this.loadPageCurr,o[t.request.limitName]=this.loadPageLimit,o=Object.assign(o,this.searchData),this.loadConfigSetting.apiFunc(o).then(l=>{this.loadPageCurr=o[t.request.pageName],this.loadEnding();let r=this.sortOutData(l);if(r.status!=t.response.statusCode)return void ExtendMessage({message:r.msg,type:"error",duration:1300});if(r.data.length===0)return void ExtendMessage({message:"没有更多数据了",type:"warning",duration:1300});let n=r[t.response.dataName]||[];this.dataParse&&typeof this.dataParse=="function"&&(n=this.dataParse.call(null,n)),this.loadDataList.push(...n),this.loadDataTotal=r[t.response.countName]||0}).catch(l=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(t){let o=this.loadConfigSetting.response,l={},r=[],n=[];l.status=t[o.statusName],l.msg=t[o.msgName],l.total=t[o.countName],r=t[o.dataName];for(let i in r)n[i]=r[i];return l.data=n,l}}},Be=C({name:"cvAutocompleteLoad",mixins:[eo],emits:["update:modelValue","input"],props:{...k.ElAutocomplete.props,modelValue:null,placeholder:{type:[String],default:"请输入内容"},popperClass:{type:[String],default:"cv-autocomplete"},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default:()=>"cvAutocompleteLoad-"+ +new Date+(Math.random()/1e4).toFixed(0)},compConfig:{type:[Object],default:()=>({})}},data:()=>({localVal:"",searchList:[],compConfigDef:{searchField:["value"]},timeout:null}),directives:{autoScrollLoad:{created(t,o,l){let r=t.querySelector(".el-autocomplete-suggestion__wrap"),n=t.querySelector(".el-autocomplete-suggestion__wrap .el-autocomplete-suggestion__list");r.addEventListener("scroll",i=>{r.offsetHeight+r.scrollTop+10-n.offsetHeight>0&&!l.context.loading&&o.value()},!1)}},loadmore:{mount(t,o){function l(n){n.target.clientHeight+n.target.scrollTop==n.target.scrollHeight&&o.value()}let r=t.querySelector(".el-autocomplete-suggestion__wrap");t.__handleScroll__=l,t.__wrapDom__=r,r.addEventListener("scroll",l,!1)},unbind(t,o,l){t.__wrapDom__.removeEventListener("scroll",t.__handleScroll__,!1)}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||10,Object.assign(t.where,this.searchData),this.loadConfigSetting=t},getMoreData(){conosle.log("加载更多"),this.loadPageCurr++,this.loadGetData()},getData(){this.loadDataList=[],this.loadGetData()},async querySearchAsync(t,o){this.loadPageCurr=1,this.loadDataLoading=!0;var l=this.loadDataList||[];let r=[];const n=this.loadConfigSetting.searchField||["value"];if(r=(t=t.toLowerCase())?l.filter(this.createFilter(t,n)):l,r.length>0)o(r.map(i=>({...i,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadPageCurr++,this.searchData.keyword=t,this.loadDataList=[],await this.loadGetData();const i=this.loadDataList.map(s=>({...s,is_last_tip:!1}));i.push({is_last_tip:!0}),o(i)}catch{}finally{this.lookFlag=!0}},createFilter:(t,o)=>l=>o.some(r=>(l[r]+"").toLowerCase().indexOf(t)!==-1),selectLoadMore(){},handleChange(t){},handleSelect(t){this.$emit("update:modelValue",t)}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-autocomplete"),m=e.resolveDirective("loadmore");return e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[1]||(o[1]=d=>n.localVal=d),"fetch-suggestions":i.querySearchAsync,onChange:i.handleChange,onSelect:i.handleSelect}),{default:e.withCtx(({item:d})=>[d.is_last_tip?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",e.normalizeProps(e.mergeProps({key:0},{item:d}))),d.is_last_tip?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-autocomolete-nodata",onClick:o[0]||(o[0]=(...p)=>i.getData&&i.getData(...p)),disabled:""},[o[2]||(o[2]=e.createTextVNode(" 没有更多数据了 ")),e.createVNode(s,{type:"ElIconRefreshLeft"}),o[3]||(o[3]=e.createTextVNode(" 刷新按钮 "))])):e.createCommentVNode("",!0)]),_:3},16,["modelValue","fetch-suggestions","onChange","onSelect"])])),[[m,i.getMoreData]])}]]);xe.install=function(t){t.component(xe.name,xe)},Be.install=function(t){t.component(Be.name,Be)};const Se=C({...k.ElForm,name:"cvFormBase",extends:k.ElForm,provide(){return{elForm:this}},props:{...k.ElForm.props,labelWidth:{type:String,default:"auto"},labelPosition:{type:String,default:"right"}},watch:{model(){}},data:()=>({})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-form-base"},{...t.$props,...t.$attrs},e.toHandlers(t.$attrs)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ne=C({name:"cvFormInline",provide(){return{elForm:this}},props:{...k.ElForm.props},watch:{},data:()=>({form:{}})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-form-base"},t.$props,e.toHandlers(t.$attrs),{inline:!0}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),rn={name:"cvFormItem",extends:k.ElFormItem,props:{},data:()=>({localLabelWidth:"",localError:""}),created(){},methods:{}},sn={key:0,class:"cv-form-item__tip"},Ee=C(rn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-form-item");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default"),t.$slots.tip?(e.openBlock(),e.createElementBlock("div",sn,[e.renderSlot(t.$slots,"tip")])):e.createCommentVNode("",!0)]),_:3},16)}]]);Se.install=function(t){t.component(Se.name,Se)},Ne.install=function(t){t.component(Ne.name,Ne)},Ee.install=function(t){t.component(Ee.name,Ee)};const $={extends:k.ElInput,emits:["update:modelValue","change"],props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(t){this.localVal=t},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localRules:[]}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},handleBlur(){this._isCheckValue()},_showError(t){this.localError=t||"请输入正确的"+this.label},_diyValidate(){},_isCheckValue(){const o=this==null?void 0:this.rules.split("|");this.localError="";for(let l in o){let r=o[l].split(":"),n=r[0]||"",i=r[1]||"";switch(n){case"require":if(this.localVal=="")return void this._showError(this.label+"不能为空");break;case"max":if(this.localVal.length>i)return void this._showError(this.label+"最大长度不超过"+i);break;case"min":if(this.localVal.length<i)return void this._showError(this.label+"最小长度不小于"+i);break;default:this._diyValidate(n)}}}}},cn=C({name:"cvInputText",mixins:[$],props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.prepend?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),De=C({name:"cvInputMobile",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"number",oninput:"if(value.length>11)value=value.slice(0,11)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入11位大陆手机号",clearable:""}),e.createSlots({prepend:e.withCtx(()=>[o[1]||(o[1]=e.createTextVNode("+86"))]),_:2},[t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"0"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Te=C({name:"cvInputEmail",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入邮箱",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Ie=C({name:"cvInputPassword",mixins:[$],components:{},props:{showPassword:{type:Boolean,default:!1}},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"password"},{disabled:t.disabled,showPassword:l.showPassword},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入密码",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Fe=C({name:"cvInputNumber",mixins:[$],props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-number",type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入整数",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Le=C({name:"cvInputIdcard",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"text",oninput:"if(value.length>18)value=value.slice(0,18)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入身份证",clearable:"",maxlength:"18"}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),_e=C({name:"cvInputDigit",mixins:[$],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),$e=C({name:"cvTextarea",mixins:[$],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:i.lastRow,autosize:l.autosize},{rows:i.lastRow,modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["rows","modelValue","onInput","placeholder"])}]]),dn={name:"cvTextareaBtn",mixins:[$],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:""},btnIcon:{type:[String],default:""},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},mn={class:"cv-textab-group"},pn={class:"cv-textab-group__append"},un={class:"cv-textab_slot-wrap"},ze=C(dn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mn,[e.createVNode(s,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:i.lastRow,autosize:l.autosize},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>t.localVal=m),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["modelValue","onInput","placeholder"]),e.createElementVNode("div",pn,[e.createElementVNode("div",un,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(c,{class:"cv-textab_slotbtn",type:"primary",size:t.size,onClick:i.onSubmit},{default:e.withCtx(()=>[l.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.btnText),1)]),_:1},8,["size","onClick"])])])])])}]]),hn={class:"cv-input-group"},gn={class:"cv-input-group__append"},Pe=C({name:"cvInputBtn",mixins:[$],emits:["btnClick"],components:{},props:{btnText:{type:[Number,String],default:"确定"},btnIcon:{type:[String],default:""}},data:()=>({}),methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",hn,[e.createVNode(s,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>t.localVal=m),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),null,16,["modelValue","onChange","onInput","placeholder"]),e.createElementVNode("div",gn,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(c,{class:"cv-input-btn__slotbtn",type:"primary",size:t.size,onClick:i.onSubmit},{default:e.withCtx(()=>[l.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.btnText),1)]),_:1},8,["size","onClick"])])])])}]]),ao=C({data:()=>({formData:{}})},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div")}]]);De.install=function(t){t.component(De.name,De)},Te.install=function(t){t.component(Te.name,Te)},Ie.install=function(t){t.component(Ie.name,Ie)},Fe.install=function(t){t.component(Fe.name,Fe)},Le.install=function(t){t.component(Le.name,Le)},_e.install=function(t){t.component(_e.name,_e)},$e.install=function(t){t.component($e.name,$e)},ze.install=function(t){t.component(ze.name,ze)},Pe.install=function(t){t.component(Pe.name,Pe)},ao.install=function(t){t.component(ao.name,ao)};const Oe=C({name:"cvInputCounter",extends:k.ElInputNumber,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data:()=>({localVal:0}),created(){},methods:{handleChange(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c),onChange:i.handleChange,step:t.step}),null,16,["modelValue","onChange","step"])}]]);Oe.install=function(t){t.component(Oe.name,Oe)};const fn={class:"cv-show-text"},Cn=["innerHTML"],je=C({name:"cvShowText",mixins:[],components:{},props:{text:{type:[Number,String,Object],default:""}},data:()=>({}),created(){},methods:{}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",fn,[l.text?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:l.text},null,8,Cn)):e.createCommentVNode("",!0),l.text?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:1})])}]]),vn={class:"cv-show-image"},Me=C({name:"cvShowImage",mixins:[],components:{},props:{url:{type:[String,Array,Object],default:""},width:{type:[String],default:"100px"},height:{type:[String],default:"100px"}},data:()=>({localUrl:""}),watch:{url:{handler(){this.localUrl=typeof this.url=="string"?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.localUrl,(c,m)=>(e.openBlock(),e.createBlock(s,{style:e.normalizeStyle("width:"+l.width+"; height:"+l.height+"; margin-right:10px"),key:m,src:c,"preview-src-list":n.localUrl},null,8,["style","src","preview-src-list"]))),128))])}]]),Ae=C({name:"cvShowTip",props:{borderColor:{type:[String],default:"#50bfff"},bgColor:{type:[String],default:"#ecf8ff"}},data:()=>({backgroundColor:"#ecf8ff",borderLeft:"5px solid #50bfff"}),created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:"cv-show-tip",style:e.normalizeStyle({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[e.renderSlot(t.$slots,"default")],4)}]]),kn={name:"cv-gallery-dialog",props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data:()=>({isShowCarousel:!1,sourceTitle:"",initialIndex:0,isShowPreview:!1}),methods:{startPreview(t){this.isShowPreview=!0,this.initialIndex=t,this.sourceTitle=this.sources[t].title},handleCarouselChange(t){this.sources[t]&&this.sources[t].title?this.sourceTitle=this.sources[t].title:this.sourceTitle=""}}},yn=["src"],bn={key:0,class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},Vn=["src"],wn=["src"],xn=["src"],Bn={name:"gallery",components:{GalleryDialog:C(kn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-carousel-item"),c=e.resolveComponent("el-carousel"),m=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(m,{visible:n.isShowPreview,"append-to-body":"",onOpen:o[0]||(o[0]=d=>n.isShowCarousel=!0),onClosed:o[1]||(o[1]=d=>n.isShowCarousel=!1),style:{"text-align":"center"}},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.sourceTitle||l.title),1)]),default:e.withCtx(()=>[l.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isShowPreview?(e.openBlock(),e.createElementBlock("video",{key:0,src:l.sources[n.initialIndex].src,autoplay:"autoplay",class:"cv-gallery-video",controls:"controls",width:"100%"},null,8,yn)):e.createCommentVNode("",!0)],64)):l.type==="iframe"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isShowPreview?(e.openBlock(),e.createElementBlock("div",bn,[e.createElementVNode("iframe",{src:l.sources[n.initialIndex].src,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,Vn)])):e.createCommentVNode("",!0)],64)):l.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.sliceSingle&&l.sources[n.initialIndex]||l.sources.length===1?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.sources[n.initialIndex].src,class:"cv-gallery-image"},null,8,wn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isShowCarousel?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,"initial-index":n.initialIndex,onChange:i.handleCarouselChange,"indicator-position":"outside"},l.carouselAttrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sources,(d,p)=>(e.openBlock(),e.createBlock(s,{key:p},{default:e.withCtx(()=>[e.createElementVNode("img",{src:d.src,class:"cv-gallery-image"},null,8,xn)]),_:2},1024))),128))]),_:1},16,["initial-index","onChange"])):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)]),_:1},8,["visible"])}]])},props:{type:{type:String,default:"image",validator:t=>["image","video","iframe"].includes(t)},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:String,thumbStyle:Object,carouselAttrs:Object,removeFn:Function,title:String,sliceSingle:{type:Boolean,default:!1}},data:()=>({}),computed:{viewIconClass(){return this.type==="video"||this.type==="iframe"?"ElIconVideoPlay":"ElIconZoomIn"},computedStyle(){let t=this.width||this.size,o=this.height||this.size;return this.type==="image"?(t=t?t+"px":"150px",o=o?o+"px":"150px"):(this.type==="video"||this.type==="iframe")&&(t=t?t+"px":"360px",o=o?o+"px":"auto"),Object.assign({},{width:t,height:o,display:"block"},this.thumbStyle)},thumbs(){return this.computedSources.map(t=>t.thumb)},computedSources(){const t=this.source;if(typeof t=="string")return[this.getStringSource(t)];if(t instanceof Array){const o=[];return t.forEach(l=>{l instanceof Object?o.push(this.getObjectSource(l)):typeof l=="string"&&o.push(this.getStringSource(l))}),o}return t instanceof Object?[this.getObjectSource(t)]:[]}},methods:{handlePreview(t){this.$refs.dialog.startPreview(t)},handleRemove(t){this.removeFn(t)},getStringSource(t){let o=t;return this.type==="image"&&this.thumbSuffix&&(o+=this.thumbSuffix),{type:this.type,src:t,thumb:o}},getObjectSource(t){return t.type=t.thumb?"image":this.type,t.thumb=t.thumb||t.src,t}}},Sn={key:0,class:"cv-gallery"},Nn={class:"el-upload-list el-upload-list--picture-card"},En=["src"],Dn=["src"],Tn={class:"el-upload-list__item-actions"},In=["onClick"],Fn=["onClick"],Re=C(Bn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-image"),c=e.resolveComponent("cv-icons"),m=e.resolveComponent("GalleryDialog");return l.source?(e.openBlock(),e.createElementBlock("div",Sn,[e.createElementVNode("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.computedSources,(d,p)=>(e.openBlock(),e.createElementBlock("li",{key:p,class:"el-upload-list__item"},[e.renderSlot(t.$slots,"default",e.mergeProps({ref_for:!0},{source:d,index:p}),()=>[d.type==="image"?(e.openBlock(),e.createBlock(s,{key:0,lazy:l.lazy,src:d.thumb,style:e.normalizeStyle(i.computedStyle),fit:"cover"},null,8,["lazy","src","style"])):d.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,src:d.thumb,style:e.normalizeStyle(i.computedStyle)},null,12,En)):d.type==="iframe"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(i.computedStyle),class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},[e.createElementVNode("iframe",{src:d.thumb,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,Dn)],4)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Tn,[e.createElementVNode("span",{onClick:f=>i.handlePreview(p,d)},[e.createVNode(c,{type:i.viewIconClass},null,8,["type"])],8,In),l.removeFn?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:f=>i.handleRemove(p)},[e.createVNode(c,{type:"ElIconDelete"})],8,Fn)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"action",e.mergeProps({ref_for:!0},{source:d,index:p}))])]))),128))]),e.createVNode(m,{carouselAttrs:l.carouselAttrs,sliceSingle:l.sliceSingle,sources:i.computedSources,title:l.title,type:l.type,ref:"dialog"},null,8,["carouselAttrs","sliceSingle","sources","title","type"])])):e.createCommentVNode("",!0)}]]);je.install=function(t){t.component(je.name,je)},Me.install=function(t){t.component(Me.name,Me)},Ae.install=function(t){t.component(Ae.name,Ae)},Re.install=function(t){t.component(Re.name,Re)};const He=C({name:"cvRadioOptBase"},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-radio");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ue=C({name:"cvRadioOptBtn"},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-radio-button");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),We=C({name:"cvRadioGroup",props:{...k.ElRadioGroup.props,modelValue:{default:""},type:{type:[String],default:"base"},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(t){this.localVal=t},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localText:[],localVal:this.modelValue,localOpt:[]}},created(){this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{t.push({label:r,value:r})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",l=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",i=r[l]===0?0:r[l]||"";i=i===0?0:i||n,t.push({label:n,value:i,disabled:!!r.disabled}),r.checked!="true"&&r.checked!=1||(typeof this.localVal=="string"?this.localVal=i:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(i))}),this.localOpt=t}}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-radio"),c=e.resolveComponent("el-radio-button"),m=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(m,{class:"cv-radio-group",modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>n.localVal=d)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[l.type=="base"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.localOpt,(d,p)=>(e.openBlock(),e.createBlock(s,{label:d.label,value:d.value,key:p,disabled:l.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","disabled"]))),128)):e.createCommentVNode("",!0),l.type=="button"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.localOpt,(d,p)=>(e.openBlock(),e.createBlock(c,{label:d.label,value:d.value,key:p,disabled:l.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","disabled"]))),128)):e.createCommentVNode("",!0)])]),_:3},8,["modelValue"])}]]);He.install=function(t){t.component(He.name,He)},Ue.install=function(t){t.component(Ue.name,Ue)},We.install=function(t){t.component(We.name,We)};const qe=C({name:"cvCheckboxOptBase",extends:k.ElCheckbox},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-checkbox");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ge=C({name:"cvCheckboxOptBtn",extends:k.ElCheckboxButton,props:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-checkbox-button");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),ka={props:{...k.ElCheckboxGroup.props,modelValue:{type:[Array],default:()=>[]},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localVal:this.modelValue,localOpt:[]}},created(){this.handleChange(),this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{t.push({label:r,value:r})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",l=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",i=r[l]===0?0:r[l]||"";i=i===0?0:i||n,t.push({label:n,value:i,disabled:!!r.disabled}),r.checked!="true"&&r.checked!=1||(typeof this.localVal=="string"?this.localVal=i:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(i))}),this.localOpt=t}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}},Ln={class:"cv-checkbox-all"},Ke=C({name:"cvCheckboxAll",mixins:[ka],components:{},data:()=>({checkAll:!1,isIndeterminate:!0,localOptAll:[]}),methods:{handleCheckAllChange(t){this.localVal=t?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(t){let o=t.length;this.checkAll=o===this.localOptAll.length,this.isIndeterminate=o>0&&o<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(t=>{t.disabled||this.localOptAll.push(t.label)})}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ln,[e.createVNode(s,{indeterminate:n.isIndeterminate,modelValue:n.checkAll,"onUpdate:modelValue":o[0]||(o[0]=m=>n.checkAll=m),onChange:i.handleCheckAllChange},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("全选")])),_:1},8,["indeterminate","modelValue","onChange"]),o[3]||(o[3]=e.createElementVNode("div",{style:{margin:"15px 0"}},null,-1)),e.createVNode(c,{modelValue:t.localVal,"onUpdate:modelValue":o[1]||(o[1]=m=>t.localVal=m),onChange:i.handleCheckedCitiesChange},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.localOpt,(m,d)=>(e.openBlock(),e.createBlock(s,{label:m.label,value:m.value,key:d,onChange:t.handleChange,disabled:t.disabled||m.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1032,["label","value","onChange","disabled"]))),128))])]),_:3},8,["modelValue","onChange"])])}]]),Qe=C({name:"cvCheckboxGroup",mixins:[ka],components:{},props:{type:{type:[String],default:"base"}},data:()=>({})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-button"),m=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(m,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>t.localVal=d)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[l.type=="base"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.localOpt,(d,p)=>(e.openBlock(),e.createBlock(s,{label:d.label,value:d.value,key:p,onChange:t.handleChange,disabled:t.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","onChange","disabled"]))),128)):e.createCommentVNode("",!0),l.type=="button"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.localOpt,(d,p)=>(e.openBlock(),e.createBlock(c,{label:d.label,value:d.value,key:p,onChange:t.handleChange,disabled:t.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["label","value","onChange","disabled"]))),128)):e.createCommentVNode("",!0)])]),_:3},16,["modelValue"])}]]);function _n(t,o,l){var r={}.atBegin;return function(n,i,s){var c,m=s||{},d=m.noTrailing,p=d!==void 0&&d,f=m.noLeading,g=f!==void 0&&f,h=m.debounceMode,v=h===void 0?void 0:h,u=!1,y=0;function b(){c&&clearTimeout(c)}function V(){for(var w=arguments.length,N=new Array(w),D=0;D<w;D++)N[D]=arguments[D];var z=this,F=Date.now()-y;function P(){y=Date.now(),i.apply(z,N)}function ae(){c=void 0}u||(g||!v||c||P(),b(),v===void 0&&F>n?g?(y=Date.now(),p||(c=setTimeout(v?ae:P,n))):P():p!==!0&&(c=setTimeout(v?ae:P,v===void 0?n-F:n)))}return V.cancel=function(w){var N=(w||{}).upcomingOnly,D=N!==void 0&&N;b(),u=!D},V}(t,o,{debounceMode:(r!==void 0&&r)!==!1})}function J(t,o=!1,l=!0){return new Promise((r,n)=>{const i=document.createElement("script");t=t.replace(/([^:]\/)\/+/g,"$1"),i.id=t,i.type="text/javascript",i.src=o?t+"?t="+new Date().getTime():t,document.getElementById(t)&&l?r():(document.body.appendChild(i),i.onload=()=>{r()})})}function $n(t){const o=t,l=document.createElement("textarea");l.value=o,document.body.appendChild(l),l.select(),document.execCommand("Copy"),k.ElMessage({message:"复制成功",type:"success"}),l.remove()}qe.install=function(t){t.component(qe.name,qe)},Ge.install=function(t){t.component(Ge.name,Ge)},Qe.install=function(t){t.component(Qe.name,Qe)},Ke.install=function(t){t.component(Ke.name,Ke)};const zn={name:"cvGeoCity",mixins:[],components:{},props:{modelValue:{type:[String,Array,Number],default:()=>[]},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1},initChoose:{type:[String,Array,Number],default:()=>[]},initStr:{type:[String,Array,Number],default:()=>[]}},watch:{modelValue(t){},initChoose:{deep:!0,immediate:!0,handler(t){this.initProvince(t)}}},data:()=>({provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],provinceCode:"",cityCode:"",districtCode:"",provinceFlag:!1,cityFlag:!1,districtFlag:!1,activeSelectArr:{}}),async mounted(){await J(this.CDN_URL_UI+"/dict/dict-area/area-province.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-city.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-district.js").then(()=>{this.initLoad()})},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.provinceFlag=!1,this.isCdnLoading=!1,this.getProvinces()},200)},initProvince(t){this.getProvinces();let o=t[0]||"";if(o!=""){let l=parseInt(o);this.provinceList.some((r,n)=>{if((isNaN(l)?r.provinceName:r.provinceCode)==o)return this.provinceCode=r.provinceCode,this.handleChoose("provinceCode",r,n),!0})}this.changeProvince(this.provinceCode),this.initCity(t)},initCity(t){let o=t[1]||"";if(o!=""){let l=parseInt(o);this.cityList.some((r,n)=>{if((isNaN(l)?r.cityName:r.cityCode)==o)return this.cityCode=r.cityCode,this.handleChoose("cityCode",r,n),!0})}this.changeCity(this.cityCode),this.initDistrict(t)},initDistrict(t){let o=t[2]||"";if(o!=""){let l=parseInt(o);this.districtList.some((r,n)=>{if((isNaN(l)?r.districtName:r.districtCode)==o)return this.districtCode=r.districtCode,this.handleChoose("districtCode",r,n),!0})}this.changeDistrict(this.districtCode)},handleChoose(t,o,l){switch(o.index=l,t){case"provinceCode":delete this.activeSelectArr.city,delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{province:{text:o.provinceName,value:o.provinceCode,index:o.index}}),this._getNeedDistrict();break;case"cityCode":delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{city:{text:o.cityName,value:o.cityCode,index:o.index}});break;case"districtCode":Object.assign(this.activeSelectArr,{district:{text:o.districtName,value:o.districtCode,index:o.index}})}this.$emit("onChoose",this.activeSelectArr)},getProvinces(){if(!this.provinceFlag&&typeof this.provinceCdnList=="object"){let t=[];for(let o in this.provinceCdnList)t.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=t,this.provinceFlag=!0}},changeProvince(t){let o;this._getNeedCity(),this.cityFlag=!0,this.cityCode="",this.districtCode="",this.provinceList.map(l=>{l.provinceCode==t&&(o=l.provinceName)}),this.$emit("addressSelect",[t,o])},_getNeedCity(){let t=[],o=this.provinceCode;for(let l in this.cityCdnList)l.substring(0,2)==o.substring(0,2)&&t.push({cityCode:l,cityName:this.cityCdnList[l]});this.cityList=t},getCities(){this.cityFlag||this.provinceCode&&(this._getNeedCity(),this.cityFlag=!0)},changeCity(t){let o;this._getNeedDistrict(),this.districtFlag=!0,this.districtCode="",this.cityList.map(l=>{l.cityCode==t&&(o=l.cityName)}),this.$emit("addressSelect",[t,o])},_getNeedDistrict(){let t=[],o=this.cityCode;for(let l in this.districtCdnList)l.substring(0,4)==o.substring(0,4)&&t.push({districtCode:l,districtName:this.districtCdnList[l]});this.districtList=t},getDistrict(){this.districtFlag||this.cityCode&&this._getNeedDistrict()},changeDistrict(t){let o;this.districtList.map(l=>{l.districtCode==t&&(o=l.districtName)}),this.$emit("addressSelect",[t,o])}}},Pn={class:"cv-geo-city"},On={key:0},jn={key:1},Ye=C(zn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",Pn,[e.createElementVNode("div",null,[e.createVNode(c,{modelValue:n.provinceCode,"onUpdate:modelValue":o[0]||(o[0]=d=>n.provinceCode=d),onFocus:i.getProvinces,onChange:i.changeProvince,placeholder:"省",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.provinceList,(d,p)=>(e.openBlock(),e.createBlock(s,{onClick:f=>i.handleChoose("provinceCode",d,p),key:d.provinceCode,label:d.provinceName,value:d.provinceCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),l.cityHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",On,[e.createVNode(c,{modelValue:n.cityCode,"onUpdate:modelValue":o[1]||(o[1]=d=>n.cityCode=d),onFocus:i.getCities,onChange:i.changeCity,placeholder:"市",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.cityList,(d,p)=>(e.openBlock(),e.createBlock(s,{onClick:f=>i.handleChoose("cityCode",d,p),key:d.cityCode,label:d.cityName,value:d.cityCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])),l.cityHide||l.districtHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jn,[e.createVNode(c,{modelValue:n.districtCode,"onUpdate:modelValue":o[2]||(o[2]=d=>n.districtCode=d),onFocus:i.getDistrict,onChange:i.changeDistrict,placeholder:"区/县",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.districtList,(d,p)=>(e.openBlock(),e.createBlock(s,{onClick:f=>i.handleChoose("districtCode",d,p),key:d.districtCode,label:d.districtName,value:d.districtCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]))])),[[m,n.isCdnLoading]])}]]),Mn={name:"cvGeoCity2",mixins:[],components:{},props:{modelValue:{type:[String,Array,Number],default:()=>[]},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1},initChoose:{type:[String,Array,Number],default:()=>[]},initStr:{type:[String,Array,Number],default:()=>[]}},watch:{initChoose:{deep:!0,immediate:!0,handler(t){this.initProvince(t)}}},data:()=>({provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],provinceCode:"",cityCode:"",districtCode:"",hideMunicipality:!1,municipalities:["110000","120000","310000","500000","北京市","天津市","上海市","重庆市"],provinceFlag:!1,cityFlag:!1,districtFlag:!1,activeSelectArr:{}}),async mounted(){await J(this.CDN_URL_UI+"/dict/dict-area/area-province.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-city.js"),await J(this.CDN_URL_UI+"/dict/dict-area/area-district.js").then(()=>{this.initLoad()})},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.provinceFlag=!1,this.isCdnLoading=!1,this.getProvinces()},200)},initProvince(t){this.getProvinces();let o=t[0]||"";if(o!=""){let l=parseInt(o);this.provinceList.some((r,n)=>{if((isNaN(l)?r.provinceName:r.provinceCode)==o)return this.provinceCode=r.provinceCode,this.handleChoose("provinceCode",r,n),!0})}this.changeProvince(this.provinceCode),this.initCity(t)},initCity(t){let o=t[1]||"";if(o!=""){let l=parseInt(o);this.cityList.some((r,n)=>{if((isNaN(l)?r.cityName:r.cityCode)==o)return this.cityCode=r.cityCode,this.handleChoose("cityCode",r,n),!0})}this.changeCity(this.cityCode),this.initDistrict(t)},initDistrict(t){let o=t[2]||"";if(o!=""){let l=parseInt(o);this.districtList.some((r,n)=>{if((isNaN(l)?r.districtName:r.districtCode)==o)return this.districtCode=r.districtCode,this.handleChoose("districtCode",r,n),!0})}this.changeDistrict(this.districtCode)},handleChoose(t,o,l){switch(o.index=l,t){case"provinceCode":if(delete this.activeSelectArr.city,delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{province:{text:o.provinceName,value:o.provinceCode,index:o.index}}),this._getNeedDistrict(),this.municipalities.indexOf(o.provinceCode)>-1){this.cityList.length==0&&this._getNeedCity();const r=this.cityList[0];this.cityCode=r.cityCode,this.changeCity(r.cityCode),this.handleChoose("cityCode",r,0);break}break;case"cityCode":delete this.activeSelectArr.district,Object.assign(this.activeSelectArr,{city:{text:o.cityName,value:o.cityCode,index:o.index}});break;case"districtCode":Object.assign(this.activeSelectArr,{district:{text:o.districtName,value:o.districtCode,index:o.index}})}this.$emit("onChoose",this.activeSelectArr)},getProvinces(){if(!this.provinceFlag&&typeof this.provinceCdnList=="object"){let t=[];for(let o in this.provinceCdnList)t.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=t,this.provinceFlag=!0}},changeProvince(t){let o;this._getNeedCity(),this.cityFlag=!0,this.cityCode="",this.districtCode="",this.provinceList.map(l=>{l.provinceCode==t&&(o=l.provinceName)}),this.hideMunicipality=this.municipalities.indexOf(this.provinceCode)>-1,this.$emit("addressSelect",[t,o])},_getNeedCity(){let t=[],o=this.provinceCode;for(let l in this.cityCdnList)l.substring(0,2)==o.substring(0,2)&&t.push({cityCode:l,cityName:this.cityCdnList[l]});this.cityList=t},getCities(){this.cityFlag||this.provinceCode&&(this._getNeedCity(),this.cityFlag=!0)},changeCity(t){let o;this._getNeedDistrict(),this.districtFlag=!0,this.districtCode="",this.cityList.map(l=>{l.cityCode==t&&(o=l.cityName)}),this.$emit("addressSelect",[t,o])},_getNeedDistrict(){let t=[],o=this.cityCode;for(let l in this.districtCdnList)l.substring(0,4)==o.substring(0,4)&&t.push({districtCode:l,districtName:this.districtCdnList[l]}),o=="500100"&&l.substring(0,4)=="5002"&&t.push({districtCode:l,districtName:this.districtCdnList[l]});this.districtList=t},getDistrict(){this.districtFlag||this.cityCode&&this._getNeedDistrict()},changeDistrict(t){let o;this.districtList.map(l=>{l.districtCode==t&&(o=l.districtName)}),this.$emit("addressSelect",[t,o])}}},An={class:"cv-geo-city"},Rn=["hidden"],Hn={key:1},Ze=C(Mn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",An,[e.createElementVNode("div",null,[e.createVNode(c,{modelValue:n.provinceCode,"onUpdate:modelValue":o[0]||(o[0]=d=>n.provinceCode=d),onFocus:i.getProvinces,onChange:i.changeProvince,placeholder:"省",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.provinceList,(d,p)=>(e.openBlock(),e.createBlock(s,{onClick:f=>i.handleChoose("provinceCode",d,p),key:d.provinceCode,label:d.provinceName,value:d.provinceCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),l.cityHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,hidden:n.hideMunicipality},[e.createVNode(c,{modelValue:n.cityCode,"onUpdate:modelValue":o[1]||(o[1]=d=>n.cityCode=d),onFocus:i.getCities,onChange:i.changeCity,placeholder:"市",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.cityList,(d,p)=>(e.openBlock(),e.createBlock(s,{onClick:f=>i.handleChoose("cityCode",d,p),key:d.cityCode,label:d.cityName,value:d.cityCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])],8,Rn)),l.cityHide||l.districtHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Hn,[e.createVNode(c,{modelValue:n.districtCode,"onUpdate:modelValue":o[2]||(o[2]=d=>n.districtCode=d),onFocus:i.getDistrict,onChange:i.changeDistrict,placeholder:"区/县",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.districtList,(d,p)=>(e.openBlock(),e.createBlock(s,{onClick:f=>i.handleChoose("districtCode",d,p),key:d.districtCode,label:d.districtName,value:d.districtCode},null,8,["onClick","label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]))])),[[m,n.isCdnLoading]])}]]);Ye.install=function(t){t.component(Ye.name,Ye)},Ze.install=function(t){t.component(Ze.name,Ze)};const Je={...k.ElOption,extends:k.ElOption,name:"cvSelectOpt"},Xe=C({name:"cvSelectBase",emits:["onChoose","change","update:modelValue"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({})},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"}},watch:{modelValue(t){this.localVal=t},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(t){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(t,o){this.$emit("onChoose",t,o)},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{t.push({label:r,value:r})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",l=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",i=r[l]===0?0:r[l]||"";if(i=i===0?0:i||n,this.dataDisabled.length>0)for(let s in this.dataDisabled)this.dataDisabled[s][l]==i&&(r.disabled=!0);t.push({label:n,value:i,disabled:!!r.disabled}),r.checked!="true"&&r.checked!=1||(typeof this.localVal=="string"?this.localVal=i:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(i))}),this.localOpt=t}}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-option"),c=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-select-base"},t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>n.localVal=m),size:t.size,filterable:"",clearable:""}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.localOpt,(m,d)=>(e.openBlock(),e.createBlock(s,{onClick:p=>i.handleChoose(m,d),disabled:m.disabled,label:m.label,value:m.value,key:d},null,8,["onClick","disabled","label","value"]))),128))])]),_:3},16,["modelValue","size"])}]]),et=C({name:"cvSelectTree",emits:["update:modelValue","change"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({value:"id",label:"title",children:"children"})},clearable:{type:Boolean,default:!0},accordion:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},refID:{type:[String],required:!1,default:()=>"cvSelectTree-"+ +new Date+(Math.random()/1e4).toFixed(0)}},watch:{modelValue(){this.localVal=this.modelValue,this.initHandle()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange()}},data:()=>({localVal:"",localOpt:[],localTitle:"",defaultExpandedKey:[]}),computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},mounted(){this.localVal=this.modelValue,this.initHandle()},methods:{initHandle(){if(this.localVal){var t=this.$refs[this.refID+"tree"].getNode(this.localVal);t&&(this.localTitle=t.data[this.dataField.label],this.$refs[this.refID+"tree"].setCurrentKey(this.localVal),this.defaultExpandedKey=[this.localVal])}else this.clearHandle();this.initScroll()},initScroll(){this.$nextTick(()=>{let t=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-select-dropdown__wrap")[0],o=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-scrollbar__bar");t.style.cssText="margin: 0px; max-height: none; overflow: hidden;",o.forEach(l=>l.style.width=0)})},handleNodeClick(t,o,l){t.disabled||(this.localTitle=t[this.dataField.label],this.localVal=t[this.dataField.value],this.defaultExpandedKey=[],this.$refs[this.refID].blur())},clearHandle(){this.localTitle="",this.localVal="",this.defaultExpandedKey=[],this.clearSelected()},clearSelected(){document.querySelectorAll(`#${this.refID}tree .el-tree-node`).forEach(t=>t.classList.remove("is-current"))},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists;this.dataField&&this.dataField.label;let o=this.dataField&&this.dataField.value||"value",l=this.dataField&&this.dataField.children||"children",r=this.dataDisabled;(function n(i){for(let s in i)r.map(c=>{i[s][o]==c[o]&&(i[s].disabled=!0)}),i[s][l]&&n(i[s][l])})(t),this.localOpt=t}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-tree"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(m,e.mergeProps(t.$props,{ref:l.refID,"popper-class":"cv-select-tree",modelValue:n.localTitle,onClear:i.clearHandle}),{default:e.withCtx(()=>[e.createVNode(c,{value:n.localTitle,label:n.localTitle,class:"options"},{default:e.withCtx(()=>[e.createVNode(s,{"highlight-current":"",id:l.refID+"tree",ref:l.refID+"tree",accordion:l.accordion,showCheckbox:l.showCheckbox,data:n.localOpt,props:l.dataField,"node-key":l.dataField.value,onNodeClick:i.handleNodeClick,"default-expand-all":l.defaultExpandAll},null,8,["id","accordion","showCheckbox","data","props","node-key","onNodeClick","default-expand-all"])]),_:1},8,["value","label"])]),_:1},16,["modelValue","onClear"])}],["__scopeId","data-v-04a429fe"]]);Je.install=function(t){t.component(Je.name,Je)},Xe.install=function(t){t.component(Xe.name,Xe)},et.install=function(t){t.component(et.name,et)};const Un={name:"cvCascaderBase",components:{},props:{...k.ElCascader.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default:()=>[]},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default:()=>({})},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localOpt:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists,o=this.dataField&&this.dataField.value||"value",l=this.dataDisabled;(function r(n){for(let i in n)l.map(s=>{n[i][o]==s[o]&&(n[i].disabled=!0)}),n[i].children&&r(n[i].children)})(t),this.localOpt=t},getCheckedNodes(){}}},Wn={class:"cv-cascader-base block"},tt=C(Un,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-cascader");return e.openBlock(),e.createElementBlock("div",Wn,[e.createVNode(s,e.mergeProps(t.$props,{props:i.props2,modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c),options:n.localOpt,onChange:i.handleChange,onGetCheckedNodes:i.getCheckedNodes}),null,16,["props","modelValue","options","onChange","onGetCheckedNodes"])])}]]);tt.install=function(t){t.component(tt.name,tt)};const ya={props:{...k.ElTimePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""}),created(){},methods:{}},ot=C({name:"cvTimeBase",mixins:[ya],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},placeholder:{type:[String,Number],default:"选择时间"}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-timePicker-base"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),format:l.format,"picker-options":{}}),null,16,["modelValue","format"])}]]),lt=C({name:"cvTimeRange",mixins:[ya],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始时间"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束时间"}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-timePicker-range"},t.$props,{"is-range":"",modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),format:l.format,"range-separator":l.rangeSeparator,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder}),null,16,["modelValue","format","range-separator","start-placeholder","end-placeholder"])}]]),at=C({name:"cvTimeSelect"},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-time-select");return e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-time-select"},t.$props),null,16)}]]),to={props:{...k.ElDatePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""})},nt=C({name:"cvDateBase",mixins:[to],props:{format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:[String,Number],default:"选择日期"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"date","value-format":l.valueFormat,placeholder:l.placeholder,"picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),it=C({name:"cvDateRange",mixins:[to],props:{valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,l=new Date;t.$emit("pick",[l,o])}},{text:"昨天",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[l,o])}},{text:"最近一周",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-6048e5),t.$emit("pick",[l,o])}},{text:"最近一个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-2592e6),t.$emit("pick",[l,o])}},{text:"最近三个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-7776e6),t.$emit("pick",[l,o])}},{text:"最近六个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-15552e6),t.$emit("pick",[l,o])}},{text:"最近一年",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-31536e6),t.$emit("pick",[l,o])}}]}})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"daterange","value-format":l.valueFormat,"range-separator":l.rangeSeparator,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,"picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),rt=C({name:"cvDatetimeBase",mixins:[to],props:{format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},placeholder:{type:[String,Number],default:"选择日期时间"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"datetime","value-format":l.valueFormat,placeholder:l.placeholder,"picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),st=C({name:"cvDatetimeRange",mixins:[to],props:{valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,l=new Date;t.$emit("pick",[l,o])}},{text:"昨天",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[l,o])}},{text:"最近一周",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-6048e5),t.$emit("pick",[l,o])}},{text:"最近一个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-2592e6),t.$emit("pick",[l,o])}},{text:"最近三个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-7776e6),t.$emit("pick",[l,o])}},{text:"最近六个月",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-15552e6),t.$emit("pick",[l,o])}},{text:"最近一年",onClick(t){const o=new Date,l=new Date;l.setTime(l.getTime()-31536e6),t.$emit("pick",[l,o])}}]}})},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"datetimerange","value-format":l.valueFormat,"range-separator":l.rangeSeparator,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,align:"right","picker-options":t.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),ct=C({name:"cvDatetimeScreen",props:{start:{type:String,default:null},end:{type:String,default:null},autoUpdate:{type:Boolean,default:!0}},emits:["update:start","update:end","change"],data(){return{defaultTime:[new Date(2e3,0,1,0,0,0),new Date(2e3,0,1,23,59,59)],internalValue:[this.start||"",this.end||""]}},watch:{start(t){t!==null&&t!==""||this.end!==null&&this.end!==""?this.internalValue[0]=t:this.internalValue=[null,null]},end(t){this.start!==null&&this.start!==""||t!==null&&t!==""?this.internalValue[1]=t:this.internalValue=[null,null]}},computed:{dateUtil:()=>({getStartOfDay(t=new Date){const o=new Date(t);return o.setHours(0,0,0,0),o},getEndOfDay(t=new Date){const o=new Date(t);return o.setHours(23,59,59,999),o},getYesterday(){const t=new Date;return t.setDate(t.getDate()-1),t},getDaysAgo(t){const o=new Date;return o.setDate(o.getDate()-(t-1)),o},getFirstDayOfMonth(){const t=new Date;return t.setDate(1),t},getFirstDayOfYear(){const t=new Date;return t.setMonth(0,1),t}}),refinedShortcuts(){return[{text:"本日",value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:"昨天",value:()=>{const t=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(t),this.dateUtil.getEndOfDay(t)]}},{text:"最近7天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(7)),this.dateUtil.getEndOfDay()]},{text:"最近30天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(30)),this.dateUtil.getEndOfDay()]},{text:"本月",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfMonth()),this.dateUtil.getEndOfDay()]},{text:"本年",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfYear()),this.dateUtil.getEndOfDay()]},{text:"全部",value:()=>[null,null]}]}},methods:{syncInternalValue(){this.start!==null&&this.start!==""||this.end!==null&&this.end!==""?this.internalValue=[this.start,this.end]:this.internalValue=[null,null]},handleDateChange(t){t?(this.$emit("update:start",t[0]),this.$emit("update:end",t[1])):(this.$emit("update:start",null),this.$emit("update:end",null)),this.$emit("change",t)},handleCalendarChange(t){}},created(){this.syncInternalValue()}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(s,{modelValue:n.internalValue,"onUpdate:modelValue":o[0]||(o[0]=c=>n.internalValue=c),type:"datetimerange",shortcuts:i.refinedShortcuts,"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","default-time":n.defaultTime,onChange:i.handleDateChange,onCalendarChange:i.handleCalendarChange,clearable:"",class:"screen-date-picker"},null,8,["modelValue","shortcuts","default-time","onChange","onCalendarChange"])}]]);ot.install=function(t){t.component(ot.name,ot)},lt.install=function(t){t.component(lt.name,lt)},at.install=function(t){t.component(at.name,at)},nt.install=function(t){t.component(nt.name,nt)},it.install=function(t){t.component(it.name,it)},rt.install=function(t){t.component(rt.name,rt)},st.install=function(t){t.component(st.name,st)},ct.install=function(t){t.component(ct.name,ct)};const dt=C({name:"cvSwitchBase",props:{...k.ElSwitch.props,activeColor:{type:[String],default:""},inactiveColor:{type:[String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){this.localVal=this.modelValue},methods:{}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-switch");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c)}),null,16,["modelValue"])}]]);dt.install=function(t){t.component(dt.name,dt)};const mt=C({name:"cvCodeSms",mixins:[],components:{},props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:"请输入验证码"},disabled:{type:Boolean,default:!1},mobile:{type:[Number,String],default:""},mobileParam:{type:String,default:"mobile"},codeUrl:{type:String,default:""},codeSign:{type:Boolean,default:!1},codeApiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(t){this.localMobile=t},modelValue(t){this.localVal=t}},data(){return{localVal:this.modelValue,localMobile:"",nextTime:0,diyPlaceholder:"短信验证码",btnDisabled:!1,btnText:"获取验证码",btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(t){this.$message(t)},getSmsCode(){if(!this.localMobile)return this.showDiyMsg("手机号不正确"),void this.$emit("onGetSms",!1);if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile))return this.showDiyMsg("手机号格式不正确"),void this.$emit("onGetSms",!1);this.codeUrl||this.codeApiFunc?(this.btnDisabled=!0,this.btnIntervalObj||this.btnDisabled&&(this.btnText="请稍后...",this.codeApiFunc?this.codeApiFunc({postType:"sendSms",cto_sms_type:"alterMobile",sendCode:"发送验证码",[this.mobileParam]:this.localMobile}).then(t=>{let o=t;o.status==200?(this.showDiyMsg("发送成功!"),setTimeout(()=>{if(this.codeSign){let l=o.data&&o.data.sign||"";this.diyPlaceholder="识别码:"+l}this.smsCodeWaitTime()},500)):(this.showDiyMsg("短信获取失败,请检查网络"),this.btnDisabled=!1,this.btnText="获取验证码")}).catch(t=>{this.btnDisabled=!1,this.btnText="获取验证码"}):(this.btnDisabled=!1,this.btnText="重新获取验证码"))):this.showDiyMsg("短信接口地址不能为空")},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let t=this.nextTime-Date.parse(new Date)/1e3;t<=0?(clearInterval(this.btnIntervalObj),this.btnText="重新获取验证码",this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=t.toString()+"s")},100)},updateInput(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-button"),c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=m=>n.localVal=m),clearable:"",placeholder:n.diyPlaceholder,onInput:i.updateInput}),{append:e.withCtx(()=>[e.createVNode(s,{onClick:i.getSmsCode,disabled:n.btnDisabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.btnText),1)]),_:1},8,["onClick","disabled"])]),_:1},16,["modelValue","placeholder","onInput"])}]]);function qn(t){if(typeof XMLHttpRequest>"u")return;const o=new XMLHttpRequest,l=t.action;o.upload&&(o.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),t.onProgress(i)});const r=new FormData;t.data&&Object.keys(t.data).forEach(i=>{r.append(i,t.data[i])}),r.append(t.filename,t.file,t.file.name),o.onerror=function(i){t.onError(i)},o.onload=function(){if(o.status<200||o.status>=300)return t.onError(function(i,s,c){let m;m=c.response?`${c.response.error||c.response}`:c.responseText?`${c.responseText}`:`fail to post ${i} ${c.status}`;const d=new Error(m);return d.status=c.status,d.method="post",d.url=i,d}(l,0,o));t.onSuccess(function(i){const s=i.responseText||i.response;if(!s)return s;try{return JSON.parse(s)}catch{return s}}(o))},o.open("post",l,!0),t.withCredentials&&"withCredentials"in o&&(o.withCredentials=!0);const n=t.headers||{};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&n[i]!==null&&o.setRequestHeader(i,n[i]);return o.send(r),o}mt.install=function(t){t.component(mt.name,mt)};const oo={inheritAttrs:!1,props:{valInit:{type:[String,Array],default:()=>""},drag:{type:Boolean,default:!1},withCredentials:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},httpRequest:Function,accept:String,beforeRemove:Function,upResponseFn:Function},data:()=>({}),computed:{upAction(){return this.mergeAttrs.upAction||""},upHeaders(){return this.mergeAttrs.upHeaders||{}},upData(){return this.mergeAttrs.upData||{}},upName(){return this.mergeAttrs.upName||"file"},componentName(){return this.$options.name},mergeAttrs(){let t=this.$cvUiParams||{},o=t.upload||{},l=Object.assign({},o,t[this.componentName]);return Object.assign({},l,this.$attrs)}},methods:{handleImageUpload(t,o){const l=this.mergeAttrs;if(!t)return void this.$message.error("文件不存在");if(l.fileSize&&!(t.size/1024/1024<l.fileSize))return void this.$message.error(`上传文件大小 ${l.fileSize} MB!`);t.type.includes("image")?l.upAction?qn({action:l.upAction,file:t,headers:l.upHeaders,filename:l.upName,data:l.upData,onProgress:()=>!1,onSuccess:r=>{l.upResponseFn&&(t.url=URL.createObjectURL(t),r=l.upResponseFn(r,t)),o(r)},onError:r=>{this.$message.error("上传错误")}}):this.$message.error("上传地址错误"):this.$message.error("上传类型错误")},beforeRemove2(){return new Promise((t,o)=>{this.$confirm("提示",{title:"确定删除??",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t(!0)}).catch(()=>{o(!1)})})},uploadRequestFn(t){let o=new FormData;o.append("file",t.file);let l="";l=t.file.type==="image/png"?"png":"jpg",axios({url:"http://api.10.com/v1sdk/ctofile.file_img_opt",methods:"post",data:o,headers:{"Content-Type":"multipart/form-data",...this.headers}}).then(r=>{})}}},Gn={class:"cv-upload-avatar"},Kn=["src"],Qn={key:1,class:"cv-upload-avatar__ing"},pt=C({name:"cvUploadAvatar",mixins:[oo],components:{},props:{fileSize:{type:[Number],default:1},src:{type:[String],default:""}},data:()=>({imageUrl:""}),mounted(){this.imageUrl=this.src||""},methods:{upAvatarBefore(t){var o=new Array;const l=(o=t.name.split("."))[o.length-1]==="jpg",r=o[o.length-1]==="png",n=o[o.length-1]==="gif",i=o[o.length-1]==="jpeg";if(!l&&!r&&!i&&n)return this.$message.error("只能上传jpg/png/gif/jpeg格式图片!"),!1;const s=t.size/1024/1024<this.fileSize;return s||this.$message.error(`上传头像图片大小不能超过 ${this.fileSize}MB!`),l||r||n||i&&s},upAvatarSuccess(t,o){this.imageUrl=URL.createObjectURL(o.raw)}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Gn,[e.createVNode(c,e.mergeProps({action:t.upAction,withCredentials:t.withCredentials,showFileList:!1},{"before-upload":i.upAvatarBefore,"on-success":i.upAvatarSuccess}),{default:e.withCtx(()=>[n.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.imageUrl,class:"cv-upload-avatar__img"},null,8,Kn)):(e.openBlock(),e.createElementBlock("div",Qn,[e.createVNode(s,{type:"ElIconPlus",size:"35"})]))]),_:1},16,["before-upload","on-success"])])}]]),Yn={name:"cvUploadImage",mixins:[oo],components:{ShowGallery:Re},props:{modelValue:{type:[String,Array,Object],default:()=>[]},galleryLabel:{type:String,default:""},fileSize:{type:Number,default:2},fileType:{type:Array,default:()=>["png","jpg","jpeg","gif"]},isShowSuccessTip:{type:Boolean,default:!0},thumbSuffix:{type:String,default:""},showSize:{type:Number,default:150},showTipState:{type:Boolean,default:!0},lazy:{type:Boolean,default:!1},drag:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},upAccept:{type:String,default:"image/*"}},mounted(){this.initShowList()},data:()=>({existFileList:[],existShowList:[],imageUrl:"",uploading:!1,dialogVisibleImg:!1,ImgName:"",dialogImageUrl:""}),computed:{showStyle(){return{width:this.showSize+"px",height:this.showSize+"px",lineHeight:this.showSize+"px"}},limit(){return this.multiple==0?1:5},showTipLastState(){return this.showTipState&&(this.fileType.length||this.fileSize)},computedValues(){return this.modelValue?typeof this.modelValue=="string"?[this.modelValue]:Object.prototype.toString.call(this.modelValue)==="[object Object]"?[]:[...this.modelValue]:[]},isShowUpload(){return!!this.multiple||this.computedValues.length===0},successFiles(){return this.fileList.filter(t=>t.status==="success")}},watch:{valInit(t){this.initShowList()}},methods:{getFileInfo(t){let o=t.lastIndexOf("/"),l=t.substring(o+1,t.length),r="";return l.lastIndexOf(".")>-1&&(r=l.slice(l.lastIndexOf(".")+1),r="image/"+r),{name:l,url:t,type:r}},initShowList(){if(!this.valInit)return[];{const t=this.valInit;let o=[];if(typeof t=="string")this.imageUrl=t;else if(Object.prototype.toString.call(t)==="[object Object]")t.name&&t.url&&o.push(t);else if(Object.prototype.toString.call(t)==="[object Array]")for(let l in t){let r=t[l];typeof r=="string"?o.push(this.getFileInfo(r)):Object.prototype.toString.call(r)==="[object Object]"&&r.name&&r.url&&o.push(r)}this.existFileList=o,this.existFileList=o}},upImageBefore(t){let o=!1;if(this.fileType.length){let l="";t.name.lastIndexOf(".")>-1&&(l=t.name.slice(t.name.lastIndexOf(".")+1)),o=this.fileType.some(r=>t.type.indexOf(r)>-1||!!(l&&l.indexOf(r)>-1))}else o=t.type.indexOf("image")>-1;return o?this.fileSize&&!(t.size/1024/1024<this.fileSize)?(this.$message.error(`上传图片大小不能超过 ${this.fileSize} MB!`),!1):(this.uploading=!0,!0):(this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`),!1)},upImageChange(t,o){this.uploading=!1,this.existFileList=o},upImageExceed(){this.$message.error(`最多上传${this.limit}张图片`)},upImageError(t){this.uploading=!1,this.$message.error("上传失败, 请重试"),this.$emit("error",t)},upImageSuccess(t,o,l){let r=t;this.uploading=!1,this.isShowSuccessTip&&this.$message.success("上传成功");const n=this.mergeAttrs;let i=null;n&&typeof n.upResponseFn=="function"&&(i=n.upResponseFn(t,o)),this.upResponseFn&&(i=this.upResponseFn(t,o,this.successFiles)),Object.prototype.toString.call(i)==="[object String]"?r=i:Object.prototype.toString.call(i)==="[object Object]"&&(r=i.value||""),this.multiple?Array.isArray(this.modelValue)?this.$emit("update:modelValue",[...this.modelValue,r]):this.$emit("update:modelValue",[r]):this.$emit("update:modelValue",r)},handlePictureCardPreview(t){var r,n,i;let o=t.raw||t,l="";l=o.type?o.type.split("/")[0]:(i=(n=(r=t==null?void 0:t.response)==null?void 0:r.body)==null?void 0:n.type)==null?void 0:i.split("/")[0],l=="image"?(this.dialogImageUrl=t.url,this.dialogVisibleImg=!0,this.ImgName=t.name):window.open(t.url)},doRemove(t){if(this.multiple){const o=[...this.computedValues];o.splice(t,1),this.$emit("update:modelValue",o||[])}else this.existFileList=[],this.$emit("update:modelValue","")},handleRemoveDiy(t){if(this.beforeRemove){if(typeof this.beforeRemove=="function"){const o=this.multiple?this.computedValues[t]:this.computedValues,l=this.beforeRemove(o,this.computedValues);l&&l.then?l.then(()=>{this.doRemove(t)},()=>{}):l!==!1&&this.doRemove(t)}}else this.doRemove(t)},handleRemove(t,o){if(this.existFileList.length>0&&this.multiple)for(let l in this.existFileList)this.existFileList[l].uid==t.uid&&this.handleRemoveDiy(l);else this.handleRemoveDiy(t);this.existFileList=o||[]}}},Zn={class:"cv-upload-image"},Jn=["src"],Xn={class:"el-upload__tip"},ei={style:{color:"#f56c6c"}},ti={style:{color:"#f56c6c"}},oi={style:{color:"#f56c6c"}},li=["src"],ut=C(Yn,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-upload"),m=e.resolveComponent("el-dialog"),d=e.resolveComponent("ShowGallery"),p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Zn,[e.withDirectives(e.createVNode(c,e.mergeProps({ref:"upload",style:{marginBottom:l.multiple&&i.computedValues.length?"20px":"0px"}},{action:t.upAction,headers:t.upHeaders,data:t.upData,name:t.upName,accept:l.upAccept,withCredentials:t.withCredentials,limit:i.limit,multiple:l.multiple,drag:!!l.drag,listType:l.drag?"picture":"picture-card",disabled:n.uploading,showFileList:!0},{"file-list":n.existFileList,"before-upload":i.upImageBefore,"on-change":i.upImageChange,"on-exceed":i.upImageExceed,"on-error":i.upImageError,"on-success":i.upImageSuccess,"http-request":t.httpRequest,"on-remove":i.handleRemove,"on-preview":i.handlePictureCardPreview}),{tip:e.withCtx(()=>[e.createElementVNode("div",Xn,[o[4]||(o[4]=e.createTextVNode(" 请上传 ")),e.createElementVNode("b",ei,e.toDisplayString(l.fileType.length?l.fileType.join("/"):"图片"),1),o[5]||(o[5]=e.createTextVNode(" 格式文件 ")),l.fileSize?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[2]||(o[2]=e.createTextVNode(" ,且大小不超过 ")),e.createElementVNode("b",ti,e.toDisplayString(l.fileSize)+"MB",1)],64)):e.createCommentVNode("",!0),l.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o[3]||(o[3]=e.createTextVNode(" ,多图上传默认 ")),e.createElementVNode("b",oi,e.toDisplayString(i.limit)+"张",1)],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[l.drag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将文件拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.imageUrl,class:"cv-upload-img__perview",style:e.normalizeStyle(i.showStyle)},null,12,Jn)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-upload-img__ing",style:e.normalizeStyle(i.showStyle)},[e.createVNode(s,{type:"ElIconPlus",size:l.showSize/3},null,8,["size"])],4))],64))])),[[p,n.uploading]])]),_:1},16,["style","file-list","before-upload","on-change","on-exceed","on-error","on-success","http-request","on-remove","on-preview"]),[[e.vShow,i.isShowUpload]]),e.createVNode(m,{modelValue:n.dialogVisibleImg,"onUpdate:modelValue":o[0]||(o[0]=f=>n.dialogVisibleImg=f),title:n.ImgName,"append-to-body":!0,style:{"text-align":"center"}},{default:e.withCtx(()=>[e.createElementVNode("img",{width:"100%",src:n.dialogImageUrl,alt:"",style:{"max-width":"300px"}},null,8,li)]),_:1},8,["modelValue","title"]),e.renderSlot(t.$slots,"gallery"),i.isShowUpload?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,lazy:l.lazy,"remove-fn":i.handleRemove,size:l.showSize,sliceSingle:!0,source:n.existShowList,thumbSuffix:l.thumbSuffix,title:l.galleryLabel},null,8,["lazy","remove-fn","size","source","thumbSuffix","title"]))])}]]),ai={mdb:"access",accdb:"access",ai:"ai",html:"html",htm:"html",asp:"web",pdf:"pdf",psd:"photoshop",psb:"photoshop",mpo:"photoshop",eps:"photoshop",avi:"video",wmv:"video",rm:"video",rmvb:"video",mp4:"video","3gp":"video",asf:"video",mov:"video",m4v:"video",flv:"video",f4v:"video",mkv:"video",mts:"video",swf:"flash",ts:"video",mp3:"audio",wav:"audio",wma:"audio",ape:"audio",aac:"audio",zip:"zip",rar:"zip",gz:"zip","7z":"zip",z:"zip",bmp:"image",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",txt:"txt",rtf:"txt",xls:"excel",xlsx:"excel",xlsm:"excel",xltx:"excel",doc:"word",docx:"word",docm:"word",wps:"word",dotx:"word",dotm:"word",ppt:"powerpoint",pptx:"powerpoint",mdf:"db",db:"db",dbf:"db",wdb:"db",vue:"vue",php:"php",jar:"jar",ini:"ini",bat:"bat",config:"config",fla:"fla",eot:"font",otf:"font",fon:"font",font:"font",ttf:"font",ttc:"font",woff:"font",woff2:"font",js:"js",md:"markdown",one:"onenote",jsx:"reactjs",xfl:"xfl",file:"file",css:"css"};function no(t){return`https://10ui.cn/icon_ext/${ai[t]}.svg`}const ni={name:"uploadList",props:{files:{type:Array,default:()=>[]},isShowDeleteConfim:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(t){return t.lastIndexOf(".")>-1&&no[t.slice(t.lastIndexOf(".")+1).toLowerCase()]||no.file},getSize:t=>t&&!isNaN(Number(t))?t:"",parsePercentage:t=>parseInt(t,10),handleDownload(t){t.url},handleDelete(t,o){this.isShowDeleteConfim?this.$confirm("确认删除该文件吗? ").then(()=>{this.$emit("remove",t,o)}).catch(()=>{}):this.$emit("remove",t,o)}}},ii=["src"],ri={class:"cv-upload-list__item-content-action"},si={inheritAttrs:!1,name:"cvUploadFile",mixins:[oo],components:{uploadList:C(ni,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(e.TransitionGroup,{class:"cv-upload-file-list el-upload-list el-upload-list--text",name:"el-list",tag:"ul"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:c.uid,class:"el-upload-list__item cv-upload-list__item-content"},[e.createVNode(s,{href:c.url,underline:!1,target:"_blank"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:i.getExtension(c.name),class:"el-upload-list__item-content-name-icon"},null,8,ii),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]),_:2},1032,["href"]),e.createElementVNode("div",ri,[e.createVNode(s,{underline:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.getSize(c.size)),1)]),_:2},1024),l.isCanDownload?(e.openBlock(),e.createBlock(s,{key:0,underline:!1,onClick:d=>i.handleDownload(c)},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("下载")])),_:2},1032,["onClick"])):e.createCommentVNode("",!0),!l.disabled&&l.isCanDelete?(e.openBlock(),e.createBlock(s,{key:1,underline:!1,onClick:d=>i.handleDelete(m,c),type:"danger"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode(" 删除 ")])),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]))),128))]),_:1})}]])},props:{modelValue:[String,Object,Array],fileSize:{type:Number,default:5},fileType:Array,placeholder:String,disabled:Boolean,isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0},isShowDeleteConfim:{type:Boolean,default:!0},isCanUploadSame:{type:Boolean,default:!0},isShowTip:{type:Boolean,default:!0},isShowSuccessTip:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},limit:Number},data:()=>({fileList:[]}),computed:{btnText(){return this.placeholder?this.placeholder:this.multiple?"上传文件":"上传单个文件"},showTip(){return this.isShowTip&&(this.fileType||this.fileSize)},list(){let t=1;return this.modelValue?(Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]).map(o=>(typeof o=="string"&&(o={name:o,url:o}),o.uid=o.uid||new Date().getTime()+t++,o)):[]}},methods:{upFileChange(t,o){this.fileList=o},upFileBefore(t){if(this.fileType){let o="";if(t.name.lastIndexOf(".")>-1&&(o=t.name.slice(t.name.lastIndexOf(".")+1)),!this.fileType.some(l=>t.type.indexOf(l)>-1||!!(o&&o.indexOf(l)>-1)))return this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`),!1}return this.fileSize&&!(t.size/1024/1024<this.fileSize)?(this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`),!1):!this.isCanUploadSame&&this.list.some(o=>o.name+o.size===t.name+t.size)?(this.$message.error("此文件已上传!"),!1):!0},upFileExceed(){this.$message.error(`最多上传${this.limit}个文件`)},upFileError(t){this.$message.error("上传失败, 请重试"),this.$emit("error",t)},upFileSuccess(t,o){this.isShowSuccessTip&&this.$message.success("上传成功"),this.upResponseFn&&(t=this.upResponseFn(t,o,this.list)),this.multiple?this.$emit("update:modelValue",[...this.list,t]):this.$emit("update:modelValue",t),this.$emit("success",t,this.list)},handleRemove(t){if(this.beforeRemove){if(typeof this.beforeRemove=="function"){const o=this.beforeRemove(this.list[t],this.list);o&&o.then?o.then(()=>{this.doRemove(t)},()=>{}):o!==!1&&this.doRemove(t)}}else this.doRemove(t)},doRemove(t){if(this.$emit("remove",this.list[t],this.list),this.fileList.splice(t,1),this.multiple){const o=[...this.list];o.splice(t,1),this.$emit("update:modelValue",o||[])}else this.$emit("update:modelValue",null)}},created(){this.fileList=this.list}},ci={class:"cv-upload-file"},di={key:0,class:"el-upload__tip"},mi={style:{color:"#f56c6c"}},pi={style:{color:"#f56c6c"}},ht=C(si,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-button"),c=e.resolveComponent("el-upload"),m=e.resolveComponent("upload-list");return e.openBlock(),e.createElementBlock("div",ci,[l.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,class:"cv-upload-file-uploader",ref:"upload"},{action:t.upAction,headers:t.upHeaders,data:t.upData,name:t.upName,drag:!1,limit:l.limit,multiple:l.multiple,showFileList:!0,fileList:n.fileList},{"before-upload":i.upFileBefore,"on-change":i.upFileChange,"on-exceed":i.upFileExceed,"on-error":i.upFileError,"on-success":i.upFileSuccess}),{tip:e.withCtx(()=>[i.showTip?(e.openBlock(),e.createElementBlock("div",di,[o[2]||(o[2]=e.createTextVNode(" 请上传 ")),l.fileSize?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[0]||(o[0]=e.createTextVNode(" 大小不超过 ")),e.createElementVNode("b",mi,e.toDisplayString(l.fileSize)+"MB",1)],64)):e.createCommentVNode("",!0),l.fileType?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o[1]||(o[1]=e.createTextVNode(" 格式为 ")),e.createElementVNode("b",pi,e.toDisplayString(l.fileType.join("/")),1)],64)):e.createCommentVNode("",!0),o[3]||(o[3]=e.createTextVNode(" 的文件 "))])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(s,{type:"primary",icon:"ElIconUpload"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.btnText),1)]),_:1})]),_:1},16,["before-upload","on-change","on-exceed","on-error","on-success"])),e.createVNode(m,{disabled:l.disabled,files:i.list,isCanDelete:l.isCanDelete,isCanDownload:l.isCanDownload,isShowDeleteConfim:l.isShowDeleteConfim,onRemove:i.handleRemove},null,8,["disabled","files","isCanDelete","isCanDownload","isShowDeleteConfim","onRemove"])])}]]),ui={name:"cvUploadVideo",mixins:[oo],components:{},props:{modelValue:{type:String},fileSize:{type:Number,default:10},fileType:{type:Array},width:{type:Number,default:360},height:{type:Number},isShowTip:{type:Boolean,default:!0},isShowSuccessTip:{type:Boolean,default:!0},upAccept:{type:String,default:"image/*"}},data:()=>({isShowVideo:!1,videoUploadPercent:0}),computed:{showTip(){return this.isShowTip&&(this.fileType||this.fileSize)}},methods:{upVideoBefore(t){let o=!1;if(Array.isArray(this.fileType)){const l=t.type.split("/");o=l[0]==="video"&&this.fileType.includes(l[1])}else o=t.type.includes("video");return o?this.fileSize&&!(t.size/1024/1024<this.fileSize)?(this.$message.error(`上传视频大小不能超过${this.fileSize}MB哦!`),!1):!0:(this.$message.error(`${t.name}格式不正确, 请上传格式正确的视频`),!1)},upVideoProcess(t,o){this.videoUploadPercent=Number(o.percentage.toFixed(0))},upVideoSuccess(t,o){this.videoUploadPercent=0,this.isShowSuccessTip&&this.$message.success("上传成功!"),this.upResponseFn?this.$emit("update:modelValue",this.upResponseFn(t,o)):this.$emit("update:modelValue",t)},upVideoError(t,o,l){this.$message.error("上传失败, 请重试!"),this.videoUploadPercent=0,this.$emit("error",t,o,l)},doRemove(){this.$emit("delete"),this.$emit("update:modelValue",null)},handleRemove(){if(this.beforeRemove){if(typeof this.beforeRemove=="function"){const t=this.beforeRemove(this.modelValue);t&&t.then?t.then(()=>{this.doRemove()},()=>{}):t!==!1&&this.doRemove()}}else this.doRemove()},handlePlayerVideo(){this.isShowVideo=!0},handleHoverClick(){this.$emit("click")}}},hi={class:"cv-upload-video"},gi={key:0,class:"el-upload__tip"},fi={style:{color:"#f56c6c"}},Ci={style:{color:"#f56c6c"}},vi={key:1,class:"vue-hover-mask"},ki=["src"],yi=["src"],gt=C(ui,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-progress"),c=e.resolveComponent("cv-icons"),m=e.resolveComponent("el-upload"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",hi,[l.modelValue?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,e.mergeProps({key:0},{action:t.upAction,headers:t.upHeaders,data:t.upData,name:t.upName,accept:l.upAccept,drag:!0,disabled:n.videoUploadPercent>0&&n.videoUploadPercent<100,showFileList:!1,withCredentials:t.withCredentials},{"before-upload":i.upVideoBefore,"on-error":i.upVideoError,"on-progress":i.upVideoProcess,"on-success":i.upVideoSuccess,httpRequest:t.httpRequest}),{default:e.withCtx(()=>[n.videoUploadPercent>0?(e.openBlock(),e.createBlock(s,{key:0,percentage:n.videoUploadPercent,style:{"margin-top":"20px"},type:"circle"},null,8,["percentage"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(c,{type:"ElIconUpload",size:"24"}),o[7]||(o[7]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将视频拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1)),i.showTip?(e.openBlock(),e.createElementBlock("div",gi,[o[5]||(o[5]=e.createTextVNode(" 请上传 ")),e.createElementVNode("span",fi," "+e.toDisplayString(this.fileType?this.fileType.join("/"):"视频")+" ",1),o[6]||(o[6]=e.createTextVNode(" 格式文件 ")),l.fileSize?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o[3]||(o[3]=e.createTextVNode(" ,且文件大小不超过 ")),e.createElementVNode("span",Ci,e.toDisplayString(l.fileSize),1),o[4]||(o[4]=e.createTextVNode(" MB "))],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))]),_:1},16,["before-upload","on-error","on-progress","on-success","httpRequest"])),l.modelValue?(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("video",{autoplay:!1,src:l.modelValue,style:e.normalizeStyle({width:l.width+"px",height:l.height?l.height+"px":"auto"})}," 您的浏览器不支持视频播放 ",12,ki),e.createElementVNode("span",{onClick:o[2]||(o[2]=(...p)=>i.handleHoverClick&&i.handleHoverClick(...p)),class:"vue-hover-mask_actions"},[e.createElementVNode("span",{onClick:o[0]||(o[0]=(...p)=>i.handlePlayerVideo&&i.handlePlayerVideo(...p)),class:"cv-upload-video_mask__item"},[e.createVNode(c,{type:"ElIconZoomIn"})]),e.createElementVNode("span",{onClick:o[1]||(o[1]=(...p)=>i.handleRemove&&i.handleRemove(...p)),class:"cv-upload-video_mask__item"},[e.createVNode(c,{type:"ElIconDelete"})])])])):e.createCommentVNode("",!0),e.createVNode(d,{visible:n.isShowVideo,"append-to-body":""},{default:e.withCtx(()=>[n.isShowVideo?(e.openBlock(),e.createElementBlock("video",{key:0,autoplay:!0,src:l.modelValue,controls:"controls",style:{width:"100%"}}," 您的浏览器不支持视频播放 ",8,yi)):e.createCommentVNode("",!0)]),_:1},8,["visible"])])}]]);pt.install=function(t){t.component(pt.name,pt)},ut.install=function(t){t.component(ut.name,ut)},ht.install=function(t){t.component(ht.name,ht)},gt.install=function(t){t.component(gt.name,gt)};const bi={class:"tabs-header"},ft=C({name:"cvTabsJump",props:{tabPosition:{type:String,default:"top"}},provide(){return{addChildComponents:t=>{this.childComponents.push(t)},clearChildClass:()=>{this.childComponents.map(t=>{t.className=null})}}},data:()=>({childComponents:[]}),computed:{tabPositionClass(){return this.tabPosition=="left"?"left":this.tabPosition=="right"?"right":this.tabPosition=="bottom"?"bottom":"top"}},created(){},mounted(){}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tabs-jump",i.tabPositionClass])},[e.createElementVNode("div",bi,[e.renderSlot(t.$slots,"default")])],2)}]]),Vi={name:"cvTabPane",emits:["click"],inject:["addChildComponents","clearChildClass"],data:()=>({isshow:!0,className:null}),props:{label:{type:String,default:""},current:{type:Boolean,default:!1},name:{type:String}},mounted(){this.addChildComponents(this),this.initCurrent()},methods:{initCurrent(){this.current&&this.handleClick()},handleClick(){this.clearChildClass(),this.className="active",this.$emit("click")}}},wi={key:1},Ct=C(Vi,[["render",function(t,o,l,r,n,i){return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tab-pane",n.className]),onClick:o[0]||(o[0]=(...s)=>i.handleClick&&i.handleClick(...s))},[t.$slots.label?e.renderSlot(t.$slots,"label",{key:0}):(e.openBlock(),e.createElementBlock("span",wi,e.toDisplayString(l.label),1))],2)),[[e.vShow,n.isshow]])}]]);ft.install=function(t){t.component(ft.name,ft)},Ct.install=function(t){t.component(Ct.name,Ct)};const xi={class:"cv-draw-captcha"},Bi=["width","height"],vt=C({name:"cvDrawCaptcha",props:{modelValue:{type:[String,Number],default:"1234"},baseCode:{type:String,default:"1234567890ABCDEFGHGKMNPQRSTUVWXY"},fontSizeMin:{type:Number,default:25},fontSizeMax:{type:Number,default:30},backgroundColorMin:{type:Number,default:255},backgroundColorMax:{type:Number,default:255},colorMin:{type:Number,default:0},colorMax:{type:Number,default:160},lineColorMin:{type:Number,default:100},lineColorMax:{type:Number,default:255},dotColorMin:{type:Number,default:0},dotColorMax:{type:Number,default:255},contentWidth:{type:Number,default:112},contentHeight:{type:Number,default:31},refreshNum:{type:Number,default:1}},data:()=>({localCode:""}),watch:{modelValue(t){this.localCode=t,this.drawPic()},refreshNum(){this.refreshCode(),this.drawPic()}},mounted(){this.modelValue==""&&(this.refreshCode(),this.drawPic())},created(){this.localCode=this.modelValue},methods:{refreshCode(){this.localCode="",this.makeCode(this.baseCode,4),this.$emit("update:modelValue",this.localCode)},makeCode(t,o){for(let l=0;l<o;l++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum:(t,o)=>Math.floor(Math.random()*(o-t)+t),randomColor(t,o){return"rgb("+this.randomNum(t,o)+","+this.randomNum(t,o)+","+this.randomNum(t,o)+")"},drawPic(){let t=document.getElementById("cv-draw-captcha").getContext("2d");t.textBaseline="bottom",t.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),t.fillRect(0,0,this.contentWidth,this.contentHeight);for(let o=0;o<this.localCode.length;o++)this.drawText(t,this.localCode[o],o);this.drawLine(t),this.drawDot(t)},drawText(t,o,l){t.fillStyle=this.randomColor(this.colorMin,this.colorMax),t.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let r=(l+1)*(this.contentWidth/(this.localCode.length+1)),n=this.randomNum(this.fontSizeMax,this.contentHeight-5);var i=this.randomNum(-45,45);t.translate(r,n),t.rotate(i*Math.PI/180),t.fillText(o,0,0),t.rotate(-i*Math.PI/180),t.translate(-r,-n)},drawLine(t){for(let o=0;o<5;o++)t.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),t.beginPath(),t.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.stroke()},drawDot(t){for(let o=0;o<80;o++)t.fillStyle=this.randomColor(0,255),t.beginPath(),t.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),t.fill()}}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",xi,[e.createElementVNode("canvas",{id:"cv-draw-captcha",width:l.contentWidth,height:l.contentHeight,onClick:o[0]||(o[0]=(...s)=>i.refreshCode&&i.refreshCode(...s))},null,8,Bi)])}],["__scopeId","data-v-0a54a645"]]),kt=C({name:"cvDrawQrcode",data:()=>({})},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",null,"二维码")}]]);vt.install=function(t){t.component(vt.name,vt)},kt.install=function(t){t.component(kt.name,kt)};const Si={name:"cvTagBase",mixins:[],components:{},props:{...k.ElTag.props,modelValue:{type:Array,default:null},closable:{type:Boolean,default:!1},disableTransitions:{type:Boolean,default:!1},effect:{type:String,default:"light"},color:{type:String,default:""},hit:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){},methods:{addTag(){this.localVal.push("新标签"),this.$nextTick(()=>{let t=this.localVal.length,o=this.$refs["newTag"+(t-1)][0],l=document.createRange();l.selectNodeContents(o),window.getSelection().removeAllRanges(),window.getSelection().addRange(l)})},checkTag(t){let o=this.$refs[`newTag${t}`][0].innerText.trim();o.length==0?this.localVal.pop():this.localVal[t]=o},removeTag(t){this.localVal.splice(t,1)}}},Ni={class:"cv-tag-base"},Ei=["onBlur"],yt=C(Si,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-tag"),c=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.localVal,(m,d)=>(e.openBlock(),e.createBlock(s,e.mergeProps({class:"cv-tag-content",ref_for:!0},{closable:l.closable,disableTransitions:l.disableTransitions,effect:l.effect,type:t.type,color:l.color,hit:l.hit,size:t.size},{onClose:p=>i.removeTag(d),key:d}),{default:e.withCtx(()=>[e.createElementVNode("div",{contenteditable:"plaintext-only",ref_for:!0,ref:`newTag${d}`,onBlur:p=>i.checkTag(d)},e.toDisplayString(m),41,Ei)]),_:2},1040,["onClose"]))),128)),e.createVNode(c,{type:"ElIconCirclePlus",size:"16",onClick:o[0]||(o[0]=m=>i.addTag())})])}]]);yt.install=function(t){t.component(yt.name,yt)};const Di={name:"cvTransferTable",props:{modelValue:{type:[Array],default:()=>[]},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((t,o)=>{try{t({total:0,data:null})}catch{o()}})}},titleTexts:{type:Array,default:()=>["待选项","已选项"]},buttonTexts:{type:Array,default:()=>[]},queryTexts:{type:Array,default:()=>["查询","筛选"]},leftColumns:{type:Array,default:()=>[]},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:"300px"},maxHeight:{type:String,default:"500px"},tableRowKey:{type:Function,default:t=>t&&t&&t.id}},data:()=>({leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}),watch:{modelValue(t){this.rightTableData=t}},created(){this.rightTableData=this.modelValue,this.handlePaginationCallBack()},computed:{hasButtonTexts(){return this.buttonTexts.length===2},buttonClasses(){return["transfer-button",{"is-with-texts":this.hasButtonTexts}]},disabledLeftButton(){return!this.leftSelection.some(t=>!this.rightTableData.some(o=>this.checkObjectIsEqual(t,o)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){const t=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(o=>t.some(l=>{const r=o[l],n=this.rightConditionTemp[l].trim();return!r||String(r).indexOf(n)>-1}))}return this.rightTableData}},methods:{handleLeftSelectionChange(t){this.leftSelection=t},handleRightSelectionChange(t){this.rightSelection=t},handleLeftRowClick(t){this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.$refs.leftTable.toggleRowSelection(t)},handleRightRowClick(t){this.$refs.rightTable.toggleRowSelection(t)},handleSizeChange(t){this.pageSize=t,this.handlePaginationCallBack()},handleCurrentChange(t){this.pageIndex=t,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){const t={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,t).then(o=>{o&&Array.isArray(o.data)&&(this.leftTableData=o.data,this.totalSize=o.total),this.$nextTick(()=>{this.leftTableData.forEach(l=>{const r=this.rightTableData.some(n=>this.checkObjectIsEqual(n,l));this.$refs.leftTable.toggleRowSelection(l,r)})})})}},handleRowStyle({row:t}){return this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))?{color:"blue"}:{}},handleSelectable(t){return!this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))},addToRight(){for(const t of this.leftSelection)this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.rightTableData.push(t);this.$emit("update:modelValue",this.rightTableData)},addToLeft(){this.rightSelection.forEach(t=>{const o=this.rightTableData.findIndex(l=>this.checkObjectIsEqual(l,t));if(o!==-1){this.rightTableData.splice(o,1);const l=this.leftTableData.find(r=>this.checkObjectIsEqual(r,t));l&&this.$refs.leftTable.toggleRowSelection(l,!1)}}),this.$emit("update:modelValue",this.rightTableData)},onLeftQuerySubmit(){this.handlePaginationCallBack()},onRightQuerySubmit(){this.rightConditionTemp=JSON.parse(JSON.stringify(this.rightQueryCondition))},checkObjectIsEqual(t,o){return this.tableRowKey(t)===this.tableRowKey(o)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(const t in this.leftQueryCondition)this.leftQueryCondition[t]=void 0;for(const t in this.rightQueryCondition)this.rightQueryCondition[t]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},Ti={class:"cv-transfer-table"},Ii={class:"transfer-panel"},Fi={class:"transfer-panel-header"},Li={key:0},_i={style:{padding:"5px"}},$i={class:"transfer-buttons"},zi={key:0,class:"button-text"},Pi={key:0,class:"button-text"},Oi={class:"transfer-panel"},ji={class:"transfer-panel-header"},Mi={key:0},Ai={style:{padding:"5px"}},bt=C(Di,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-button"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-form"),d=e.resolveComponent("el-table-column"),p=e.resolveComponent("el-table"),f=e.resolveComponent("el-pagination"),g=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",Ti,[e.createElementVNode("div",Ii,[e.createElementVNode("p",Fi,[e.createElementVNode("span",null,e.toDisplayString(l.titleTexts&&l.titleTexts[0]),1),e.createElementVNode("span",null,e.toDisplayString(n.leftSelection.length)+"/"+e.toDisplayString(n.leftTableData.length),1)]),l.showQuery?(e.openBlock(),e.createElementBlock("div",Li,[e.createVNode(m,{inline:!0,model:n.leftQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"leftCondition",{scope:n.leftQueryCondition},void 0,!0),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s,{type:"primary",onClick:o[0]||(o[0]=h=>i.onLeftQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"leftTable","max-height":l.maxHeight,height:l.minHeight,data:n.leftTableData,"row-key":l.tableRowKey,"row-style":i.handleRowStyle,onRowClick:i.handleLeftRowClick,onSelectionChange:i.handleLeftSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(d,{width:"40px",type:"selection",selectable:i.handleSelectable},null,8,["selectable"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.leftColumns,h=>(e.openBlock(),e.createBlock(d,{prop:h.id,key:h.id,label:h.label,width:h.width},{default:e.withCtx(v=>[e.renderSlot(t.$slots,"default",{scope:{row:v.row,col:h}},()=>[e.createElementVNode("span",null,e.toDisplayString(v.row[h.id]),1)],!0)]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","row-style","onRowClick","onSelectionChange"]),e.createElementVNode("div",_i,[l.showPagination?(e.openBlock(),e.createBlock(f,{key:0,onSizeChange:i.handleSizeChange,onCurrentChange:i.handleCurrentChange,"current-page":n.pageIndex,"page-sizes":[10,20,50,100],"page-size":n.pageSize,"pager-count":5,total:n.totalSize,layout:"total, sizes, prev, pager, next"},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",$i,[e.createVNode(s,{type:"primary",class:e.normalizeClass(i.buttonClasses),disabled:i.disabledLeftButton,onClick:i.addToRight},{default:e.withCtx(()=>[l.buttonTexts[0]!==void 0?(e.openBlock(),e.createElementBlock("span",zi,e.toDisplayString(l.buttonTexts[0]),1)):e.createCommentVNode("",!0),e.createVNode(g,{type:"ElIconArrowRight"})]),_:1},8,["class","disabled","onClick"]),e.createVNode(s,{type:"primary",class:e.normalizeClass(i.buttonClasses),disabled:n.rightSelection.length===0,onClick:i.addToLeft},{default:e.withCtx(()=>[e.createVNode(g,{type:"ElIconArrowLeft"}),l.buttonTexts[1]!==void 0?(e.openBlock(),e.createElementBlock("span",Pi,e.toDisplayString(l.buttonTexts[1]),1)):e.createCommentVNode("",!0)]),_:1},8,["class","disabled","onClick"])]),e.createElementVNode("div",Oi,[e.createElementVNode("p",ji,[e.createElementVNode("span",null,e.toDisplayString(l.titleTexts&&l.titleTexts[1]),1),e.createElementVNode("span",null,e.toDisplayString(n.rightSelection.length)+"/"+e.toDisplayString(n.rightTableData.length),1)]),l.showQuery?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(m,{inline:!0,model:n.rightQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"rightCondition",{scope:n.rightQueryCondition},void 0,!0),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s,{type:"primary",onClick:o[1]||(o[1]=h=>i.onRightQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"rightTable","max-height":l.maxHeight,height:l.minHeight,data:i.calcRightTableData,"row-key":l.tableRowKey,onRowClick:i.handleRightRowClick,onSelectionChange:i.handleRightSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(d,{width:"40px",type:"selection"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.rightColumns||l.leftColumns,h=>(e.openBlock(),e.createBlock(d,{prop:h.id,key:h.id,label:h.label,width:h.width},{default:e.withCtx(v=>[e.renderSlot(t.$slots,"default",{scope:{row:v.row,col:h}},()=>[e.createElementVNode("span",null,e.toDisplayString(v.row[h.id]),1)],!0)]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","onRowClick","onSelectionChange"]),e.createElementVNode("div",Ai,[l.showPagination?(e.openBlock(),e.createBlock(f,{key:0,total:n.rightTableData.length,layout:"total"},null,8,["total"])):e.createCommentVNode("",!0)])])])}],["__scopeId","data-v-7edbc016"]]);bt.install=function(t){t.component(bt.name,bt)};const Wo={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...k.ElTable.props,modelValue:{type:[Array,Object],default:()=>[]},headerCellStyle:{type:[Function,Object],default:()=>({})}},data:()=>({loadDataList:[]}),watch:{modelValue(t){this.loadDataList=t},loadDataList(t){this.$emit("update:modelValue",t)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(t){this.loadPageCurr=t,this.getData()},handleSizeChange(t){this.loadPageLimit=t,this.getData()}}},Ri={name:"cvTableBase",mixins:[eo,Wo],props:{align:{type:String,default:"left"},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default:()=>({})},tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}),watch:{tableRefresh(t,o){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||this.paginationGroup[0],Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},Hi={class:"cv-table-list"},Ui={key:0,class:"cv-tablie-list-page page"},Vt=C(Ri,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table"),c=e.resolveComponent("cv-icons"),m=e.resolveComponent("el-button"),d=e.resolveComponent("el-pagination"),p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Hi,[e.withDirectives((e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:i.handleSelectionChange}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange"])),[[p,t.loadDataLoading]]),l.showPagebreak?e.withDirectives((e.openBlock(),e.createElementBlock("div",Ui,[e.createVNode(m,{onClick:i.refresh,style:{float:"left",margin:"0 10px 0 0",padding:"5px 10px"}},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconRefresh",size:"14"})]),_:1},8,["onClick"]),e.createVNode(d,{background:"",onSizeChange:t.handleSizeChange,onCurrentChange:t.handleCurrentChange,"pager-count":n.paginationCount,"page-sizes":n.paginationGroup,"current-page":t.loadPageCurr,"page-size":t.loadPageLimit,layout:"total, sizes, prev, pager, next, jumper",total:t.loadDataTotal},null,8,["onSizeChange","onCurrentChange","pager-count","page-sizes","current-page","page-size","total"])],512)),[[e.vShow,t.loadDataLoading===!1]]):e.createCommentVNode("",!0)])}]]),Wi={class:"cv-table-tree"},wt=C({name:"cvTableTree",mixins:[eo,Wo],props:{tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({searchData:{},tableConfDef:{tablePrimary:"",childName:"children"},pager_count:7,page:1}),watch:{tableRefresh(t,o){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table"),c=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Wi,[e.withDirectives((e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:i.handleSelectionChange,"row-key":t.loadConfigSetting.tablePrimary,"tree-props":{children:t.loadConfigSetting.childName,hasChildren:"hasChildren"}}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange","row-key","tree-props"])),[[c,t.loadDataLoading]])])}]]),qi={name:"cvTableEditor",mixins:[eo,Wo],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default:()=>({})}},data:()=>({mergeRules:{},apiFunc:null,tableConfDef:{},cell_click_index:null,cell_click_label:""}),watch:{},created(){this.loadConfigSetting=Object.assign({},this.tableConfDef,this.tableConfig)},mounted(){},methods:{cell_click(t,o,l,r){switch(this.cell_click_index=t.index,this.cell_click_label=o.label,o.label){case"taskid":case"taskname":this.cell_click_index=t.index,this.cell_click_label=o.label;break;default:return}},handleChangeTData(t){}}},Gi={class:"cv-table-editor"},xt=C(qi,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table"),c=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Gi,[e.withDirectives((e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},"row-class-name":"cv-tbed-tr"}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data"])),[[c,t.loadDataLoading]])])}]]),Bt=C({name:"cvTbColumnIndex",inject:{pageCurr:{default:1},pageLimit:{default:10}},props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:String,default:"center"},width:{type:[String,Number],default:55},continuity:{type:[Boolean,String],default:!1}},data:()=>({}),created(){},methods:{indexMethod(t){return this.continuity&&this.pageCurr&&this.pageLimit?t+1+(this.pageCurr-1)*this.pageLimit:t+1}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{type:"index",index:i.indexMethod}),null,16,["index"])}]]),St=C({name:"cvTbColumnCheck",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:[String],default:"center"},width:{type:[String,Number],default:55}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{type:"selection"}),null,16)}]]),Ki={name:"cvTbColumnText",props:{...k.ElTableColumn.props},data:()=>({}),created(){},methods:{getContentText(t){let o=t.row[this.prop];return this.formatter&&(o=this.formatter(t.row,t.column)),o}}},Qi={style:{display:"contents"}},Nt=C(Ki,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.createElementVNode("div",Qi,e.toDisplayString(c.row[t.prop]),1)]),_:1},16)}]]),Yi={name:"cvTbColumnImg",props:{...k.ElTableColumn.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data:()=>({localImgWidth:"50px",localImgHeight:"50px",localImgArr:[],localImgOne:""}),created(){this.imgWidth&&(this.localImgWidth=this.imgWidth.indexOf("px")!==-1?this.imgWidth:this.imgWidth+"px"),this.imgHeight&&(this.localImgHeight=this.imgHeight.indexOf("px")!==-1?this.imgHeight:this.imgHeight+"px")},methods:{handleImgOne(t){let o=t[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o[0];if(Object.prototype.toString.call(o)==="[object String]")return o}},handleImgArr(t){let o=t[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o;if(Object.prototype.toString.call(o)==="[object String]")return[o]}},handleImgLeng(t){let o=t[this.prop]||null;return o?Object.prototype.toString.call(o)==="[object Array]"?o.length:Object.prototype.toString.call(o)==="[object String]"?1:void 0:0}}},Zi={key:0,class:"cv-table-column-img-mark"},Ji={class:"cv-table-column-img-text"},Et=C(Yi,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-image"),c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(m=>[e.createElementVNode("div",{class:"cv-table-column-img-box",style:e.normalizeStyle({width:n.localImgWidth,height:n.localImgHeight})},[e.createVNode(s,{style:e.normalizeStyle({width:n.localImgWidth,height:n.localImgHeight}),fit:"scale-down",lazy:"",src:i.handleImgOne(m.row),"preview-src-list":i.handleImgArr(m.row)},{error:e.withCtx(()=>o[0]||(o[0]=[e.createElementVNode("span",{class:"el-image__error cv-table-column-img-err"},[e.createTextVNode(" 暂无 "),e.createElementVNode("br"),e.createTextVNode(" 图片 ")],-1)])),_:2},1032,["style","src","preview-src-list"]),i.handleImgLeng(m.row)>1?(e.openBlock(),e.createElementBlock("p",Zi,[e.createElementVNode("span",Ji,e.toDisplayString(i.handleImgLeng(m.row))+"张",1)])):e.createCommentVNode("",!0)],4)]),_:1},16)}]]),Dt=C({name:"cvTbColumnOpt",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"right"},label:{type:[String],default:"操作"}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}]]),Tt=C({name:"cvTbColumnBase",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}]]),It=C({name:"cvTbColumnExpand",props:{...k.ElTableColumn.props},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$props,{type:"expand"}),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,props:c})))]),_:3},16)}]]),Ft=C({name:"cvTbColumnEnum",props:{...k.ElTableColumn.props,dataLists:{type:[Object,Array],default:()=>({})}},data:()=>({}),created(){},methods:{dealTypeEnum(t){let o=Object.keys(this.dataLists);return t[this.prop]?this.dataLists[t[this.prop]]||"":this.dataLists[o[0]]||""}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.createElementVNode("span",null,e.toDisplayString(i.dealTypeEnum(c.row)),1)]),_:1},16)}]]),Xi={name:"cvTbEditSearch",props:{...k.ElTableColumn.props,modelValue:{type:[String],default:""},align:{type:[String],default:"left"}},data:()=>({isEditIndex:null,localVal:"",autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:"",searchCurrTbIndex:0,searchIsSelect:!1}),watch:{modelValue(t){},localVal(t){this.$emit("update:modelValue",t)}},directives:{edfocus:{mounted:t=>{}}},created(){},methods:{searchEdit(t,o){this.isEditIndex=o,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${o}`].focus()})},searchSave(t,o){this.isEditIndex=null},searchSelect(t,o,l){this.searchIsSelect=!0,this.localTableData[l]=Object.assign(this.localTableData[l],t),this.localTableData[l].row_num=1,t.row_attr?this.localTableData[l].row_name=t.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${t.row_attr} ]</span>`:this.localTableData[l].row_name=t.row_name},searchFocus(t,o){this.searchCurrClass="cvtegac"+t,this.searchCurrTbIndex=t},searchBlur(t,o){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(t,o){this.searchIsSelect=!1,this.searchResList=[];const l=this.searchSett;if(l.searchMockData!=null&&l.searchMockData){if(!(typeof l.searchMockData!="Array"&&typeof l.searchMockData!="object")){const r=this.sortOutData(l.searchMockData);this.tableData=r,this.$message({message:r.msg||"",type:"warning",duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else l.searchFunc&&typeof l.searchFunc=="function"&&l.searchFunc({page:1,pagesize:20,keyword:t,...l.searchParam}).then(r=>{this.searchResList=[...r.data],this.searchParseData(t,o)})},searchParseData(t,o){var l=[],r=[];const n=this.searchSett;if(this.searchResList.length>0){for(let i in this.searchResList){let s=this.searchResList[i];const c=n.searchField.row_price;s.row_price=s[c];const m=n.searchField.row_stock;s.row_stock=s[m];const d=n.searchField.row_attr;s.row_attr=s[d];const p=n.searchField.row_name;s.row_name=s[p];const f=n.searchField.row_unit;s.row_unit=s[f];const g=n.searchField.row_id;s.row_id=s[g],s.value=s.row_name,r.push(s)}l=r}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{o(l)},600)},inputSearchFilter:t=>o=>o.value.toLowerCase().indexOf(t.toLowerCase())===0,searchIconClick(){this.isEditIndex=null}}},er={class:"name"},tr={class:"addr"},or={class:"addr"},lr={class:"droplist-item"},ar={class:"name"},nr={key:0,class:"attr"},ir={class:"price"},rr={class:"rest"},sr=["onClick"],Lt=C(Xi,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("ElIconCircleClose"),c=e.resolveComponent("el-icon"),m=e.resolveComponent("el-autocomplete"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.mergeProps(t.$props,{"class-name":"cv-table-editor-search-column"}),{default:e.withCtx(p=>[n.isEditIndex==p.$index?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,ref:`cv-tbce-autocomplete${p.$index}`},n.autocompleteAttr,{modelValue:p.row[t.prop],"onUpdate:modelValue":f=>p.row[t.prop]=f,"popper-class":`cv-tbce-autocomplete cvtegac${p.$index}`,"fetch-suggestions":i.searchQuery,onSelect:f=>i.searchSelect(f,p.row,p.$index),onFocus:f=>i.searchFocus(p.$index,f),onBlur:f=>i.searchBlur(p.row,p.$index)}),{suffix:e.withCtx(()=>[e.createVNode(c,{onClick:f=>i.searchIconClick(p.row,p.$index)},{default:e.withCtx(()=>[e.createVNode(s)]),_:2},1032,["onClick"])]),default:e.withCtx(({item:f})=>[e.renderSlot(t.$slots,"default",{item:f},()=>[e.createElementVNode("div",er,e.toDisplayString(f.row_name),1),e.createElementVNode("span",tr,"价格:"+e.toDisplayString(f.row_price),1),e.createElementVNode("span",or,e.toDisplayString(f.row_rest),1),e.createElementVNode("div",lr,[e.createElementVNode("div",ar,[e.createTextVNode(e.toDisplayString(f.row_name)+" ",1),f.row_attr?(e.openBlock(),e.createElementBlock("div",nr,"[ "+e.toDisplayString(f.row_attr)+"]",1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ir,"¥ "+e.toDisplayString(f.row_price),1),e.createElementVNode("div",rr,e.toDisplayString(f.attr_stock),1)])])]),_:2},1040,["modelValue","onUpdate:modelValue","popper-class","fetch-suggestions","onSelect","onFocus","onBlur"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:f=>i.searchEdit(p.row,p.$index)},e.toDisplayString(p.row[t.prop]),9,sr))]),_:3},16)}]]),_t=C({name:"cvTbEditOpt",props:{tableData:{type:[Array],default:()=>[]},...k.ElTableColumn.props,label:{type:[String],default:"操作"},align:{type:[String],default:"center"},width:{type:[String],default:"100"},fixed:{type:[String],default:"left"},btnAdd:{type:[Boolean,String],default:!0},btnDel:{type:[Boolean,String],default:!0}},data:()=>({localTbData:[]}),watch:{tableData(t){this.localTbData=t}},created(){this.localTbData=this.tableData},methods:{optHdDelete(t,o){this.localTbData.splice(t,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-button"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[l.btnAdd?(e.openBlock(),e.createBlock(c,{key:0,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:o[0]||(o[0]=p=>i.optHdAdd())},{default:e.withCtx(()=>[e.createVNode(s,{type:"ElIconPlus"})]),_:1})):e.createCommentVNode("",!0),l.btnDel?(e.openBlock(),e.createBlock(c,{key:1,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:p=>i.optHdDelete(d.$index,d.row)},{default:e.withCtx(()=>[e.createVNode(s,{type:"ElIconClose"})]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1},16)}]]),cr={name:"cvTbEditText",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""},editAttr:{type:[Object],default:()=>({placeholder:"请输入"})},editClearable:{type:[Boolean],default:!0},editStyle:{type:[Object],default:()=>({"--el-input-border":0,"--el-input-border-radius":0,"--el-input-height":"36px"})},editClass:{type:[Object],default:()=>({})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}},toFixed:{type:[String,Number],default:""}},data:()=>({currValue:"",isEditIndex:null,isErrIndex:[]}),directives:{edfocus:{mounted:t=>{t.querySelector("input").focus()},inserted:function(t){t.querySelector("input").focus()}}},created(){},methods:{textIsError(t){return this.isErrIndex&&this.isErrIndex[t]&&this.isErrIndex[t][this.prop]},textHdEdit(t,o){this.isEditIndex=o},textHdClear(t,o){},textHdSave(t,o){this.isEditIndex=null;let l=t[this.prop];if(this.toFixed!=""){let r=parseInt(this.toFixed);isNaN(l)||(t[this.prop]=parseFloat(l).toFixed(r))}else t[this.prop]=l}},render22(t,o){let l=this;return t("el-table-column",{props:{...this.$props},scopedSlots:{default:r=>{this.currValue=r.row[this.prop];let n=r.$index;return this.isEditIndex==n?t("el-input",{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:i=>{i.keyCode===13&&(this.$emit("update:param",i.target.value),this.callback&&this.callback())}},on:{blur:i=>{this.$emit("update:param",i.target.value),this.callback&&this.callback()},input:function(i){l.currValue=i||i.target.value},blur:i=>{this.isEditIndex=null,l.currValue=i||i.target.value}}},this.currValue):t("span",{class:{showtext:!0},on:{click:()=>{this.isEditIndex=n}}},this.currValue)}}})}},dr=["onClick"],$t=C(cr,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-input"),c=e.resolveComponent("el-table-column"),m=e.resolveDirective("edfocus");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{"class-name":"cv-table-editor-text-column"}),{default:e.withCtx(d=>[n.isEditIndex!=d.$index||l.editAttr.disabled?(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:p=>i.textHdEdit(d.row,d.$index)},e.toDisplayString(d.row[t.prop]),9,dr)):e.withDirectives((e.openBlock(),e.createBlock(s,e.mergeProps({key:0},l.editAttr,{clearable:l.editClearable,style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p,onBlur:e.withModifiers(p=>i.textHdSave(d.row,d.$index),["prevent"]),onClear:p=>i.textHdClear(d.row,d.$index)}),null,16,["clearable","style","class","modelValue","onUpdate:modelValue","onBlur","onClear"])),[[m]])]),_:1},16)}]]),zt=C({name:"cvTbEditRadio",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-radio"),c=e.resolveComponent("el-radio-group"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[e.createVNode(c,e.mergeProps({style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p},l.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataLists,(p,f)=>(e.openBlock(),e.createBlock(s,{key:f,label:p[l.dataField.label],value:p[l.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p[l.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:2},1040,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]),Pt=C({name:"cvTbEditCheckbox",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data:()=>({localVal:[]}),created(){},methods:{handleParseValue(t){this.localVal=[]}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-group"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[d.row[t.prop]?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p},l.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataLists,(p,f)=>(e.openBlock(),e.createBlock(s,{key:f,label:p[l.dataField.label],value:p[l.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p[l.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:2},1040,["style","class","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},16)}]]),Ot=C({name:"cvTbEditSelect",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data:()=>({}),created(){}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(m,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[e.createVNode(c,e.mergeProps({style:l.editStyle,class:l.editClass,modelValue:d.row[t.prop],"onUpdate:modelValue":p=>d.row[t.prop]=p},l.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataLists,(p,f)=>(e.openBlock(),e.createBlock(s,{key:f,label:p[l.dataField.label],value:p[l.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p[l.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:2},1040,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]);function te(t){return function(o){return typeof Array.isArray=="function"?Array.isArray(o):Object.prototype.toString.call(o)==="[object Array]"}(t)?t.length===0:function(o){return Object.prototype.toString.call(o)==="[object Object]"}(t)?Object.keys(t).length===0:t===""||t==null}Vt.install=function(t){t.component(Vt.name,Vt)},wt.install=function(t){t.component(wt.name,wt)},xt.install=function(t){t.component(xt.name,xt)},Bt.install=function(t){t.component(Bt.name,Bt)},St.install=function(t){t.component(St.name,St)},Nt.install=function(t){t.component(Nt.name,Nt)},Et.install=function(t){t.component(Et.name,Et)},Dt.install=function(t){t.component(Dt.name,Dt)},Tt.install=function(t){t.component(Tt.name,Tt)},It.install=function(t){t.component(It.name,It)},Ft.install=function(t){t.component(Ft.name,Ft)},Lt.install=function(t){t.component(Lt.name,Lt)},_t.install=function(t){t.component(_t.name,_t)},$t.install=function(t){t.component($t.name,$t)},zt.install=function(t){t.component(zt.name,zt)},Pt.install=function(t){t.component(Pt.name,Pt)},Ot.install=function(t){t.component(Ot.name,Ot)};const le=(t,o)=>te(t)?o:t;function Z(t){return t==null?"":String(t)}function mr(t){let o=t.lastIndexOf("."),l=t.substring(o+1);return["png","jpg","jpeg","gif","webp","svg"].indexOf(l.toLowerCase())!=-1}function pr(t){var o=new Date,l=new Date(t),r=o-l,n=Math.floor(r/1e3),i=Math.floor(n/60),s=Math.floor(i/60);if(i<1)var c=n+"秒前";else s<1?c=i+"分钟前":s<24?c=s+"小时前":c=l.toLocaleString();return c}const ur={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",ur,o[0]||(o[0]=[e.createElementVNode("rect",{width:"12",height:"12",rx:"2",fill:"#86909C"},null,-1),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.98095 5.49307L8.22012 3.25389C8.28521 3.18881 8.39074 3.18881 8.45582 3.25389L8.69153 3.4896C8.75661 3.55468 8.75661 3.66021 8.69153 3.7253L6.45235 5.96447L8.69153 8.20364C8.75661 8.26873 8.75661 8.37426 8.69153 8.43934L8.45582 8.67505C8.39074 8.74013 8.28521 8.74013 8.22012 8.67505L5.98095 6.43587L3.74178 8.67505C3.67669 8.74013 3.57116 8.74013 3.50608 8.67505L3.27037 8.43934C3.20529 8.37426 3.20529 8.26873 3.27037 8.20364L5.50954 5.96447L3.27037 3.7253C3.20529 3.66021 3.20529 3.55468 3.27037 3.4896L3.50608 3.25389C3.57116 3.18881 3.67669 3.18881 3.74178 3.25389L5.98095 5.49307Z",fill:"white"},null,-1)]))}]]),gr={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},fr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",gr,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"},null,-1)]))}]]),Cr={class:"comment-common-icon"},vr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Cr,o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.createElementVNode("path",{d:"M4.88933 0.613974C4.92947 0.616946 4.96831 0.629568 5.00253 0.650767C6.67348 1.68589 7.55141 3.13884 7.63632 5.00962C7.947 5.00962 8.2245 4.65999 8.46882 3.96072L8.49487 3.88447C8.53862 3.75351 8.68025 3.68282 8.8112 3.72656C8.83398 3.73417 8.85554 3.74502 8.87522 3.75878C9.96316 4.5193 10.5048 5.50231 10.5 6.70782C10.4999 6.73762 10.4982 6.76675 10.495 6.7952C10.4985 6.86294 10.5 6.93131 10.5 7.00005C10.5 9.48533 8.48528 11.5 6 11.5C3.51472 11.5 1.5 9.48533 1.5 7.00005C1.5 6.90255 1.5031 6.80578 1.50921 6.70983C1.5062 6.70917 1.5031 6.70849 1.5 6.70782C1.50864 6.60849 1.52139 6.50994 1.53824 6.41219C1.54515 6.35775 1.55321 6.30373 1.56222 6.25003L1.57017 6.24983C1.7622 5.3813 2.28426 4.57601 3.13635 3.83394C4.00892 3.07405 4.50079 2.11523 4.61198 0.957499L4.62156 0.844839C4.63175 0.707146 4.75163 0.603784 4.88933 0.613974Z"})],-1)]))}]]),kr={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},yr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",kr,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 1.3335C14.3514 1.3335 14.6394 1.60546 14.6648 1.95041L14.6666 2.00016V14.0002C14.6666 14.3516 14.3947 14.6396 14.0497 14.665L14 14.6668H1.99998C1.64853 14.6668 1.36059 14.3949 1.33514 14.0499L1.33331 14.0002V2.00016C1.33331 1.64871 1.60527 1.36077 1.95023 1.33532L1.99998 1.3335H14ZM13.3333 2.66618H2.66664V13.3328H13.3333V2.66618ZM11.9219 6.7879C11.9719 6.83791 12 6.90574 12 6.97647V11.7993C12 11.9098 11.9104 11.9993 11.8 11.9993H6.81615C6.7975 11.9993 6.77945 11.9968 6.76232 11.992L3.91042 11.9847C3.79996 11.9844 3.71063 11.8947 3.7109 11.7842C3.71102 11.7313 3.73209 11.6807 3.76948 11.6433L6.52468 8.88807C6.62882 8.78393 6.79766 8.78393 6.9018 8.88807L8.17297 10.1593L11.5447 6.7879C11.6489 6.68376 11.8177 6.68376 11.9219 6.7879ZM5.99997 3.99951V5.99951H3.99997V3.99951H5.99997Z"},null,-1)]))}]]),br={class:"comment-common-icon"},Vr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",br,o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M586.624 234.624a74.624 74.624 0 1 1-149.184 0 74.624 74.624 0 0 1 149.12 0z m0 554.624a74.624 74.624 0 1 1-149.248 0 74.624 74.624 0 0 1 149.248 0zM512 586.624a74.624 74.624 0 1 0 0-149.248 74.624 74.624 0 0 0 0 149.248z",fill:"currentColor"})],-1)]))}]]),wr={class:"comment-common-icon",style:{color:"#1e80ff"}},xr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",wr,o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1534"},[e.createElementVNode("path",{d:"M668.928 166.912c-20.48-53.504-47.9744-84.7872-82.0224-94.9248-33.5872-10.0352-61.952 4.096-76.032 13.9776-27.5456 19.3536-41.216 49.664-50.0224 74.1376-3.3792 9.3184-6.4512 19.0976-9.216 27.9552l-2.6624 8.3968a227.8912 227.8912 0 0 1-10.3936 27.9552c-25.344 52.9408-47.4112 84.5312-66.7648 104.96-18.944 19.968-36.4544 30.464-55.1936 39.7824a45.3632 45.3632 0 0 0-25.088 40.5504l-0.1024 480.7168c0 24.9344 20.2752 45.2096 45.2096 45.2096h423.0656c21.7088 0 38.144-6.912 50.0224-16.9984a72.192 72.192 0 0 0 14.4896-16.896l0.2048-0.2048 0.0512-0.1536 0.8192-1.024 1.2288-1.8944c39.424-63.7952 66.7648-114.688 88.2176-175.616 24.4224-69.4784 36.8128-129.6896 42.0352-176.64 5.12-45.6704 3.7888-81.664-1.5872-101.376a77.9776 77.9776 0 0 0-45.568-52.3264 116.5824 116.5824 0 0 0-45.4144-8.6016l-192.8192-2.6624c28.1088-115.0976 10.0864-181.6064-2.4576-214.3744zM64.0512 413.9008a45.2096 45.2096 0 0 1 45.1584-47.36H176.128c24.9344 0 45.2096 20.2752 45.2096 45.2096v480.6144a45.2096 45.2096 0 0 1-45.2096 45.2096h-44.288a45.2096 45.2096 0 0 1-45.1584-43.0592L64 413.952z","p-id":"1535"})],-1)]))}]]),Br={class:"comment-common-icon"},Sr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Br,o[0]||(o[0]=[e.createElementVNode("svg",{t:"1650360973068",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1168",width:"200",height:"200"},[e.createElementVNode("path",{d:"M547.968 138.88c6.656-4.672 14.08-6.976 20.48-5.056 6.08 1.792 22.848 10.752 40.192 56.128 8.576 22.4 27.264 81.536-5.632 197.504a45.44 45.44 0 0 0 42.88 57.984l217.6 3.008h0.448a53.12 53.12 0 0 1 20.096 3.328 16.256 16.256 0 0 1 5.568 3.648 14.464 14.464 0 0 1 3.264 6.4c2.176 7.808 4.608 33.984-0.256 77.248-4.672 41.984-15.936 97.408-38.784 162.368-19.136 54.336-43.52 100.48-81.472 161.792a56.384 56.384 0 0 0-1.664 2.496l-0.128 0.128-1.408 2.112a7.872 7.872 0 0 1-1.28 1.472 3.84 3.84 0 0 1-1.28 0.64 20.48 20.48 0 0 1-6.848 0.96H356.032V421.44c19.712-10.624 40.704-24.576 62.592-47.616 25.472-26.88 51.008-64.768 78.208-121.6 5.568-11.584 9.856-24.384 13.632-36.032l3.072-9.856c2.688-8.448 5.184-16.384 8.064-24.32 8.064-22.4 16.128-36.032 26.368-43.136z m120.96 27.968c-20.48-53.44-48-84.736-81.984-94.912-33.6-9.984-61.952 4.16-76.032 14.08-27.584 19.264-41.28 49.6-50.048 74.048-3.392 9.344-6.464 19.2-9.216 27.968l-2.688 8.448a227.84 227.84 0 0 1-10.432 27.904c-25.28 52.928-47.36 84.544-66.752 104.96-18.944 19.968-36.48 30.464-55.168 39.808a45.376 45.376 0 0 0-25.088 40.576l-0.064 480.64c0 24.96 20.224 45.248 45.184 45.248h423.04c21.76 0 38.144-6.912 50.048-16.96a71.808 71.808 0 0 0 14.528-16.896l0.128-0.256 0.128-0.128 0.832-0.96 1.152-1.92c39.424-63.872 66.816-114.688 88.256-175.68a810.24 810.24 0 0 0 42.048-176.64c5.12-45.632 3.776-81.664-1.6-101.376a77.952 77.952 0 0 0-45.568-52.288 116.544 116.544 0 0 0-45.44-8.64l-192.768-2.688c28.096-115.072 10.048-181.568-2.496-214.336z m-604.864 247.04a45.184 45.184 0 0 1 45.12-47.296h67.008c24.96 0 45.184 20.288 45.184 45.248v480.64c0 24.96-20.224 45.12-45.184 45.12H131.84a45.184 45.184 0 0 1-45.12-43.072l-22.656-480.64z","p-id":"1169"})],-1)]))}]]),Nr={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},Er=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",Nr,o[0]||(o[0]=[e.createElementVNode("path",{"data-v-d6f79dbc":"","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99976 7.93206L10.0656 3.86619C10.1633 3.76856 10.3215 3.76856 10.4192 3.86619L10.7727 4.21975C10.8704 4.31738 10.8704 4.47567 10.7727 4.5733L6.35331 8.99272C6.15805 9.18798 5.84147 9.18798 5.6462 8.99272L1.22679 4.5733C1.12916 4.47567 1.12916 4.31738 1.22679 4.21975L1.58034 3.86619C1.67797 3.76856 1.83626 3.76856 1.93389 3.86619L5.99976 7.93206Z"},null,-1)]))}]]),Dr={class:"comment-common-icon"},Tr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Dr,o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99951 0.5C9.03708 0.5 11.4995 2.96243 11.4995 6C11.4995 9.03757 9.03708 11.5 5.99951 11.5C2.96195 11.5 0.499512 9.03757 0.499512 6C0.499512 2.96243 2.96195 0.5 5.99951 0.5ZM6.25 3.49988C6.38807 3.49988 6.5 3.61181 6.5 3.74988V5.49988H8.25C8.38807 5.49988 8.5 5.61181 8.5 5.74988V6.24988C8.5 6.38795 8.38807 6.49988 8.25 6.49988H5.75C5.61193 6.49988 5.5 6.38795 5.5 6.24988V3.74988C5.5 3.61181 5.61193 3.49988 5.75 3.49988H6.25Z"})],-1)]))}]]),Ir={class:"comment-common-icon"},Fr=C({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Ir,o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1320",width:"200",height:"200"},[e.createElementVNode("path",{d:"M147.264 647.296V220.928c0-49.536 40.128-89.728 89.6-89.728H793.6c49.536 0 89.728 40.192 89.728 89.728v426.368c0 49.536-40.128 89.728-89.6 89.728h-145.216a47.04 47.04 0 0 0-28.16 9.408l-194.56 145.792a3.392 3.392 0 0 1-5.12-1.984l-26.752-116.672a47.04 47.04 0 0 0-45.824-36.544H236.992a89.728 89.728 0 0 1-89.728-89.728zM236.864 64A156.928 156.928 0 0 0 80 220.928l0.064 426.368a156.928 156.928 0 0 0 156.928 156.928h94.976l23.232 101.312 0.064 0.448a70.592 70.592 0 0 0 109.696 40.832l190.208-142.592H793.6a156.928 156.928 0 0 0 156.928-156.928l-0.064-426.368A156.928 156.928 0 0 0 793.536 64H236.928z m69.44 442.496a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z m268.8-65.344a65.344 65.344 0 1 1-130.752 0 65.344 65.344 0 0 1 130.752 0z m138.368 65.344a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z","p-id":"1321"})],-1)]))}]]),Lr={class:"cv-comment-emoji"},_r={class:"face-tooltip-head select-none"},$r=["onClick"],zr=["src"],Pr={class:"emoji-body select-none"},Or={style:{padding:"0 5px"}},jr=["onClick"],Mr={class:"emoji-btn select-none"},Ar={key:0},Rr=C(Object.assign({name:"CompInputEmoji"},{__name:"input-emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const l=t,r=e.ref(0),n=e.ref(0),i=e.ref(new Array(2)),{emojiList:s,faceList:c}=l.emoji;function m(){i.value[0]=s[0]}return(d,p)=>(e.openBlock(),e.createElementBlock("div",Lr,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:m},{reference:e.withCtx(()=>[e.createElementVNode("div",Mr,[d.$slots.default?e.renderSlot(d.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",Ar,[e.createVNode(e.unref(fr)),p[0]||(p[0]=e.createElementVNode("span",null,"表情",-1))]))])]),default:e.withCtx(()=>[e.createElementVNode("div",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(f,g)=>(e.openBlock(),e.createElementBlock("label",{key:g,class:e.normalizeClass(r.value==g?"active":""),onClick:h=>function(v){switch(r.value=v,v){case 0:n.value=0;break;case 1:n.value=-50,i.value[1]=s[1]}}(g)},[e.createElementVNode("img",{src:f,alt:""},null,8,zr)],10,$r))),128))]),e.createElementVNode("div",Pr,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${n.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",Or,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,(h,v)=>(e.openBlock(),e.createElementBlock("span",{key:v,class:"emoji-item",onClick:u=>d.$emit("addEmoji",v)},[e.createVNode(e.unref(k.ElImage),{src:h,title:String(v),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,jr))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-2fb59975"]]),Hr={class:"cv-comment-editor"},Ur=["placeholder","innerHTML"],Wr=["src"],qr=["onClick"],Gr={key:0,class:"cv-comment-editor__action"},Kr={__name:"input-box",props:{placeholder:"",contentBtn:"",parentId:"",reply:""},emits:["hide","close"],setup(t,{expose:o,emit:l}){const r=t,n=e.ref(""),i=e.ref(),s=e.ref(!1),c=e.ref(!1),m=e.ref(),d=e.ref(!0),p=e.ref(),f=e.ref(),g=e.ref([]),h=e.ref([]),v=e.reactive({imgLength:0}),u=64,y=e.ref(),b=e.ref(!1),V=e.ref(),w=e.computed(()=>u+"px"),N=e.computed(()=>"8px 12px"),D=l,{upload:z,submit:F,focus:P}=e.inject("InjectInputBox"),ae=e.inject("InjectionEmojiApi");function Qo(){F({content:r.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${r.reply.user.username}:</span> ${n.value}`:n.value,parentId:le(r.parentId,null),reply:r.reply,files:h.value,clear:()=>{m.value&&(m.value.innerHTML="",n.value=m.value.innerHTML,s.value=!1),g.value.length=0,h.value=[],d.value=!0,D("close")}})}function $a(S){te(n.value)&&!v.imgLength&&(c.value=!1,D("hide",S))}function za(S){b.value=!0,s.value=!0,c.value=!0,e.nextTick(()=>{p.value=document.querySelector("div[id^='el-popper-container']")}),P()}function Pa(S){var B,T;y.value=(B=window.getSelection())==null?void 0:B.getRangeAt(0),(T=m.value)!=null&&T.innerHTML||(s.value=!1),b.value=!1}function Oa(S){const{innerHTML:B}=(S==null?void 0:S.target)||S;n.value=B||"",te(n.value.replace(/ |<br>| /g,""))?d.value=!0:d.value=!1}function Yo(){e.nextTick(()=>{var S;(S=m.value)==null||S.focus()})}function ja(S){S.ctrlKey&&S.key=="Enter"&&(te(n.value.replace(/ |<br>| /g,""))?k.ElMessage({message:"内容不能为空",type:"info"}):Qo())}function Ma(S){var L;g.value.length=0,h.value.length=0;const B=(L=f.value)==null?void 0:L.files;if(v.imgLength=le(B==null?void 0:B.length,0),B)for(let I=0;I<B.length;I++){let Y=B[I].name,ne=(T=B[I],window.URL?window.URL.createObjectURL(T):window.webkitURL?window.webkitURL.createObjectURL(T):"");h.value.push(B[I]),mr(Y)?g.value.push(ne):k.ElMessage({type:"warn",message:"请选择图片类型文件!",duration:2500})}var T}return e.watch(()=>n.value,S=>{b.value||(i.value=S)}),e.onMounted(()=>{var S;(S=m.value)==null||S.addEventListener("keyup",B=>{const T=B.target;T.innerHTML=="<br>"&&(T.innerHTML="")})}),o({focus:()=>Yo()}),(S,B)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",Hr,[e.createElementVNode("div",{class:e.normalizeClass(["cv-comment-editor__box",{active:s.value,"input-active":c.value}])},[e.createElementVNode("div",{ref_key:"editorRef",ref:m,class:"rich-input",contenteditable:"true",placeholder:r.placeholder,onFocus:za,onInput:Oa,onBlur:Pa,onKeydown:e.withKeys(ja,["enter"]),innerHTML:i.value,style:e.normalizeStyle({minHeight:w.value,padding:N.value})},null,44,Ur),e.createElementVNode("div",{ref_key:"imageRef",ref:V,class:"image-preview-box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(T,L)=>(e.openBlock(),e.createElementBlock("div",{key:L,class:"image-preview"},[e.createElementVNode("img",{src:T,alt:""},null,8,Wr),e.createElementVNode("div",{class:"clean-btn",onClick:I=>{var ne;return Y=L,void((ne=g==null?void 0:g.value)==null?void 0:ne.splice(Y,1));var Y}},[e.createVNode(e.unref(hr))],8,qr)]))),128))],512)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",Gr,[e.createElementVNode("div",null,[e.createVNode(Rr,{emoji:e.unref(ae),onAddEmoji:B[0]||(B[0]=T=>function(L){var Y;let I=window.getSelection();I&&(I.removeAllRanges(),y.value||(Yo(),y.value=I.getRangeAt(0)),y.value.deleteContents(),y.value.insertNode(y.value.createContextualFragment(L)),y.value.collapse(!1),I.addRange(y.value),n.value=((Y=m==null?void 0:m.value)==null?void 0:Y.innerHTML)||"",te(n.value.replace(/ |<br>| /g,""))?d.value=!0:d.value=!1)}(T))},null,8,["emoji"]),e.createElementVNode("div",{class:"picture",onClick:B[1]||(B[1]=(...T)=>{var L,I;return((L=f.value)==null?void 0:L.click)&&((I=f.value)==null?void 0:I.click(...T))})},[e.createVNode(e.unref(yr)),B[2]||(B[2]=e.createElementVNode("span",null,"图片",-1)),e.createElementVNode("input",{id:"comment-upload",ref_key:"inputRef",ref:f,type:"file",multiple:"",onChange:Ma},null,544)])]),e.createElementVNode("div",null,[B[3]||(B[3]=e.createElementVNode("span",{style:{"margin-right":"10px"}},[e.createTextVNode(" 文明上网理性发言,请遵守 "),e.createElementVNode("a",{href:"###",target:"_blank"},"《新闻评论服务协议》")],-1)),e.createVNode(e.unref(k.ElButton),{type:"primary",disabled:d.value,onClick:Qo},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.contentBtn),1)]),_:1},8,["disabled"])])])):e.createCommentVNode("",!0)]),_:1})])),[[e.unref(k.ClickOutside),$a,p.value]])}},ba=C(Kr,[["__scopeId","data-v-e6039cd3"]]),Qr={class:"u-fold"},Yr={class:"action-box select-none"},Zr=C(Object.assign({name:"UFold"},{__name:"fold",props:{line:{type:[Number,String],default:5}},setup(t){e.useCssVars(c=>({"15491e60":l.value}));const o=t,l=e.computed(()=>{let c=Math.trunc(Number(o.line));return c>0?c:1}),r=e.ref(!0),n=e.ref(!1),i=e.ref();let s;return e.onMounted(()=>{s=new ResizeObserver(c=>{r.value&&i.value&&(n.value=i.value.offsetHeight<i.value.scrollHeight)}),s.observe(i.value)}),e.onUnmounted(()=>{s.disconnect()}),(c,m)=>(e.openBlock(),e.createElementBlock("div",Qr,[e.createElementVNode("div",{class:e.normalizeClass(["txt-box",{"over-hidden":r.value}])},[e.createElementVNode("div",{ref_key:"divBox",ref:i},[e.renderSlot(c.$slots,"default",{},void 0,!0)],512)],2),e.createElementVNode("div",Yr,[n.value&&c.unfold?(e.openBlock(),e.createElementBlock("div",{key:0,class:"expand-btn",onClick:m[0]||(m[0]=d=>r.value=!r.value)},e.toDisplayString(r.value?"展开":"收起"),1)):e.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-94334818"]]),el={__name:"user-card",props:{uid:""},setup(t){const o=e.ref({}),{showInfo:l}=e.inject("InjectContentBox"),r=e.inject("InjectSlots"),n=()=>e.h("div",r.card(o.value));return(i,s)=>e.unref(r).card?(e.openBlock(),e.createBlock(e.unref(k.ElPopover),{key:0,placement:"top",width:300,"show-after":300,onBeforeEnter:s[0]||(s[0]=()=>e.unref(l)(t.uid,c=>o.value=c))},{reference:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),default:e.withCtx(()=>[e.createVNode(n)]),_:3})):e.renderSlot(i.$slots,"default",{key:1})}};function Va(t){return!!e.getCurrentScope()&&(e.onScopeDispose(t),!0)}const qo=typeof window<"u"&&typeof document<"u";const Jr=Object.prototype.toString,Xr=t=>Jr.call(t)==="[object Object]";function io(t){return Array.isArray(t)?t:[t]}const es=qo?window:void 0,wa=qo?window.navigator:void 0;function xa(...t){const o=[],l=()=>{o.forEach(m=>m()),o.length=0},r=e.computed(()=>{const m=io(e.toValue(t[0])).filter(d=>d!=null);return m.every(d=>typeof d!="string")?m:void 0}),n=(i=()=>{var m,d;return[(d=(m=r.value)==null?void 0:m.map(p=>function(f){var g;const h=e.toValue(f);return(g=h==null?void 0:h.$el)!=null?g:h}(p)))!=null?d:[es].filter(p=>p!=null),io(e.toValue(r.value?t[1]:t[0])),io(e.unref(r.value?t[2]:t[1])),e.toValue(r.value?t[3]:t[2])]},s=([m,d,p,f])=>{if(l(),!(m!=null&&m.length)||!(d!=null&&d.length)||!(p!=null&&p.length))return;const g=Xr(f)?{...f}:f;o.push(...m.flatMap(h=>d.flatMap(v=>p.map(u=>((y,b,V,w)=>(y.addEventListener(b,V,w),()=>y.removeEventListener(b,V,w)))(h,v,u,g)))))},c={flush:"post"},e.watch(i,s,{...c,immediate:!0}));var i,s,c;return Va(l),()=>{n(),l()}}function Ba(t){const o=function(){const l=e.shallowRef(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{l.value=!0},r),l}();return e.computed(()=>(o.value,!!t()))}function tl(t,o={}){const{controls:l=!1,navigator:r=wa}=o,n=Ba(()=>r&&"permissions"in r),i=e.shallowRef(),s=typeof t=="string"?{name:t}:t,c=e.shallowRef(),m=()=>{var p,f;c.value=(f=(p=i.value)==null?void 0:p.state)!=null?f:"prompt"};xa(i,"change",m,{passive:!0});const d=function(p){let f;function g(){return f||(f=p()),f}return g.reset=async()=>{const h=f;f=void 0,h&&await h},g}(async()=>{if(n.value){if(!i.value)try{i.value=await r.permissions.query(s)}catch{i.value=void 0}finally{m()}return l?e.toRaw(i.value):void 0}});return d(),l?{state:c,isSupported:n,query:d}:c}function ts(t={}){const{navigator:o=wa,read:l=!1,source:r,copiedDuring:n=1500,legacy:i=!1}=t,s=Ba(()=>o&&"clipboard"in o),c=tl("clipboard-read"),m=tl("clipboard-write"),d=e.computed(()=>s.value||i),p=e.shallowRef(""),f=e.shallowRef(!1),g=function(v,u,y={}){const{immediate:b=!0,immediateCallback:V=!1}=y,w=e.shallowRef(!1);let N=null;function D(){N&&(clearTimeout(N),N=null)}function z(){w.value=!1,D()}function F(...P){V&&v(),D(),w.value=!0,N=setTimeout(()=>{w.value=!1,N=null,v(...P)},e.toValue(u))}return b&&(w.value=!0,qo&&F()),Va(z),{isPending:e.shallowReadonly(w),start:F,stop:z}}(()=>f.value=!1,n,{immediate:!1});function h(v){return v==="granted"||v==="prompt"}return d.value&&l&&xa(["copy","cut"],async function(){let v=!(s.value&&h(c.value));if(!v)try{p.value=await o.clipboard.readText()}catch{v=!0}var u,y,b;v&&(p.value=(b=(y=(u=document==null?void 0:document.getSelection)==null?void 0:u.call(document))==null?void 0:y.toString())!=null?b:"")},{passive:!0}),{isSupported:d,text:p,copied:f,copy:async function(v=e.toValue(r)){if(d.value&&v!=null){let u=!(s.value&&h(m.value));if(!u)try{await o.clipboard.writeText(v)}catch{u=!0}u&&function(y){const b=document.createElement("textarea");b.value=y??"",b.style.position="absolute",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}(v),p.value=v,f.value=!0,g.start()}}}}const os={class:"comment-list-actbox__right"},ls={class:"operation-warp"},as={class:"dialog-footer"},ns={__name:"comment-operate",props:{data:{type:[Object],default:()=>({})}},setup(t){const{copy:o}=ts(),l=e.ref(!1),r=e.ref({report_type:"",report_content:""}),n=t;function i(){let s=n.data||{};l.value=!1,k.ElMessage({type:"info",message:"举报成功: "+s.id})}return(s,c)=>{const m=e.resolveComponent("el-dropdown-item"),d=e.resolveComponent("el-dropdown-menu"),p=e.resolveComponent("el-dropdown"),f=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-form-item"),v=e.resolveComponent("el-input"),u=e.resolveComponent("el-form"),y=e.resolveComponent("el-button"),b=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",os,[e.createVNode(p,{trigger:"click",onCommand:c[0]||(c[0]=V=>function(w){let N=n.data||{};switch(w){case"remove":setTimeout(()=>{var D;(D=commentRef.value)==null||D.remove(N)},200);break;case"report":l.value=!0;break;case"copy":o(N.content),k.ElMessage({type:"info",message:"复制成功"})}}(V))},{dropdown:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(m,{command:"report"},{default:e.withCtx(()=>c[5]||(c[5]=[e.createTextVNode("举报")])),_:1}),e.createVNode(m,{command:"remove"},{default:e.withCtx(()=>c[6]||(c[6]=[e.createTextVNode("删除")])),_:1}),e.createVNode(m,{divided:"",command:"copy"},{default:e.withCtx(()=>c[7]||(c[7]=[e.createTextVNode("复制")])),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(e.unref(Vr))])]),_:1}),e.createVNode(b,{title:"举报",modelValue:l.value,"onUpdate:modelValue":c[4]||(c[4]=V=>l.value=V),width:"400px",style:{width:"90%","max-width":"400px"}},{footer:e.withCtx(()=>[e.createElementVNode("span",as,[e.createVNode(y,{onClick:c[3]||(c[3]=V=>l.value=!1)},{default:e.withCtx(()=>c[13]||(c[13]=[e.createTextVNode("取消")])),_:1}),e.createVNode(y,{type:"primary",onClick:i},{default:e.withCtx(()=>c[14]||(c[14]=[e.createTextVNode("提交")])),_:1})])]),default:e.withCtx(()=>[e.createVNode(u,{"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(h,{label:"您为什么要举报此信息?"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:r.value.report_type,"onUpdate:modelValue":c[1]||(c[1]=V=>r.value.report_type=V)},{default:e.withCtx(()=>[e.createVNode(f,{value:"色情淫秽"},{default:e.withCtx(()=>c[8]||(c[8]=[e.createTextVNode("色情淫秽")])),_:1}),e.createVNode(f,{value:"骚扰谩骂"},{default:e.withCtx(()=>c[9]||(c[9]=[e.createTextVNode("骚扰谩骂")])),_:1}),e.createVNode(f,{value:"广告欺诈"},{default:e.withCtx(()=>c[10]||(c[10]=[e.createTextVNode("广告欺诈")])),_:1}),e.createVNode(f,{value:"反动"},{default:e.withCtx(()=>c[11]||(c[11]=[e.createTextVNode("反动")])),_:1}),e.createVNode(f,{value:"其他"},{default:e.withCtx(()=>c[12]||(c[12]=[e.createTextVNode("其他")])),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"举报说明(可选):"},{default:e.withCtx(()=>[e.createVNode(v,{type:"textarea",modelValue:r.value.report_content,"onUpdate:modelValue":c[2]||(c[2]=V=>r.value.report_content=V),maxlength:"200",placeholder:"描述恶意行为",rows:"3"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},is={class:"comment-sub"},rs=["href"],ss={class:"comment-primary"},cs={class:"comment-main"},ds={key:1,class:"user-info"},ms=["href"],ps={class:"username"},us={class:"name",style:{"max-width":"10em"}},hs={blank:"true",class:"rank"},gs=["innerHTML"],fs={class:"address",style:{color:"#939393","font-size":"12px"}},Cs={class:"time"},vs={class:"content"},ks=["innerHTML"],ys={class:"imgbox",style:{display:"flex"}},bs={class:"comment-list-actbox select-none"},Vs={class:"comment-list-actbox__left"},ws={key:2},xs={class:"comment-list-actbox__right"},Bs={key:2},Ss={__name:"content-box",props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:""}},setup(t){const o=t,l=e.reactive({active:!1}),r=e.ref(),n=e.ref(),i=e.computed(()=>{let y=o.data.contentImg;return te(y)?[]:y==null?void 0:y.split("||")}),{allEmoji:s}=e.inject("InjectionEmojiApi"),{like:c,user:m,relativeTime:d}=e.inject("InjectContentBox");function p(){l.active=!l.active,l.active&&e.nextTick(()=>{var y;(y=r.value)==null||y.focus()})}function f(y){var V;const b=y.target;(V=n.value)!=null&&V.contains(b)||(l.active=!1)}const g=e.inject("InjectSlots"),h=()=>e.h("div",g.info(o.data)),v=e.computed(()=>((y,b)=>(b=b.replace(/\[.+?\]/g,V=>{const w=y[V];return w?['<img src="',w,'" width="20" height="20" alt="',V,'" title="',V,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):V}),b))(s,o.data.content)),u=y=>{switch(y){case 1:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="831"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#8CDBF4" p-id="832"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="833"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m950.857143-365.714285l73.142857-73.142858v146.285715h-73.142857z m73.142857-73.142858h146.285715v146.285715h-146.285715z m0 146.285715h146.285715v438.857143h-146.285715z" fill="#FFFFFF"></path></svg>';case 2:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="765"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#6ECEFF" p-id="766"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="767"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v146.285714h-146.285714z m-219.428572 292.571428V512h146.285714v146.285714z" fill="#FFFFFF" p-id="768"></path><path d="M1097.142857 585.142857V438.857143h365.714286v146.285714z m0 73.142857h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 3:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="799"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#599DFF" p-id="800"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="801"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v73.142857h-146.285714z m0 219.428571h146.285714v73.142857h-146.285714z m-146.285715-146.285714h292.571429v146.285714h-292.571429z m-73.142857 219.428571h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 4:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="815"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#34D19B" p-id="816"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="817"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m975.213715-365.714285L1243.428571 219.428571v219.428572h-146.285714zM1097.142857 438.857143h146.285714v292.571428h-146.285714z m146.285714 146.285714h73.142858v146.285714h-73.142858z m0-365.714286h73.142858v146.285715h-73.142858z m73.142858 0h146.285714v585.142858h-146.285714z" fill="#FFFFFF"></path></svg>';case 5:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="782"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#FFA000" p-id="783"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="784"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-73.142857h146.285714v219.428572h-146.285714z m-219.428572-365.714286h365.714286v146.285715h-365.714286z m0 438.857143h219.428572v146.285715h-219.428572z m73.142857-219.428571h219.428572v146.285714h-219.428572z" fill="#FFFFFF" p-id="785"></path><path d="M1316.571429 438.857143h146.285714v146.285714h-146.285714z m-219.428572-73.142857h146.285714v219.428571h-146.285714z" fill="#FFFFFF"></path></svg>';case 6:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="748"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#F36262" p-id="749"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="750"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-146.285714h146.285714v292.571429h-146.285714z m-73.142858-292.571429h146.285715v146.285715h-146.285715z m-146.285714 146.285715h146.285714v438.857143h-146.285714z" fill="#FFFFFF" p-id="751"></path><path d="M1243.428571 438.857143h219.428572v146.285714h-219.428572z m-48.786285-170.642286L1243.428571 219.428571v146.285715h-146.285714zM1243.428571 658.285714h146.285715v146.285715h-146.285715z" fill="#FFFFFF"></path></svg>';default:return""}};return(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["comment",{reply:o.reply}])},[e.createElementVNode("div",is,[e.createVNode(el,{uid:e.unref(Z)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createVNode(e.unref(k.ElAvatar),{style:{"margin-top":"5px"},size:40,fit:"cover",src:t.data.user.avatar},{default:e.withCtx(()=>b[2]||(b[2]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])),_:1},8,["src"])],8,rs)]),_:1},8,["uid"])]),e.createElementVNode("div",ss,[e.createElementVNode("div",cs,[e.unref(g).info?(e.openBlock(),e.createBlock(h,{key:0})):(e.openBlock(),e.createElementBlock("div",ds,[e.createVNode(el,{uid:e.unref(Z)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createElementVNode("div",ps,[e.createElementVNode("span",us,e.toDisplayString(t.data.user.username),1),e.createElementVNode("span",hs,[e.createElementVNode("i",{class:"comment-common-icon",style:{"font-size":"24px"},innerHTML:u(t.data.user.level)},null,8,gs)])])],8,ms)]),_:1},8,["uid"]),e.createElementVNode("span",fs," "+e.toDisplayString(t.data.address),1),e.createElementVNode("time",Cs,e.toDisplayString(e.unref(d)?e.unref(pr)(t.data.createTime):t.data.createTime),1)])),e.createElementVNode("div",vs,[e.createVNode(Zr,{unfold:""},{default:e.withCtx(()=>[e.createElementVNode("div",{innerHTML:v.value},null,8,ks),e.createElementVNode("div",ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(V,w)=>(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:w,src:V,style:{height:"72px",padding:"8px 4px"},lazy:"","preview-src-list":i.value,"initial-index":w},null,8,["src","preview-src-list","initial-index"]))),128))])]),_:1})]),e.createElementVNode("div",bs,[e.createElementVNode("div",Vs,[e.createElementVNode("div",{"data-tip":"点赞",class:"item",onClick:b[0]||(b[0]=V=>e.unref(c)(e.unref(Z)(t.data.id)))},[e.unref(m).likeIds.map(String).indexOf(e.unref(Z)(t.data.id))==-1?(e.openBlock(),e.createBlock(e.unref(Sr),{key:0})):(e.openBlock(),e.createBlock(e.unref(xr),{key:1})),t.data.likes!=0?(e.openBlock(),e.createElementBlock("span",ws,e.toDisplayString(t.data.likes),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{"data-tip":"回复",ref_key:"btnRef",ref:n,class:e.normalizeClass(["item",{active:l.active}]),onClick:p},[e.createVNode(e.unref(Fr)),e.createElementVNode("span",null,e.toDisplayString(l.active?"取消回复":"回复"),1)],2)]),e.createElementVNode("div",xs,[e.renderSlot(y.$slots,"operate",{},()=>[e.createVNode(ns,{data:o.data},null,8,["data"])],!0)])]),l.active?(e.openBlock(),e.createElementBlock("div",Bs,[e.createVNode(ba,{ref_key:"commentRef",ref:r,"parent-id":e.unref(Z)(t.id),placeholder:`回复 @${t.data.user.username}...`,reply:t.data,"content-btn":"发布",style:{"margin-top":"12px"},onHide:f,onClose:b[1]||(b[1]=V=>l.active=!1)},null,8,["parent-id","placeholder","reply"])])):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"default",{},void 0,!0)])],2))}},Sa=C(Ss,[["__scopeId","data-v-d0b5b3d2"]]),Ns={key:0,class:"reply-box"},Es={class:"reply-list"},Ds={key:0,class:"fetch-more"},Ts={key:0},Is={key:1},Fs={key:0},Ls={key:1,class:"fetch-more"},_s={__name:"reply-box",props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:""}},setup(t){const o=t,l=e.reactive({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:r,replyShowSize:n,comments:i,page:s}=e.inject("InjectReplyBox"),c=e.computed(()=>{let g={total:0,length:0,list:[]};if(o.data){let h=o.data.list.length;g={total:o.data.total,length:h,list:o.data.list}}if(!l.over){let h=g.list.slice(0,n);g.list=h}return s&&(g.list=g.list.slice(0,5)),g}),m=()=>{l.over=!0},d=g=>{i.value.forEach(h=>{h.id==o.id&&h.reply&&(h.reply=g)})},p=g=>{l.pageNum=g,r(o.id,g,l.pageSize,h=>d(h))},f=g=>{l.pageSize=g,r(o.id,l.pageNum,g,h=>d(h))};return(g,h)=>c.value.length>0?(e.openBlock(),e.createElementBlock("div",Ns,[e.createElementVNode("div",Es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.list,(v,u)=>(e.openBlock(),e.createBlock(Sa,{id:t.id,key:u,data:v,reply:""},null,8,["id","data"]))),128)),c.value.length>e.unref(n)?(e.openBlock(),e.createElementBlock("div",Ds,[l.loading?(e.openBlock(),e.createElementBlock("span",Ts,"加载中...")):(e.openBlock(),e.createElementBlock("div",Is,[l.over?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Fs,[e.createTextVNode(" 共"+e.toDisplayString(c.value.total)+"条回复, ",1),e.createElementVNode("span",{class:"fetch-more-comment select-none",onClick:m},[h[0]||(h[0]=e.createTextVNode(" 点击查看 ")),e.createVNode(e.unref(Er))])]))]))])):e.createCommentVNode("",!0),l.over&&e.unref(s)?(e.openBlock(),e.createElementBlock("div",Ls,[e.createVNode(e.unref(k.ElPagination),{small:"","hide-on-single-page":"",layout:"total, prev, pager, next",total:c.value.total,"page-size":l.pageSize,onCurrentChange:p,onSizeChange:f},null,8,["total","page-size"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}},$s=C(_s,[["__scopeId","data-v-1726e7d1"]]),zs={key:0,class:"comment-list"},Ps={__name:"comment-list",props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup:t=>(o,l)=>t.data?(e.openBlock(),e.createElementBlock("div",zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(r,n)=>(e.openBlock(),e.createBlock(Sa,{id:e.unref(Z)(r.id),key:n,data:r},{default:e.withCtx(()=>[e.createVNode($s,{id:e.unref(Z)(r.id),data:r.reply},null,8,["id","data"])]),_:2},1032,["id","data"]))),128))])):e.createCommentVNode("",!0)},Os={class:"cv-comment-base"},js={class:"cv-comment-form"},Ms={class:"cv-comment-form__content"},As={class:"cv-comment-form__avatar"},Rs={class:"cv-comment-list-wrapper"},jt=Object.assign({name:"cvCommentBase"},{__name:"comment",props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:["submit","like","replyPage","showInfo","focus"],setup(t,{expose:o,emit:l}){const r=t,{user:n,comments:i,showSize:s,replyShowSize:c,total:m}=e.toRefs(r.config),d=l,p={upload:r.upload,submit:({content:g,parentId:h,reply:v,files:u,clear:y})=>{d("submit",{content:g,parentId:h,reply:v,files:u,finish:b=>{if(y(),h){let V=i.value.find(w=>w.id==h);if(V){let w=V.reply;w?(w.list.unshift(b),w.total++):V.reply={total:1,list:[b]}}}else i.value.unshift(b)}})},focus:()=>d("focus")};e.provide("InjectInputBox",p);const f=(g,h)=>{let v=null;i.value.forEach(u=>{var y;v=u.id==g?u:(y=u.reply)==null?void 0:y.list.find(b=>b.id==g),v&&(v.likes+=h)})};return e.provide("InjectContentBox",{user:n,like:g=>{const h=r.config.user.likeIds;d("like",g,()=>{if(h.findIndex(v=>v==g)==-1)h.push(g),f(g,1);else{let v=h.findIndex(u=>u==g);v!=-1&&(h.splice(v,1),f(g,-1))}})},relativeTime:le(r.relativeTime,!1),showInfo:(g,h)=>d("showInfo",g,h)}),e.provide("InjectReplyBox",{page:r.page,replyPage:(g,h,v,u)=>{d("replyPage",{parentId:g,pageNum:h,pageSize:v,finish:u})},replyShowSize:le(c,3),comments:i}),e.provide("InjectionEmojiApi",r.config.emoji),e.provide("InjectSlots",e.useSlots()),o({remove:g=>{const{parentId:h,id:v}=g;if(h){let u=i.value.find(b=>b.id==h),y=u==null?void 0:u.reply;if(y){let b=y.list.findIndex(V=>V.id==v);b!=-1&&(y.list.splice(b,1),y.total--)}}else{let u=i.value.findIndex(y=>y.id==v);u!=-1&&i.value.splice(u,1)}}}),(g,h)=>{const v=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock("div",Os,[e.createElementVNode("div",js,[h[1]||(h[1]=e.createElementVNode("div",{class:"cv-comment-form__header"},[e.createElementVNode("span",{class:"cv-comment-form__hdtitle"},"评论")],-1)),e.createElementVNode("div",Ms,[e.createElementVNode("div",As,[e.createVNode(v,{size:40,src:t.config.user.avatar},{default:e.withCtx(()=>h[0]||(h[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])),_:1},8,["src"])]),e.createVNode(ba,{placeholder:"输入评论(Enter换行,Ctrl + Enter发送)","content-btn":"发表评论"})])]),e.renderSlot(g.$slots,"default",{},()=>[h[2]||(h[2]=e.createElementVNode("div",{class:"title"},"全部评论",-1))]),e.createElementVNode("div",Rs,[e.createVNode(Ps,{data:e.unref(i),total:e.unref(m),"show-size":e.unref(le)(e.unref(s),5)},null,8,["data","total","show-size"])])])}}}),Hs={class:"comment-scroll"},Us=["infinite-scroll-disabled"],Ws={class:"scroll-btn"},qs={key:1},Gs={key:2},Mt=Object.assign({name:"cvCommentScroll"},{__name:"comment-scroll",props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:["more"],setup(t,{emit:o}){const l=t,r=e.ref(!1),n=e.ref(!1),i=o,s=e.computed(()=>n.value&&l.disable),c=e.computed(()=>!n.value||r.value||s.value),m=((p,f=200,g=!1)=>{let h=!1,v=null;const u=(...y)=>new Promise((b,V)=>{if(v&&clearTimeout(v),g&&!h){const w=p.apply(void 0,y);b(w),h=!0}else v=setTimeout(()=>{const w=p.apply(void 0,y);b(w),h=!1,v=null},f)});return u.cancel=()=>{v&&clearTimeout(v),h=!1},u})(()=>{i("more"),r.value=!1},500),d=()=>{r.value=!0,m()};return(p,f)=>{const g=e.resolveComponent("el-link"),h=e.resolveDirective("infinite-scroll");return e.openBlock(),e.createElementBlock("div",Hs,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{"infinite-scroll-disabled":c.value,"infinite-scroll-distance":"2"},[e.renderSlot(p.$slots,"default"),e.createElementVNode("div",Ws,[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:0,type:"primary",underline:!1,onClick:f[0]||(f[0]=v=>n.value=!n.value)},{default:e.withCtx(()=>f[1]||(f[1]=[e.createTextVNode("加载更多")])),_:1})),r.value?(e.openBlock(),e.createElementBlock("p",qs,"加载中...")):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("p",Gs,"没有更多了")):e.createCommentVNode("",!0)])],8,Us)),[[h,d]])])}}}),Ks={class:"cv-comment-nav-wrap"},Qs={class:"cv-comment-nav__sort"},At=Object.assign({name:"cvCommentNav"},{__name:"comment-nav",props:{modelValue:!1},emits:["update:modelValue","sorted"],setup(t,{emit:o}){const l=t,r=o,n=e.computed({get:()=>l.modelValue,set(i){r("update:modelValue",i),r("sorted",i)}});return(i,s)=>(e.openBlock(),e.createElementBlock("div",Ks,[s[4]||(s[4]=e.createElementVNode("span",{class:"cv-comment-nav__title"},"全部评论",-1)),e.createElementVNode("div",Qs,[e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:n.value}]),onClick:s[0]||(s[0]=c=>n.value=!0)},[e.createVNode(e.unref(Tr)),s[2]||(s[2]=e.createTextVNode(" 最新 "))],2),e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:!n.value}]),onClick:s[1]||(s[1]=c=>n.value=!1)},[e.createVNode(e.unref(vr)),s[3]||(s[3]=e.createTextVNode(" 最热 "))],2)])]))}});jt.install=function(t){t.component(jt.name,jt)},Mt.install=function(t){t.component(Mt.name,Mt)},At.install=function(t){t.component(At.name,At)};const Ys={name:"cvSvgs",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data:()=>({}),computed:{svgType(){return"svg"+this.type},style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},Zs={key:0,"aria-hidden":"true"},Js=["xlink:href"],Rt=C(Ys,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.svgType)))]),l.name?(e.openBlock(),e.createElementBlock("svg",Zs,[e.createElementVNode("use",{"xlink:href":l.name},null,8,Js)])):e.createCommentVNode("",!0)]),_:3},16)}]]),Xs={name:"cvIcons",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data:()=>({}),computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},ec={key:0,"aria-hidden":"true"},tc=["xlink:href"],Ht=C(Xs,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.type)))]),l.name?(e.openBlock(),e.createElementBlock("svg",ec,[e.createElementVNode("use",{"xlink:href":l.name},null,8,tc)])):e.createCommentVNode("",!0)]),_:3},16)}]]);Ht.install=function(t){t.component(Ht.name,Ht)},Rt.install=function(t){t.component(Rt.name,Rt)};const oc={class:"u-emoji"},lc={class:"face-tooltip-head select-none"},ac=["onClick"],nc=["src"],ic={class:"emoji-body select-none"},rc={style:{padding:"0 5px"}},sc=["onClick"],cc={class:"emoji-btn select-none"},dc={key:0},mc=C(Object.assign({name:"cvEmoji"},{__name:"emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const l=t,r=e.ref(0),n=e.ref(0),i=e.ref(new Array(2)),{emojiList:s,faceList:c}=l.emoji;function m(){i.value[0]=s[0]}return(d,p)=>(e.openBlock(),e.createElementBlock("div",oc,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:m},{reference:e.withCtx(()=>[e.createElementVNode("div",cc,[d.$slots.default?e.renderSlot(d.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",dc,p[0]||(p[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"})],-1),e.createElementVNode("span",null,"表情",-1)])))])]),default:e.withCtx(()=>[e.createElementVNode("div",lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(f,g)=>(e.openBlock(),e.createElementBlock("label",{key:g,class:e.normalizeClass(r.value==g?"active":""),onClick:h=>function(v){switch(r.value=v,v){case 0:n.value=0;break;case 1:n.value=-50,i.value[1]=s[1]}}(g)},[e.createElementVNode("img",{src:f,alt:""},null,8,nc)],10,ac))),128))]),e.createElementVNode("div",ic,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${n.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,(h,v)=>(e.openBlock(),e.createElementBlock("span",{key:v,class:"emoji-item",onClick:u=>d.$emit("addEmoji",v)},[e.createVNode(e.unref(k.ElImage),{src:h,title:String(v),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,sc))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-da53b6ed"]]),pc={class:"cv-chat-message"},uc={class:"chat-list"},hc={class:"content"},gc={key:0,class:"username"},fc=["innerHTML"],Cc={__name:"message",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(t,{expose:o}){const{allEmoji:l}=e.inject("InjectionEmojiApi"),r=e.ref();o({scroll:()=>{e.nextTick(()=>{const i=document.querySelector(".chat-item:last-child");r.value.setScrollTop(i.offsetTop)})}});const n=(i,s)=>(s=s.replace(/\[.+?\]/g,c=>{const m=i[c];return m?['<img src="',m,'" width="20" height="20" alt="',c,'" title="',c,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):c}),s);return(i,s)=>(e.openBlock(),e.createElementBlock("div",pc,[e.createVNode(e.unref(k.ElScrollbar),{ref_key:"scrollbarRef",ref:r},{default:e.withCtx(()=>[e.createElementVNode("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(c,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass([{self:t.userId==c.id},"chat-item"])},[e.createElementVNode("div",null,[e.createVNode(e.unref(k.ElAvatar),null,{default:e.withCtx(()=>s[0]||(s[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])),_:1})]),e.createElementVNode("div",hc,[t.userId!=c.id?(e.openBlock(),e.createElementBlock("div",gc,e.toDisplayString(c.username),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"card-box",innerHTML:n(e.unref(l),c.content)},null,8,fc)]),s[1]||(s[1]=e.createElementVNode("div",{class:"date"},null,-1))],2))),128))])]),_:1},512)]))}},vc={class:"cv-chat-wrap"},kc={class:"header"},yc={id:"chat-footer",class:"footer"},Ut=Object.assign({name:"cvChat"},{__name:"chat",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:["submit"],setup(t,{emit:o}){const l=t,r=e.ref(!1),n=e.ref(""),i=e.ref(),{data:s}=l,c=o,m=g=>{const{ctrlKey:h,key:v}=g;h&&v=="Enter"&&p()},d=()=>{n.value="",i.value.scroll()},p=()=>{let g=n.value;g.trim()?(g=g.replace(/\n/g,"<br/>"),c("submit",{clear:d,content:g})):k.ElMessage({type:"error",message:"内容不能为空"})},f=g=>{let h=document.getElementById("emojiInput"),v=h.selectionStart,u=h.selectionEnd,y=h.value;if(v===null||u===null)return;let b=y.substring(0,v)+g+y.substring(u);h.value=b,h.focus(),h.selectionStart=v+g.length,h.selectionEnd=v+g.length,n.value=b};return e.provide("InjectionEmojiApi",l.emoji),(g,h)=>{const v=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",vc,[e.createElementVNode("div",{class:e.normalizeClass([{active:r.value},"chat-container translate"])},[e.createElementVNode("div",kc,[e.createVNode(v,{size:"32"},{default:e.withCtx(()=>h[2]||(h[2]=[e.createElementVNode("svg",{viewBox:"0 0 1318 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1318.502489 432.779052c0-231.790522-209.29842-419.704826-467.458992-419.704826s-467.56979 188.357498-467.56979 419.704826 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319412-19.168145L1165.822116 742.350141C1259.336074 665.56676 1318.502489 555.433023 1318.502489 432.779052z",fill:"#612273","p-id":"10993"}),e.createElementVNode("path",{d:"M1034.304263 745.784895a509.673231 509.673231 0 0 1-183.482363 33.239559c-244.532352 0-445.077689-168.524562-465.353819-383.25211-1.107985 12.07704-1.883575 24.264878-1.883575 36.563514 0 231.790522 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319411-19.168145 25.262064 25.262064 0 0 0-7.5343-17.284571zM1165.822116 669.223112l2.769964 70.689461C1260.44406 663.239991 1318.502489 553.992642 1318.502489 432.779052a366.632331 366.632331 0 0 0-1.883575-36.785111 403.971435 403.971435 0 0 1-150.796798 273.229171z",fill:"#612273",opacity:".2","p-id":"10994"}),e.createElementVNode("path",{d:"M383.25211 432.779052a383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978C173.510496 258.160571 0 413.943302 0 606.178749c0 101.713049 48.97295 193.011037 126.421121 256.609392l-5.761524 148.470028a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696c-177.831638-59.388011-304.91755-212.733175-304.91755-393.113179z",fill:"#EB3D72","p-id":"10995"}),e.createElementVNode("path",{d:"M342.256654 391.672798c0 117.557239 53.958883 223.59143 140.714132 299.71002a391.008007 391.008007 0 0 1-99.718676-258.603766 383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978-7.091106 0-14.071413 0-21.05172 0.553993a375.939407 375.939407 0 0 0-24.375677 132.958234zM630.111231 802.181346a407.627786 407.627786 0 0 1-283.533434 110.798528 424.136767 424.136767 0 0 1-152.12638-27.699632l-71.686647 71.686648-2.105173 54.291279a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696 486.294741 486.294741 0 0 1-58.058429-23.710885zM85.425665 821.792686l-5.761523-4.985934c1.883575 2.215971 3.656351 4.431941 5.650725 6.647911z",fill:"#EB3D72",opacity:".5","p-id":"10996"}),e.createElementVNode("path",{d:"M833.426531 332.395585c64.263147-10.193465 64.041549-66.479117 62.601169-75.342999s-15.400995-54.291279-59.942004-47.200173S799.078987 254.836615 799.078987 254.836615a28.475222 28.475222 0 1 0 56.174854-8.97468s6.315516 3.323956 8.30989 20.27613-11.966241 29.029214-35.455529 33.239559-88.638823-19.943735-104.039819-115.452067C709.110582 96.39472 781.57282 28.253625 838.966457 13.185025a55.399264 55.399264 0 0 0-64.041549-5.318329c-56.064055 35.123134-97.170309 109.579745-85.536464 182.817571 14.957801 93.846354 79.664142 151.904783 144.038087 141.711318zM203.980091 573.825579a53.072495 53.072495 0 0 0 33.90435-67.919498c-2.659165-6.537113-21.162519-38.225492-53.51569-25.040467a30.026401 30.026401 0 0 0-19.832936 40.773858 22.159706 22.159706 0 1 0 40.773858-16.619779s5.318329 1.329582 9.861069 13.739017-3.988747 24.043281-21.05172 31.023588-70.02467 0.553993-98.832288-68.695087C68.916685 417.599654 110.798528 353.558104 151.904783 332.395585a42.879031 42.879031 0 0 0-48.97295 7.423502 146.918849 146.918849 0 0 0-32.574767 152.458775c27.810431 68.141095 86.866046 100.605064 133.623025 81.547717z",fill:"#FED150","p-id":"10997"})],-1)])),_:1}),h[3]||(h[3]=e.createElementVNode("div",{style:{"margin-left":"12px"}},[e.createElementVNode("div",null,"聊天室"),e.createElementVNode("div",{style:{"font-size":"12px"}},"当前2人在线")],-1))]),e.createVNode(Cc,{ref_key:"messageRef",ref:i,data:e.unref(s),"user-id":t.userId},null,8,["data","user-id"]),e.createElementVNode("div",yc,[e.createVNode(e.unref(k.ElInput),{id:"emojiInput",modelValue:n.value,"onUpdate:modelValue":h[0]||(h[0]=u=>n.value=u),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"请输入内容",onKeydown:e.withKeys(m,["enter"])},null,8,["modelValue"]),e.createVNode(mc,{style:{margin:"0 8px 0"},emoji:t.emoji,placement:"top-end",onAddEmoji:f},{default:e.withCtx(()=>h[4]||(h[4]=[e.createElementVNode("svg",{width:"22",height:"22",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7186"},[e.createElementVNode("path",{d:"M510.944 960c-247.04 0-448-200.96-448-448s200.992-448 448-448c247.008 0 448 200.96 448 448S757.984 960 510.944 960zM510.944 128c-211.744 0-384 172.256-384 384 0 211.744 172.256 384 384 384 211.744 0 384-172.256 384-384C894.944 300.256 722.688 128 510.944 128zM512 773.344c-89.184 0-171.904-40.32-226.912-110.624-10.88-13.92-8.448-34.016 5.472-44.896 13.888-10.912 34.016-8.48 44.928 5.472 42.784 54.688 107.136 86.048 176.512 86.048 70.112 0 134.88-31.904 177.664-87.552 10.784-14.016 30.848-16.672 44.864-5.888 14.016 10.784 16.672 30.88 5.888 44.864C685.408 732.32 602.144 773.344 512 773.344zM368 515.2c-26.528 0-48-21.472-48-48l0-64c0-26.528 21.472-48 48-48s48 21.472 48 48l0 64C416 493.696 394.496 515.2 368 515.2zM656 515.2c-26.496 0-48-21.472-48-48l0-64c0-26.528 21.504-48 48-48s48 21.472 48 48l0 64C704 493.696 682.496 515.2 656 515.2z","p-id":"7187"})],-1)])),_:1},8,["emoji"]),e.createVNode(v,{size:"18",class:e.normalizeClass([{".cv-chat-wrap submit-btn":n.value.trim()!=""},"select-none cursor-pointer"]),style:{"padding-bottom":"5px"},onClick:p},{default:e.withCtx(()=>h[5]||(h[5]=[e.createElementVNode("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15072"},[e.createElementVNode("path",{d:"M1008.00076 6.285714q18.857143 13.714286 15.428571 36.571429l-146.285714 877.714286q-2.857143 16.571429-18.285714 25.714286-8 4.571429-17.714286 4.571429-6.285714 0-13.714286-2.857143l-258.857143-105.714286-138.285714 168.571429q-10.285714 13.142857-28 13.142857-7.428571 0-12.571429-2.285714-10.857143-4-17.428571-13.428571t-6.571429-20.857143l0-199.428571 493.714286-605.142857-610.857143 528.571429-225.714286-92.571429q-21.142857-8-22.857143-31.428571-1.142857-22.857143 18.285714-33.714286l950.857143-548.571429q8.571429-5.142857 18.285714-5.142857 11.428571 0 20.571429 6.285714z","p-id":"15073"})],-1)])),_:1},8,["class"])])],2),e.createVNode(e.unref(k.ElButton),{class:"chat-btn",onClick:h[1]||(h[1]=u=>r.value=!r.value)},{default:e.withCtx(()=>h[6]||(h[6]=[e.createTextVNode("chat")])),_:1})])}}});Ut.install=function(t){t.component(Ut.name,Ut)};const bc={key:0},Vc=Object.assign({name:"cvNoticeBar"},{__name:"notice-bar",props:{data:{type:[String,Array],default:()=>[]},vertical:{type:[Boolean],default:!1},suffixIcon:{type:[String],default:""},prefixIcon:{type:[String],default:""},size:{type:[Number],default:14},height:{type:[Number],default:40},delay:{type:[Number],default:1e3},spped:{type:[Number],default:100},color:{type:[String],default:"--color-warning"},background:{type:[String],default:"var(--color-warning-light-9)"}},setup(t){const o=t,{data:l,vertical:r,suffixIcon:n,prefixIcon:i,size:s,height:c,delay:m,spped:d,color:p,background:f}=o,g=e.reactive({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),h=e.ref({}),v=e.ref({style:{cssText:""}}),u=e.computed(()=>o.delay>2e3?o.delay:2e3),y=()=>{g.oneTime=g.textWidth/o.spped,g.twoTime=(g.textWidth+g.boxWidth)/o.spped},b=()=>{g.order===1?(v.value.style.cssText=`animation: oneAnimation ${g.oneTime}s linear; opactity: 1;}`,g.order=2):v.value.style.cssText=`animation: twoAnimation ${g.twoTime}s linear infinite; opacity: 1;`};return e.onMounted(()=>{o.vertical||(e.nextTick(()=>{g.boxWidth=h.value.offsetWidth,g.textWidth=v.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${g.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${g.boxWidth}px;} 100% {left: -${g.textWidth}px;}}`),y(),setTimeout(()=>{b()},o.delay)}),v.value.addEventListener("animationend",()=>{b()},!1))}),(V,w)=>{const N=e.resolveComponent("el-carousel-item"),D=e.resolveComponent("el-carousel"),z=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",{class:"cv-notice-bar",style:e.normalizeStyle({background:e.unref(f),height:`${e.unref(c)}px`})},[e.unref(r)?(e.openBlock(),e.createElementBlock("div",bc,[e.createVNode(D,{height:"40px",direction:"vertical",autoplay:!0,"indicator-position":"none",interval:u.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),F=>(e.openBlock(),e.createBlock(N,{key:F},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F),1)]),_:2},1024))),128))]),_:1},8,["interval"])])):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle({color:e.unref(p),fontSize:`${e.unref(s)}px`}),class:"cv-notice-bar-wrap"},[e.unref(i)?(e.openBlock(),e.createBlock(z,{key:0,type:e.unref(i)},null,8,["type"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"boxRef",ref:h,class:"text-box"},[e.createElementVNode("div",{ref_key:"textRef",ref:v,class:"text"},e.toDisplayString(e.unref(l)),513)],512),e.unref(n)?(e.openBlock(),e.createBlock(z,{key:1,type:e.unref(n)},null,8,["type"])):e.createCommentVNode("",!0)],4))],4)}}}),Wt=C(Vc,[["__scopeId","data-v-f231e77d"]]);Wt.install=function(t){t.component(Wt.name,Wt)};const wc=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[Ga.basicSetup]}),ol="change",ll="update",al="focus",nl="blur",il="ready",rl="update:modelValue",xc=({onUpdate:t,onChange:o,onFocus:l,onBlur:r,...n})=>_.EditorState.create({doc:n.doc,selection:n.selection,extensions:[...Array.isArray(n.extensions)?n.extensions:[n.extensions],E.EditorView.updateListener.of(i=>{t(i),i.docChanged&&o(i.state.doc.toString(),i),i.focusChanged&&(i.view.hasFocus?l(i):r(i))})]}),ee=t=>{const o=new _.Compartment;return{compartment:o,run:l=>{o.get(t.state)?t.dispatch({effects:o.reconfigure(l)}):t.dispatch({effects:_.StateEffect.appendConfig.of(o.of(l))})}}},sl=(t,o)=>{const{compartment:l,run:r}=ee(t);return n=>{const i=l.get(t.state);r(n??i!==o?o:[])}},Bc=t=>{const o=()=>t.state.doc.toString(),{run:l}=ee(t),r=sl(t,[E.EditorView.editable.of(!1),_.EditorState.readOnly.of(!0)]),n=sl(t,E.keymap.of([Ka.indentWithTab])),{run:i}=ee(t),{run:s}=ee(t),{run:c}=ee(t),{run:m}=ee(t);return{focus:()=>t.focus(),getDoc:o,setDoc:d=>{d!==o()&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:d}})},reExtensions:l,toggleDisabled:r,toggleIndentWithTab:n,setTabSize:d=>{i([_.EditorState.tabSize.of(d),x.indentUnit.of(" ".repeat(d))])},setPhrases:d=>{s([_.EditorState.phrases.of(d)])},setPlaceholder:d=>{c(E.placeholder(d))},setStyle:(d={})=>{m(E.EditorView.theme({"&":{...d}}))}}},Sc=e.defineComponent({name:"VueCodemirror",props:{modelValue:{type:String,default:""},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indentWithTab:{type:Boolean,default:!1},tabSize:Number,placeholder:String,style:Object,autoDestroy:{type:Boolean,default:!1},phrases:Object,root:Object,extensions:Array,selection:Object},emits:{[ol]:(t,o)=>!0,[ll]:t=>!0,[al]:t=>!0,[nl]:t=>!0,[il]:t=>!0,[rl]:(t,o)=>!0},setup(t,o){const l=e.shallowRef(),r=e.shallowRef(),n=e.shallowRef(),i={...wc},s=e.computed(()=>{const c={};return Object.keys(e.toRaw(t)).forEach(m=>{m!=="modelValue"&&(c[m]=t[m]??i[m])}),c});return e.onMounted(()=>{r.value=xc({doc:t.modelValue,selection:s.value.selection,extensions:i.extensions??[],onFocus:m=>o.emit(al,m),onBlur:m=>o.emit(nl,m),onUpdate:m=>o.emit(ll,m),onChange:(m,d)=>{m!==t.modelValue&&(o.emit(ol,m,d),o.emit(rl,m,d))}}),n.value=new E.EditorView({state:r.value,parent:l.value,root:s.value.root}),n.value.contentDOM.addEventListener("scroll",m=>{});const c=Bc(n.value);e.watch(()=>t.modelValue,m=>{m!==c.getDoc()&&c.setDoc(m)}),e.watch(()=>t.extensions,m=>c.reExtensions(m||[]),{immediate:!0}),e.watch(()=>s.value.disabled,m=>c.toggleDisabled(m),{immediate:!0}),e.watch(()=>s.value.indentWithTab,m=>c.toggleIndentWithTab(m),{immediate:!0}),e.watch(()=>s.value.tabSize,m=>c.setTabSize(m),{immediate:!0}),e.watch(()=>s.value.phrases,m=>c.setPhrases(m||{}),{immediate:!0}),e.watch(()=>s.value.placeholder,m=>c.setPlaceholder(m),{immediate:!0}),e.watch(()=>s.value.style,m=>c.setStyle(m),{immediate:!0}),s.value.autofocus&&c.focus(),o.emit(il,{state:r.value,view:n.value,container:l.value,editorTools:c})}),e.onBeforeUnmount(()=>{s.value.autoDestroy&&n.value&&n.value.destroy()}),()=>e.h("div",{class:"cv-editor-codemirror",ref:l})}}),cl="#e06c75",qt="#abb2bf",Uo="#7d8799",dl="#d19a66",ml="#2c313a",pl="#282c34",ro="#353a42",ul="#528bff",Nc=E.EditorView.theme({"&":{color:qt,backgroundColor:pl},".cm-content":{caretColor:ul},".cm-cursor, .cm-dropCursor":{borderLeftColor:ul},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:qt},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:pl,color:Uo,border:"none"},".cm-activeLineGutter":{backgroundColor:ml},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ro},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ro,borderBottomColor:ro},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ml,color:qt}}},{dark:!0}),Ec=x.HighlightStyle.define([{tag:a.tags.keyword,color:"#c678dd"},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.propertyName,a.tags.macroName],color:cl},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:"#61afef"},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:dl},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:qt},{tag:[a.tags.typeName,a.tags.className,a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:"#e5c07b"},{tag:[a.tags.operator,a.tags.operatorKeyword,a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link,a.tags.special(a.tags.string)],color:"#56b6c2"},{tag:[a.tags.meta,a.tags.comment],color:Uo},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.strikethrough,textDecoration:"line-through"},{tag:a.tags.link,color:Uo,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:cl},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:dl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted],color:"#98c379"},{tag:a.tags.invalid,color:"#ffffff"}]),Dc=[Nc,x.syntaxHighlighting(Ec)],Tc=!1,so="#FAFAFA",O="#90A4AE",ie="#80CBC440",hl="#272727",co="#FAFAFA",gl="#00000010",Ic="#c2c2c222",Fc="#CFD8DC",Lc="#7E939E",_c="#FAFAFA",fl="#7C4DFF",mo="#90A4AE",Cl="#6182B8",$c="#91B859",zc="#F76D47",vl="#8796B0",Pc="#FFB62C",Oc="#F76D47",jc="#90A4AE",Mc="#91B859",Ac="#E53935",Rc="#39ADB5",Hc=E.EditorView.theme({"&":{color:O,backgroundColor:so},".cm-content":{caretColor:hl},".cm-cursor, .cm-dropCursor":{borderLeftColor:hl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ie},".cm-panels":{backgroundColor:co,color:O},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:co,outline:`1px solid ${gl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ie},".cm-activeLine":{backgroundColor:Ic},".cm-selectionMatch":{backgroundColor:ie},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:_c,outline:"none"},".cm-gutters":{backgroundColor:so,color:O,border:"none"},".cm-activeLineGutter":{backgroundColor:so},".cm-lineNumbers .cm-gutterElement":{color:Fc},".cm-lineNumbers .cm-activeLineGutter":{color:Lc},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:O},".cm-tooltip":{border:`1px solid ${gl}`,backgroundColor:co,color:O},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:O,borderBottomColor:O},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ie,color:O}}},{dark:Tc}),Uc=x.HighlightStyle.define([{tag:a.tags.keyword,color:fl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:mo},{tag:[a.tags.propertyName],color:Cl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:$c},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Cl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:zc},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:mo},{tag:[a.tags.className],color:Pc},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Oc},{tag:[a.tags.typeName],color:vl,fontStyle:vl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:fl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Rc},{tag:[a.tags.meta,a.tags.comment],color:jc},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Mc},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:mo},{tag:a.tags.invalid,color:Ac},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Wc=[Hc,x.syntaxHighlighting(Uc)],qc=!0,po="#263238",j="#EEFFFF",re="#80CBC420",kl="#FFCC00",uo="#263238",yl="#FFFFFF10",Gc="#4c616c22",Kc="#37474F",Qc="#607a86",Yc="#263238",bl="#C792EA",ho="#EEFFFF",Vl="#82AAFF",Zc="#C3E88D",Jc="#F78C6C",wl="#B2CCD6",Xc="#FFCB6B",ed="#F78C6C",td="#546E7A",od="#C3E88D",ld="#FF5370",ad="#89DDFF",nd=E.EditorView.theme({"&":{color:j,backgroundColor:po},".cm-content":{caretColor:kl},".cm-cursor, .cm-dropCursor":{borderLeftColor:kl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:re},".cm-panels":{backgroundColor:uo,color:j},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:uo,outline:`1px solid ${yl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:re},".cm-activeLine":{backgroundColor:Gc},".cm-selectionMatch":{backgroundColor:re},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Yc,outline:"none"},".cm-gutters":{backgroundColor:po,color:j,border:"none"},".cm-activeLineGutter":{backgroundColor:po},".cm-lineNumbers .cm-gutterElement":{color:Kc},".cm-lineNumbers .cm-activeLineGutter":{color:Qc},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:j},".cm-tooltip":{border:`1px solid ${yl}`,backgroundColor:uo,color:j},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:j,borderBottomColor:j},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:re,color:j}}},{dark:qc}),id=x.HighlightStyle.define([{tag:a.tags.keyword,color:bl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:ho},{tag:[a.tags.propertyName],color:Vl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Zc},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Vl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Jc},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:ho},{tag:[a.tags.className],color:Xc},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:ed},{tag:[a.tags.typeName],color:wl,fontStyle:wl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:bl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:ad},{tag:[a.tags.meta,a.tags.comment],color:td},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:od},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:ho},{tag:a.tags.invalid,color:ld},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),rd=[nd,x.syntaxHighlighting(id)],sd=!1,go="#FDF6E3",M="#586E75",se="#EEE8D5",xl="#657B83",fo="#FDF6E3",Bl="#D3AF86",cd="#d5bd5c22",dd="#586E75",md="#567983",pd="#EEE8D5",Sl="#859900",Co="#268BD2",Nl="#268BD2",ud="#2AA198",hd="#CB4B16",El="#CB4B16",gd="#CB4B16",fd="#D33682",Cd="#93A1A1",vd="#268BD2",kd="#DC322F",yd="#DC322F",bd=E.EditorView.theme({"&":{color:M,backgroundColor:go},".cm-content":{caretColor:xl},".cm-cursor, .cm-dropCursor":{borderLeftColor:xl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:se},".cm-panels":{backgroundColor:fo,color:M},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:fo,outline:`1px solid ${Bl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:se},".cm-activeLine":{backgroundColor:cd},".cm-selectionMatch":{backgroundColor:se},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:pd,outline:"none"},".cm-gutters":{backgroundColor:go,color:M,border:"none"},".cm-activeLineGutter":{backgroundColor:go},".cm-lineNumbers .cm-gutterElement":{color:dd},".cm-lineNumbers .cm-activeLineGutter":{color:md},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:M},".cm-tooltip":{border:`1px solid ${Bl}`,backgroundColor:fo,color:M},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:M,borderBottomColor:M},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:se,color:M}}},{dark:sd}),Vd=x.HighlightStyle.define([{tag:a.tags.keyword,color:Sl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Co},{tag:[a.tags.propertyName],color:Nl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:ud},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Nl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:hd},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Co},{tag:[a.tags.className],color:gd},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:fd},{tag:[a.tags.typeName],color:El,fontStyle:El},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Sl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:yd},{tag:[a.tags.meta,a.tags.comment],color:Cd},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:vd},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Co},{tag:a.tags.invalid,color:kd},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),wd=[bd,x.syntaxHighlighting(Vd)],xd=!0,vo="#002B36",A="#93A1A1",ce="#274642",Dl="#D30102",ko="#002B36",Tl="#2AA19899",Bd="#005b7022",Sd="#93A1A1",Nd="#949494",Ed="#073642",Il="#859900",yo="#268BD2",Fl="#268BD2",Dd="#2AA198",Td="#CB4B16",Ll="#CB4B16",Id="#CB4B16",Fd="#D33682",Ld="#586E75",_d="#268BD2",$d="#DC322F",zd="#DC322F",Pd=E.EditorView.theme({"&":{color:A,backgroundColor:vo},".cm-content":{caretColor:Dl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Dl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ce},".cm-panels":{backgroundColor:ko,color:A},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:ko,outline:`1px solid ${Tl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ce},".cm-activeLine":{backgroundColor:Bd},".cm-selectionMatch":{backgroundColor:ce},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Ed,outline:"none"},".cm-gutters":{backgroundColor:vo,color:A,border:"none"},".cm-activeLineGutter":{backgroundColor:vo},".cm-lineNumbers .cm-gutterElement":{color:Sd},".cm-lineNumbers .cm-activeLineGutter":{color:Nd},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:A},".cm-tooltip":{border:`1px solid ${Tl}`,backgroundColor:ko,color:A},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A,borderBottomColor:A},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ce,color:A}}},{dark:xd}),Od=x.HighlightStyle.define([{tag:a.tags.keyword,color:Il},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:yo},{tag:[a.tags.propertyName],color:Fl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Dd},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Fl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Td},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:yo},{tag:[a.tags.className],color:Id},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Fd},{tag:[a.tags.typeName],color:Ll,fontStyle:Ll},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Il},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:zd},{tag:[a.tags.meta,a.tags.comment],color:Ld},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:_d},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:yo},{tag:a.tags.invalid,color:$d},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),jd=[Pd,x.syntaxHighlighting(Od)],Md=!0,bo="#282A36",R="#F8F8F2",de="#44475A",_l="#F8F8F2",Vo="#282A36",$l="#191A21",Ad="#53576c22",Rd="#6272A4",Hd="#F8F8F2",Ud="#44475A",zl="#FF79C6",wo="#F8F8F2",Pl="#50FA7B",Wd="#F1FA8C",qd="#BD93F9",Ol="#8BE9FD",Gd="#8BE9FD",Kd="#BD93F9",Qd="#6272A4",Yd="#BD93F9",Zd="#FF5555",Jd="#F1FA8C",Xd=E.EditorView.theme({"&":{color:R,backgroundColor:bo},".cm-content":{caretColor:_l},".cm-cursor, .cm-dropCursor":{borderLeftColor:_l},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:de},".cm-panels":{backgroundColor:Vo,color:R},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Vo,outline:`1px solid ${$l}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:de},".cm-activeLine":{backgroundColor:Ad},".cm-selectionMatch":{backgroundColor:de},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Ud,outline:"none"},".cm-gutters":{backgroundColor:bo,color:R,border:"none"},".cm-activeLineGutter":{backgroundColor:bo},".cm-lineNumbers .cm-gutterElement":{color:Rd},".cm-lineNumbers .cm-activeLineGutter":{color:Hd},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:R},".cm-tooltip":{border:`1px solid ${$l}`,backgroundColor:Vo,color:R},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:R,borderBottomColor:R},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:de,color:R}}},{dark:Md}),em=x.HighlightStyle.define([{tag:a.tags.keyword,color:zl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:wo},{tag:[a.tags.propertyName],color:Pl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Wd},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Pl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:qd},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:wo},{tag:[a.tags.className],color:Gd},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Kd},{tag:[a.tags.typeName],color:Ol,fontStyle:Ol},{tag:[a.tags.operator,a.tags.operatorKeyword],color:zl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Jd},{tag:[a.tags.meta,a.tags.comment],color:Qd},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Yd},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:wo},{tag:a.tags.invalid,color:Zd},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),tm=[Xd,x.syntaxHighlighting(em)],om=!1,xo="#fff",H="#444d56",me="#0366d625",jl="#044289",Bo="#fff",Ml="#e1e4e8",lm="#c6c6c622",am="#1b1f234d",nm="#24292e",im="#34d05840",Al="#d73a49",So="#e36209",Rl="#005cc5",rm="#032f62",sm="#005cc5",Hl="#005cc5",cm="#6f42c1",dm="#005cc5",mm="#6a737d",pm="#005cc5",um="#cb2431",hm="#032f62",gm=E.EditorView.theme({"&":{color:H,backgroundColor:xo},".cm-content":{caretColor:jl},".cm-cursor, .cm-dropCursor":{borderLeftColor:jl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:me},".cm-panels":{backgroundColor:Bo,color:H},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Bo,outline:`1px solid ${Ml}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:me},".cm-activeLine":{backgroundColor:lm},".cm-selectionMatch":{backgroundColor:me},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:im,outline:"none"},".cm-gutters":{backgroundColor:xo,color:H,border:"none"},".cm-activeLineGutter":{backgroundColor:xo},".cm-lineNumbers .cm-gutterElement":{color:am},".cm-lineNumbers .cm-activeLineGutter":{color:nm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:H},".cm-tooltip":{border:`1px solid ${Ml}`,backgroundColor:Bo,color:H},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:H,borderBottomColor:H},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:me,color:H}}},{dark:om}),fm=x.HighlightStyle.define([{tag:a.tags.keyword,color:Al},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:So},{tag:[a.tags.propertyName],color:Rl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:rm},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Rl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:sm},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:So},{tag:[a.tags.className],color:cm},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:dm},{tag:[a.tags.typeName],color:Hl,fontStyle:Hl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Al},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:hm},{tag:[a.tags.meta,a.tags.comment],color:mm},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:pm},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:So},{tag:a.tags.invalid,color:um},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Cm=[gm,x.syntaxHighlighting(fm)],vm=!0,No="#24292e",U="#d1d5da",pe="#3392FF44",Ul="#c8e1ff",Eo="#24292e",Wl="#1b1f23",km="#4d566022",ym="#444d56",bm="#e1e4e8",Vm="#17E5E650",ql="#f97583",Do="#ffab70",Gl="#79b8ff",wm="#9ecbff",xm="#79b8ff",Kl="#79b8ff",Bm="#b392f0",Sm="#79b8ff",Nm="#6a737d",Em="#79b8ff",Dm="#f97583",Tm="#9ecbff",Im=E.EditorView.theme({"&":{color:U,backgroundColor:No},".cm-content":{caretColor:Ul},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ul},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:pe},".cm-panels":{backgroundColor:Eo,color:U},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Eo,outline:`1px solid ${Wl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:pe},".cm-activeLine":{backgroundColor:km},".cm-selectionMatch":{backgroundColor:pe},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Vm,outline:"none"},".cm-gutters":{backgroundColor:No,color:U,border:"none"},".cm-activeLineGutter":{backgroundColor:No},".cm-lineNumbers .cm-gutterElement":{color:ym},".cm-lineNumbers .cm-activeLineGutter":{color:bm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:U},".cm-tooltip":{border:`1px solid ${Wl}`,backgroundColor:Eo,color:U},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:U,borderBottomColor:U},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:pe,color:U}}},{dark:vm}),Fm=x.HighlightStyle.define([{tag:a.tags.keyword,color:ql},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Do},{tag:[a.tags.propertyName],color:Gl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:wm},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Gl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:xm},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Do},{tag:[a.tags.className],color:Bm},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Sm},{tag:[a.tags.typeName],color:Kl,fontStyle:Kl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:ql},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Tm},{tag:[a.tags.meta,a.tags.comment],color:Nm},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Em},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Do},{tag:a.tags.invalid,color:Dm},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Lm=[Im,x.syntaxHighlighting(Fm)],_m=!0,To="#21202e",W="#edecee",ue="#3d375e7f",Ql="#a277ff",Io="#21202e",Yl="#3b334b",$m="#4d4b6622",zm="#a394f033",Pm="#cdccce",Om="#a394f033",Zl="#a277ff",Fo="#edecee",Jl="#ffca85",jm="#61ffca",Mm="#61ffca",Xl="#82e2ff",Am="#82e2ff",Rm="#61ffca",Hm="#6d6d6d",Um="#a277ff",Wm="#ff6767",qm="#61ffca",Gm=E.EditorView.theme({"&":{color:W,backgroundColor:To},".cm-content":{caretColor:Ql},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ql},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ue},".cm-panels":{backgroundColor:Io,color:W},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Io,outline:`1px solid ${Yl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ue},".cm-activeLine":{backgroundColor:$m},".cm-selectionMatch":{backgroundColor:ue},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Om,outline:"none"},".cm-gutters":{backgroundColor:To,color:W,border:"none"},".cm-activeLineGutter":{backgroundColor:To},".cm-lineNumbers .cm-gutterElement":{color:zm},".cm-lineNumbers .cm-activeLineGutter":{color:Pm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:W},".cm-tooltip":{border:`1px solid ${Yl}`,backgroundColor:Io,color:W},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:W,borderBottomColor:W},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ue,color:W}}},{dark:_m}),Km=x.HighlightStyle.define([{tag:a.tags.keyword,color:Zl},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Fo},{tag:[a.tags.propertyName],color:Jl},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:jm},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:Jl},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:Mm},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Fo},{tag:[a.tags.className],color:Am},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:Rm},{tag:[a.tags.typeName],color:Xl,fontStyle:Xl},{tag:[a.tags.operator,a.tags.operatorKeyword],color:Zl},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:qm},{tag:[a.tags.meta,a.tags.comment],color:Hm},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Um},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Fo},{tag:a.tags.invalid,color:Wm},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Qm=[Gm,x.syntaxHighlighting(Km)],Ym=!0,Lo="#1a1b26",q="#787c99",he="#515c7e40",ea="#c0caf5",_o="#1a1b26",ta="#787c99",Zm="#43455c22",Jm="#363b54",Xm="#737aa2",ep="#16161e",oa="#bb9af7",$o="#c0caf5",la="#7aa2f7",tp="#9ece6a",op="#bb9af7",aa="#0db9d7",lp="#c0caf5",ap="#ff9e64",np="#444b6a",ip="#89ddff",rp="#ff5370",sp="#b4f9f8",cp=E.EditorView.theme({"&":{color:q,backgroundColor:Lo},".cm-content":{caretColor:ea},".cm-cursor, .cm-dropCursor":{borderLeftColor:ea},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:he},".cm-panels":{backgroundColor:_o,color:q},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:_o,outline:`1px solid ${ta}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:he},".cm-activeLine":{backgroundColor:Zm},".cm-selectionMatch":{backgroundColor:he},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:ep,outline:"none"},".cm-gutters":{backgroundColor:Lo,color:q,border:"none"},".cm-activeLineGutter":{backgroundColor:Lo},".cm-lineNumbers .cm-gutterElement":{color:Jm},".cm-lineNumbers .cm-activeLineGutter":{color:Xm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:q},".cm-tooltip":{border:`1px solid ${ta}`,backgroundColor:_o,color:q},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:q,borderBottomColor:q},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:he,color:q}}},{dark:Ym}),dp=x.HighlightStyle.define([{tag:a.tags.keyword,color:oa},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:$o},{tag:[a.tags.propertyName],color:la},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:tp},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:la},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:op},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:$o},{tag:[a.tags.className],color:lp},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:ap},{tag:[a.tags.typeName],color:aa,fontStyle:aa},{tag:[a.tags.operator,a.tags.operatorKeyword],color:oa},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:sp},{tag:[a.tags.meta,a.tags.comment],color:np},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:ip},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:$o},{tag:a.tags.invalid,color:rp},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),mp=[cp,x.syntaxHighlighting(dp)],pp=!0,zo="#24283b",G="#7982a9",ge="#6f7bb630",na="#c0caf5",Po="#24283b",ia="#7982a9",up="#4d547722",hp="#3b4261",gp="#737aa2",fp="#1f2335",ra="#bb9af7",Oo="#c0caf5",sa="#7aa2f7",Cp="#9ece6a",vp="#bb9af7",ca="#2ac3de",kp="#c0caf5",yp="#ff9e64",bp="#565f89",Vp="#89ddff",wp="#ff5370",xp="#b4f9f8",Bp=E.EditorView.theme({"&":{color:G,backgroundColor:zo},".cm-content":{caretColor:na},".cm-cursor, .cm-dropCursor":{borderLeftColor:na},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ge},".cm-panels":{backgroundColor:Po,color:G},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Po,outline:`1px solid ${ia}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ge},".cm-activeLine":{backgroundColor:up},".cm-selectionMatch":{backgroundColor:ge},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:fp,outline:"none"},".cm-gutters":{backgroundColor:zo,color:G,border:"none"},".cm-activeLineGutter":{backgroundColor:zo},".cm-lineNumbers .cm-gutterElement":{color:hp},".cm-lineNumbers .cm-activeLineGutter":{color:gp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:G},".cm-tooltip":{border:`1px solid ${ia}`,backgroundColor:Po,color:G},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:G,borderBottomColor:G},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ge,color:G}}},{dark:pp}),Sp=x.HighlightStyle.define([{tag:a.tags.keyword,color:ra},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Oo},{tag:[a.tags.propertyName],color:sa},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Cp},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:sa},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:vp},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Oo},{tag:[a.tags.className],color:kp},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:yp},{tag:[a.tags.typeName],color:ca,fontStyle:ca},{tag:[a.tags.operator,a.tags.operatorKeyword],color:ra},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:xp},{tag:[a.tags.meta,a.tags.comment],color:bp},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Vp},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Oo},{tag:a.tags.invalid,color:wp},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Np=[Bp,x.syntaxHighlighting(Sp)],Ep=!1,jo="#e1e2e7",K="#6a6f8e",fe="#8591b840",da="#3760bf",Mo="#e1e2e7",ma="#6a6f8e",Dp="#a7aaba22",Tp="#b3b6cd",Ip="#68709a",Fp="#e9e9ec",pa="#9854f1",Ao="#3760bf",ua="#2e7de9",Lp="#587539",_p="#9854f1",ha="#07879d",$p="#3760bf",zp="#b15c00",Pp="#9da3c2",Op="#006a83",jp="#ff3e64",Mp="#2e5857",Ap=E.EditorView.theme({"&":{color:K,backgroundColor:jo},".cm-content":{caretColor:da},".cm-cursor, .cm-dropCursor":{borderLeftColor:da},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:fe},".cm-panels":{backgroundColor:Mo,color:K},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Mo,outline:`1px solid ${ma}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:fe},".cm-activeLine":{backgroundColor:Dp},".cm-selectionMatch":{backgroundColor:fe},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Fp,outline:"none"},".cm-gutters":{backgroundColor:jo,color:K,border:"none"},".cm-activeLineGutter":{backgroundColor:jo},".cm-lineNumbers .cm-gutterElement":{color:Tp},".cm-lineNumbers .cm-activeLineGutter":{color:Ip},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:K},".cm-tooltip":{border:`1px solid ${ma}`,backgroundColor:Mo,color:K},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:K,borderBottomColor:K},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:fe,color:K}}},{dark:Ep}),Rp=x.HighlightStyle.define([{tag:a.tags.keyword,color:pa},{tag:[a.tags.name,a.tags.deleted,a.tags.character,a.tags.macroName],color:Ao},{tag:[a.tags.propertyName],color:ua},{tag:[a.tags.processingInstruction,a.tags.string,a.tags.inserted,a.tags.special(a.tags.string)],color:Lp},{tag:[a.tags.function(a.tags.variableName),a.tags.labelName],color:ua},{tag:[a.tags.color,a.tags.constant(a.tags.name),a.tags.standard(a.tags.name)],color:_p},{tag:[a.tags.definition(a.tags.name),a.tags.separator],color:Ao},{tag:[a.tags.className],color:$p},{tag:[a.tags.number,a.tags.changed,a.tags.annotation,a.tags.modifier,a.tags.self,a.tags.namespace],color:zp},{tag:[a.tags.typeName],color:ha,fontStyle:ha},{tag:[a.tags.operator,a.tags.operatorKeyword],color:pa},{tag:[a.tags.url,a.tags.escape,a.tags.regexp,a.tags.link],color:Mp},{tag:[a.tags.meta,a.tags.comment],color:Pp},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,fontWeight:"bold",color:Op},{tag:[a.tags.atom,a.tags.bool,a.tags.special(a.tags.variableName)],color:Ao},{tag:a.tags.invalid,color:jp},{tag:a.tags.strikethrough,textDecoration:"line-through"}]),Hp=[Ap,x.syntaxHighlighting(Rp)],Up={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:"input...",backgroundColor:"white",language:"markdown",theme:"oneDark",phrases:"en-us"},Na={emits:["update:config"],components:{CodemirrorEditor:Sc},data:()=>({codemrrConfig:{...Up},codemrrThemes:{oneDark:Dc,materialLight:Wc,materialDark:rd,solarizedLight:wd,solarizedDark:jd,dracula:tm,githubLight:Cm,githubDark:Lm,aura:Qm,tokyoNight:mp,tokyoNightStorm:Np,tokyoNightDay:Hp},codemrrLanguages:{javascript:Jo.javascript(),js:Jo.javascript(),html:Qa.html(),markdown:Za.markdown(),json:Ya.json(),vue:Ja.vue(),java:en.java(),php:Xa.php(),python:tn.python(),go:ln.go(),mysql:Xo.sql(),sql:Xo.sql(),xml:on.xml(),css:an.css()},codemrrPhrases:{"Control character":"Steuerzeichen","Selection deleted":"Auswahl gelöscht","Folded lines":"Eingeklappte Zeilen","Unfolded lines":"Ausgeklappte Zeilen",to:"bis","folded code":"eingeklappter Code",unfold:"ausklappen","Fold line":"Zeile einklappen","Unfold line":"Zeile ausklappen","Go to line":"Springe zu Zeile",go:"OK",Find:"Suchen",Replace:"Ersetzen",next:"nächste",previous:"vorherige",all:"alle","match case":"groß/klein beachten","by word":"ganze Wörter",replace:"ersetzen","replace all":"alle ersetzen",close:"schließen","current match":"aktueller Treffer","replaced $ matches":"$ Treffer ersetzt","replaced match on line $":"Treffer on Zeile $ ersetzt","on line":"auf Zeile",Completions:"Vervollständigungen",Diagnostics:"Diagnosen","No diagnostics":"Keine Diagnosen"},editorViewInst:null,editorStateInst:null}),computed:{optionTheme(){let t=Object.keys(this.codemrrThemes);return["default"].concat(t)},optionPhrases:()=>["en-us","de-de"],optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){const t=[];return t.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&t.push(this.codemrrThemes[this.codemrrConfig.theme]),t},codemrrBind(){return{theme:this.codemrrConfig.theme,language:this.codemrrConfig.language,autofocus:this.codemrrConfig.autofocus,placeholder:this.codemrrConfig.placeholder,indentWithTab:this.codemrrConfig.indentWithTab,tabSize:this.codemrrConfig.tabSize,disabled:this.codemrrConfig.disabled,phrases:this.codemrrConfig.phrases==="en-us"?{}:this.codemrrPhrases}}},watch:{codemrrConfig(t){this.$emit("update:config",t)}}},oe={props:{editorID:{type:[String],required:!1,default:()=>""}},data:()=>({editorRefEL:null}),computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((1e3*Math.random()).toFixed(0)+"")}}};function Ea(t,o){var l=document.createElement("a");if(l.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(t)),l.setAttribute("download",o),l.style.display="none",document.createEvent){const r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),l.dispatchEvent(r)}else l.click()}function Ce(t){return t<10?"0"+t:t}const Wp={undo:!1,redo:!1,strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,hr:!0,quote:!0,ul:!0,ol:!0,notChecked:!0,checked:!0,link:!0,table:!0,image:!0,uploadImage:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,importmd:!0,exportmd:!0,code:!0,html_to_markdown:!0,split:!0,preview:!0,scrollSync:!0,save:!0,clear:!0,copy:!0,toc:!0,fullscreen:!0,theme:!0,backgroundColor:!1,language:!1,phrases:!1,disabled:!1,autofocus:!1,indentWithTab:!1},qp={t:"1713021153946",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1924",width:"20",height:"20"},Gp={t:"1599285632421",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"45640",width:"17",height:"17"},Kp={t:"1611551476626",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4615",width:"22",height:"22"},Qp={t:"1713097613984",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6856",width:"18",height:"18"},Yp={t:"1713109019954",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"13071",width:"18",height:"18"},Go={components:{SvgImgMap:C({name:"SvgImgMap"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",qp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M659.456 786.432l-114.688-188.416c-4.10112-8.192-8.19712-12.28288-16.384-12.28288-4.096 0-8.19712 4.096-12.288 4.096l-57.344 57.344-61.44-90.11712c-4.096-8.192-8.192-12.28288-16.384-12.28288s-12.288 4.096-16.384 8.192l-151.552 225.28c0 4.096-4.096 8.192-4.096 12.288 0 12.28288 8.192 20.48 20.48 20.48h413.696c12.288 0 20.48-8.19712 20.48-20.48l-4.096-4.10112zM286.72 512c40.96 0 73.728-32.768 73.728-73.728S327.68 364.544 286.72 364.544s-73.728 32.768-73.728 73.728C208.896 479.232 245.76 512 286.72 512zM851.968 98.304H323.584c-40.96 0-73.728 32.768-73.728 73.728v20.48c0 12.288 8.192 20.48 20.48 20.48s16.384-12.288 16.384-20.48v-20.48c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.85888 16.384 36.85888 36.864v528.384c0 20.48-16.37888 36.864-36.85888 36.864h-20.48c-12.288 0-20.48 8.192-20.48 20.48s8.192 20.48 20.48 20.48h20.48c40.96 0 73.72288-32.768 73.72288-73.728v-532.48c0.00512-40.96-32.76288-73.728-73.72288-73.728z","p-id":"1925"},null,-1),e.createElementVNode("path",{d:"M700.416 249.856H172.032c-40.96 0-73.728 32.768-73.728 73.728v528.384c0 40.96 32.768 73.72288 73.728 73.72288h528.384c40.96 0 73.728-32.76288 73.728-73.72288V323.584c0-40.96-32.768-73.728-73.728-73.728z m36.864 602.112c0 20.48-16.384 36.85888-36.864 36.85888H172.032c-20.48 0-36.864-16.37888-36.864-36.85888V323.584c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.864 16.384 36.864 36.864v528.384z","p-id":"1926"},null,-1)]))}]]),SvgUploadFile:C({name:"SvgUploadFile"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Gp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M127.519 892.879v-763.34h655.448V514.69h63.612V81.831c0-8.783-7.12-15.903-15.903-15.903H79.81c-8.783 0-15.903 7.12-15.903 15.903v858.757c0 8.783 7.12 15.903 15.903 15.903h493.993v-63.612H127.519z","p-id":"45641"},null,-1),e.createElementVNode("path",{d:"M231.608 228.388h447.269V292H231.608zM231.608 384.409h447.269v63.612H231.608zM231.608 540.43h245.141v63.612H231.608zM231.608 696.451h245.141v63.612H231.608zM923.269 762.938L745.315 584.984c-3.545-3.545-8.34-5.074-12.966-4.596a15.931 15.931 0 0 0-9.848 4.616L544.586 762.918c-6.248 6.248-6.248 16.379 0 22.627l22.353 22.353c6.248 6.248 16.379 6.248 22.627 0l112.555-112.555v245.148c0 8.837 7.163 16 16 16h31.612c8.837 0 16-7.163 16-16V695.363l112.555 112.555c6.248 6.248 16.379 6.248 22.627 0l22.353-22.353c6.249-6.248 6.249-16.378 0.001-22.627z","p-id":"45642"},null,-1)]))}]]),SvgToc:C({name:"SvgToc"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Kp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M370.1 371.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7zM370.1 712.4h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.2-2.6 5.7-5.7 5.7z m333.5-7.5H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.1-2.7 5.7-5.8 5.7zM370.1 542.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7z","p-id":"4616"},null,-1),e.createElementVNode("path",{d:"M847.1 560.4V250.1s0-24.7-14-46.4c-10.8-16.8-30-31.8-64.2-31.8h-261c-0.2 0-0.3 0-0.5 0.1H255s-78.1 0-78.1 78.1l0.1 213.4V774s0 24.7 13.9 46.3c10.8 16.8 30 31.8 64.2 31.8h261.1c0.2 0 0.3 0 0.5-0.1H769s78.1 0 78.1-78.1l-0.1-213.4 0.1-0.1z m-39 213.6c-1.3 38.5-38.9 39-38.9 39h-514c-1.3-0.1-2.5-0.2-3.8-0.3-5.4-1.1-15.7-4.1-23.9-11.7-9-9.7-11.2-22.3-11.7-26.1v-0.7l0.1-524.2c1.3-38.5 38.9-39 38.9-39h514c1.3 0.1 2.5 0.2 3.7 0.3 5.4 1.1 15.7 4.1 23.9 11.7 9 9.7 11.2 22.2 11.7 26 0 0.2 0 0.5 0.1 0.7l-0.1 524.3z","p-id":"4617"},null,-1)]))}]]),SvgCopy:C({name:"SvgCopy"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Qp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M857.373005 65.290005 469.604424 65.290005c-34.211173 0-62.044078 27.832905-62.044078 62.043055l0 10.340509-63.076594 0c-25.993001 0-48.228421 16.346293-57.001225 39.293935L166.626995 176.967504c-34.21015 0-62.043055 27.832905-62.043055 62.043055l0 657.655358c0 34.21015 27.832905 62.043055 62.043055 62.043055l550.115086 0c34.21015 0 62.043055-27.832905 62.043055-62.043055l0-49.634444 78.587869 0c34.21015 0 62.043055-27.832905 62.043055-62.043055L919.41606 127.33306C919.41606 93.122911 891.583155 65.290005 857.373005 65.290005zM344.483752 179.035606l194.402595 0c10.833743 0 19.646456 8.813736 19.646456 19.646456 0 10.833743-8.813736 19.646456-19.646456 19.646456L344.483752 218.328517c-10.833743 0-19.646456-8.813736-19.646456-19.646456C324.836273 187.849342 333.650009 179.035606 344.483752 179.035606zM737.423099 896.665917c0 11.402701-9.278317 20.681018-20.681018 20.681018L166.626995 917.346935c-11.403724 0-20.681018-9.278317-20.681018-20.681018L145.945977 239.010559c0-11.402701 9.277294-20.681018 20.681018-20.681018l120.111588 0c8.197706 24.02723 30.977525 41.362037 57.744145 41.362037l194.402595 0c26.767644 0 49.54644-17.334807 57.744145-41.362037l120.111588 0c11.402701 0 20.681018 9.278317 20.681018 20.681018L737.422076 896.665917zM878.054023 784.988418c0 11.402701-9.278317 20.681018-20.681018 20.681018l-78.587869 0L778.785136 239.010559c0-34.21015-27.832905-62.043055-62.043055-62.043055L595.886549 176.967504c-8.771781-22.947641-31.007201-39.293935-57.001225-39.293935l-89.963964 0L448.921359 127.33306c0-11.403724 9.278317-20.681018 20.683065-20.681018l387.768581 0c11.402701 0 20.681018 9.277294 20.681018 20.681018L878.054023 784.988418z","p-id":"6857"},null,-1),e.createElementVNode("path",{d:"M620.597347 334.252737 260.748652 334.252737c-11.422144 0-20.681018 9.259898-20.681018 20.681018s9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018S632.018467 334.252737 620.597347 334.252737z","p-id":"6858"},null,-1),e.createElementVNode("path",{d:"M620.597347 454.201619 260.748652 454.201619c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C641.278365 463.46254 632.018467 454.201619 620.597347 454.201619z","p-id":"6859"},null,-1),e.createElementVNode("path",{d:"M440.673511 574.151525 260.748652 574.151525c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l179.924859 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C461.35453 583.411423 452.093609 574.151525 440.673511 574.151525z","p-id":"6860"},null,-1)]))}]]),SvgLanguage:C({name:"SvgLanguage"},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("svg",Yp,o[0]||(o[0]=[e.createElementVNode("path",{d:"M200.313605 806.764028h487.993851v78.708685h-487.993851z",fill:"#6C7280","p-id":"13072"},null,-1),e.createElementVNode("path",{d:"M809.518832 136.166026H79.102229a78.708686 78.708686 0 0 0-78.708686 78.708686V944.504228a78.708686 78.708686 0 0 0 78.708686 78.708685h730.416603a78.708686 78.708686 0 0 0 78.708685-78.708685V214.874712a78.708686 78.708686 0 0 0-78.708685-78.708686z m0 848.479631V944.504228H79.102229V214.874712h730.416603V944.504228z","p-id":"13073"},null,-1),e.createElementVNode("path",{d:"M944.897771 0H171.978478v78.708686H944.897771v787.086856h78.708686V78.708686a78.708686 78.708686 0 0 0-78.708686-78.708686z","p-id":"13074"},null,-1),e.createElementVNode("path",{d:"M360.092237 609.205227h161.352805l44.863951 117.275941h58.244427l-157.417371-385.672559h-55.09608L263.280553 725.694081H315.228286z m57.45734-157.417372a487.206764 487.206764 0 0 0 20.464259-73.986164q8.657955 31.483474 27.548039 78.708686l40.14143 107.043812H375.046887z","p-id":"13075"},null,-1)]))}]])},emits:["on-action","on-act-copy","on-act-save","on-act-theme","on-act-custom","on-act-choose-image"],props:{exportFileName:{type:String,default:""},toolbars:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data:()=>({actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:""}),computed:{lastExpFileName(){let t=new Date,o=t.getFullYear(),l=t.getMonth()+1,r=t.getDate(),n=t.getHours(),i=t.getMinutes(),s=o+"-"+Ce(l)+"-"+Ce(r)+"_"+Ce(n)+"-"+Ce(i);return this.exportFileName||s},toolConfig(){const{toolbars:t={}}=this;return{...Wp,...t}}},created(){this.actionPreview=this.isPreview||!1},methods:{actionPhrasesSet(t){this.codemrrConfig.phrases=t,this.actionPhrasesDropdown=!1},actionLanguageSet(t){this.codemrrConfig.language=t,this.actionLanguageDropdown=!1},actionBgColorSet(t){this.codemrrConfig.backgroundColor=t,this.actionBgColorDropdown=!1},actionThemesSet(t){this.codemrrConfig.theme=t,this.actionThemeDropdown=!1,this.$emit("on-act-theme",t)},actionFullscreenSet(t){this.actionFullscreen=t;let o=this.$refs[this.editorWrapRefID];t?o.classList.add("fullscreen"):o.classList.remove("fullscreen"),this.actionCurrent("fullscreen",t)},actionChooseImage(){const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const o=t.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),t.value="")},t.click()},actionInsBg(){const t=this.getLastPoint(),o=t.content||!1;o?this.insertContent("=="+o+"=="):(this.insertContent("===="),this.setCursor(t.line,t.ch+1))},actionUndo(){if(this.editorViewInst){const t=this.editorViewInst.state.behavior(_.EditorState.effect(_.EditorState.undo));this.editorViewInst.update([{changes:{from:0,to:t.doc.length,insert:t.doc},selection:_.EditorSelection.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:_.EditorState.redo()})},actionInsStrong(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="**"+o+"**",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="****",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsItalic(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="*"+o+"*",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="**",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsOverline(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="~~"+o+"~~",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="~~~~",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsUnderline(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="<u>"+o+"</u>",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="<u></u>",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionInsTitle(t){const o={1:"# ",2:"## ",3:"### ",4:"#### ",5:"##### ",6:"###### "}[t],l=this.getLastPoint(),r=l.content||!1;let n=`
|
|
2
2
|
`+o+`标题
|
|
3
3
|
|
|
4
4
|
`;r?r.startsWith("#")?this.insertContent(l.end+1,n):(n=`
|
|
@@ -23,12 +23,12 @@ row 2 col 1 | row 2 col 2
|
|
|
23
23
|
|
|
24
24
|
`,this.insertContent(t.end,o),this.setCursor(t.start+77,t.start+77)},actionInsImage(){const t=this.getLastPoint();let o="";o=`
|
|
25
25
|
|
|
26
|
-
`,this.insertContent(t.end,o),this.setCursor(t.start+48,t.start+48)},actionImportFile(t){const o=t.target.files[0];if(!o)return;const{type:l}=o;if(!["text/markdown","text/src"].includes(l))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result},r.onerror=n=>{}},actionExportFile(){let t=".text";const o={java:".java",php:".php",css:".css",vue:".vue",go:".go",python:".py",json:".json",javascript:".js",js:".js",html:".html",markdown:".md"};this.language&&o[this.language]&&(t=o[this.language]),
|
|
27
|
-
`+an(this.actionHtmlText),this.insertContent(t.end,o),this.setCursor(t.start+o.length,t.start+o.length),this.actionHtmlText="",this.actionHtmlDiaVisible=!1},actionCurrent(t,o){this.$emit("on-action",t,o)},actionCustom(t){this.$emit("on-act-custom",t)}}},Zp={name:"cvEditorCode",mixins:[Na,oe,qo],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({autoRefresh:!0,autofocus:!1,lineNumbers:!0,tabSize:4,indentUnit:2,line:!0,styleActiveLine:!0})},toolbars:{type:[Object],default:()=>({})},language:{type:[String],default:""},theme:{type:[String],default:"oneDark"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data:()=>({localVal:"",heightMainPx:"",editorWrapRefEL:null}),watch:{localVal(t){this.$emit("update:modelValue",t)},modelValue(t){this.localVal!=t&&(this.localVal=t)},height(t){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},heightTotalPx(){let t=""+this.height;return t.includes("%")||t.includes("px")?t:t+"px"},widthTotalPx(){let t=""+this.width;return t.includes("px")?t:t+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx(),this.optionLanguage.includes(this.language)&&(this.codemrrConfig.language=this.language),this.optionTheme.includes(this.theme)&&(this.codemrrConfig.theme=this.theme)},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const t=this.editorWrapRefEL.querySelector(".cv-editor-code-toolbar").offsetHeight;return t?this.heightTotalPx.includes("%")?`calc(100% - ${t}px - 2px)`:this.heightTotalPx.replace("px","")-t-2+"px":this.heightTotalPx},consoleLog(t,o){},initEditorReady(t){const{container:o,state:l,view:r}=t;this.editorStateInst=l,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){}}},Yp={key:0,class:"cv-editor-code-toolbar","data-title":"头部工具栏"},Jp={class:"cv-editor-toolbars"},Xp={name:"导入文件",class:"import-file"},eu={name:"保存到本地"},tu={key:1,class:"shift-theme",name:"主题"},ou=["onClick"],lu={class:"shift-theme",name:"语言"},au=["onClick"],nu={class:"icon-svg"},iu={key:5,class:"segmentation"},ru=["name"],cu={title:"编辑器",class:"cv-editor-code-main"},qt=C(Zp,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("SvgLanguage"),s=e.resolveComponent("SvgCopy"),m=e.resolveComponent("CodemirrorEditor");return e.openBlock(),e.createElementBlock("div",{ref:i.editorWrapRefID,class:e.normalizeClass(["cv-editor-code-wrap cv-editor-vars",l.bordered?"border":""]),style:e.normalizeStyle({width:i.widthTotalPx,height:i.heightTotalPx})},[t.actionPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Yp,[e.createElementVNode("ul",Jp,[t.$slots.title?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("li",null,[e.renderSlot(t.$slots,"title")]),o[16]||(o[16]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1))],64)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("li",Xp,[e.createElementVNode("span",{class:"iconfont icon-daoru",onClick:o[0]||(o[0]=(...d)=>t.actionImportFile&&t.actionImportFile(...d))}),e.createElementVNode("input",{type:"file",onChange:o[1]||(o[1]=d=>t.actionImportFile(d)),accept:"text/markdown"},null,32)],512),[[e.vShow,t.toolConfig.importmd]]),e.withDirectives(e.createElementVNode("li",eu,[e.createElementVNode("span",{class:"iconfont icon-download",onClick:o[2]||(o[2]=(...d)=>t.actionExportFile&&t.actionExportFile(...d))})],512),[[e.vShow,t.toolConfig.exportmd]]),o[20]||(o[20]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1)),t.toolConfig.theme?(e.openBlock(),e.createElementBlock("li",tu,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[3]||(o[3]=d=>t.actionThemeDropdown=!t.actionThemeDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionThemeDropdown}),onMouseleave:o[4]||(o[4]=d=>t.actionThemeDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionTheme,d=>(e.openBlock(),e.createElementBlock("li",{onClick:p=>t.actionThemesSet(d)},e.toDisplayString(d),9,ou))),256))],34)])):e.createCommentVNode("",!0),e.createElementVNode("li",lu,[e.createElementVNode("span",{class:"icon-svg",onClick:o[5]||(o[5]=d=>t.actionLanguageDropdown=!t.actionLanguageDropdown)},[e.createVNode(c)]),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionLanguageDropdown}),onMouseleave:o[6]||(o[6]=d=>t.actionLanguageDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionLanguage,d=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(d==l.language?"active":""),onClick:p=>t.actionLanguageSet(d)},e.toDisplayString(d),11,au))),256))],34)]),o[21]||(o[21]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.copy?(e.openBlock(),e.createElementBlock("li",{key:2,name:"复制",onClick:o[7]||(o[7]=(...d)=>t.actionCopySet&&t.actionCopySet(...d))},[e.createElementVNode("span",nu,[e.createVNode(s)])])):e.createCommentVNode("",!0),t.toolConfig.clear?(e.openBlock(),e.createElementBlock("li",{key:3,name:"清空",onClick:o[8]||(o[8]=d=>n.localVal="")},o[17]||(o[17]=[e.createElementVNode("span",{class:"iconfont icon-clear"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",{key:4,name:"保存",onClick:o[9]||(o[9]=(...d)=>t.actionSaveSet&&t.actionSaveSet(...d))},o[18]||(o[18]=[e.createElementVNode("span",{class:"iconfont icon-save"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",iu,o[19]||(o[19]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",{key:6,name:t.actionFullscreen?"退出全屏":"全屏"},[e.withDirectives(e.createElementVNode("span",{onClick:o[10]||(o[10]=d=>t.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[e.vShow,t.actionFullscreen]]),e.withDirectives(e.createElementVNode("span",{onClick:o[11]||(o[11]=d=>t.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[e.vShow,!t.actionFullscreen]])],8,ru)):e.createCommentVNode("",!0)])])),e.createElementVNode("div",cu,[e.createVNode(m,e.mergeProps(t.codemrrBind,{id:t.editorRefID,ref:t.editorRefID,style:{height:n.heightMainPx,backgroundColor:t.codemrrConfig.backgroundColor},extensions:t.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[12]||(o[12]=d=>n.localVal=d),onReady:i.initEditorReady,onChange:o[13]||(o[13]=d=>i.consoleLog("change",d)),onFocus:o[14]||(o[14]=d=>i.consoleLog("focus",d)),onBlur:o[15]||(o[15]=d=>i.consoleLog("blur",d))}),null,16,["id","style","extensions","modelValue","onReady"])])],6)}]]),Gt=C({name:"cvEditorJson",components:{},mixins:[oe],props:{modelValue:{type:[Object,Array,Number,String,Boolean],default:""},mode:{type:[String],default:"text"},readOnly:{type:[Boolean],default:!1},options:{type:[Object],default:()=>({mode:"text"})},height:{type:String},plus:{type:Boolean,default:!0}},data:()=>({editorInstance:null,style:{},max:!1,internalChange:!1,localVal:""}),watch:{modelValue:{handler(t){this.localVal!=t&&(this.localVal=t,this.updateVal(t))},deep:!0},max(t){this.$nextTick(()=>{this.initNewCreate()})},options:{handler(t){this.options&&this.options.mode&&this.editorInstance},deep:!0}},computed:{getHeight(){return this.height&&!this.max?{height:this.height}:{}}},async mounted(){this.initNewCreate()},updated(){this.editorInstance.updateProps({mode:this.mode,readOnly:this.readOnly})},beforeUnmount(){this.destroyView()},beforeDestroy(){this.destroyView()},methods:{async initNewCreate(){const{JSONEditor:t}=await import("https://10ui.cn/jsoneditor/vanilla-jsoneditor@0.22.0/standalone.js");this.editorInstance||(this.editorInstance=new t({target:this.$refs[this.editorRefID],props:{value:this.modelValue,mode:this.mode,readOnly:this.readOnly,...this.options,onChange:this.onChange}}),this.updateVal(this.modelValue))},onChange(){let t=null,o={};try{o=this.editorInstance.get()}catch(l){t=l}t?this.$emit("error",t):this.editorInstance&&(this.internalChange=!0,this.localVal=o,this.$emit("update:modelValue",this.localVal),this.$nextTick(()=>{this.internalChange=!1}))},updateVal(t){this.editorInstance&&t!==void 0&&!this.internalChange&&this.editorInstance.update({json:t})},isJSON(t){try{return JSON.parse(t),!0}catch{return!1}},destroyView(){this.editor&&(this.editorInstance.destroy(),this.editor=null)},handleChange(t){this.emitData||(this.emitData=Fn(400,o=>{this.$emit("update:modelValue",o)})),this.emitData(t)}}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-editor-json",{"max-box":n.max,"min-box":!n.max}]),style:e.normalizeStyle(i.getHeight)},[e.createElementVNode("div",{ref:t.editorRefID,class:"jsoneditor-box"},null,512),e.createElementVNode("a",{onClick:o[0]||(o[0]=c=>n.max=!n.max),class:"max-btn"})],6)}]]),su={class:"cv-editor-upload-container"},du=["advlist","anchor","autolink","autosave","code","codesample","directionality","emoticons","fullscreen","image","insertdatetime","link","lists","media","nonbreaking","pagebreak","preview","save","searchreplace","table","visualblocks","visualchars","wordcount"],mu=["hr blockquote anchor pagebreak insertdatetime table emoticons | searchreplace preview code codesample | fullscreen | link media image ","inserttemplate undo redo | styles | removeformat subscript superscript forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist indent"];let X=[];const pu=(t,o)=>{const l=document.getElementById(t),r=o||function(){};if(!l){const n=document.createElement("script");n.src=t,n.id=t,document.body.appendChild(n),X.push(r),("onload"in n?function(c){c.onload=function(){this.onerror=this.onload=null;for(const s of X)s(null,c);X=null},c.onerror=function(){this.onerror=this.onload=null,r(new Error("Failed to load "+t),c)}}:function(c){c.onreadystatechange=function(){if(this.readyState==="complete"||this.readyState==="loaded"){this.onreadystatechange=null;for(const s of X)s(null,c);X=null}}})(n)}l&&r&&(window.tinymce?r(null,l):X.push(r))},uu=["id"],hu={class:"editor-custom-btn-container"},Kt=C({inheritAttrs:!1,name:"cvEditorTinymce",components:{EditorSlideUpload:C({name:"EditorSlideUpload",props:{color:{type:String,default:"#1890ff"},accept:{type:[String],default:"image/jpeg,image/gif,image/png"},upName:{type:[String],default:""},upAction:{type:[String],default:""},upResponseFn:{type:[Function],default:()=>{}},upHeaders:{type:[Object],default:()=>{}},upData:{type:[Object],default:()=>{}}},data:()=>({dialogVisible:!1,listObj:{},fileList:[],diyUpList:new FormData}),methods:{checkAllSuccess(){return Object.keys(this.listObj).every(t=>this.listObj[t].hasSuccess)},handleSubmit(){const t=Object.keys(this.listObj).map(o=>this.listObj[o]);this.checkAllSuccess()?(this.$emit("successCBK",t),this.listObj={},this.fileList=[],this.dialogVisible=!1):this.$message("请等待所有图片上传成功。如果出现网络问题,请刷新页面并重新上传!")},handleSuccess(t,o){const l=o.uid,r=Object.keys(this.listObj);for(let n=0,i=r.length;n<i;n++)if(this.listObj[r[n]].uid===l)return this.upResponseFn&&typeof this.upResponseFn=="function"?this.listObj[r[n]].url=this.upResponseFn(t):this.listObj[r[n]].url=t.files.file||"",void(this.listObj[r[n]].hasSuccess=!0)},handleRemove(t){const o=t.uid,l=Object.keys(this.listObj);for(let r=0,n=l.length;r<n;r++)if(this.listObj[l[r]].uid===o)return void delete this.listObj[l[r]]},beforeUpload(t){const o=this,l=window.URL||window.webkitURL,r=t.uid;return this.listObj[r]={},new Promise((n,i)=>{const c=new Image;c.src=l.createObjectURL(t),c.onload=function(){o.listObj[r]={hasSuccess:!1,uid:t.uid,width:this.width,height:this.height}},n(!0)})}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("cv-icons"),s=e.resolveComponent("el-button"),m=e.resolveComponent("el-upload"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",su,[e.createVNode(s,{style:e.normalizeStyle({background:l.color,borderColor:l.color,fontSize:"16px"}),type:"primary",onClick:o[0]||(o[0]=p=>n.dialogVisible=!0)},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconUpload",size:"16",style:{"margin-right":"5px"}}),o[2]||(o[2]=e.createTextVNode(" 上传 "))]),_:1},8,["style"]),e.createVNode(d,{visible:n.dialogVisible},{default:e.withCtx(()=>[e.createVNode(m,e.mergeProps({class:"editor-slide-upload"},{action:l.upAction,headers:l.upHeaders,data:l.upData,name:l.upName,multiple:!0,showFileList:!0,listType:"picture-card",autoUpload:!0},{"file-list":n.fileList,"on-remove":i.handleRemove,"on-success":i.handleSuccess,"before-upload":i.beforeUpload}),{default:e.withCtx(()=>[e.createVNode(s,{type:"primary"},{default:e.withCtx(()=>o[3]||(o[3]=[e.createTextVNode("点击上传")])),_:1})]),_:1},16,["file-list","on-remove","on-success","before-upload"]),e.createVNode(s,{onClick:o[1]||(o[1]=p=>n.dialogVisible=!1)},{default:e.withCtx(()=>o[4]||(o[4]=[e.createTextVNode("取消")])),_:1}),e.createVNode(s,{type:"primary",onClick:i.handleSubmit},{default:e.withCtx(()=>o[5]||(o[5]=[e.createTextVNode("确定")])),_:1},8,["onClick"])]),_:1},8,["visible"])])}]])},emits:["update:modelValue"],mixins:[oe],props:{modelValue:{type:String,default:""},toolbar:{type:Array,required:!1,default:()=>[]},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"100%"},uploadAttr:{type:[Object],default:()=>({})}},data:()=>({localVal:"",fullscreen:!1,languageTypeList:{en:"en",zh:"zh_CN",es:"es_MX",ja:"ja"}}),computed:{containerWidth(){const t=this.width;return/^[\d]+(\.[\d]+)?$/.test(t)?`${t}px`:t}},watch:{modelValue(t){this.localVal!=t&&(this.localVal=t,window.tinymce.get(this.editorRefID).setContent(t||""))}},created(){this.localVal=this.modelValue},mounted(){this.initLoad()},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{initLoad(){pu("https://10ui.cn/tinymce/@7.0.0/tinymce.min.js",t=>{t?this.$message.error(t.message):this.initTinymce()})},initTinymce(){const t=this;window.tinymce.init({selector:`#${this.editorRefID}`,license_key:"gpl",language:this.languageTypeList.zh,height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:mu,menubar:this.menubar,plugins:du,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",editimage_cors_hosts:["www.tinymce.com","codepen.io"],link_default_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:o=>{t.localVal&&o.setContent(t.localVal)},setup(o){o.on("FullscreenStateChanged",l=>{t.fullscreen=l.state}),o.on("input",l=>{t.localVal=o.getContent(),t.$emit("update:modelValue",t.localVal)})},convert_urls:!1,images_upload_handler(o,l,r,n){n(0),new FormData}})},destroyTinymce(){const t=window.tinymce.get(this.editorRefID);this.fullscreen&&t.execCommand("mceFullScreen"),t&&t.destroy()},setContent(t){window.tinymce.get(this.editorRefID).setContent(t)},getContent(){window.tinymce.get(this.editorRefID).getContent()},imageSuccessCBK(t){t.forEach(o=>window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${o.url}" >`))}}},[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("EditorSlideUpload");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-editor-tinymce tinymce-container",{fullscreen:n.fullscreen}]),style:e.normalizeStyle({width:i.containerWidth})},[e.createElementVNode("textarea",{id:t.editorRefID,class:"tinymce-textarea"},null,8,uu),e.createElementVNode("div",hu,[e.createVNode(c,e.mergeProps({color:"#1890ff",class:"editor-upload-btn",onSuccessCBK:i.imageSuccessCBK},l.uploadAttr),null,16,["onSuccessCBK"])])],6)}],["__scopeId","data-v-8cbc5d06"]]),gu={name:"cvEditorMarkdown",mixins:[Na,oe,qo],emits:["update:modelValue","on-ready","on-upload-image"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({})},toolbars:{type:[Object],default:()=>({})},language:{type:[String],default:"markdown"},theme:{type:[String],default:"light"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data:()=>({lastPos:"",lastInsert:"",lastHtml:"",scrollSide:"",localVal:"",heightMainPx:"",editorWrapRefEL:null}),watch:{localVal(t){this.$emit("update:modelValue",t)},modelValue(t){this.localVal!=t&&(this.localVal=t)},height(t){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},previewRefID(){return this.editorRefID+"preview"},heightTotalPx(){let t=""+this.height;return t.includes("%")||t.includes("px")?t:t+"px"},widthTotalPx(){let t=""+this.width;return t.includes("px")?t:t+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx()},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const t=this.editorWrapRefEL.querySelector(".cv-editor-markdown-toolbar").offsetHeight;return t?this.heightTotalPx.includes("%")?`calc(100% - ${t}px - 2px)`:this.heightTotalPx.replace("px","")-t-2+"px":this.heightTotalPx},consoleLog(t,o){},initEditorReady(t){const{container:o,state:l,view:r}=t;this.editorStateInst=l,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID],this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller").addEventListener("scroll",this.markdownScroll),this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview").addEventListener("scroll",this.previewScroll)},handlePaste(t,o){const{clipboardData:l={}}=o,{types:r=[],items:n}=l;let i=null;for(let c=0;c<r.length;c++)if(r[c]==="Files"){i=n[c];break}if(i){const c=i.getAsFile();/image/gi.test(c.type)&&(this.$emit("on-upload-image",c),o.preventDefault())}},setCursor(t,o){this.editorViewInst.dispatch({selection:{anchor:t,head:o}}),this.editorViewInst.focus()},GetContent(){const t=this.editorViewState.selection.main.head,o=this.editorViewState.doc.lineAt(t).number,l=this.editorViewState.doc.line(o).text.trim();return l!==""&&l},deleteContent(t,o){this.editorViewInst.dispatch({changes:{from:t,to:o}})},getLastPoint(){const t=this.editorViewInst.state.selection.main.head,o=this.editorViewInst.state.doc.lineAt(t).number,l=this.editorViewInst.state.doc.line(o).from,r=this.editorViewInst.state.doc.line(o).to,n=this.editorViewInst.state.doc.line(o).text;return this.lastPos||{line:o,start:l,end:r,content:n}},insertContent(t,o){this.getLastPoint(),this.editorViewInst.dispatch({changes:{from:t,insert:o}})},listerenKeyupEnter(t){const{lastInsert:o}=this;o&&(["-","- [ ]","- [x]"].includes(o.trim())?(t.preventDefault(),this.insertContent(`
|
|
26
|
+
`,this.insertContent(t.end,o),this.setCursor(t.start+48,t.start+48)},actionImportFile(t){const o=t.target.files[0];if(!o)return;const{type:l}=o;if(!["text/markdown","text/src"].includes(l))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result},r.onerror=n=>{}},actionExportFile(){let t=".text";const o={java:".java",php:".php",css:".css",vue:".vue",go:".go",python:".py",json:".json",javascript:".js",js:".js",html:".html",markdown:".md"};this.language&&o[this.language]&&(t=o[this.language]),Ea(this.localVal,this.lastExpFileName+t)},insertCode(){const t=this.getLastPoint(),o=t.content||!1;let l="";o?(l="\n```text\n"+o+"\n```\n",this.deleteContent(t.start,t.end),this.insertContent(t.start,l)):(l="\n```text\n\n```\n",this.insertContent(t.start,l)),this.setCursor(t.start+l.length,t.start+l.length)},actionSaveSet(){const{localVal:t,codemrrConfig:o,lastHtml:l}=this;this.$emit("on-act-save",{theme:o.theme||"",value:t||"",html:l||""})},actionCopySet(){this.$cvCopy(this.localVal),this.$emit("on-act-copy",this.localVal)},actionHtmlVisible(t){this.actionHtmlText="",this.actionHtmlDiaVisible=!!t},actionHtmlToMD(){const t=this.getLastPoint();let o="";o=`
|
|
27
|
+
`+nn(this.actionHtmlText),this.insertContent(t.end,o),this.setCursor(t.start+o.length,t.start+o.length),this.actionHtmlText="",this.actionHtmlDiaVisible=!1},actionCurrent(t,o){this.$emit("on-action",t,o)},actionCustom(t){this.$emit("on-act-custom",t)}}},Zp={name:"cvEditorCode",mixins:[Na,oe,Go],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({autoRefresh:!0,autofocus:!1,lineNumbers:!0,tabSize:4,indentUnit:2,line:!0,styleActiveLine:!0})},toolbars:{type:[Object],default:()=>({})},language:{type:[String],default:""},theme:{type:[String],default:"oneDark"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data:()=>({localVal:"",heightMainPx:"",editorWrapRefEL:null}),watch:{localVal(t){this.$emit("update:modelValue",t)},modelValue(t){this.localVal!=t&&(this.localVal=t)},height(t){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},heightTotalPx(){let t=""+this.height;return t.includes("%")||t.includes("px")?t:t+"px"},widthTotalPx(){let t=""+this.width;return t.includes("px")?t:t+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx(),this.optionLanguage.includes(this.language)&&(this.codemrrConfig.language=this.language),this.optionTheme.includes(this.theme)&&(this.codemrrConfig.theme=this.theme)},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const t=this.editorWrapRefEL.querySelector(".cv-editor-code-toolbar").offsetHeight;return t?this.heightTotalPx.includes("%")?`calc(100% - ${t}px - 2px)`:this.heightTotalPx.replace("px","")-t-2+"px":this.heightTotalPx},consoleLog(t,o){},initEditorReady(t){const{container:o,state:l,view:r}=t;this.editorStateInst=l,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){}}},Jp={key:0,class:"cv-editor-code-toolbar","data-title":"头部工具栏"},Xp={class:"cv-editor-toolbars"},eu={name:"导入文件",class:"import-file"},tu={name:"保存到本地"},ou={key:1,class:"shift-theme",name:"主题"},lu=["onClick"],au={class:"shift-theme",name:"语言"},nu=["onClick"],iu={class:"icon-svg"},ru={key:5,class:"segmentation"},su=["name"],cu={title:"编辑器",class:"cv-editor-code-main"},Gt=C(Zp,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("SvgLanguage"),c=e.resolveComponent("SvgCopy"),m=e.resolveComponent("CodemirrorEditor");return e.openBlock(),e.createElementBlock("div",{ref:i.editorWrapRefID,class:e.normalizeClass(["cv-editor-code-wrap cv-editor-vars",l.bordered?"border":""]),style:e.normalizeStyle({width:i.widthTotalPx,height:i.heightTotalPx})},[t.actionPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Jp,[e.createElementVNode("ul",Xp,[t.$slots.title?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("li",null,[e.renderSlot(t.$slots,"title")]),o[16]||(o[16]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1))],64)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("li",eu,[e.createElementVNode("span",{class:"iconfont icon-daoru",onClick:o[0]||(o[0]=(...d)=>t.actionImportFile&&t.actionImportFile(...d))}),e.createElementVNode("input",{type:"file",onChange:o[1]||(o[1]=d=>t.actionImportFile(d)),accept:"text/markdown"},null,32)],512),[[e.vShow,t.toolConfig.importmd]]),e.withDirectives(e.createElementVNode("li",tu,[e.createElementVNode("span",{class:"iconfont icon-download",onClick:o[2]||(o[2]=(...d)=>t.actionExportFile&&t.actionExportFile(...d))})],512),[[e.vShow,t.toolConfig.exportmd]]),o[20]||(o[20]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1)),t.toolConfig.theme?(e.openBlock(),e.createElementBlock("li",ou,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[3]||(o[3]=d=>t.actionThemeDropdown=!t.actionThemeDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionThemeDropdown}),onMouseleave:o[4]||(o[4]=d=>t.actionThemeDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionTheme,d=>(e.openBlock(),e.createElementBlock("li",{onClick:p=>t.actionThemesSet(d)},e.toDisplayString(d),9,lu))),256))],34)])):e.createCommentVNode("",!0),e.createElementVNode("li",au,[e.createElementVNode("span",{class:"icon-svg",onClick:o[5]||(o[5]=d=>t.actionLanguageDropdown=!t.actionLanguageDropdown)},[e.createVNode(s)]),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionLanguageDropdown}),onMouseleave:o[6]||(o[6]=d=>t.actionLanguageDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionLanguage,d=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(d==l.language?"active":""),onClick:p=>t.actionLanguageSet(d)},e.toDisplayString(d),11,nu))),256))],34)]),o[21]||(o[21]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.copy?(e.openBlock(),e.createElementBlock("li",{key:2,name:"复制",onClick:o[7]||(o[7]=(...d)=>t.actionCopySet&&t.actionCopySet(...d))},[e.createElementVNode("span",iu,[e.createVNode(c)])])):e.createCommentVNode("",!0),t.toolConfig.clear?(e.openBlock(),e.createElementBlock("li",{key:3,name:"清空",onClick:o[8]||(o[8]=d=>n.localVal="")},o[17]||(o[17]=[e.createElementVNode("span",{class:"iconfont icon-clear"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",{key:4,name:"保存",onClick:o[9]||(o[9]=(...d)=>t.actionSaveSet&&t.actionSaveSet(...d))},o[18]||(o[18]=[e.createElementVNode("span",{class:"iconfont icon-save"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",ru,o[19]||(o[19]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",{key:6,name:t.actionFullscreen?"退出全屏":"全屏"},[e.withDirectives(e.createElementVNode("span",{onClick:o[10]||(o[10]=d=>t.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[e.vShow,t.actionFullscreen]]),e.withDirectives(e.createElementVNode("span",{onClick:o[11]||(o[11]=d=>t.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[e.vShow,!t.actionFullscreen]])],8,su)):e.createCommentVNode("",!0)])])),e.createElementVNode("div",cu,[e.createVNode(m,e.mergeProps(t.codemrrBind,{id:t.editorRefID,ref:t.editorRefID,style:{height:n.heightMainPx,backgroundColor:t.codemrrConfig.backgroundColor},extensions:t.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[12]||(o[12]=d=>n.localVal=d),onReady:i.initEditorReady,onChange:o[13]||(o[13]=d=>i.consoleLog("change",d)),onFocus:o[14]||(o[14]=d=>i.consoleLog("focus",d)),onBlur:o[15]||(o[15]=d=>i.consoleLog("blur",d))}),null,16,["id","style","extensions","modelValue","onReady"])])],6)}]]),Kt=C({name:"cvEditorJson",components:{},mixins:[oe],props:{modelValue:{type:[Object,Array,Number,String,Boolean],default:""},mode:{type:[String],default:"text"},readOnly:{type:[Boolean],default:!1},options:{type:[Object],default:()=>({mode:"text"})},height:{type:String},plus:{type:Boolean,default:!0}},data:()=>({editorInstance:null,style:{},max:!1,internalChange:!1,localVal:""}),watch:{modelValue:{handler(t){this.localVal!=t&&(this.localVal=t,this.updateVal(t))},deep:!0},max(t){this.$nextTick(()=>{this.initNewCreate()})},options:{handler(t){this.options&&this.options.mode&&this.editorInstance},deep:!0}},computed:{getHeight(){return this.height&&!this.max?{height:this.height}:{}}},async mounted(){this.initNewCreate()},updated(){this.editorInstance.updateProps({mode:this.mode,readOnly:this.readOnly})},beforeUnmount(){this.destroyView()},beforeDestroy(){this.destroyView()},methods:{async initNewCreate(){const{JSONEditor:t}=await import("https://10ui.cn/jsoneditor/vanilla-jsoneditor@0.22.0/standalone.js");this.editorInstance||(this.editorInstance=new t({target:this.$refs[this.editorRefID],props:{value:this.modelValue,mode:this.mode,readOnly:this.readOnly,...this.options,onChange:this.onChange}}),this.updateVal(this.modelValue))},onChange(){let t=null,o={};try{o=this.editorInstance.get()}catch(l){t=l}t?this.$emit("error",t):this.editorInstance&&(this.internalChange=!0,this.localVal=o,this.$emit("update:modelValue",this.localVal),this.$nextTick(()=>{this.internalChange=!1}))},updateVal(t){this.editorInstance&&t!==void 0&&!this.internalChange&&this.editorInstance.update({json:t})},isJSON(t){try{return JSON.parse(t),!0}catch{return!1}},destroyView(){this.editor&&(this.editorInstance.destroy(),this.editor=null)},handleChange(t){this.emitData||(this.emitData=_n(400,o=>{this.$emit("update:modelValue",o)})),this.emitData(t)}}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-editor-json",{"max-box":n.max,"min-box":!n.max}]),style:e.normalizeStyle(i.getHeight)},[e.createElementVNode("div",{ref:t.editorRefID,class:"jsoneditor-box"},null,512),e.createElementVNode("a",{onClick:o[0]||(o[0]=s=>n.max=!n.max),class:"max-btn"})],6)}]]),du={class:"cv-editor-upload-container"},mu=["advlist","anchor","autolink","autosave","code","codesample","directionality","emoticons","fullscreen","image","insertdatetime","link","lists","media","nonbreaking","pagebreak","preview","save","searchreplace","table","visualblocks","visualchars","wordcount"],pu=["hr blockquote anchor pagebreak insertdatetime table emoticons | searchreplace preview code codesample | fullscreen | link media image ","inserttemplate undo redo | styles | removeformat subscript superscript forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist indent"];let X=[];const uu=(t,o)=>{const l=document.getElementById(t),r=o||function(){};if(!l){const n=document.createElement("script");n.src=t,n.id=t,document.body.appendChild(n),X.push(r),("onload"in n?function(s){s.onload=function(){this.onerror=this.onload=null;for(const c of X)c(null,s);X=null},s.onerror=function(){this.onerror=this.onload=null,r(new Error("Failed to load "+t),s)}}:function(s){s.onreadystatechange=function(){if(this.readyState==="complete"||this.readyState==="loaded"){this.onreadystatechange=null;for(const c of X)c(null,s);X=null}}})(n)}l&&r&&(window.tinymce?r(null,l):X.push(r))},hu=["id"],gu={class:"editor-custom-btn-container"},Qt=C({inheritAttrs:!1,name:"cvEditorTinymce",components:{EditorSlideUpload:C({name:"EditorSlideUpload",props:{color:{type:String,default:"#1890ff"},accept:{type:[String],default:"image/jpeg,image/gif,image/png"},upName:{type:[String],default:""},upAction:{type:[String],default:""},upResponseFn:{type:[Function],default:()=>{}},upHeaders:{type:[Object],default:()=>{}},upData:{type:[Object],default:()=>{}}},data:()=>({dialogVisible:!1,listObj:{},fileList:[],diyUpList:new FormData}),methods:{checkAllSuccess(){return Object.keys(this.listObj).every(t=>this.listObj[t].hasSuccess)},handleSubmit(){const t=Object.keys(this.listObj).map(o=>this.listObj[o]);this.checkAllSuccess()?(this.$emit("successCBK",t),this.listObj={},this.fileList=[],this.dialogVisible=!1):this.$message("请等待所有图片上传成功。如果出现网络问题,请刷新页面并重新上传!")},handleSuccess(t,o){const l=o.uid,r=Object.keys(this.listObj);for(let n=0,i=r.length;n<i;n++)if(this.listObj[r[n]].uid===l)return this.upResponseFn&&typeof this.upResponseFn=="function"?this.listObj[r[n]].url=this.upResponseFn(t):this.listObj[r[n]].url=t.files.file||"",void(this.listObj[r[n]].hasSuccess=!0)},handleRemove(t){const o=t.uid,l=Object.keys(this.listObj);for(let r=0,n=l.length;r<n;r++)if(this.listObj[l[r]].uid===o)return void delete this.listObj[l[r]]},beforeUpload(t){const o=this,l=window.URL||window.webkitURL,r=t.uid;return this.listObj[r]={},new Promise((n,i)=>{const s=new Image;s.src=l.createObjectURL(t),s.onload=function(){o.listObj[r]={hasSuccess:!1,uid:t.uid,width:this.width,height:this.height}},n(!0)})}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-button"),m=e.resolveComponent("el-upload"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",du,[e.createVNode(c,{style:e.normalizeStyle({background:l.color,borderColor:l.color,fontSize:"16px"}),type:"primary",onClick:o[0]||(o[0]=p=>n.dialogVisible=!0)},{default:e.withCtx(()=>[e.createVNode(s,{type:"ElIconUpload",size:"16",style:{"margin-right":"5px"}}),o[2]||(o[2]=e.createTextVNode(" 上传 "))]),_:1},8,["style"]),e.createVNode(d,{visible:n.dialogVisible},{default:e.withCtx(()=>[e.createVNode(m,e.mergeProps({class:"editor-slide-upload"},{action:l.upAction,headers:l.upHeaders,data:l.upData,name:l.upName,multiple:!0,showFileList:!0,listType:"picture-card",autoUpload:!0},{"file-list":n.fileList,"on-remove":i.handleRemove,"on-success":i.handleSuccess,"before-upload":i.beforeUpload}),{default:e.withCtx(()=>[e.createVNode(c,{type:"primary"},{default:e.withCtx(()=>o[3]||(o[3]=[e.createTextVNode("点击上传")])),_:1})]),_:1},16,["file-list","on-remove","on-success","before-upload"]),e.createVNode(c,{onClick:o[1]||(o[1]=p=>n.dialogVisible=!1)},{default:e.withCtx(()=>o[4]||(o[4]=[e.createTextVNode("取消")])),_:1}),e.createVNode(c,{type:"primary",onClick:i.handleSubmit},{default:e.withCtx(()=>o[5]||(o[5]=[e.createTextVNode("确定")])),_:1},8,["onClick"])]),_:1},8,["visible"])])}]])},emits:["update:modelValue"],mixins:[oe],props:{modelValue:{type:String,default:""},toolbar:{type:Array,required:!1,default:()=>[]},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"100%"},uploadAttr:{type:[Object],default:()=>({})}},data:()=>({localVal:"",fullscreen:!1,languageTypeList:{en:"en",zh:"zh_CN",es:"es_MX",ja:"ja"}}),computed:{containerWidth(){const t=this.width;return/^[\d]+(\.[\d]+)?$/.test(t)?`${t}px`:t}},watch:{modelValue(t){this.localVal!=t&&(this.localVal=t,window.tinymce.get(this.editorRefID).setContent(t||""))}},created(){this.localVal=this.modelValue},mounted(){this.initLoad()},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{initLoad(){uu("https://10ui.cn/tinymce/@7.0.0/tinymce.min.js",t=>{t?this.$message.error(t.message):this.initTinymce()})},initTinymce(){const t=this;window.tinymce.init({selector:`#${this.editorRefID}`,license_key:"gpl",language:this.languageTypeList.zh,height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:pu,menubar:this.menubar,plugins:mu,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",editimage_cors_hosts:["www.tinymce.com","codepen.io"],link_default_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:o=>{t.localVal&&o.setContent(t.localVal)},setup(o){o.on("FullscreenStateChanged",l=>{t.fullscreen=l.state}),o.on("input",l=>{t.localVal=o.getContent(),t.$emit("update:modelValue",t.localVal)})},convert_urls:!1,images_upload_handler(o,l,r,n){n(0),new FormData}})},destroyTinymce(){const t=window.tinymce.get(this.editorRefID);this.fullscreen&&t.execCommand("mceFullScreen"),t&&t.destroy()},setContent(t){window.tinymce.get(this.editorRefID).setContent(t)},getContent(){window.tinymce.get(this.editorRefID).getContent()},imageSuccessCBK(t){t.forEach(o=>window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${o.url}" >`))}}},[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("EditorSlideUpload");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-editor-tinymce tinymce-container",{fullscreen:n.fullscreen}]),style:e.normalizeStyle({width:i.containerWidth})},[e.createElementVNode("textarea",{id:t.editorRefID,class:"tinymce-textarea"},null,8,hu),e.createElementVNode("div",gu,[e.createVNode(s,e.mergeProps({color:"#1890ff",class:"editor-upload-btn",onSuccessCBK:i.imageSuccessCBK},l.uploadAttr),null,16,["onSuccessCBK"])])],6)}],["__scopeId","data-v-8cbc5d06"]]),fu={name:"cvEditorMarkdown",mixins:[Na,oe,Go],emits:["update:modelValue","on-ready","on-upload-image"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({})},toolbars:{type:[Object],default:()=>({})},language:{type:[String],default:"markdown"},theme:{type:[String],default:"light"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data:()=>({lastPos:"",lastInsert:"",lastHtml:"",scrollSide:"",localVal:"",heightMainPx:"",editorWrapRefEL:null}),watch:{localVal(t){this.$emit("update:modelValue",t)},modelValue(t){this.localVal!=t&&(this.localVal=t)},height(t){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},previewRefID(){return this.editorRefID+"preview"},heightTotalPx(){let t=""+this.height;return t.includes("%")||t.includes("px")?t:t+"px"},widthTotalPx(){let t=""+this.width;return t.includes("px")?t:t+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx()},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const t=this.editorWrapRefEL.querySelector(".cv-editor-markdown-toolbar").offsetHeight;return t?this.heightTotalPx.includes("%")?`calc(100% - ${t}px - 2px)`:this.heightTotalPx.replace("px","")-t-2+"px":this.heightTotalPx},consoleLog(t,o){},initEditorReady(t){const{container:o,state:l,view:r}=t;this.editorStateInst=l,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID],this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller").addEventListener("scroll",this.markdownScroll),this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview").addEventListener("scroll",this.previewScroll)},handlePaste(t,o){const{clipboardData:l={}}=o,{types:r=[],items:n}=l;let i=null;for(let s=0;s<r.length;s++)if(r[s]==="Files"){i=n[s];break}if(i){const s=i.getAsFile();/image/gi.test(s.type)&&(this.$emit("on-upload-image",s),o.preventDefault())}},setCursor(t,o){this.editorViewInst.dispatch({selection:{anchor:t,head:o}}),this.editorViewInst.focus()},GetContent(){const t=this.editorViewState.selection.main.head,o=this.editorViewState.doc.lineAt(t).number,l=this.editorViewState.doc.line(o).text.trim();return l!==""&&l},deleteContent(t,o){this.editorViewInst.dispatch({changes:{from:t,to:o}})},getLastPoint(){const t=this.editorViewInst.state.selection.main.head,o=this.editorViewInst.state.doc.lineAt(t).number,l=this.editorViewInst.state.doc.line(o).from,r=this.editorViewInst.state.doc.line(o).to,n=this.editorViewInst.state.doc.line(o).text;return this.lastPos||{line:o,start:l,end:r,content:n}},insertContent(t,o){this.getLastPoint(),this.editorViewInst.dispatch({changes:{from:t,insert:o}})},listerenKeyupEnter(t){const{lastInsert:o}=this;o&&(["-","- [ ]","- [x]"].includes(o.trim())?(t.preventDefault(),this.insertContent(`
|
|
28
28
|
`+o)):/^\d+\.$/.test(o.trim())&&(t.preventDefault(),this.insertContent(`
|
|
29
29
|
`+(parseInt(o,0)+1)+". ")))},listerenDelete(){setTimeout(()=>{const{editorViewInst:t}=this;t.isClean()||t.getValue().split(`
|
|
30
|
-
`).pop()===""&&(this.lastInsert="")},20)},mousescrollSide(t){this.scrollSide=t},getScrollData(){const t=this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller"),o=t.scrollHeight,l=t.scrollTop,r=this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview");return{markdownRef:t,markdownScrollHeight:o,markdownScrollTop:l,previewRef:r,contentHeight:r.offsetHeight,previewScrollHeight:r.scrollHeight,previewScrollTop:r.scrollTop||0}},markdownScroll(){if(this.actionScrollSync&&this.scrollSide==="left"){const{markdownRef:t,markdownScrollHeight:o,markdownScrollTop:l,previewRef:r,contentHeight:n,previewScrollHeight:i,previewScrollTop:c}=this.getScrollData();r.scrollTop=parseInt(l/(o-n)*(i-n),0)}},previewScroll(){if(this.actionScrollSync&&this.scrollSide==="right"){const{markdownRef:t,markdownScrollHeight:o,markdownScrollTop:l,previewRef:r,contentHeight:n,previewScrollHeight:i,previewScrollTop:c}=this.getScrollData(),s=parseInt(c/(i-n)*(o-n),0);t.scrollTop=s}}}},fu={key:0,class:"cv-editor-markdown-toolbar","data-title":"头部工具栏"},Cu={class:"cv-editor-toolbars"},vu={key:1,name:"插入图片"},ku={key:2,name:"本地图片"},yu={class:"icon-svg"},bu={key:4,name:"上传图片"},Vu={key:5,name:"上传文件"},wu={name:"导入文件",class:"import-file"},xu={name:"保存到本地"},Bu={key:6,name:"代码块"},Nu={key:7,class:"shift-theme",name:"主题"},Su=["onClick"],Eu={key:8,class:"shift-theme",name:"背景颜色"},Du=["onClick"],Tu={key:9,class:"shift-theme",name:"phrases"},Iu=["onClick"],Lu=["name"],Fu=["name"],_u=["name"],$u=["name"],zu={key:15,name:"全屏编辑"},Pu={key:16,name:"分屏显示"},ju={key:17,name:"预览"},Ou={key:18,class:"segmentation"},Mu={class:"icon-svg"},Au={key:22,class:"segmentation"},Ru={key:23,name:"目录"},Hu={key:24,class:"segmentation"},Uu=["name"],Wu={class:"cv-editor-toolbars"},qu={key:0,name:"撤销"},Gu={key:2,name:"粗体"},Ku={key:3,name:"斜体"},Qu={key:4,name:"删除线"},Zu={key:5,name:"下划线"},Yu={key:6,name:"标题1"},Ju={key:7,name:"标题2"},Xu={key:8,name:"标题3"},eh={key:9,name:"标题4"},th={key:10,name:"标题5"},oh={key:11,name:"标题6"},lh={key:12,name:"分割线"},ah={key:13,name:"引用"},nh={key:14,name:"无序列表"},ih={key:15,name:"有序列表"},rh={key:16,name:"未完成列表"},ch={key:17,name:"已完成列表"},sh={key:18,name:"链接"},dh={key:19,name:"表格"},Qt=C(gu,[["render",function(t,o,l,r,n,i){const c=e.resolveComponent("SvgImgMap"),s=e.resolveComponent("SvgUploadFile"),m=e.resolveComponent("SvgCopy"),d=e.resolveComponent("SvgToc"),p=e.resolveComponent("CodemirrorEditor"),f=e.resolveComponent("cv-markdown-show"),g=e.resolveComponent("el-input"),h=e.resolveComponent("el-button"),v=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",{ref:i.editorWrapRefID,class:e.normalizeClass(["cv-editor-markdown-wrap",l.bordered?"border":""]),style:e.normalizeStyle({width:i.widthTotalPx,height:i.heightTotalPx})},[t.actionPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fu,[e.createElementVNode("ul",Cu,[t.$slots.title?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("li",null,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),o[65]||(o[65]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1))],64)):e.createCommentVNode("",!0),t.toolConfig.image?(e.openBlock(),e.createElementBlock("li",vu,[e.createElementVNode("span",{onClick:o[0]||(o[0]=(...u)=>t.actionInsImage&&t.actionInsImage(...u)),class:"iconfont icon-img"})])):e.createCommentVNode("",!0),t.toolConfig.uploadImage?(e.openBlock(),e.createElementBlock("li",ku,[e.createElementVNode("span",{onClick:o[1]||(o[1]=(...u)=>t.actionChooseImage&&t.actionChooseImage(...u)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_image?(e.openBlock(),e.createElementBlock("li",{key:3,name:"图片空间",onClick:o[2]||(o[2]=u=>t.actionCustom("image-browse"))},[e.createElementVNode("span",yu,[e.createVNode(c)])])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadImage?(e.openBlock(),e.createElementBlock("li",bu,[e.createElementVNode("span",{onClick:o[3]||(o[3]=u=>t.actionCustom("image-upload")),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadFile?(e.openBlock(),e.createElementBlock("li",Vu,[e.createElementVNode("span",{onClick:o[4]||(o[4]=u=>t.actionCustom("file-upload")),class:"icon-svg"},[e.createVNode(s)])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("li",wu,[e.createElementVNode("span",{class:"iconfont icon-daoru",onClick:o[5]||(o[5]=(...u)=>t.actionImportFile&&t.actionImportFile(...u))}),e.createElementVNode("input",{type:"file",onChange:o[6]||(o[6]=u=>t.actionImportFile(u)),accept:"text/markdown"},null,32)],512),[[e.vShow,t.toolConfig.importmd]]),e.withDirectives(e.createElementVNode("li",xu,[e.createElementVNode("span",{class:"iconfont icon-download",onClick:o[7]||(o[7]=(...u)=>t.actionExportFile&&t.actionExportFile(...u))})],512),[[e.vShow,t.toolConfig.exportmd]]),o[72]||(o[72]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1)),t.toolConfig.code?(e.openBlock(),e.createElementBlock("li",Bu,[e.createElementVNode("span",{onClick:o[8]||(o[8]=(...u)=>t.insertCode&&t.insertCode(...u)),class:"iconfont icon-code"})])):e.createCommentVNode("",!0),t.toolConfig.theme?(e.openBlock(),e.createElementBlock("li",Nu,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[9]||(o[9]=u=>t.actionThemeDropdown=!t.actionThemeDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionThemeDropdown}),onMouseleave:o[10]||(o[10]=u=>t.actionThemeDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionTheme,u=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.actionThemesSet(u)},e.toDisplayString(u),9,Su))),256))],34)])):e.createCommentVNode("",!0),t.toolConfig.backgroundColor?(e.openBlock(),e.createElementBlock("li",Eu,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[11]||(o[11]=u=>t.actionBgColorDropdown=!t.actionBgColorDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionBgColorDropdown}),onMouseleave:o[12]||(o[12]=u=>t.actionBgColorDropdown=!1)},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["red","black","yellow","lawngreen","blue","white"],u=>e.createElementVNode("li",{onClick:y=>t.actionBgColorSet(u)},e.toDisplayString(u),9,Du)),64))],34)])):e.createCommentVNode("",!0),t.toolConfig.phrases?(e.openBlock(),e.createElementBlock("li",Tu,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[13]||(o[13]=u=>t.actionPhrasesDropdown=!t.actionPhrasesDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionPhrasesDropdown}),onMouseleave:o[14]||(o[14]=u=>t.actionPhrasesDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionPhrases,u=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.actionPhrasesSet(u)},e.toDisplayString(u),9,Iu))),256))],34)])):e.createCommentVNode("",!0),t.toolConfig.html_to_markdown?(e.openBlock(),e.createElementBlock("li",{key:10,name:"html转markdown",onClick:o[15]||(o[15]=u=>t.actionHtmlVisible(!0))},o[66]||(o[66]=[e.createElementVNode("span",{style:{width:"auto","font-size":"12px !important",padding:"0px 6px",margin:"0 10px",border:"1px #e2e2e2 solid"}}," HTML2MD ",-1)]))):e.createCommentVNode("",!0),t.toolConfig.disabled?(e.openBlock(),e.createElementBlock("li",{key:11,name:t.codemrrConfig.disabled?"toggle disabled:开":"toggle disabled:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[16]||(o[16]=u=>t.codemrrConfig.disabled=!t.codemrrConfig.disabled),class:"iconfont icon-on"},null,512),[[e.vShow,t.codemrrConfig.disabled]]),e.withDirectives(e.createElementVNode("span",{onClick:o[17]||(o[17]=u=>t.codemrrConfig.disabled=!t.codemrrConfig.disabled),class:"iconfont icon-off"},null,512),[[e.vShow,!t.codemrrConfig.disabled]])],8,Lu)):e.createCommentVNode("",!0),t.toolConfig.autofocus?(e.openBlock(),e.createElementBlock("li",{key:12,name:t.codemrrConfig.autofocus?"toggle autofocus:开":"toggle autofocus:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[18]||(o[18]=u=>t.codemrrConfig.autofocus=!t.codemrrConfig.autofocus),class:"iconfont icon-on"},null,512),[[e.vShow,t.codemrrConfig.autofocus]]),e.withDirectives(e.createElementVNode("span",{onClick:o[19]||(o[19]=u=>t.codemrrConfig.autofocus=!t.codemrrConfig.autofocus),class:"iconfont icon-off"},null,512),[[e.vShow,!t.codemrrConfig.autofocus]])],8,Fu)):e.createCommentVNode("",!0),t.toolConfig.indentWithTab?(e.openBlock(),e.createElementBlock("li",{key:13,name:t.codemrrConfig.indentWithTab?"toggle indentWithTab:开":"toggle indentWithTab:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[20]||(o[20]=u=>t.codemrrConfig.indentWithTab=!t.codemrrConfig.indentWithTab),class:"iconfont icon-on"},null,512),[[e.vShow,t.codemrrConfig.indentWithTab]]),e.withDirectives(e.createElementVNode("span",{onClick:o[21]||(o[21]=u=>t.codemrrConfig.indentWithTab=!t.codemrrConfig.indentWithTab),class:"iconfont icon-off"},null,512),[[e.vShow,!t.codemrrConfig.indentWithTab]])],8,_u)):e.createCommentVNode("",!0),o[73]||(o[73]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.scrollSync?(e.openBlock(),e.createElementBlock("li",{key:14,name:t.actionScrollSync?"同步滚动:开":"同步滚动:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[22]||(o[22]=u=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-on active"},null,512),[[e.vShow,t.actionScrollSync]]),e.withDirectives(e.createElementVNode("span",{onClick:o[23]||(o[23]=u=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-off"},null,512),[[e.vShow,!t.actionScrollSync]])],8,$u)):e.createCommentVNode("",!0),t.toolConfig.split&&t.actionSplit?(e.openBlock(),e.createElementBlock("li",zu,[e.createElementVNode("span",{onClick:o[24]||(o[24]=u=>t.actionSplit=!1),class:"iconfont icon-md"})])):e.createCommentVNode("",!0),t.toolConfig.split&&!t.actionSplit?(e.openBlock(),e.createElementBlock("li",Pu,[e.createElementVNode("span",{onClick:o[25]||(o[25]=u=>t.actionSplit=!0),class:"iconfont icon-group"})])):e.createCommentVNode("",!0),t.toolConfig.preview?(e.openBlock(),e.createElementBlock("li",ju,[e.createElementVNode("span",{onClick:o[26]||(o[26]=u=>t.actionPreview=!0),class:"iconfont icon-preview"})])):e.createCommentVNode("",!0),t.toolConfig.copy||t.toolConfig.clear||t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",Ou,o[67]||(o[67]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.copy?(e.openBlock(),e.createElementBlock("li",{key:19,name:"复制",onClick:o[27]||(o[27]=(...u)=>t.actionCopySet&&t.actionCopySet(...u))},[e.createElementVNode("span",Mu,[e.createVNode(m)])])):e.createCommentVNode("",!0),t.toolConfig.clear?(e.openBlock(),e.createElementBlock("li",{key:20,name:"清空",onClick:o[28]||(o[28]=u=>n.localVal="")},o[68]||(o[68]=[e.createElementVNode("span",{class:"iconfont icon-clear"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",{key:21,name:"保存",onClick:o[29]||(o[29]=(...u)=>t.actionSaveSet&&t.actionSaveSet(...u))},o[69]||(o[69]=[e.createElementVNode("span",{class:"iconfont icon-save"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.toc?(e.openBlock(),e.createElementBlock("li",Au,o[70]||(o[70]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.toc?(e.openBlock(),e.createElementBlock("li",Ru,[e.withDirectives(e.createElementVNode("span",{onClick:o[30]||(o[30]=u=>t.actionToc=!t.actionToc),class:"icon-svg active"},[e.createVNode(d)],512),[[e.vShow,t.actionToc]]),e.withDirectives(e.createElementVNode("span",{onClick:o[31]||(o[31]=u=>t.actionToc=!t.actionToc),class:"icon-svg"},[e.createVNode(d)],512),[[e.vShow,!t.actionToc]])])):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",Hu,o[71]||(o[71]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",{key:25,name:t.actionFullscreen?"退出全屏":"全屏"},[e.withDirectives(e.createElementVNode("span",{onClick:o[32]||(o[32]=u=>t.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[e.vShow,t.actionFullscreen]]),e.withDirectives(e.createElementVNode("span",{onClick:o[33]||(o[33]=u=>t.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[e.vShow,!t.actionFullscreen]])],8,Uu)):e.createCommentVNode("",!0)]),e.createElementVNode("ul",Wu,[t.toolConfig.undo?(e.openBlock(),e.createElementBlock("li",qu,[e.createElementVNode("span",{class:"iconfont icon-undo",onClick:o[34]||(o[34]=(...u)=>t.actionUndo&&t.actionUndo(...u))})])):e.createCommentVNode("",!0),t.toolConfig.redo?(e.openBlock(),e.createElementBlock("li",{key:1,name:"重做",onClick:o[35]||(o[35]=(...u)=>t.actionRedo&&t.actionRedo(...u))},o[74]||(o[74]=[e.createElementVNode("span",{class:"iconfont icon-redo"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.strong?(e.openBlock(),e.createElementBlock("li",Gu,[e.createElementVNode("span",{onClick:o[36]||(o[36]=(...u)=>t.actionInsStrong&&t.actionInsStrong(...u)),class:"iconfont icon-bold"})])):e.createCommentVNode("",!0),t.toolConfig.italic?(e.openBlock(),e.createElementBlock("li",Ku,[e.createElementVNode("span",{onClick:o[37]||(o[37]=(...u)=>t.actionInsItalic&&t.actionInsItalic(...u)),class:"iconfont icon-italic"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Qu,[e.createElementVNode("span",{onClick:o[38]||(o[38]=(...u)=>t.actionInsOverline&&t.actionInsOverline(...u)),class:"iconfont icon-overline"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Zu,[e.createElementVNode("span",{onClick:o[39]||(o[39]=(...u)=>t.actionInsUnderline&&t.actionInsUnderline(...u)),class:"iconfont icon-under-line"})])):e.createCommentVNode("",!0),t.toolConfig.h1?(e.openBlock(),e.createElementBlock("li",Yu,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[40]||(o[40]=u=>t.actionInsTitle(1))},"h1")])):e.createCommentVNode("",!0),t.toolConfig.h2?(e.openBlock(),e.createElementBlock("li",Ju,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[41]||(o[41]=u=>t.actionInsTitle(2))},"h2")])):e.createCommentVNode("",!0),t.toolConfig.h3?(e.openBlock(),e.createElementBlock("li",Xu,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[42]||(o[42]=u=>t.actionInsTitle(3))},"h3")])):e.createCommentVNode("",!0),t.toolConfig.h4?(e.openBlock(),e.createElementBlock("li",eh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[43]||(o[43]=u=>t.actionInsTitle(4))},"h4")])):e.createCommentVNode("",!0),t.toolConfig.h5?(e.openBlock(),e.createElementBlock("li",th,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[44]||(o[44]=u=>t.actionInsTitle(5))},"h5")])):e.createCommentVNode("",!0),t.toolConfig.h6?(e.openBlock(),e.createElementBlock("li",oh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[45]||(o[45]=u=>t.actionInsTitle(6))},"h6")])):e.createCommentVNode("",!0),t.toolConfig.hr?(e.openBlock(),e.createElementBlock("li",lh,[e.createElementVNode("span",{onClick:o[46]||(o[46]=(...u)=>t.actionInsLine&&t.actionInsLine(...u)),class:"iconfont icon-horizontal"})])):e.createCommentVNode("",!0),t.toolConfig.quote?(e.openBlock(),e.createElementBlock("li",ah,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[47]||(o[47]=(...u)=>t.actionInsQuote&&t.actionInsQuote(...u)),class:"iconfont icon-quote"})])):e.createCommentVNode("",!0),t.toolConfig.ul?(e.openBlock(),e.createElementBlock("li",nh,[e.createElementVNode("span",{onClick:o[48]||(o[48]=(...u)=>t.actionInsUl&&t.actionInsUl(...u)),class:"iconfont icon-ul"})])):e.createCommentVNode("",!0),t.toolConfig.ol?(e.openBlock(),e.createElementBlock("li",ih,[e.createElementVNode("span",{onClick:o[49]||(o[49]=(...u)=>t.actionInsOl&&t.actionInsOl(...u)),class:"iconfont icon-ol"})])):e.createCommentVNode("",!0),t.toolConfig.notChecked?(e.openBlock(),e.createElementBlock("li",rh,[e.createElementVNode("span",{onClick:o[50]||(o[50]=(...u)=>t.insertNotFinished&&t.insertNotFinished(...u)),class:"iconfont icon-checked-false"})])):e.createCommentVNode("",!0),t.toolConfig.checked?(e.openBlock(),e.createElementBlock("li",ch,[e.createElementVNode("span",{onClick:o[51]||(o[51]=(...u)=>t.insertFinished&&t.insertFinished(...u)),class:"iconfont icon-checked"})])):e.createCommentVNode("",!0),t.toolConfig.link?(e.openBlock(),e.createElementBlock("li",sh,[e.createElementVNode("span",{onClick:o[52]||(o[52]=(...u)=>t.actionInsLink&&t.actionInsLink(...u)),class:"iconfont icon-link"})])):e.createCommentVNode("",!0),t.toolConfig.table?(e.openBlock(),e.createElementBlock("li",dh,[e.createElementVNode("span",{onClick:o[53]||(o[53]=(...u)=>t.actionInsTable&&t.actionInsTable(...u)),class:"iconfont icon-table"})])):e.createCommentVNode("",!0)])])),e.createElementVNode("div",{title:"编辑器",class:"cv-editor-markdown-main",style:e.normalizeStyle({background:t.actionPreview?"#fff":""})},[e.withDirectives(e.createVNode(p,e.mergeProps(t.codemrrBind,{id:t.editorRefID,ref:t.editorRefID,style:{height:n.heightMainPx,backgroundColor:t.codemrrConfig.backgroundColor},extensions:t.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[54]||(o[54]=u=>n.localVal=u),onReady:i.initEditorReady,onChange:o[55]||(o[55]=u=>i.consoleLog("change",u)),onFocus:o[56]||(o[56]=u=>i.consoleLog("focus",u)),onBlur:o[57]||(o[57]=u=>i.consoleLog("blur",u)),onMouseenter:o[58]||(o[58]=u=>i.mousescrollSide("left"))}),null,16,["id","style","extensions","modelValue","onReady"]),[[e.vShow,!t.actionPreview]]),e.withDirectives(e.createVNode(f,{html:n.lastHtml,"onUpdate:html":o[59]||(o[59]=u=>n.lastHtml=u),ref:i.previewRefID,editorID:i.previewRefID,modelValue:n.localVal,theme:t.codemrrConfig.theme||l.theme,language:l.language,tocShow:t.actionToc,style:e.normalizeStyle([{flex:"1",height:"100%","border-left":"1px solid #dedede","overflow-y":"auto"},{height:t.actionPreview?"":n.heightMainPx}]),onMouseenter:o[60]||(o[60]=u=>i.mousescrollSide("right"))},null,8,["html","editorID","modelValue","theme","language","tocShow","style"]),[[e.vShow,t.actionPreview?t.actionPreview:t.actionSplit]])],4),e.withDirectives(e.createElementVNode("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[61]||(o[61]=u=>t.actionPreview=!1)},o[75]||(o[75]=[e.createElementVNode("span",{class:"iconfont icon-close"},null,-1)]),512),[[e.vShow,t.actionPreview]]),e.createVNode(v,{modelValue:t.actionHtmlDiaVisible,"onUpdate:modelValue":o[64]||(o[64]=u=>t.actionHtmlDiaVisible=u),title:"html转markdown",width:"680","show-close":!1,"append-to-body":""},{footer:e.withCtx(()=>[e.createVNode(h,{onClick:o[63]||(o[63]=u=>t.actionHtmlVisible(!1))},{default:e.withCtx(()=>o[76]||(o[76]=[e.createTextVNode("取消")])),_:1}),e.createVNode(h,{type:"primary",onClick:t.actionHtmlToMD},{default:e.withCtx(()=>o[77]||(o[77]=[e.createTextVNode("转换成markdown")])),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(g,{type:"textarea",modelValue:t.actionHtmlText,"onUpdate:modelValue":o[62]||(o[62]=u=>t.actionHtmlText=u),rows:14,placeholder:"请输入html代码..."},null,8,["modelValue"])]),_:1},8,["modelValue"])],6)}],["__scopeId","data-v-a76ecd6a"]]),ve={add(t,o){const l=`toc${o}${++this.index}`,r={anchor:l,level:o,text:t},n=this.tocItems;return r.level<=5&&n.push(r),l},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0};function ha(t){return o=>{typeof o=="string"&&o!==t.text&&(t.escaped=!0,t.text=o)}}const Ea=/[&<>"']/,mh=new RegExp(Ea.source,"g"),Da=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ph=new RegExp(Da.source,"g"),uh={"&":"&","<":"<",">":">",'"':""","'":"'"},ga=t=>uh[t];function fa(t,o){if(o){if(Ea.test(t))return t.replace(mh,ga)}else if(Da.test(t))return t.replace(ph,ga);return t}const hh={name:"cvMarkdownShow",mixins:[oe],emits:["update:html","on-copy"],props:{html:{type:[String]},modelValue:{type:[String],default:""},markedOptions:{type:Object,default:()=>({})},theme:{type:String,default:"light"},language:{type:String,default:""},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},tocShow:{type:[Boolean],default:!1}},watch:{modelValue(t){this.localVal=t||"",this.initNewCreate()},localHtml(t){this.$emit("update:html",t)}},data:()=>({localVal:"",localHtml:"",previewImgModal:!1,previewImgSrc:"",previewImgMode:"",timeoutId:null,imgs:[],tocTrigger:!1,tocAction:"",tocLists:[]}),created(){this.localVal=this.modelValue||""},async mounted(){ve.reset(),await function(t,o=!1){let l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("id",t),o?l.setAttribute("href",t+"?t="+new Date().getTime()):l.setAttribute("href",t),document.getElementById(t)||document.head.appendChild(l)}(this.CDN_URL_UI+"/highlight.js/@11.8.0/styles/default.min.css"),await J(this.CDN_URL_UI+"/highlight.js/@11.8.0/highlight.min.js").then(()=>{setTimeout(()=>{hljs.highlightAll(),this.initNewCreate()},30)})},methods:{async initNewCreate(){const{Marked:t,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");o.prototype.heading=function(n,i,c,s){let m=ve.add(n,i);return`<h${i} id="${c.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-")}" toc-id="${m}">${n}</h${i}>`};const l=new t(function(n){if(typeof n=="function"&&(n={highlight:n}),!n||typeof n.highlight!="function")throw new Error("Must provide highlight function");return typeof n.langPrefix!="string"&&(n.langPrefix="language-"),{async:!!n.async,walkTokens(i){if(i.type!=="code")return;const c=function(m){return(m.lang||"").match(/\S*/)[0]}(i);if(n.async)return Promise.resolve(n.highlight(i.text,c)).then(ha(i));const s=n.highlight(i.text,c);if(s instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");ha(i)(s)},renderer:{code(i,c,s){const m=(c||"").match(/\S*/)[0],d=m?` class="${n.langPrefix}${fa(m)}"`:"";return i=i.replace(/\n$/,""),`<pre><code${d}>${s?i:fa(i,!0)}
|
|
31
|
-
</code></pre>`}}}}({langPrefix:"hljs language-",highlight(n,i){const
|
|
30
|
+
`).pop()===""&&(this.lastInsert="")},20)},mousescrollSide(t){this.scrollSide=t},getScrollData(){const t=this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller"),o=t.scrollHeight,l=t.scrollTop,r=this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview");return{markdownRef:t,markdownScrollHeight:o,markdownScrollTop:l,previewRef:r,contentHeight:r.offsetHeight,previewScrollHeight:r.scrollHeight,previewScrollTop:r.scrollTop||0}},markdownScroll(){if(this.actionScrollSync&&this.scrollSide==="left"){const{markdownRef:t,markdownScrollHeight:o,markdownScrollTop:l,previewRef:r,contentHeight:n,previewScrollHeight:i,previewScrollTop:s}=this.getScrollData();r.scrollTop=parseInt(l/(o-n)*(i-n),0)}},previewScroll(){if(this.actionScrollSync&&this.scrollSide==="right"){const{markdownRef:t,markdownScrollHeight:o,markdownScrollTop:l,previewRef:r,contentHeight:n,previewScrollHeight:i,previewScrollTop:s}=this.getScrollData(),c=parseInt(s/(i-n)*(o-n),0);t.scrollTop=c}}}},Cu={key:0,class:"cv-editor-markdown-toolbar","data-title":"头部工具栏"},vu={class:"cv-editor-toolbars"},ku={key:1,name:"插入图片"},yu={key:2,name:"本地图片"},bu={class:"icon-svg"},Vu={key:4,name:"上传图片"},wu={key:5,name:"上传文件"},xu={name:"导入文件",class:"import-file"},Bu={name:"保存到本地"},Su={key:6,name:"代码块"},Nu={key:7,class:"shift-theme",name:"主题"},Eu=["onClick"],Du={key:8,class:"shift-theme",name:"背景颜色"},Tu=["onClick"],Iu={key:9,class:"shift-theme",name:"phrases"},Fu=["onClick"],Lu=["name"],_u=["name"],$u=["name"],zu=["name"],Pu={key:15,name:"全屏编辑"},Ou={key:16,name:"分屏显示"},ju={key:17,name:"预览"},Mu={key:18,class:"segmentation"},Au={class:"icon-svg"},Ru={key:22,class:"segmentation"},Hu={key:23,name:"目录"},Uu={key:24,class:"segmentation"},Wu=["name"],qu={class:"cv-editor-toolbars"},Gu={key:0,name:"撤销"},Ku={key:2,name:"粗体"},Qu={key:3,name:"斜体"},Yu={key:4,name:"删除线"},Zu={key:5,name:"下划线"},Ju={key:6,name:"标题1"},Xu={key:7,name:"标题2"},eh={key:8,name:"标题3"},th={key:9,name:"标题4"},oh={key:10,name:"标题5"},lh={key:11,name:"标题6"},ah={key:12,name:"分割线"},nh={key:13,name:"引用"},ih={key:14,name:"无序列表"},rh={key:15,name:"有序列表"},sh={key:16,name:"未完成列表"},ch={key:17,name:"已完成列表"},dh={key:18,name:"链接"},mh={key:19,name:"表格"},Yt=C(fu,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("SvgImgMap"),c=e.resolveComponent("SvgUploadFile"),m=e.resolveComponent("SvgCopy"),d=e.resolveComponent("SvgToc"),p=e.resolveComponent("CodemirrorEditor"),f=e.resolveComponent("cv-markdown-show"),g=e.resolveComponent("el-input"),h=e.resolveComponent("el-button"),v=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",{ref:i.editorWrapRefID,class:e.normalizeClass(["cv-editor-markdown-wrap",l.bordered?"border":""]),style:e.normalizeStyle({width:i.widthTotalPx,height:i.heightTotalPx})},[t.actionPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Cu,[e.createElementVNode("ul",vu,[t.$slots.title?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("li",null,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),o[65]||(o[65]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1))],64)):e.createCommentVNode("",!0),t.toolConfig.image?(e.openBlock(),e.createElementBlock("li",ku,[e.createElementVNode("span",{onClick:o[0]||(o[0]=(...u)=>t.actionInsImage&&t.actionInsImage(...u)),class:"iconfont icon-img"})])):e.createCommentVNode("",!0),t.toolConfig.uploadImage?(e.openBlock(),e.createElementBlock("li",yu,[e.createElementVNode("span",{onClick:o[1]||(o[1]=(...u)=>t.actionChooseImage&&t.actionChooseImage(...u)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_image?(e.openBlock(),e.createElementBlock("li",{key:3,name:"图片空间",onClick:o[2]||(o[2]=u=>t.actionCustom("image-browse"))},[e.createElementVNode("span",bu,[e.createVNode(s)])])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadImage?(e.openBlock(),e.createElementBlock("li",Vu,[e.createElementVNode("span",{onClick:o[3]||(o[3]=u=>t.actionCustom("image-upload")),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadFile?(e.openBlock(),e.createElementBlock("li",wu,[e.createElementVNode("span",{onClick:o[4]||(o[4]=u=>t.actionCustom("file-upload")),class:"icon-svg"},[e.createVNode(c)])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("li",xu,[e.createElementVNode("span",{class:"iconfont icon-daoru",onClick:o[5]||(o[5]=(...u)=>t.actionImportFile&&t.actionImportFile(...u))}),e.createElementVNode("input",{type:"file",onChange:o[6]||(o[6]=u=>t.actionImportFile(u)),accept:"text/markdown"},null,32)],512),[[e.vShow,t.toolConfig.importmd]]),e.withDirectives(e.createElementVNode("li",Bu,[e.createElementVNode("span",{class:"iconfont icon-download",onClick:o[7]||(o[7]=(...u)=>t.actionExportFile&&t.actionExportFile(...u))})],512),[[e.vShow,t.toolConfig.exportmd]]),o[72]||(o[72]=e.createElementVNode("li",{class:"segmentation"},[e.createElementVNode("div")],-1)),t.toolConfig.code?(e.openBlock(),e.createElementBlock("li",Su,[e.createElementVNode("span",{onClick:o[8]||(o[8]=(...u)=>t.insertCode&&t.insertCode(...u)),class:"iconfont icon-code"})])):e.createCommentVNode("",!0),t.toolConfig.theme?(e.openBlock(),e.createElementBlock("li",Nu,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[9]||(o[9]=u=>t.actionThemeDropdown=!t.actionThemeDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionThemeDropdown}),onMouseleave:o[10]||(o[10]=u=>t.actionThemeDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionTheme,u=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.actionThemesSet(u)},e.toDisplayString(u),9,Eu))),256))],34)])):e.createCommentVNode("",!0),t.toolConfig.backgroundColor?(e.openBlock(),e.createElementBlock("li",Du,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[11]||(o[11]=u=>t.actionBgColorDropdown=!t.actionBgColorDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionBgColorDropdown}),onMouseleave:o[12]||(o[12]=u=>t.actionBgColorDropdown=!1)},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["red","black","yellow","lawngreen","blue","white"],u=>e.createElementVNode("li",{onClick:y=>t.actionBgColorSet(u)},e.toDisplayString(u),9,Tu)),64))],34)])):e.createCommentVNode("",!0),t.toolConfig.phrases?(e.openBlock(),e.createElementBlock("li",Iu,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[13]||(o[13]=u=>t.actionPhrasesDropdown=!t.actionPhrasesDropdown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:t.actionPhrasesDropdown}),onMouseleave:o[14]||(o[14]=u=>t.actionPhrasesDropdown=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.optionPhrases,u=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.actionPhrasesSet(u)},e.toDisplayString(u),9,Fu))),256))],34)])):e.createCommentVNode("",!0),t.toolConfig.html_to_markdown?(e.openBlock(),e.createElementBlock("li",{key:10,name:"html转markdown",onClick:o[15]||(o[15]=u=>t.actionHtmlVisible(!0))},o[66]||(o[66]=[e.createElementVNode("span",{style:{width:"auto","font-size":"12px !important",padding:"0px 6px",margin:"0 10px",border:"1px #e2e2e2 solid"}}," HTML2MD ",-1)]))):e.createCommentVNode("",!0),t.toolConfig.disabled?(e.openBlock(),e.createElementBlock("li",{key:11,name:t.codemrrConfig.disabled?"toggle disabled:开":"toggle disabled:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[16]||(o[16]=u=>t.codemrrConfig.disabled=!t.codemrrConfig.disabled),class:"iconfont icon-on"},null,512),[[e.vShow,t.codemrrConfig.disabled]]),e.withDirectives(e.createElementVNode("span",{onClick:o[17]||(o[17]=u=>t.codemrrConfig.disabled=!t.codemrrConfig.disabled),class:"iconfont icon-off"},null,512),[[e.vShow,!t.codemrrConfig.disabled]])],8,Lu)):e.createCommentVNode("",!0),t.toolConfig.autofocus?(e.openBlock(),e.createElementBlock("li",{key:12,name:t.codemrrConfig.autofocus?"toggle autofocus:开":"toggle autofocus:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[18]||(o[18]=u=>t.codemrrConfig.autofocus=!t.codemrrConfig.autofocus),class:"iconfont icon-on"},null,512),[[e.vShow,t.codemrrConfig.autofocus]]),e.withDirectives(e.createElementVNode("span",{onClick:o[19]||(o[19]=u=>t.codemrrConfig.autofocus=!t.codemrrConfig.autofocus),class:"iconfont icon-off"},null,512),[[e.vShow,!t.codemrrConfig.autofocus]])],8,_u)):e.createCommentVNode("",!0),t.toolConfig.indentWithTab?(e.openBlock(),e.createElementBlock("li",{key:13,name:t.codemrrConfig.indentWithTab?"toggle indentWithTab:开":"toggle indentWithTab:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[20]||(o[20]=u=>t.codemrrConfig.indentWithTab=!t.codemrrConfig.indentWithTab),class:"iconfont icon-on"},null,512),[[e.vShow,t.codemrrConfig.indentWithTab]]),e.withDirectives(e.createElementVNode("span",{onClick:o[21]||(o[21]=u=>t.codemrrConfig.indentWithTab=!t.codemrrConfig.indentWithTab),class:"iconfont icon-off"},null,512),[[e.vShow,!t.codemrrConfig.indentWithTab]])],8,$u)):e.createCommentVNode("",!0),o[73]||(o[73]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.scrollSync?(e.openBlock(),e.createElementBlock("li",{key:14,name:t.actionScrollSync?"同步滚动:开":"同步滚动:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[22]||(o[22]=u=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-on active"},null,512),[[e.vShow,t.actionScrollSync]]),e.withDirectives(e.createElementVNode("span",{onClick:o[23]||(o[23]=u=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-off"},null,512),[[e.vShow,!t.actionScrollSync]])],8,zu)):e.createCommentVNode("",!0),t.toolConfig.split&&t.actionSplit?(e.openBlock(),e.createElementBlock("li",Pu,[e.createElementVNode("span",{onClick:o[24]||(o[24]=u=>t.actionSplit=!1),class:"iconfont icon-md"})])):e.createCommentVNode("",!0),t.toolConfig.split&&!t.actionSplit?(e.openBlock(),e.createElementBlock("li",Ou,[e.createElementVNode("span",{onClick:o[25]||(o[25]=u=>t.actionSplit=!0),class:"iconfont icon-group"})])):e.createCommentVNode("",!0),t.toolConfig.preview?(e.openBlock(),e.createElementBlock("li",ju,[e.createElementVNode("span",{onClick:o[26]||(o[26]=u=>t.actionPreview=!0),class:"iconfont icon-preview"})])):e.createCommentVNode("",!0),t.toolConfig.copy||t.toolConfig.clear||t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",Mu,o[67]||(o[67]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.copy?(e.openBlock(),e.createElementBlock("li",{key:19,name:"复制",onClick:o[27]||(o[27]=(...u)=>t.actionCopySet&&t.actionCopySet(...u))},[e.createElementVNode("span",Au,[e.createVNode(m)])])):e.createCommentVNode("",!0),t.toolConfig.clear?(e.openBlock(),e.createElementBlock("li",{key:20,name:"清空",onClick:o[28]||(o[28]=u=>n.localVal="")},o[68]||(o[68]=[e.createElementVNode("span",{class:"iconfont icon-clear"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",{key:21,name:"保存",onClick:o[29]||(o[29]=(...u)=>t.actionSaveSet&&t.actionSaveSet(...u))},o[69]||(o[69]=[e.createElementVNode("span",{class:"iconfont icon-save"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.toc?(e.openBlock(),e.createElementBlock("li",Ru,o[70]||(o[70]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.toc?(e.openBlock(),e.createElementBlock("li",Hu,[e.withDirectives(e.createElementVNode("span",{onClick:o[30]||(o[30]=u=>t.actionToc=!t.actionToc),class:"icon-svg active"},[e.createVNode(d)],512),[[e.vShow,t.actionToc]]),e.withDirectives(e.createElementVNode("span",{onClick:o[31]||(o[31]=u=>t.actionToc=!t.actionToc),class:"icon-svg"},[e.createVNode(d)],512),[[e.vShow,!t.actionToc]])])):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",Uu,o[71]||(o[71]=[e.createElementVNode("div",null,null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.fullscreen?(e.openBlock(),e.createElementBlock("li",{key:25,name:t.actionFullscreen?"退出全屏":"全屏"},[e.withDirectives(e.createElementVNode("span",{onClick:o[32]||(o[32]=u=>t.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[e.vShow,t.actionFullscreen]]),e.withDirectives(e.createElementVNode("span",{onClick:o[33]||(o[33]=u=>t.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[e.vShow,!t.actionFullscreen]])],8,Wu)):e.createCommentVNode("",!0)]),e.createElementVNode("ul",qu,[t.toolConfig.undo?(e.openBlock(),e.createElementBlock("li",Gu,[e.createElementVNode("span",{class:"iconfont icon-undo",onClick:o[34]||(o[34]=(...u)=>t.actionUndo&&t.actionUndo(...u))})])):e.createCommentVNode("",!0),t.toolConfig.redo?(e.openBlock(),e.createElementBlock("li",{key:1,name:"重做",onClick:o[35]||(o[35]=(...u)=>t.actionRedo&&t.actionRedo(...u))},o[74]||(o[74]=[e.createElementVNode("span",{class:"iconfont icon-redo"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.strong?(e.openBlock(),e.createElementBlock("li",Ku,[e.createElementVNode("span",{onClick:o[36]||(o[36]=(...u)=>t.actionInsStrong&&t.actionInsStrong(...u)),class:"iconfont icon-bold"})])):e.createCommentVNode("",!0),t.toolConfig.italic?(e.openBlock(),e.createElementBlock("li",Qu,[e.createElementVNode("span",{onClick:o[37]||(o[37]=(...u)=>t.actionInsItalic&&t.actionInsItalic(...u)),class:"iconfont icon-italic"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Yu,[e.createElementVNode("span",{onClick:o[38]||(o[38]=(...u)=>t.actionInsOverline&&t.actionInsOverline(...u)),class:"iconfont icon-overline"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Zu,[e.createElementVNode("span",{onClick:o[39]||(o[39]=(...u)=>t.actionInsUnderline&&t.actionInsUnderline(...u)),class:"iconfont icon-under-line"})])):e.createCommentVNode("",!0),t.toolConfig.h1?(e.openBlock(),e.createElementBlock("li",Ju,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[40]||(o[40]=u=>t.actionInsTitle(1))},"h1")])):e.createCommentVNode("",!0),t.toolConfig.h2?(e.openBlock(),e.createElementBlock("li",Xu,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[41]||(o[41]=u=>t.actionInsTitle(2))},"h2")])):e.createCommentVNode("",!0),t.toolConfig.h3?(e.openBlock(),e.createElementBlock("li",eh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[42]||(o[42]=u=>t.actionInsTitle(3))},"h3")])):e.createCommentVNode("",!0),t.toolConfig.h4?(e.openBlock(),e.createElementBlock("li",th,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[43]||(o[43]=u=>t.actionInsTitle(4))},"h4")])):e.createCommentVNode("",!0),t.toolConfig.h5?(e.openBlock(),e.createElementBlock("li",oh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[44]||(o[44]=u=>t.actionInsTitle(5))},"h5")])):e.createCommentVNode("",!0),t.toolConfig.h6?(e.openBlock(),e.createElementBlock("li",lh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[45]||(o[45]=u=>t.actionInsTitle(6))},"h6")])):e.createCommentVNode("",!0),t.toolConfig.hr?(e.openBlock(),e.createElementBlock("li",ah,[e.createElementVNode("span",{onClick:o[46]||(o[46]=(...u)=>t.actionInsLine&&t.actionInsLine(...u)),class:"iconfont icon-horizontal"})])):e.createCommentVNode("",!0),t.toolConfig.quote?(e.openBlock(),e.createElementBlock("li",nh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[47]||(o[47]=(...u)=>t.actionInsQuote&&t.actionInsQuote(...u)),class:"iconfont icon-quote"})])):e.createCommentVNode("",!0),t.toolConfig.ul?(e.openBlock(),e.createElementBlock("li",ih,[e.createElementVNode("span",{onClick:o[48]||(o[48]=(...u)=>t.actionInsUl&&t.actionInsUl(...u)),class:"iconfont icon-ul"})])):e.createCommentVNode("",!0),t.toolConfig.ol?(e.openBlock(),e.createElementBlock("li",rh,[e.createElementVNode("span",{onClick:o[49]||(o[49]=(...u)=>t.actionInsOl&&t.actionInsOl(...u)),class:"iconfont icon-ol"})])):e.createCommentVNode("",!0),t.toolConfig.notChecked?(e.openBlock(),e.createElementBlock("li",sh,[e.createElementVNode("span",{onClick:o[50]||(o[50]=(...u)=>t.insertNotFinished&&t.insertNotFinished(...u)),class:"iconfont icon-checked-false"})])):e.createCommentVNode("",!0),t.toolConfig.checked?(e.openBlock(),e.createElementBlock("li",ch,[e.createElementVNode("span",{onClick:o[51]||(o[51]=(...u)=>t.insertFinished&&t.insertFinished(...u)),class:"iconfont icon-checked"})])):e.createCommentVNode("",!0),t.toolConfig.link?(e.openBlock(),e.createElementBlock("li",dh,[e.createElementVNode("span",{onClick:o[52]||(o[52]=(...u)=>t.actionInsLink&&t.actionInsLink(...u)),class:"iconfont icon-link"})])):e.createCommentVNode("",!0),t.toolConfig.table?(e.openBlock(),e.createElementBlock("li",mh,[e.createElementVNode("span",{onClick:o[53]||(o[53]=(...u)=>t.actionInsTable&&t.actionInsTable(...u)),class:"iconfont icon-table"})])):e.createCommentVNode("",!0)])])),e.createElementVNode("div",{title:"编辑器",class:"cv-editor-markdown-main",style:e.normalizeStyle({background:t.actionPreview?"#fff":""})},[e.withDirectives(e.createVNode(p,e.mergeProps(t.codemrrBind,{id:t.editorRefID,ref:t.editorRefID,style:{height:n.heightMainPx,backgroundColor:t.codemrrConfig.backgroundColor},extensions:t.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[54]||(o[54]=u=>n.localVal=u),onReady:i.initEditorReady,onChange:o[55]||(o[55]=u=>i.consoleLog("change",u)),onFocus:o[56]||(o[56]=u=>i.consoleLog("focus",u)),onBlur:o[57]||(o[57]=u=>i.consoleLog("blur",u)),onMouseenter:o[58]||(o[58]=u=>i.mousescrollSide("left"))}),null,16,["id","style","extensions","modelValue","onReady"]),[[e.vShow,!t.actionPreview]]),e.withDirectives(e.createVNode(f,{html:n.lastHtml,"onUpdate:html":o[59]||(o[59]=u=>n.lastHtml=u),ref:i.previewRefID,editorID:i.previewRefID,modelValue:n.localVal,theme:t.codemrrConfig.theme||l.theme,language:l.language,tocShow:t.actionToc,style:e.normalizeStyle([{flex:"1",height:"100%","border-left":"1px solid #dedede","overflow-y":"auto"},{height:t.actionPreview?"":n.heightMainPx}]),onMouseenter:o[60]||(o[60]=u=>i.mousescrollSide("right"))},null,8,["html","editorID","modelValue","theme","language","tocShow","style"]),[[e.vShow,t.actionPreview?t.actionPreview:t.actionSplit]])],4),e.withDirectives(e.createElementVNode("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[61]||(o[61]=u=>t.actionPreview=!1)},o[75]||(o[75]=[e.createElementVNode("span",{class:"iconfont icon-close"},null,-1)]),512),[[e.vShow,t.actionPreview]]),e.createVNode(v,{modelValue:t.actionHtmlDiaVisible,"onUpdate:modelValue":o[64]||(o[64]=u=>t.actionHtmlDiaVisible=u),title:"html转markdown",width:"680","show-close":!1,"append-to-body":""},{footer:e.withCtx(()=>[e.createVNode(h,{onClick:o[63]||(o[63]=u=>t.actionHtmlVisible(!1))},{default:e.withCtx(()=>o[76]||(o[76]=[e.createTextVNode("取消")])),_:1}),e.createVNode(h,{type:"primary",onClick:t.actionHtmlToMD},{default:e.withCtx(()=>o[77]||(o[77]=[e.createTextVNode("转换成markdown")])),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(g,{type:"textarea",modelValue:t.actionHtmlText,"onUpdate:modelValue":o[62]||(o[62]=u=>t.actionHtmlText=u),rows:14,placeholder:"请输入html代码..."},null,8,["modelValue"])]),_:1},8,["modelValue"])],6)}],["__scopeId","data-v-a76ecd6a"]]),ve={add(t,o){const l=`toc${o}${++this.index}`,r={anchor:l,level:o,text:t},n=this.tocItems;return r.level<=5&&n.push(r),l},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0};function ga(t){return o=>{typeof o=="string"&&o!==t.text&&(t.escaped=!0,t.text=o)}}const Da=/[&<>"']/,ph=new RegExp(Da.source,"g"),Ta=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uh=new RegExp(Ta.source,"g"),hh={"&":"&","<":"<",">":">",'"':""","'":"'"},fa=t=>hh[t];function Ca(t,o){if(o){if(Da.test(t))return t.replace(ph,fa)}else if(Ta.test(t))return t.replace(uh,fa);return t}const gh={name:"cvMarkdownShow",mixins:[oe],emits:["update:html","on-copy"],props:{html:{type:[String]},modelValue:{type:[String],default:""},markedOptions:{type:Object,default:()=>({})},theme:{type:String,default:"light"},language:{type:String,default:""},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},tocShow:{type:[Boolean],default:!1}},watch:{modelValue(t){this.localVal=t||"",this.initNewCreate()},localHtml(t){this.$emit("update:html",t)}},data:()=>({localVal:"",localHtml:"",previewImgModal:!1,previewImgSrc:"",previewImgMode:"",timeoutId:null,imgs:[],tocTrigger:!1,tocAction:"",tocLists:[]}),created(){this.localVal=this.modelValue||""},async mounted(){ve.reset(),await function(t,o=!1){let l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("id",t),o?l.setAttribute("href",t+"?t="+new Date().getTime()):l.setAttribute("href",t),document.getElementById(t)||document.head.appendChild(l)}(this.CDN_URL_UI+"/highlight.js/@11.8.0/styles/default.min.css"),await J(this.CDN_URL_UI+"/highlight.js/@11.8.0/highlight.min.js").then(()=>{setTimeout(()=>{hljs.highlightAll(),this.initNewCreate()},30)})},methods:{async initNewCreate(){const{Marked:t,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");o.prototype.heading=function(n,i,s,c){let m=ve.add(n,i);return`<h${i} id="${s.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-")}" toc-id="${m}">${n}</h${i}>`};const l=new t(function(n){if(typeof n=="function"&&(n={highlight:n}),!n||typeof n.highlight!="function")throw new Error("Must provide highlight function");return typeof n.langPrefix!="string"&&(n.langPrefix="language-"),{async:!!n.async,walkTokens(i){if(i.type!=="code")return;const s=function(m){return(m.lang||"").match(/\S*/)[0]}(i);if(n.async)return Promise.resolve(n.highlight(i.text,s)).then(ga(i));const c=n.highlight(i.text,s);if(c instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");ga(i)(c)},renderer:{code(i,s,c){const m=(s||"").match(/\S*/)[0],d=m?` class="${n.langPrefix}${Ca(m)}"`:"";return i=i.replace(/\n$/,""),`<pre><code${d}>${c?i:Ca(i,!0)}
|
|
31
|
+
</code></pre>`}}}}({langPrefix:"hljs language-",highlight(n,i){const s=hljs.getLanguage(i)?i:"plaintext";return hljs.highlight(n,{language:s}).value}}));l.use({gfm:!0,tables:!0,breaks:!1,pedantic:!1,smartLists:!0});let r=l.parse(this.localVal,{sanitize:!1,...this.markedOptions});r=r.replace(/href="/gi,'target="_blank" href="'),this.copyCode&&(r=r.replace(/<pre>/g,'<div class="code-block"><span class="copy-code">'+this.copyBtnText+"</span><pre>").replace(/<\/pre>/g,"</pre></div>")),/\[\[TOC\]\]/.test(r)&&(r=r.replace(/\[\[TOC\]\]/g,'<ul class="toc-anchor"></ul>')),this.localHtml=r,this.tocLists=ve.tocItems,this.tocTrigger,ve.reset(),this.addCopyListener(),this.addImageClickListener()},addCopyListener(){setTimeout(()=>{const t=document.querySelectorAll(".code-block .copy-code");this.btns=t;for(let o=0,l=t.length;o<l;o++)t[o].onclick=()=>{const r=t[o].parentNode.querySelectorAll("pre")[0].innerText;this.$cvCopy(r),this.$emit("on-copy",r)}},30)},addImageClickListener(){if(this.imgs.length>0)for(let t=0,o=this.imgs.length;t<o;t++)this.imgs[t].onclick=null;setTimeout(()=>{if(this.$refs[this.editorRefID]){this.imgs=this.$refs[this.editorRefID].querySelectorAll("img");for(let t=0,o=this.imgs.length;t<o;t++)this.imgs[t].onclick=()=>{const l=this.imgs[t].getAttribute("src");this.previewImage(l)}}},600)},previewImage(t){const o=new Image;o.src=t,o.onload=()=>{const l=o.naturalWidth,r=o.naturalHeight;this.previewImgMode=r/l>1.4?"horizontal":"vertical",this.previewImgSrc=t,this.previewImgModal=!0}},handleScroll(){const t=this.$refs[this.editorRefID],o=t.querySelector(".markdown-preview"),l=o.querySelectorAll("h1,h2,h3,h4,h5");let r=null;if([...l].forEach(n=>{n.offsetTop-o.offsetTop<=o.scrollTop&&(r=n)}),r){this.tocAction=r.getAttribute("toc-id");const n=t.querySelector("ul.toc-anchor");if(n){const i=n.querySelector(`li[anchor="${this.tocAction}"]`);i&&(n.scrollTop=i.offsetTop-n.offsetTop-20)}}},tocClick(t){this.tocAction=t.anchor;const o=this.$refs[this.editorRefID].querySelector(".markdown-preview"),l=o.querySelector("h"+t.level+'[toc-id="'+this.tocAction+'"]');l&&o.scrollTo({top:l.offsetTop-o.offsetTop,behavior:"smooth"})},tocLevel(t,o){let l=9999;return o===void 0&&(o=this.tocLists),o.forEach(({level:r})=>{l=Math.min(l,r)}),l===9999?t:t-(l-1)}}},fh=["id"],Ch=["innerHTML"],vh={class:"toc-anchor"},kh=["anchor","onClick"],yh=["anchor","title"],bh=["src"],Zt=C(gh,[["render",function(t,o,l,r,n,i){const s=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",{class:"cv-markdown-preview",id:t.editorRefID,ref:t.editorRefID,style:e.normalizeStyle([l.tocShow?"display:flex;":""])},[t.$slots.default?e.renderSlot(t.$slots,"default",{key:0},()=>[e.createTextVNode(e.toDisplayString(n.localHtml),1)]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass("markdown-preview markdown-theme-base "+("markdown-theme-"+l.theme)),onScroll:o[0]||(o[0]=(...c)=>i.handleScroll&&i.handleScroll(...c)),innerHTML:n.localHtml},null,42,Ch),e.withDirectives(e.createElementVNode("ul",vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tocLists,c=>(e.openBlock(),e.createElementBlock("li",{class:"toc-anchor-item",anchor:c.anchor,key:c.anchor,onClick:m=>i.tocClick(c)},[e.createElementVNode("span",{class:e.normalizeClass(`toc-link-${i.tocLevel(c.level)}${n.tocAction==c.anchor?" toc-link-action":""}`),anchor:c.anchor,title:c.text},e.toDisplayString(c.text),11,yh)],8,kh))),128))],512),[[e.vShow,l.tocShow]]),e.createElementVNode("div",{class:e.normalizeClass(["preview-img",n.previewImgModal?"active":""])},[e.createVNode(s,{type:"ElIconClose",onClick:o[1]||(o[1]=c=>n.previewImgModal=!1)}),e.createElementVNode("img",{src:n.previewImgSrc,class:e.normalizeClass([n.previewImgMode]),alt:""},null,10,bh)],2)],12,fh)}]]),Vh={name:"cvMarkdownSimple",mixins:[oe,Go,{methods:{toggleSlideDown(){this.slideDown=!this.slideDown},actionThemesSet(t){this.codemrrConfig.theme=t,this.actionThemeDropdown=!1,this.$emit("on-act-theme",t)},actionChooseImage(){const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const o=t.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),t.value="")},t.click()},actionUndo(){},actionRedo(){},actionInsBg(){const t=this.getCursortPosition(),o=this.localVal.substring(t-1,t);this.insertContent("===="),o!==`
|
|
32
32
|
`&&this.localVal,this.setCaretPosition(t+5)},actionInsStrong(){const t=this.getCursortPosition(),o=this.localVal.substring(t-1,t);this.insertContent("****"),o!==`
|
|
33
33
|
`&&this.localVal,this.setCaretPosition(t+2)},actionInsItalic(){const t=this.getCursortPosition(),o=this.localVal.substring(t-1,t);this.insertContent("**"),o!==`
|
|
34
34
|
`&&this.localVal,this.setCaretPosition(t+1)},actionInsOverline(){const t=this.getCursortPosition(),o=this.localVal.substring(t-1,t);this.insertContent("~~~~"),o!==`
|
|
@@ -44,9 +44,9 @@ row 1 col 1 | row 1 col 2
|
|
|
44
44
|
row 2 col 1 | row 2 col 2
|
|
45
45
|
|
|
46
46
|
`)},actionInsImage(){this.insertContent(`
|
|
47
|
-
`)},actionImportFile(t){const o=t.target.files[0];if(!o)return;const{type:l}=o;if(!["text/markdown","text/src"].includes(l))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result,t.target.value=""},r.onerror=n=>{}},actionExportFile(){
|
|
47
|
+
`)},actionImportFile(t){const o=t.target.files[0];if(!o)return;const{type:l}=o;if(!["text/markdown","text/src"].includes(l))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result,t.target.value=""},r.onerror=n=>{}},actionExportFile(){Ea(this.localVal,this.lastExpFileName+".md")},insertCode(){const t=this.getCursortPosition(),o=this.localVal.substring(t-1,t);this.insertContent("\n```\n\n```"),o!==`
|
|
48
48
|
`&&this.localVal,this.setCaretPosition(t+5)},actionSaveSet(){const{localVal:t,codemrrConfig:o,lastHtml:l}=this;this.$emit("on-act-save",{theme:o.theme||"",value:t||"",html:l||""})},actionCustom(t){this.$emit("on-act-custom",t)}}}],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},theme:{type:String,default:"light"},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},toolbars:{type:Object,default:()=>({})},bordered:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},interval:{type:Number,default:1e4},markedOptions:{type:Object,default:()=>({})},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},isCustomFullscreen:{type:Boolean,default:!1}},data(){return{localVal:"",timeoutId:null,indexLenth:1,html:"",fullscreen:!1,scrollSide:"",lastInsert:"",timerId:null,themeSlideDown:!1,scrolling:!0,textareaHeight:this.height}},destroyed(){clearInterval(this.timerId)},watch:{localVal(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{const{localVal:t}=this;let o=marked(t,{sanitize:!1,...this.markedOptions}).replace(/href="/gi,'target="_blank" href="');this.copyCode&&o!==""&&(o=o.replace(/<pre>/g,'<div class="code-block"><span class="copy-code">'+this.copyBtnText+"</span><pre>").replace(/<\/pre>/g,"</pre></div>")),this.html=o,this.indexLenth=this.localVal.split(`
|
|
49
49
|
`).length,this.textareaHeight=22*this.indexLenth,this.addImageClickListener(),this.addCopyListener(),this.$emit("update:modelValue",t)},30)},modelValue(){this.localVal!==this.modelValue&&(this.localVal=this.modelValue)}},mounted(){this.init()},methods:{init(){this.localVal=this.modelValue,this.codemrrConfig.theme=this.theme,setTimeout(()=>{const t=this.$refs.textarea;t.focus(),t.addEventListener("keydown",o=>{o.keyCode===83&&(o.metaKey||o.ctrlKey)&&(o.preventDefault(),this.actionSaveSet())}),t.addEventListener("paste",this.handlePaste),this.autoSave&&(this.timerId=setInterval(()=>{this.actionSaveSet()},this.interval)),this.$emit("on-ready",{vm:this,insertContent:this.insertContent})},20)},insertContent(t){this.lastInsert=t;const o=this.getCursortPosition(),l=this.localVal.substring(o-1,o),r=this.localVal.substring(o-4,o);if(l!==`
|
|
50
50
|
`&&this.localVal!==""&&r!==" "){const n=`
|
|
51
51
|
`+t;this.insertAfterText(n)}else this.insertAfterText(t)},getCursortPosition(){const t=this.$refs.textarea;let o=0;if(document.selection){t.focus();let l=document.selection.createRange();l.moveStart("character",-this.localVal.length),o=l.text.length}else(t.selectionStart||parseInt(t.selectionStart,0)===0)&&(o=t.selectionStart);return o},insertAfterText(t){const o=this.$refs.textarea;let l;if(document.selection)o.focus(),l=document.selection.createRange(),l.text=t,o.focus();else if(o.selectionStart||parseInt(o.selectionStart,0)===0){const r=o.selectionStart,n=o.selectionEnd,i=o.scrollTop;o.value=o.value.substring(0,r)+t+o.value.substring(n,o.value.length),o.focus(),o.selectionStart=r+t.length,o.selectionEnd=r+t.length,o.scrollTop=i}else o.value+=t,o.focus();this.localVal=o.value},setCaretPosition(t){const o=this.$refs.textarea;if(o.setSelectionRange)o.focus(),o.setSelectionRange(t,t);else if(o.createTextRange){let l=o.createTextRange();l.collapse(!0),l.moveEnd("character",t),l.moveStart("character",t),l.select()}},tab(t){this.insertContent(" ",this),t.preventDefault?t.preventDefault():t.returnValue=!1},enter(){const{lastInsert:t}=this;["- ","1. ","- [ ] ","- [x] "].includes(t)&&this.insertContent(t)},onDelete(){const t=this.localVal.split(`
|
|
52
|
-
`);t[t.length-1]===""&&(this.lastInsert="")},mousescrollSide(t){this.scrollSide=t},handlePaste(t){const{clipboardData:o={}}=t,{types:l=[],items:r}=o;let n=null;for(let i=0;i<l.length;i++)if(l[i]==="Files"){n=r[i];break}if(n){const i=n.getAsFile();/image/gi.test(i.type)&&(this.$emit("on-upload-image",i),this.$emit("on-paste-image",i),t.preventDefault())}},markdownScroll(){const{scrolling:t}=this;if(t&&this.scroll==="left"){const o=this.$refs.markdownEditor,l=this.$refs.preview,r=l.offsetHeight,n=o.scrollHeight,i=o.scrollTop,c=l.scrollHeight;l.scrollTop=parseInt(i/(n-r)*(c-r),0)}},previewScroll(){const{scrolling:t}=this;if(t&&this.scroll==="right"){const o=this.$refs.markdownEditor,l=this.$refs.preview,r=l.offsetHeight,n=o.scrollHeight,i=l.scrollHeight,c=l.scrollTop;o.scrollTop=parseInt(c/(i-r)*(n-r),0)}},mousescrollSide(t){this.scroll=t}}},Vh={key:0,title:"头部工具栏"},wh={class:"cv-editor-toolbars"},xh={key:0,name:"粗体"},Bh={key:1,name:"斜体"},Nh={key:2,name:"删除线"},Sh={key:3,name:"下划线"},Eh={key:4,name:"标题1"},Dh={key:5,name:"标题2"},Th={key:6,name:"标题3"},Ih={key:7,name:"标题4"},Lh={key:8,name:"标题5"},Fh={key:9,name:"标题6"},_h={key:10,name:"分割线"},$h={key:11,name:"引用"},zh={key:12,name:"无序列表"},Ph={key:13,name:"有序列表"},jh={key:14,name:"未完成列表"},Oh={key:15,name:"已完成列表"},Mh={key:16,name:"链接"},Ah={key:17,name:"表格"},Rh=["name"],Hh={key:19,name:"全屏编辑"},Uh={key:20,name:"分屏显示"},Wh={key:21,name:"预览"},qh={class:"cv-editor-toolbars"},Gh={key:0,name:"图片"},Kh={key:1,name:"本地图片"},Qh={key:2,name:"图片空间"},Zh={key:3,name:"上传图片"},Yh={key:4,name:"上传文件"},Jh={key:5,class:"shift-theme",name:"代码块主题"},Xh={name:"导入文件",class:"import-file"},e1={name:"保存到本地"},t1={key:6,name:"全屏"},o1={key:7,name:"退出全屏"},l1=["innerHTML"],Yt=C(bh,[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`markdown ${n.fullscreen?"fullscreen":""} ${l.bordered?"border":""}`),ref:"markdown",style:e.normalizeStyle({width:l.width+(typeof l.width=="string"?"":"px"),height:l.height+(typeof l.height=="string"?"":"px")})},[t.actionPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Vh,[e.createElementVNode("ul",wh,[e.createElementVNode("li",null,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),t.toolConfig.strong?(e.openBlock(),e.createElementBlock("li",xh,[e.createElementVNode("span",{onClick:o[0]||(o[0]=(...c)=>t.actionInsStrong&&t.actionInsStrong(...c)),class:"iconfont icon-bold"})])):e.createCommentVNode("",!0),t.toolConfig.italic?(e.openBlock(),e.createElementBlock("li",Bh,[e.createElementVNode("span",{onClick:o[1]||(o[1]=(...c)=>t.actionInsItalic&&t.actionInsItalic(...c)),class:"iconfont icon-italic"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Nh,[e.createElementVNode("span",{onClick:o[2]||(o[2]=(...c)=>t.actionInsOverline&&t.actionInsOverline(...c)),class:"iconfont icon-overline"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Sh,[e.createElementVNode("span",{onClick:o[3]||(o[3]=(...c)=>t.actionInsUnderline&&t.actionInsUnderline(...c)),class:"iconfont icon-under-line"})])):e.createCommentVNode("",!0),t.toolConfig.h1?(e.openBlock(),e.createElementBlock("li",Eh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[4]||(o[4]=c=>t.actionInsTitle(1))},"h1")])):e.createCommentVNode("",!0),t.toolConfig.h2?(e.openBlock(),e.createElementBlock("li",Dh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[5]||(o[5]=c=>t.actionInsTitle(2))},"h2")])):e.createCommentVNode("",!0),t.toolConfig.h3?(e.openBlock(),e.createElementBlock("li",Th,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[6]||(o[6]=c=>t.actionInsTitle(3))},"h3")])):e.createCommentVNode("",!0),t.toolConfig.h4?(e.openBlock(),e.createElementBlock("li",Ih,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[7]||(o[7]=c=>t.actionInsTitle(4))},"h4")])):e.createCommentVNode("",!0),t.toolConfig.h5?(e.openBlock(),e.createElementBlock("li",Lh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[8]||(o[8]=c=>t.actionInsTitle(5))},"h5")])):e.createCommentVNode("",!0),t.toolConfig.h6?(e.openBlock(),e.createElementBlock("li",Fh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[9]||(o[9]=c=>t.actionInsTitle(6))},"h6")])):e.createCommentVNode("",!0),t.toolConfig.hr?(e.openBlock(),e.createElementBlock("li",_h,[e.createElementVNode("span",{onClick:o[10]||(o[10]=(...c)=>t.actionInsLine&&t.actionInsLine(...c)),class:"iconfont icon-horizontal"})])):e.createCommentVNode("",!0),t.toolConfig.quote?(e.openBlock(),e.createElementBlock("li",$h,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[11]||(o[11]=(...c)=>t.actionInsQuote&&t.actionInsQuote(...c)),class:"iconfont icon-quote"})])):e.createCommentVNode("",!0),t.toolConfig.ul?(e.openBlock(),e.createElementBlock("li",zh,[e.createElementVNode("span",{onClick:o[12]||(o[12]=(...c)=>t.actionInsUl&&t.actionInsUl(...c)),class:"iconfont icon-ul"})])):e.createCommentVNode("",!0),t.toolConfig.ol?(e.openBlock(),e.createElementBlock("li",Ph,[e.createElementVNode("span",{onClick:o[13]||(o[13]=(...c)=>t.actionInsOl&&t.actionInsOl(...c)),class:"iconfont icon-ol"})])):e.createCommentVNode("",!0),t.toolConfig.notChecked?(e.openBlock(),e.createElementBlock("li",jh,[e.createElementVNode("span",{onClick:o[14]||(o[14]=(...c)=>t.insertNotFinished&&t.insertNotFinished(...c)),class:"iconfont icon-checked-false"})])):e.createCommentVNode("",!0),t.toolConfig.checked?(e.openBlock(),e.createElementBlock("li",Oh,[e.createElementVNode("span",{onClick:o[15]||(o[15]=(...c)=>t.insertFinished&&t.insertFinished(...c)),class:"iconfont icon-checked"})])):e.createCommentVNode("",!0),t.toolConfig.link?(e.openBlock(),e.createElementBlock("li",Mh,[e.createElementVNode("span",{onClick:o[16]||(o[16]=(...c)=>t.actionInsLink&&t.actionInsLink(...c)),class:"iconfont icon-link"})])):e.createCommentVNode("",!0),t.toolConfig.table?(e.openBlock(),e.createElementBlock("li",Ah,[e.createElementVNode("span",{onClick:o[17]||(o[17]=(...c)=>t.actionInsTable&&t.actionInsTable(...c)),class:"iconfont icon-table"})])):e.createCommentVNode("",!0),o[53]||(o[53]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.scrollSync?(e.openBlock(),e.createElementBlock("li",{key:18,name:t.actionScrollSync?"同步滚动:开":"同步滚动:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[18]||(o[18]=c=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-on"},null,512),[[e.vShow,t.actionScrollSync]]),e.withDirectives(e.createElementVNode("span",{onClick:o[19]||(o[19]=c=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-off"},null,512),[[e.vShow,!t.actionScrollSync]])],8,Rh)):e.createCommentVNode("",!0),t.toolConfig.split&&t.actionSplit?(e.openBlock(),e.createElementBlock("li",Hh,[e.createElementVNode("span",{onClick:o[20]||(o[20]=c=>t.actionSplit=!1),class:"iconfont icon-md"})])):e.createCommentVNode("",!0),t.toolConfig.split&&!t.actionSplit?(e.openBlock(),e.createElementBlock("li",Uh,[e.createElementVNode("span",{onClick:o[21]||(o[21]=c=>t.actionSplit=!0),class:"iconfont icon-group"})])):e.createCommentVNode("",!0),t.toolConfig.preview?(e.openBlock(),e.createElementBlock("li",Wh,[e.createElementVNode("span",{onClick:o[22]||(o[22]=c=>t.actionPreview=!0),class:"iconfont icon-preview"})])):e.createCommentVNode("",!0),t.toolConfig.clear?(e.openBlock(),e.createElementBlock("li",{key:22,name:"清空",onClick:o[23]||(o[23]=c=>n.localVal="")},o[51]||(o[51]=[e.createElementVNode("span",{class:"iconfont icon-clear"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",{key:23,name:"保存",onClick:o[24]||(o[24]=(...c)=>t.actionSaveSet&&t.actionSaveSet(...c))},o[52]||(o[52]=[e.createElementVNode("span",{class:"iconfont icon-save"},null,-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("ul",qh,[t.toolConfig.image?(e.openBlock(),e.createElementBlock("li",Gh,[e.createElementVNode("span",{onClick:o[25]||(o[25]=(...c)=>t.actionInsImage&&t.actionInsImage(...c)),class:"iconfont icon-img"})])):e.createCommentVNode("",!0),t.toolConfig.uploadImage?(e.openBlock(),e.createElementBlock("li",Kh,[e.createElementVNode("span",{onClick:o[26]||(o[26]=(...c)=>t.actionChooseImage&&t.actionChooseImage(...c)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_image?(e.openBlock(),e.createElementBlock("li",Qh,[e.createElementVNode("span",{onClick:o[27]||(o[27]=(...c)=>t.custom_actionInsImage&&t.custom_actionInsImage(...c)),class:"iconfont icon-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadImage?(e.openBlock(),e.createElementBlock("li",Zh,[e.createElementVNode("span",{onClick:o[28]||(o[28]=(...c)=>t.custom_chooseImage&&t.custom_chooseImage(...c)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadFile?(e.openBlock(),e.createElementBlock("li",Yh,[e.createElementVNode("span",{onClick:o[29]||(o[29]=(...c)=>t.custom_chooseFile&&t.custom_chooseFile(...c)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.theme?(e.openBlock(),e.createElementBlock("li",Jh,[e.createElementVNode("div",null,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[30]||(o[30]=c=>n.themeSlideDown=!n.themeSlideDown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:n.themeSlideDown}),onMouseleave:o[35]||(o[35]=c=>n.themeSlideDown=!1)},[e.createElementVNode("li",{onClick:o[31]||(o[31]=c=>t.setThemes("light"))},"Light"),e.createElementVNode("li",{onClick:o[32]||(o[32]=c=>t.setThemes("dark"))},"VS Code"),e.createElementVNode("li",{onClick:o[33]||(o[33]=c=>t.setThemes("oneDark"))},"Atom OneDark"),e.createElementVNode("li",{onClick:o[34]||(o[34]=c=>t.setThemes("gitHub"))},"GitHub")],34)])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("li",Xh,[e.createElementVNode("span",{class:"iconfont icon-daoru",onClick:o[36]||(o[36]=(...c)=>t.actionImportFile&&t.actionImportFile(...c))}),e.createElementVNode("input",{type:"file",onChange:o[37]||(o[37]=c=>t.actionImportFile(c)),accept:"text/markdown"},null,32)],512),[[e.vShow,t.toolConfig.importmd]]),e.withDirectives(e.createElementVNode("li",e1,[e.createElementVNode("span",{class:"iconfont icon-download",onClick:o[38]||(o[38]=(...c)=>t.actionExportFile&&t.actionExportFile(...c))})],512),[[e.vShow,t.toolConfig.exportmd]]),o[54]||(o[54]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.fullscreen&&!n.fullscreen?(e.openBlock(),e.createElementBlock("li",t1,[e.createElementVNode("span",{onClick:o[39]||(o[39]=c=>n.fullscreen=!n.fullscreen),class:"iconfont icon-fullscreen"})])):e.createCommentVNode("",!0),t.toolConfig.fullscreen&&n.fullscreen?(e.openBlock(),e.createElementBlock("li",o1,[e.createElementVNode("span",{onClick:o[40]||(o[40]=c=>n.fullscreen=!n.fullscreen),class:"iconfont icon-quite"})])):e.createCommentVNode("",!0)])])),e.withDirectives(e.createElementVNode("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[41]||(o[41]=c=>t.actionPreview=!1)},o[55]||(o[55]=[e.createElementVNode("span",{class:"iconfont icon-close"},null,-1)]),512),[[e.vShow,t.actionPreview]]),e.createElementVNode("div",{title:"编辑器",class:"cv-editor-markdown-main",style:e.normalizeStyle({background:t.actionPreview?"#fff":""})},[e.withDirectives(e.createElementVNode("div",{class:"markdown-editor",ref:"markdownEditor",onScroll:o[47]||(o[47]=(...c)=>i.markdownScroll&&i.markdownScroll(...c)),onMouseenter:o[48]||(o[48]=c=>i.mousescrollSide("markdown"))},[e.createElementVNode("ul",{class:"index",ref:"index",style:e.normalizeStyle({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.indexLenth,c=>(e.openBlock(),e.createElementBlock("li",{key:c},e.toDisplayString(c),1))),128))],4),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[42]||(o[42]=c=>n.localVal=c),ref:"textarea",onKeydown:o[43]||(o[43]=e.withKeys((...c)=>i.tab&&i.tab(...c),["tab"])),onKeyup:[o[44]||(o[44]=e.withKeys((...c)=>i.enter&&i.enter(...c),["enter"])),o[45]||(o[45]=e.withKeys((...c)=>i.onDelete&&i.onDelete(...c),["delete"]))],onMouseenter:o[46]||(o[46]=c=>i.mousescrollSide("left")),style:e.normalizeStyle({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},null,36),[[e.vModelText,n.localVal]])],544),[[e.vShow,!t.preview]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass("markdown-preview "+("markdown-theme-"+t.codemrrConfig.theme)),ref:"preview",onScroll:o[49]||(o[49]=(...c)=>i.previewScroll&&i.previewScroll(...c)),onMouseenter:o[50]||(o[50]=c=>i.mousescrollSide("right"))},[e.createElementVNode("div",{innerHTML:n.html,ref:"previewInner"},null,8,l1)],34),[[e.vShow,t.preview?t.preview:t.split]])],4)],6)}],["__scopeId","data-v-36211c6f"]]),a1=["innerHTML"],Jt=C({name:"cvMarkdownNostyle",props:{modelValue:{type:String,default:""},initValue:{type:String,default:""}},data:()=>({localHtml:"",localVal:""}),watch:{initValue(){this.initNewCreate()}},created(){this.localVal=this.initValue||""},async mounted(){this.initNewCreate()},methods:{async initNewCreate(){const{Marked:t,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");let l=new t().parser(this.localVal,{sanitize:!1});l=l.replace(/href="/gi,'target="_blank" href="'),this.localHtml=l}}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:"markdown-preview-nostyle",innerHTML:n.localHtml},null,8,a1)}]]);function Ca(t){return Object.prototype.toString.call(t)==="[object Object]"}function Q(t,...o){return o.reduce((l,r)=>Object.keys(r).reduce((n,i)=>{const c=r[i];var s;return Ca(c)?n[i]=Q(n[i]?n[i]:{},c):(s=c,Array.isArray(s)?n[i]=c.map((m,d)=>{if(Ca(m)){const p=n[i]?n[i]:[];return Q(p[d]?p[d]:{},m)}return m}):n[i]=c),n},l),t)}function Ta(t,o){const{[o[0]]:l,...r}=t;return Object.keys(t).reduce((n,i)=>(o.includes(i)||(n[i]=t[i]),n),{})}function Ao(t){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...t}}Qt.install=function(t){t.component(Qt.name,Qt)},Zt.install=function(t){t.component(Zt.name,Zt)},Yt.install=function(t){t.component(Yt.name,Yt)},Jt.install=function(t){t.component(Jt.name,Jt)},qt.install=function(t){t.component(qt.name,qt)},Gt.install=function(t){t.component(Gt.name,Gt)},Kt.install=function(t){t.component(Kt.name,Kt)};class n1{constructor(o,l){this.WinVue=o,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=e.ref(!1),this.boxProps=e.ref({}),this.boxOptions=Q({closeIsConfirm:!1,closeIsDestroy:!0,width:"40%",title:"默认标题"},l.diyOpts),this.boxProps.value=Ta(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=l.component||"",this.bodyOptions=Q({},l.props),this.bodyFunc=Q({},l.onFunc);for(const r in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(r)&&!r.startsWith("on")){const n="on"+r.charAt(0).toUpperCase()+r.slice(1);this.bodyFunc[n]=this.bodyFunc[r],delete this.bodyFunc[r]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var o=this;const l={data:()=>({}),methods:{clearVm(){o.vmApp&&o.close()}},mounted(){},unmounted(){},render(){const i=e.createVNode(o.bodyComponent,{...o.bodyOptions,ref:"inner",onSetTitle(p){o.boxProps.value.title=p},onClose:()=>o.close(),...o.bodyFunc},{default:()=>""});let c={ok:Ao({text:"确定",type:"primary",order:0}),cancel:Ao({text:"取消",order:1})};Object.entries(c).forEach(([p,f])=>{if(["ok","cancel"].includes(p)){const g=p==="ok"?o.defaultFunc.onOK:o.defaultFunc.onCancel;f.clickFn=f.clickFn||g}else c[p]=Ao(f)});const s=Object.values(c).filter(p=>!p.isHide);e.createVNode("div",{},s.map(p=>e.createVNode(k.ElButton,{type:p.type,onClick:p.clickFn},p.text)));const m=function(p){o.close()},d=typeof o.boxOptions.beforeClose=="function"?o.boxOptions.beforeClose:m;return e.createVNode(k.ElDialog,{...o.boxProps.value,modelValue:o.boxShow.value,beforeClose:p=>{o.boxOptions.closeIsConfirm?k.ElMessageBox.confirm("确认关闭?","提示").then(f=>{d(m)}).catch(f=>{m()}):d(m)},onClosed2(p){o.close()},onClosed:o.close},{default:()=>i})}};this.vmComponent=l;const r=document.createElement("div");document.body.appendChild(r),this.vmTargetElement=r;const n=e.createVNode(l);n.appContext=this.WinVue._context,e.render(n,this.vmTargetElement),this.vmApp=n}close(){this.boxShow&&(this.boxShow.value=!1),this.vmTargetElement&&(e.render(null,this.vmTargetElement),document.body.removeChild(this.vmTargetElement),this.vmApp=null)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}}function Ro(t){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...t}}class i1{constructor(o,l){this.WinVue=o,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=e.ref(!1),this.boxProps=e.ref({}),this.boxOptions=Q({closeIsConfirm:!0,closeIsDestroy:!0,width:"40%",title:"默认标题"},l.diyOpts),this.boxProps.value=Ta(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=l.component||"",this.bodyOptions=Q({},l.props),this.bodyFunc=Q({},l.onFunc);for(const r in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(r)&&!r.startsWith("on")){const n="on"+r.charAt(0).toUpperCase()+r.slice(1);this.bodyFunc[n]=this.bodyFunc[r],delete this.bodyFunc[r]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var o=this;const l={data:()=>({}),methods:{clearVm(){o.vmApp&&o.close()}},mounted(){},unmounted(){document.body.removeChild(o.vmTargetElement)},render(){const i=e.createVNode(o.bodyComponent,{...o.bodyOptions,ref:"inner",onSetTitle(p){o.boxProps.value.title=p},onClose:this.clearVm,...o.bodyFunc},{default:()=>""});let c={ok:Ro({text:"确定",type:"primary",order:0}),cancel:Ro({text:"取消",order:1})};Object.entries(c).forEach(([p,f])=>{if(["ok","cancel"].includes(p)){const g=p==="ok"?o.defaultFunc.onOK:o.defaultFunc.onCancel;f.clickFn=f.clickFn||g}else c[p]=Ro(f)});const s=Object.values(c).filter(p=>!p.isHide);e.createVNode("div",{},s.map(p=>e.createVNode(k.ElButton,{type:p.type,onClick:p.clickFn},p.text)));const m=function(p){o.close()},d=typeof o.boxOptions.beforeClose=="function"?o.boxOptions.beforeClose:m;return e.createVNode(k.ElDrawer,{...o.boxProps.value,modelValue:o.boxShow.value,beforeClose:p=>{o.boxOptions.closeIsConfirm?k.ElMessageBox.confirm("确认关闭?","提示").then(f=>{d(m)}).catch(f=>{m()}):d(m)},onClosed2(p){this.clearVm()},onClosed:this.clearVm},{default:()=>i})}};this.vmComponent=l;const r=document.createElement("div");document.body.appendChild(r),this.vmTargetElement=r;const n=e.createVNode(l);n.appContext=this.WinVue._context,e.render(n,this.vmTargetElement),this.vmApp=n}close(){this.boxShow.value=!1,e.render(null,this.vmTargetElement)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}}function Ia(t,o=null,l={},r={},n={}){const i=new n1(t,{component:o,diyOpts:l,props:r,onFunc:n,onOK(){i.getInner(),i.close()},onCancel(){i.close()}});return i}function La(t,o="",l={},r={},n=null){const i=new i1(t,{component:o,diyOpts:{...l},props:r,onFunc:n,onOK(){i.getInner(),i.close()},onCancel(){i.close()}});return i}var Fa=[ke,ye,be,Ve,we,xe,Be,Ne,Se,Ee,cn,De,Te,Ie,Le,Fe,_e,Pe,je,$e,ze,Oe,Me,Ae,We,He,Ue,Qe,qe,Ge,Ke,Je,Xe,et,tt,ot,lt,at,nt,it,rt,ct,st,mt,pt,ut,ht,kt,yt,dt,Ct,vt,Vt,bt,wt,Lt,Ft,_t,$t,zt,Pt,xt,Bt,Nt,St,Et,Dt,Tt,It,gt,ft,Ze,Ye,jt,Ot,Mt,Rt,At,Ht,Ut,qt,Gt,Kt,Qt,Zt,Yt,Jt];const Go=function(t,o={}){Fa.forEach(l=>{t.component(l.name,l)}),t.config.globalProperties.$cvUiParams={...o},t.config.globalProperties.$cvDialogRender=function(){return Ia(t,...arguments)},t.config.globalProperties.$cvCopy=_n,t.config.globalProperties.$cvDrawerRender=function(){return La(t,...arguments)},t.config.globalProperties.CDN_URL_UI="https://10ui.cn/"};typeof window<"u"&&window._vueApp_&&Go(window._vueApp_);const r1={version:"0.3.x",install:Go};exports.components=Fa,exports.cvDialogRender=Ia,exports.cvDrawerRender=La,exports.default=r1,exports.install=Go;
|
|
52
|
+
`);t[t.length-1]===""&&(this.lastInsert="")},mousescrollSide(t){this.scrollSide=t},handlePaste(t){const{clipboardData:o={}}=t,{types:l=[],items:r}=o;let n=null;for(let i=0;i<l.length;i++)if(l[i]==="Files"){n=r[i];break}if(n){const i=n.getAsFile();/image/gi.test(i.type)&&(this.$emit("on-upload-image",i),this.$emit("on-paste-image",i),t.preventDefault())}},markdownScroll(){const{scrolling:t}=this;if(t&&this.scroll==="left"){const o=this.$refs.markdownEditor,l=this.$refs.preview,r=l.offsetHeight,n=o.scrollHeight,i=o.scrollTop,s=l.scrollHeight;l.scrollTop=parseInt(i/(n-r)*(s-r),0)}},previewScroll(){const{scrolling:t}=this;if(t&&this.scroll==="right"){const o=this.$refs.markdownEditor,l=this.$refs.preview,r=l.offsetHeight,n=o.scrollHeight,i=l.scrollHeight,s=l.scrollTop;o.scrollTop=parseInt(s/(i-r)*(n-r),0)}},mousescrollSide(t){this.scroll=t}}},wh={key:0,title:"头部工具栏"},xh={class:"cv-editor-toolbars"},Bh={key:0,name:"粗体"},Sh={key:1,name:"斜体"},Nh={key:2,name:"删除线"},Eh={key:3,name:"下划线"},Dh={key:4,name:"标题1"},Th={key:5,name:"标题2"},Ih={key:6,name:"标题3"},Fh={key:7,name:"标题4"},Lh={key:8,name:"标题5"},_h={key:9,name:"标题6"},$h={key:10,name:"分割线"},zh={key:11,name:"引用"},Ph={key:12,name:"无序列表"},Oh={key:13,name:"有序列表"},jh={key:14,name:"未完成列表"},Mh={key:15,name:"已完成列表"},Ah={key:16,name:"链接"},Rh={key:17,name:"表格"},Hh=["name"],Uh={key:19,name:"全屏编辑"},Wh={key:20,name:"分屏显示"},qh={key:21,name:"预览"},Gh={class:"cv-editor-toolbars"},Kh={key:0,name:"图片"},Qh={key:1,name:"本地图片"},Yh={key:2,name:"图片空间"},Zh={key:3,name:"上传图片"},Jh={key:4,name:"上传文件"},Xh={key:5,class:"shift-theme",name:"代码块主题"},e1={name:"导入文件",class:"import-file"},t1={name:"保存到本地"},o1={key:6,name:"全屏"},l1={key:7,name:"退出全屏"},a1=["innerHTML"],Jt=C(Vh,[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`markdown ${n.fullscreen?"fullscreen":""} ${l.bordered?"border":""}`),ref:"markdown",style:e.normalizeStyle({width:l.width+(typeof l.width=="string"?"":"px"),height:l.height+(typeof l.height=="string"?"":"px")})},[t.actionPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",wh,[e.createElementVNode("ul",xh,[e.createElementVNode("li",null,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),t.toolConfig.strong?(e.openBlock(),e.createElementBlock("li",Bh,[e.createElementVNode("span",{onClick:o[0]||(o[0]=(...s)=>t.actionInsStrong&&t.actionInsStrong(...s)),class:"iconfont icon-bold"})])):e.createCommentVNode("",!0),t.toolConfig.italic?(e.openBlock(),e.createElementBlock("li",Sh,[e.createElementVNode("span",{onClick:o[1]||(o[1]=(...s)=>t.actionInsItalic&&t.actionInsItalic(...s)),class:"iconfont icon-italic"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Nh,[e.createElementVNode("span",{onClick:o[2]||(o[2]=(...s)=>t.actionInsOverline&&t.actionInsOverline(...s)),class:"iconfont icon-overline"})])):e.createCommentVNode("",!0),t.toolConfig.overline?(e.openBlock(),e.createElementBlock("li",Eh,[e.createElementVNode("span",{onClick:o[3]||(o[3]=(...s)=>t.actionInsUnderline&&t.actionInsUnderline(...s)),class:"iconfont icon-under-line"})])):e.createCommentVNode("",!0),t.toolConfig.h1?(e.openBlock(),e.createElementBlock("li",Dh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[4]||(o[4]=s=>t.actionInsTitle(1))},"h1")])):e.createCommentVNode("",!0),t.toolConfig.h2?(e.openBlock(),e.createElementBlock("li",Th,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[5]||(o[5]=s=>t.actionInsTitle(2))},"h2")])):e.createCommentVNode("",!0),t.toolConfig.h3?(e.openBlock(),e.createElementBlock("li",Ih,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[6]||(o[6]=s=>t.actionInsTitle(3))},"h3")])):e.createCommentVNode("",!0),t.toolConfig.h4?(e.openBlock(),e.createElementBlock("li",Fh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[7]||(o[7]=s=>t.actionInsTitle(4))},"h4")])):e.createCommentVNode("",!0),t.toolConfig.h5?(e.openBlock(),e.createElementBlock("li",Lh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[8]||(o[8]=s=>t.actionInsTitle(5))},"h5")])):e.createCommentVNode("",!0),t.toolConfig.h6?(e.openBlock(),e.createElementBlock("li",_h,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[9]||(o[9]=s=>t.actionInsTitle(6))},"h6")])):e.createCommentVNode("",!0),t.toolConfig.hr?(e.openBlock(),e.createElementBlock("li",$h,[e.createElementVNode("span",{onClick:o[10]||(o[10]=(...s)=>t.actionInsLine&&t.actionInsLine(...s)),class:"iconfont icon-horizontal"})])):e.createCommentVNode("",!0),t.toolConfig.quote?(e.openBlock(),e.createElementBlock("li",zh,[e.createElementVNode("span",{style:{"font-size":"16px"},onClick:o[11]||(o[11]=(...s)=>t.actionInsQuote&&t.actionInsQuote(...s)),class:"iconfont icon-quote"})])):e.createCommentVNode("",!0),t.toolConfig.ul?(e.openBlock(),e.createElementBlock("li",Ph,[e.createElementVNode("span",{onClick:o[12]||(o[12]=(...s)=>t.actionInsUl&&t.actionInsUl(...s)),class:"iconfont icon-ul"})])):e.createCommentVNode("",!0),t.toolConfig.ol?(e.openBlock(),e.createElementBlock("li",Oh,[e.createElementVNode("span",{onClick:o[13]||(o[13]=(...s)=>t.actionInsOl&&t.actionInsOl(...s)),class:"iconfont icon-ol"})])):e.createCommentVNode("",!0),t.toolConfig.notChecked?(e.openBlock(),e.createElementBlock("li",jh,[e.createElementVNode("span",{onClick:o[14]||(o[14]=(...s)=>t.insertNotFinished&&t.insertNotFinished(...s)),class:"iconfont icon-checked-false"})])):e.createCommentVNode("",!0),t.toolConfig.checked?(e.openBlock(),e.createElementBlock("li",Mh,[e.createElementVNode("span",{onClick:o[15]||(o[15]=(...s)=>t.insertFinished&&t.insertFinished(...s)),class:"iconfont icon-checked"})])):e.createCommentVNode("",!0),t.toolConfig.link?(e.openBlock(),e.createElementBlock("li",Ah,[e.createElementVNode("span",{onClick:o[16]||(o[16]=(...s)=>t.actionInsLink&&t.actionInsLink(...s)),class:"iconfont icon-link"})])):e.createCommentVNode("",!0),t.toolConfig.table?(e.openBlock(),e.createElementBlock("li",Rh,[e.createElementVNode("span",{onClick:o[17]||(o[17]=(...s)=>t.actionInsTable&&t.actionInsTable(...s)),class:"iconfont icon-table"})])):e.createCommentVNode("",!0),o[53]||(o[53]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.scrollSync?(e.openBlock(),e.createElementBlock("li",{key:18,name:t.actionScrollSync?"同步滚动:开":"同步滚动:关"},[e.withDirectives(e.createElementVNode("span",{onClick:o[18]||(o[18]=s=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-on"},null,512),[[e.vShow,t.actionScrollSync]]),e.withDirectives(e.createElementVNode("span",{onClick:o[19]||(o[19]=s=>t.actionScrollSync=!t.actionScrollSync),class:"iconfont icon-off"},null,512),[[e.vShow,!t.actionScrollSync]])],8,Hh)):e.createCommentVNode("",!0),t.toolConfig.split&&t.actionSplit?(e.openBlock(),e.createElementBlock("li",Uh,[e.createElementVNode("span",{onClick:o[20]||(o[20]=s=>t.actionSplit=!1),class:"iconfont icon-md"})])):e.createCommentVNode("",!0),t.toolConfig.split&&!t.actionSplit?(e.openBlock(),e.createElementBlock("li",Wh,[e.createElementVNode("span",{onClick:o[21]||(o[21]=s=>t.actionSplit=!0),class:"iconfont icon-group"})])):e.createCommentVNode("",!0),t.toolConfig.preview?(e.openBlock(),e.createElementBlock("li",qh,[e.createElementVNode("span",{onClick:o[22]||(o[22]=s=>t.actionPreview=!0),class:"iconfont icon-preview"})])):e.createCommentVNode("",!0),t.toolConfig.clear?(e.openBlock(),e.createElementBlock("li",{key:22,name:"清空",onClick:o[23]||(o[23]=s=>n.localVal="")},o[51]||(o[51]=[e.createElementVNode("span",{class:"iconfont icon-clear"},null,-1)]))):e.createCommentVNode("",!0),t.toolConfig.save?(e.openBlock(),e.createElementBlock("li",{key:23,name:"保存",onClick:o[24]||(o[24]=(...s)=>t.actionSaveSet&&t.actionSaveSet(...s))},o[52]||(o[52]=[e.createElementVNode("span",{class:"iconfont icon-save"},null,-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("ul",Gh,[t.toolConfig.image?(e.openBlock(),e.createElementBlock("li",Kh,[e.createElementVNode("span",{onClick:o[25]||(o[25]=(...s)=>t.actionInsImage&&t.actionInsImage(...s)),class:"iconfont icon-img"})])):e.createCommentVNode("",!0),t.toolConfig.uploadImage?(e.openBlock(),e.createElementBlock("li",Qh,[e.createElementVNode("span",{onClick:o[26]||(o[26]=(...s)=>t.actionChooseImage&&t.actionChooseImage(...s)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_image?(e.openBlock(),e.createElementBlock("li",Yh,[e.createElementVNode("span",{onClick:o[27]||(o[27]=(...s)=>t.custom_actionInsImage&&t.custom_actionInsImage(...s)),class:"iconfont icon-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadImage?(e.openBlock(),e.createElementBlock("li",Zh,[e.createElementVNode("span",{onClick:o[28]||(o[28]=(...s)=>t.custom_chooseImage&&t.custom_chooseImage(...s)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.custom_uploadFile?(e.openBlock(),e.createElementBlock("li",Jh,[e.createElementVNode("span",{onClick:o[29]||(o[29]=(...s)=>t.custom_chooseFile&&t.custom_chooseFile(...s)),class:"iconfont icon-upload-img"})])):e.createCommentVNode("",!0),t.toolConfig.theme?(e.openBlock(),e.createElementBlock("li",Xh,[e.createElementVNode("div",null,[e.createElementVNode("span",{class:"iconfont icon-theme",onClick:o[30]||(o[30]=s=>n.themeSlideDown=!n.themeSlideDown)}),e.createElementVNode("ul",{class:e.normalizeClass({active:n.themeSlideDown}),onMouseleave:o[35]||(o[35]=s=>n.themeSlideDown=!1)},[e.createElementVNode("li",{onClick:o[31]||(o[31]=s=>t.setThemes("light"))},"Light"),e.createElementVNode("li",{onClick:o[32]||(o[32]=s=>t.setThemes("dark"))},"VS Code"),e.createElementVNode("li",{onClick:o[33]||(o[33]=s=>t.setThemes("oneDark"))},"Atom OneDark"),e.createElementVNode("li",{onClick:o[34]||(o[34]=s=>t.setThemes("gitHub"))},"GitHub")],34)])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("li",e1,[e.createElementVNode("span",{class:"iconfont icon-daoru",onClick:o[36]||(o[36]=(...s)=>t.actionImportFile&&t.actionImportFile(...s))}),e.createElementVNode("input",{type:"file",onChange:o[37]||(o[37]=s=>t.actionImportFile(s)),accept:"text/markdown"},null,32)],512),[[e.vShow,t.toolConfig.importmd]]),e.withDirectives(e.createElementVNode("li",t1,[e.createElementVNode("span",{class:"iconfont icon-download",onClick:o[38]||(o[38]=(...s)=>t.actionExportFile&&t.actionExportFile(...s))})],512),[[e.vShow,t.toolConfig.exportmd]]),o[54]||(o[54]=e.createElementVNode("li",{class:"empty"},null,-1)),t.toolConfig.fullscreen&&!n.fullscreen?(e.openBlock(),e.createElementBlock("li",o1,[e.createElementVNode("span",{onClick:o[39]||(o[39]=s=>n.fullscreen=!n.fullscreen),class:"iconfont icon-fullscreen"})])):e.createCommentVNode("",!0),t.toolConfig.fullscreen&&n.fullscreen?(e.openBlock(),e.createElementBlock("li",l1,[e.createElementVNode("span",{onClick:o[40]||(o[40]=s=>n.fullscreen=!n.fullscreen),class:"iconfont icon-quite"})])):e.createCommentVNode("",!0)])])),e.withDirectives(e.createElementVNode("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[41]||(o[41]=s=>t.actionPreview=!1)},o[55]||(o[55]=[e.createElementVNode("span",{class:"iconfont icon-close"},null,-1)]),512),[[e.vShow,t.actionPreview]]),e.createElementVNode("div",{title:"编辑器",class:"cv-editor-markdown-main",style:e.normalizeStyle({background:t.actionPreview?"#fff":""})},[e.withDirectives(e.createElementVNode("div",{class:"markdown-editor",ref:"markdownEditor",onScroll:o[47]||(o[47]=(...s)=>i.markdownScroll&&i.markdownScroll(...s)),onMouseenter:o[48]||(o[48]=s=>i.mousescrollSide("markdown"))},[e.createElementVNode("ul",{class:"index",ref:"index",style:e.normalizeStyle({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.indexLenth,s=>(e.openBlock(),e.createElementBlock("li",{key:s},e.toDisplayString(s),1))),128))],4),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[42]||(o[42]=s=>n.localVal=s),ref:"textarea",onKeydown:o[43]||(o[43]=e.withKeys((...s)=>i.tab&&i.tab(...s),["tab"])),onKeyup:[o[44]||(o[44]=e.withKeys((...s)=>i.enter&&i.enter(...s),["enter"])),o[45]||(o[45]=e.withKeys((...s)=>i.onDelete&&i.onDelete(...s),["delete"]))],onMouseenter:o[46]||(o[46]=s=>i.mousescrollSide("left")),style:e.normalizeStyle({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},null,36),[[e.vModelText,n.localVal]])],544),[[e.vShow,!t.preview]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass("markdown-preview "+("markdown-theme-"+t.codemrrConfig.theme)),ref:"preview",onScroll:o[49]||(o[49]=(...s)=>i.previewScroll&&i.previewScroll(...s)),onMouseenter:o[50]||(o[50]=s=>i.mousescrollSide("right"))},[e.createElementVNode("div",{innerHTML:n.html,ref:"previewInner"},null,8,a1)],34),[[e.vShow,t.preview?t.preview:t.split]])],4)],6)}],["__scopeId","data-v-36211c6f"]]),n1=["innerHTML"],Xt=C({name:"cvMarkdownNostyle",props:{modelValue:{type:String,default:""},initValue:{type:String,default:""}},data:()=>({localHtml:"",localVal:""}),watch:{initValue(){this.initNewCreate()}},created(){this.localVal=this.initValue||""},async mounted(){this.initNewCreate()},methods:{async initNewCreate(){const{Marked:t,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");let l=new t().parser(this.localVal,{sanitize:!1});l=l.replace(/href="/gi,'target="_blank" href="'),this.localHtml=l}}},[["render",function(t,o,l,r,n,i){return e.openBlock(),e.createElementBlock("div",{class:"markdown-preview-nostyle",innerHTML:n.localHtml},null,8,n1)}]]);function va(t){return Object.prototype.toString.call(t)==="[object Object]"}function Q(t,...o){return o.reduce((l,r)=>Object.keys(r).reduce((n,i)=>{const s=r[i];var c;return va(s)?n[i]=Q(n[i]?n[i]:{},s):(c=s,Array.isArray(c)?n[i]=s.map((m,d)=>{if(va(m)){const p=n[i]?n[i]:[];return Q(p[d]?p[d]:{},m)}return m}):n[i]=s),n},l),t)}function Ia(t,o){const{[o[0]]:l,...r}=t;return Object.keys(t).reduce((n,i)=>(o.includes(i)||(n[i]=t[i]),n),{})}function Ro(t){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...t}}Yt.install=function(t){t.component(Yt.name,Yt)},Zt.install=function(t){t.component(Zt.name,Zt)},Jt.install=function(t){t.component(Jt.name,Jt)},Xt.install=function(t){t.component(Xt.name,Xt)},Gt.install=function(t){t.component(Gt.name,Gt)},Kt.install=function(t){t.component(Kt.name,Kt)},Qt.install=function(t){t.component(Qt.name,Qt)};class i1{constructor(o,l){this.WinVue=o,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=e.ref(!1),this.boxProps=e.ref({}),this.boxOptions=Q({closeIsConfirm:!1,closeIsDestroy:!0,width:"40%",title:"默认标题"},l.diyOpts),this.boxProps.value=Ia(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=l.component||"",this.bodyOptions=Q({},l.props),this.bodyFunc=Q({},l.onFunc);for(const r in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(r)&&!r.startsWith("on")){const n="on"+r.charAt(0).toUpperCase()+r.slice(1);this.bodyFunc[n]=this.bodyFunc[r],delete this.bodyFunc[r]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var o=this;const l={data:()=>({}),methods:{clearVm(){o.vmApp&&o.close()}},mounted(){},unmounted(){},render(){const i=e.createVNode(o.bodyComponent,{...o.bodyOptions,ref:"inner",onSetTitle(p){o.boxProps.value.title=p},onClose:()=>o.close(),...o.bodyFunc},{default:()=>""});let s={ok:Ro({text:"确定",type:"primary",order:0}),cancel:Ro({text:"取消",order:1})};Object.entries(s).forEach(([p,f])=>{if(["ok","cancel"].includes(p)){const g=p==="ok"?o.defaultFunc.onOK:o.defaultFunc.onCancel;f.clickFn=f.clickFn||g}else s[p]=Ro(f)});const c=Object.values(s).filter(p=>!p.isHide);e.createVNode("div",{},c.map(p=>e.createVNode(k.ElButton,{type:p.type,onClick:p.clickFn},p.text)));const m=function(p){o.close()},d=typeof o.boxOptions.beforeClose=="function"?o.boxOptions.beforeClose:m;return e.createVNode(k.ElDialog,{...o.boxProps.value,modelValue:o.boxShow.value,beforeClose:p=>{o.boxOptions.closeIsConfirm?k.ElMessageBox.confirm("确认关闭?","提示").then(f=>{d(m)}).catch(f=>{m()}):d(m)},onClosed2(p){o.close()},onClosed:o.close},{default:()=>i})}};this.vmComponent=l;const r=document.createElement("div");document.body.appendChild(r),this.vmTargetElement=r;const n=e.createVNode(l);n.appContext=this.WinVue._context,e.render(n,this.vmTargetElement),this.vmApp=n}close(){this.boxShow&&(this.boxShow.value=!1),this.vmTargetElement&&(e.render(null,this.vmTargetElement),document.body.removeChild(this.vmTargetElement),this.vmApp=null)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}}function Ho(t){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...t}}class r1{constructor(o,l){this.WinVue=o,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=e.ref(!1),this.boxProps=e.ref({}),this.boxOptions=Q({closeIsConfirm:!0,closeIsDestroy:!0,width:"40%",title:"默认标题"},l.diyOpts),this.boxProps.value=Ia(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=l.component||"",this.bodyOptions=Q({},l.props),this.bodyFunc=Q({},l.onFunc);for(const r in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(r)&&!r.startsWith("on")){const n="on"+r.charAt(0).toUpperCase()+r.slice(1);this.bodyFunc[n]=this.bodyFunc[r],delete this.bodyFunc[r]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var o=this;const l={data:()=>({}),methods:{clearVm(){o.vmApp&&o.close()}},mounted(){},unmounted(){document.body.removeChild(o.vmTargetElement)},render(){const i=e.createVNode(o.bodyComponent,{...o.bodyOptions,ref:"inner",onSetTitle(p){o.boxProps.value.title=p},onClose:this.clearVm,...o.bodyFunc},{default:()=>""});let s={ok:Ho({text:"确定",type:"primary",order:0}),cancel:Ho({text:"取消",order:1})};Object.entries(s).forEach(([p,f])=>{if(["ok","cancel"].includes(p)){const g=p==="ok"?o.defaultFunc.onOK:o.defaultFunc.onCancel;f.clickFn=f.clickFn||g}else s[p]=Ho(f)});const c=Object.values(s).filter(p=>!p.isHide);e.createVNode("div",{},c.map(p=>e.createVNode(k.ElButton,{type:p.type,onClick:p.clickFn},p.text)));const m=function(p){o.close()},d=typeof o.boxOptions.beforeClose=="function"?o.boxOptions.beforeClose:m;return e.createVNode(k.ElDrawer,{...o.boxProps.value,modelValue:o.boxShow.value,beforeClose:p=>{o.boxOptions.closeIsConfirm?k.ElMessageBox.confirm("确认关闭?","提示").then(f=>{d(m)}).catch(f=>{m()}):d(m)},onClosed2(p){this.clearVm()},onClosed:this.clearVm},{default:()=>i})}};this.vmComponent=l;const r=document.createElement("div");document.body.appendChild(r),this.vmTargetElement=r;const n=e.createVNode(l);n.appContext=this.WinVue._context,e.render(n,this.vmTargetElement),this.vmApp=n}close(){this.boxShow.value=!1,e.render(null,this.vmTargetElement)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}}function Fa(t,o=null,l={},r={},n={}){const i=new i1(t,{component:o,diyOpts:l,props:r,onFunc:n,onOK(){i.getInner(),i.close()},onCancel(){i.close()}});return i}function La(t,o="",l={},r={},n=null){const i=new r1(t,{component:o,diyOpts:{...l},props:r,onFunc:n,onOK(){i.getInner(),i.close()},onCancel(){i.close()}});return i}var _a=[ke,ye,be,Ve,we,xe,Be,Se,Ne,Ee,cn,De,Te,Ie,Fe,Le,_e,Pe,Oe,$e,ze,je,Me,Ae,We,He,Ue,Qe,qe,Ge,Ke,Je,Xe,et,tt,ot,lt,at,nt,it,rt,st,ct,dt,pt,ut,ht,gt,yt,bt,mt,vt,kt,wt,Vt,xt,Lt,_t,$t,zt,Pt,Ot,Bt,St,Nt,Et,Dt,Tt,It,Ft,ft,Ct,Ye,Ze,jt,Mt,At,Ht,Rt,Ut,Wt,Gt,Kt,Qt,Yt,Zt,Jt,Xt];const Ko=function(t,o={}){_a.forEach(l=>{t.component(l.name,l)}),t.config.globalProperties.$cvUiParams={...o},t.config.globalProperties.$cvDialogRender=function(){return Fa(t,...arguments)},t.config.globalProperties.$cvCopy=$n,t.config.globalProperties.$cvDrawerRender=function(){return La(t,...arguments)},t.config.globalProperties.CDN_URL_UI="https://10ui.cn/"};typeof window<"u"&&window._vueApp_&&Ko(window._vueApp_);const s1={version:"0.3.x",install:Ko};exports.components=_a,exports.cvDialogRender=Fa,exports.cvDrawerRender=La,exports.default=s1,exports.install=Ko;
|