@10yun/cv-pc-ui 0.3.67 → 0.3.68
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 +4 -4
- package/lib/cv-ui.css +1 -1
- package/lib/cv-ui.js +4 -4
- package/package.json +4 -4
- package/src/mixins/load-data.js +2 -2
package/lib/cv-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ClickOutside as e,ElAutocomplete as t,ElAvatar as n,ElBadge as r,ElButton as i,ElButton as a,ElCascader as o,ElCheckbox as s,ElCheckboxButton as c,ElCheckboxGroup as l,ElDatePicker as u,ElDialog as d,ElDrawer as f,ElForm as p,ElFormItem as m,ElIcon as h,ElImage as g,ElInput as ee,ElInput as _,ElInputNumber as te,ElMessage as ne,ElMessage as re,ElMessageBox as ie,ElMessageBox as ae,ElOption as oe,ElPagination as se,ElPopover as ce,ElScrollbar as le,ElSelect as ue,ElSwitch as de,ElTable as fe,ElTableColumn as pe,ElTag as me,ElTimePicker as he}from"element-plus";import{Fragment as v,Transition as ge,TransitionGroup as _e,computed as ve,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ye,createTextVNode as C,createVNode as w,defineComponent as be,getCurrentInstance as xe,getCurrentScope as Se,guardReactiveProps as T,h as Ce,inject as we,mergeProps as E,nextTick as Te,normalizeClass as D,normalizeProps as O,normalizeStyle as k,onBeforeUnmount as Ee,onMounted as De,onScopeDispose as Oe,onUnmounted as ke,openBlock as A,provide as Ae,reactive as je,ref as j,render as Me,renderList as M,renderSlot as N,resolveComponent as P,resolveDirective as Ne,resolveDynamicComponent as Pe,shallowReadonly as Fe,shallowRef as Ie,toDisplayString as F,toHandlers as Le,toRaw as Re,toRef as ze,toRefs as Be,toValue as Ve,unref as I,useCssVars as He,useSlots as Ue,vShow as L,watch as R,withCtx as z,withDirectives as B,withKeys as We,withModifiers as Ge}from"vue";import{basicSetup as Ke}from"codemirror";import{Compartment as qe,EditorSelection as Je,EditorState as Ye,StateEffect as Xe}from"@codemirror/state";import{EditorView as Ze,keymap as Qe,placeholder as $e}from"@codemirror/view";import{indentWithTab as et}from"@codemirror/commands";import{HighlightStyle as tt,indentUnit as nt,syntaxHighlighting as rt}from"@codemirror/language";import{tags as V}from"@lezer/highlight";import{javascript as it}from"@codemirror/lang-javascript";import{html as at}from"@codemirror/lang-html";import{json as ot}from"@codemirror/lang-json";import{markdown as st}from"@codemirror/lang-markdown";import{vue as ct}from"@codemirror/lang-vue";import{php as lt}from"@codemirror/lang-php";import{java as ut}from"@codemirror/lang-java";import{sql as dt}from"@codemirror/lang-sql";import{python as ft}from"@codemirror/lang-python";import{xml as pt}from"@codemirror/lang-xml";import{go as mt}from"@codemirror/lang-go";import{css as ht}from"@codemirror/lang-css";import gt from"html-to-md";var H=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},_t={name:`cvBadge`,extends:{ExtendBadge:r},props:{...r.props},created(){},computed:{isShow(){return this.value?!(this.value>0):!0}},data(){return{}}};function vt(e,t,n,r,i,a){let o=P(`el-badge`);return A(),y(o,E(e.$props,{hidden:a.isShow}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`hidden`])}var yt=H(_t,[[`render`,vt]]);yt.install=function(e){e.component(yt.name,yt)};var bt={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(){return{}},methods:{}};function xt(e,t,n,r,i,a){let o=P(`el-row`);return A(),y(o,E({class:`cv-row`},{type:n.type,justify:n.justify,align:n.align,tag:n.tag},{gutter:parseInt(n.gutter)}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`gutter`])}var St=H(bt,[[`render`,xt]]),Ct={name:`cvCol`,props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data(){return{}},methods:{}};function wt(e,t,n,r,i,a){let o=P(`el-col`);return A(),y(o,{class:`cv-col`,span:parseInt(n.span),offset:parseInt(n.offset)},{default:z(()=>[N(e.$slots,`default`)]),_:3},8,[`span`,`offset`])}var Tt=H(Ct,[[`render`,wt]]);St.install=function(e){e.component(St.name,St)},Tt.install=function(e){e.component(Tt.name,Tt)};var Et={name:`cvBtnBase`,emits:[`click`],props:{...a.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:``}},data(){return{loadingStatus:!1}},computed:{filteredProps(){let{autoLoading:e,...t}=this.$props;return t},hasDefaultContent(){let e=this.$slots.default?.();return e&&e.length>0}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit(`click`,()=>{this.loadingStatus=!1})}catch(e){throw this.loadingStatus=!1,e}}}};function Dt(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`);return e.$slots.default||a.hasDefaultContent?(A(),y(s,E({key:0,class:`cv-btn`},a.filteredProps,{loading:i.loadingStatus,onClick:a.handleClick}),{default:z(()=>[n.svg?(A(),y(o,{key:0,type:n.svg,size:`14`,color:`currentColor`},null,8,[`type`])):b(``,!0),N(e.$slots,`default`)]),_:3},16,[`loading`,`onClick`])):(A(),y(s,E({key:1,class:`cv-btn`},a.filteredProps,{loading:i.loadingStatus,onClick:a.handleClick}),{default:z(()=>[n.svg?(A(),y(o,{key:0,type:n.svg,size:`14`,color:`currentColor`},null,8,[`type`])):b(``,!0)]),_:1},16,[`loading`,`onClick`]))}var Ot=H(Et,[[`render`,Dt]]),kt={name:`cvBtnText`,emits:[`click`],props:{...a.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:``}},data(){return{loadingStatus:!1}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit(`click`,()=>{this.loadingStatus=!1})}catch(e){throw this.loadingStatus=!1,e}}}};function At(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`);return A(),y(s,E({class:`cv-btn`},e.$props,{link:``,loading:i.loadingStatus,onClick:a.handleClick}),{default:z(()=>[n.svg?(A(),y(o,{key:0,type:n.svg,size:`14`,color:`currentColor`},null,8,[`type`])):b(``,!0),N(e.$slots,`default`)]),_:3},16,[`loading`,`onClick`])}var jt=H(kt,[[`render`,At]]);Ot.install=function(e){e.component(Ot.name,Ot)},jt.install=function(e){e.component(jt.name,jt)};var Mt={name:`cvAutocompleteBase`,props:{...t.props},data(){return{localVal:``,loadingStatus:!1}},created(){},methods:{async querySearchAsync(e,t){}}};function Nt(e,t,n,r,i,a){let o=P(`el-autocomplete`);return A(),y(o,E({modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e},e.$props,{"fetch-suggestions":a.querySearchAsync}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`modelValue`,`fetch-suggestions`])}var Pt=H(Mt,[[`render`,Nt]]),Ft={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data(){return{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`){let e=this.loadConfigSetting,t={...e.where};t[e.request.pageName]=this.loadPageCurr,t[e.request.limitName]=this.loadPageLimit,t=Object.assign(t,this.searchData),this.loadConfigSetting.apiFunc(t).then(n=>{this.loadPageCurr=t[e.request.pageName],this.loadEnding();let r=this.sortOutData(n);if(r.status!=e.response.statusCode){ExtendMessage({message:r.msg,type:`error`,duration:1300});return}if(r.data.length===0){ExtendMessage({message:`没有更多数据了`,type:`warning`,duration:1300});return}let i=r[e.response.dataName]||[];this.dataParse&&typeof this.dataParse==`function`&&(i=this.dataParse.call(null,i)),this.loadDataList.push(...i),this.loadDataTotal=r[e.response.countName]||0}).catch(e=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(e){let t=this.loadConfigSetting.response,n={},r=[],i=[];n.status=e[t.statusName],n.msg=e[t.msgName],n.total=e[t.countName],r=e[t.dataName];for(let e in r)i[e]=r[e];return n.data=i,n}}},It={name:`cvAutocompleteLoad`,mixins:[Ft],emits:[`update:modelValue`,`input`],props:{...t.props,modelValue:{type:[String,Object,Number],default:()=>({})},placeholder:{type:[String],default:`请输入内容`},popperClass:{type:[String],default:`cv-autocomplete-load`},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default(){return`cvAutocompleteLoad-`+ +new Date+((Math.random()/1e4).toFixed(0)+``)}},compConfig:{type:[Object],default:()=>({})}},data(){return{localVal:``,searchList:[],compConfigDef:{searchField:[`value`]},timeout:null,loadingMore:!1}},directives:{loadmore:{mounted(e,t){let n=((e,t)=>{let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}})(e=>{let{scrollTop:n,scrollHeight:r,clientHeight:i}=e.target;r-(n+i)<10&&!t.instance.loading&&t.value()},200),r=new MutationObserver(()=>{let t=e.querySelector(`.el-autocomplete-suggestion__wrap`);t&&!e.__scrollHandler__&&(t.addEventListener(`scroll`,n),e.__scrollHandler__=n,r.disconnect())});r.observe(e,{childList:!0,subtree:!0})},beforeUnmount(e){if(e.__scrollHandler__){let t=e.querySelector(`.el-autocomplete-suggestion__wrap`);t&&t.removeEventListener(`scroll`,e.__scrollHandler__),delete e.__scrollHandler__}}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||10,Object.assign(e.where,this.searchData),this.loadConfigSetting=e},getMoreData(){if(!(this.loadingMore||this.loadDataList.length>=this.loadDataTotal))try{this.loadingMore=!0,this.loadPageCurr++,this.loadGetData()}finally{this.loadingMore=!1}},getData(){this.loadPageCurr=1,this.loadDataList=[],this.loadGetData()},async querySearchAsync(e,t){this.loadPageCurr=1,this.loadDataLoading=!0;var n=this.loadDataList||[];let r=[],i=this.loadConfigSetting.searchField||[`value`];if(e=e.toLowerCase(),r=e?n.filter(this.createFilter(e,i)):n,r.length>0)t(r.map(e=>({...e,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadDataList.length<this.loadDataTotal&&this.loadPageCurr++,this.searchData.keyword=e,this.loadDataList=[],await this.loadGetData();let n=this.loadDataList.map(e=>({...e,is_last_tip:!1}));n.push({is_last_tip:!0}),t(n)}catch{}finally{this.lookFlag=!0}},createFilter(e,t){return n=>t.some(t=>(n[t]+``).toLowerCase().indexOf(e)!==-1)},handleChange(e){},handleSelect(e){this.$emit(`update:modelValue`,e)}}};function Lt(e,t,n,r,i,a){let o=P(`cv-icon-svg`),s=P(`el-autocomplete`),c=Ne(`loadmore`);return B((A(),x(`div`,null,[w(s,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[1]||=e=>i.localVal=e,"fetch-suggestions":a.querySearchAsync,onChange:a.handleChange,onSelect:a.handleSelect,teleported:!1,"popper-append-to-body":!1}),{load:z(()=>[...t[2]||=[]]),default:z(({item:n})=>[n.is_last_tip?b(``,!0):N(e.$slots,`default`,O(E({key:0},{item:n}))),n.is_last_tip?(A(),x(`div`,{key:1,class:`cv-autocomolete-nodata`,onClick:t[0]||=Ge((...e)=>a.getData&&a.getData(...e),[`stop`]),disabled:``},[t[3]||=C(` 没有更多数据了 `,-1),w(o,{type:`ElIconRefreshLeft`}),t[4]||=C(` 刷新按钮 `,-1)])):b(``,!0)]),_:3},16,[`modelValue`,`fetch-suggestions`,`onChange`,`onSelect`])])),[[c,a.getMoreData]])}var Rt=H(It,[[`render`,Lt]]);Pt.install=function(e){e.component(Pt.name,Pt)},Rt.install=function(e){e.component(Rt.name,Rt)};var zt={...p,name:`cvFormBase`,extends:p,provide(){return{elForm:this}},props:{...p.props,labelWidth:{type:[String,Number],default:`auto`},labelPosition:{type:String,default:`right`}},watch:{model(){}},data(){return{}}};function Bt(e,t,n,r,i,a){let o=P(`el-form`);return A(),y(o,E({class:`cv-form-base`},{...e.$props,...e.$attrs},Le(e.$attrs)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Vt=H(zt,[[`render`,Bt]]),Ht={name:`cvFormInline`,provide(){return{elForm:this}},props:{...p.props},watch:{},data(){return{form:{}}}};function Ut(e,t,n,r,i,a){let o=P(`el-form`);return A(),y(o,E({class:`cv-form-base`},e.$props,Le(e.$attrs),{inline:!0}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Wt=H(Ht,[[`render`,Ut]]),Gt={name:`cvFormItem`,extends:m,props:{...m.props},data(){return{localLabelWidth:``,localError:``}},created(){},methods:{}},Kt={key:0,class:`cv-form-item__tip`};function qt(e,t,n,r,i,a){let o=P(`el-form-item`);return A(),y(o,O(T({...e.$props,...e.$attrs})),{default:z(()=>[N(e.$slots,`default`),e.$slots.tip?(A(),x(`div`,Kt,[N(e.$slots,`tip`)])):b(``,!0)]),_:3},16)}var Jt=H(Gt,[[`render`,qt]]);Vt.install=function(e){e.component(Vt.name,Vt)},Wt.install=function(e){e.component(Wt.name,Wt)},Jt.install=function(e){e.component(Jt.name,Jt)};var Yt={extends:_,emits:[`update:modelValue`,`change`],props:{..._.props,modelValue:{type:[Number,String],default:``},placeholder:{type:[Number,String],default:``},disabled:{type:Boolean,default:!1}},watch:{modelValue(e){this.localVal=e},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(e){this.localError=e||`请输入正确的`+this.label},_diyValidate(){},_isCheckValue(){let e=this?.rules.split(`|`);this.localError=``;for(let t in e){let n=e[t].split(`:`),r=n[0]||``,i=n[1]||``;switch(r){case`require`:if(this.localVal==``){this._showError(this.label+`不能为空`);return}break;case`max`:if(this.localVal.length>i){this._showError(this.label+`最大长度不超过`+i);return}break;case`min`:if(this.localVal.length<i){this._showError(this.label+`最小长度不小于`+i);return}break;default:this._diyValidate(r);break}}}}},Xt={name:`cvInputText`,mixins:[Yt],props:{},data(){return{}},methods:{}};function Zt(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`text`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入`,clearable:``}),ye({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.prepend?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var Qt=H(Xt,[[`render`,Zt]]),$t={name:`cvInputMobile`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function en(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`number`,oninput:`if(value.length>11)value=value.slice(0,11)`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入11位大陆手机号`,clearable:``}),ye({prepend:z(()=>[t[1]||=C(`+86`,-1)]),_:2},[e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`0`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var tn=H($t,[[`render`,en]]),nn={name:`cvInputEmail`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function rn(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`text`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入邮箱`,clearable:``}),ye({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var an=H(nn,[[`render`,rn]]),on={name:`cvInputPassword`,mixins:[Yt],components:{},props:{showPassword:{type:Boolean,default:!1}},data(){return{}},methods:{}};function sn(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`password`},{disabled:e.disabled,showPassword:n.showPassword},{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入密码`,clearable:``}),ye({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var cn=H(on,[[`render`,sn]]),ln={name:`cvInputNumber`,mixins:[Yt],props:{},data(){return{}},methods:{}};function un(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({class:`cv-number`,type:`number`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入整数`,clearable:``}),ye({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var dn=H(ln,[[`render`,un]]),fn={name:`cvInputIdcard`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function pn(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`text`,oninput:`if(value.length>18)value=value.slice(0,18)`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入身份证`,clearable:``,maxlength:`18`}),ye({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var mn=H(fn,[[`render`,pn]]),hn={name:`cvInputDigit`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function gn(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`number`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入`,clearable:``}),ye({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var _n=H(hn,[[`render`,gn]]),vn={name:`cvTextarea`,mixins:[Yt],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit(`btnClick`,this.localVal)}}};function yn(e,t,n,r,i,a){let o=P(`el-input`);return A(),y(o,E({type:`textarea`},{disabled:e.disabled,rows:a.lastRow,autosize:n.autosize},{rows:a.lastRow,modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入内容`,clearable:``}),null,16,[`rows`,`modelValue`,`onInput`,`placeholder`])}var bn=H(vn,[[`render`,yn]]),xn={name:`cvTextareaBtn`,mixins:[Yt],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:``},btnIcon:{type:[String],default:``},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit(`btnClick`,this.localVal)}}},Sn={class:`cv-textab-group`},Cn={class:`cv-textab-group__append`},wn={class:`cv-textab_slot-wrap`};function Tn(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-button`);return A(),x(`div`,Sn,[w(o,E({type:`textarea`},{disabled:e.disabled,rows:a.lastRow,autosize:n.autosize},{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入内容`,clearable:``}),null,16,[`modelValue`,`onInput`,`placeholder`]),S(`div`,Cn,[S(`div`,wn,[N(e.$slots,`default`,{},()=>[w(s,{class:`cv-textab_slotbtn`,type:`primary`,size:e.size,onClick:a.onSubmit},{default:z(()=>[n.btnIcon?(A(),x(`i`,{key:0,class:D(n.btnIcon),style:{"margin-right":`5px`}},null,2)):b(``,!0),C(` `+F(n.btnText),1)]),_:1},8,[`size`,`onClick`])])])])])}var En=H(xn,[[`render`,Tn]]),Dn={name:`cvInputBtn`,mixins:[Yt],emits:[`btnClick`],components:{},props:{btnText:{type:[Number,String],default:`确定`},btnIcon:{type:[String],default:``}},data(){return{}},methods:{onSubmit(){this.$emit(`btnClick`,this.localVal)}}},On={class:`cv-input-group`},kn={class:`cv-input-group__append`};function An(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-button`);return A(),x(`div`,On,[w(o,E({type:`text`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入`,clearable:``}),null,16,[`modelValue`,`onChange`,`onInput`,`placeholder`]),S(`div`,kn,[N(e.$slots,`default`,{},()=>[w(s,{class:`cv-input-btn__slotbtn`,type:`primary`,size:e.size,onClick:a.onSubmit},{default:z(()=>[n.btnIcon?(A(),x(`i`,{key:0,class:D(n.btnIcon),style:{"margin-right":`5px`}},null,2)):b(``,!0),C(` `+F(n.btnText),1)]),_:1},8,[`size`,`onClick`])])])])}var jn=H(Dn,[[`render`,An]]),Mn={data(){return{formData:{}}}};function Nn(e,t,n,r,i,a){return A(),x(`div`)}var Pn=H(Mn,[[`render`,Nn]]);tn.install=function(e){e.component(tn.name,tn)},an.install=function(e){e.component(an.name,an)},cn.install=function(e){e.component(cn.name,cn)},dn.install=function(e){e.component(dn.name,dn)},mn.install=function(e){e.component(mn.name,mn)},_n.install=function(e){e.component(_n.name,_n)},bn.install=function(e){e.component(bn.name,bn)},En.install=function(e){e.component(En.name,En)},jn.install=function(e){e.component(jn.name,jn)},Pn.install=function(e){e.component(Pn.name,Pn)};var Fn={name:`cvInputCounter`,extends:te,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data(){return{localVal:0}},created(){},methods:{handleChange(e){this.$emit(`update:modelValue`,this.localVal)}}};function In(e,t,n,r,i,a){let o=P(`el-input-number`);return A(),y(o,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,onChange:a.handleChange,step:e.step}),null,16,[`modelValue`,`onChange`,`step`])}var Ln=H(Fn,[[`render`,In]]);Ln.install=function(e){e.component(Ln.name,Ln)};var Rn={name:`cvShowText`,mixins:[],components:{},props:{text:{type:[Number,String,Object],default:``}},data(){return{}},created(){},methods:{}},zn={class:`cv-show-text`},Bn=[`innerHTML`];function Vn(e,t,n,r,i,a){return A(),x(`div`,zn,[n.text?(A(),x(`div`,{key:0,innerHTML:n.text},null,8,Bn)):b(``,!0),n.text?b(``,!0):N(e.$slots,`default`,{key:1})])}var Hn=H(Rn,[[`render`,Vn]]),Un={name:`cvShowImage`,mixins:[],components:{},props:{url:{type:[String,Array,Object],default:``},width:{type:[String],default:`100px`},height:{type:[String],default:`100px`}},data(){return{localUrl:``}},watch:{url:{handler(){this.localUrl=typeof this.url==`string`?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},Wn={class:`cv-show-image`};function Gn(e,t,n,r,i,a){let o=P(`el-image`);return A(),x(`div`,Wn,[(A(!0),x(v,null,M(i.localUrl,(e,t)=>(A(),y(o,{style:k(`width:`+n.width+`; height:`+n.height+`; margin-right:10px`),key:t,src:e,"preview-src-list":i.localUrl},null,8,[`style`,`src`,`preview-src-list`]))),128))])}var Kn=H(Un,[[`render`,Gn]]),qn={name:`cvShowTip`,props:{borderColor:{type:[String],default:`#50bfff`},bgColor:{type:[String],default:`#ecf8ff`}},data(){return{backgroundColor:`#ecf8ff`,borderLeft:`5px solid #50bfff`}},created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}};function Jn(e,t,n,r,i,a){return A(),x(`div`,{class:`cv-show-tip`,style:k({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[N(e.$slots,`default`)],4)}var Yn=H(qn,[[`render`,Jn]]),Xn={name:`cv-gallery-dialog`,props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data(){return{isShowCarousel:!1,sourceTitle:``,initialIndex:0,isShowPreview:!1}},methods:{startPreview(e){this.isShowPreview=!0,this.initialIndex=e,this.sourceTitle=this.sources[e].title},handleCarouselChange(e){this.sources[e]&&this.sources[e].title?this.sourceTitle=this.sources[e].title:this.sourceTitle=``}}},Zn=[`src`],Qn={key:0,class:`cv-gallery-iframe embed-responsive embed-responsive-16by9`},$n=[`src`],er=[`src`],tr=[`src`];function nr(e,t,n,r,i,a){let o=P(`el-carousel-item`),s=P(`el-carousel`),c=P(`el-dialog`);return A(),y(c,{visible:i.isShowPreview,"append-to-body":``,onOpen:t[0]||=e=>i.isShowCarousel=!0,onClosed:t[1]||=e=>i.isShowCarousel=!1,style:{"text-align":`center`}},{header:z(()=>[C(F(i.sourceTitle||n.title),1)]),default:z(()=>[n.type===`video`?(A(),x(v,{key:0},[i.isShowPreview?(A(),x(`video`,{key:0,src:n.sources[i.initialIndex].src,autoplay:`autoplay`,class:`cv-gallery-video`,controls:`controls`,width:`100%`},null,8,Zn)):b(``,!0)],64)):n.type===`iframe`?(A(),x(v,{key:1},[i.isShowPreview?(A(),x(`div`,Qn,[S(`iframe`,{src:n.sources[i.initialIndex].src,allowfullscreen:`true`,border:`0`,frameborder:`no`,framespacing:`0`,scrolling:`no`},null,8,$n)])):b(``,!0)],64)):n.type===`image`?(A(),x(v,{key:2},[n.sliceSingle&&n.sources[i.initialIndex]||n.sources.length===1?(A(),x(`img`,{key:0,src:n.sources[i.initialIndex].src,class:`cv-gallery-image`},null,8,er)):(A(),x(v,{key:1},[i.isShowCarousel?(A(),y(s,E({key:0,"initial-index":i.initialIndex,onChange:a.handleCarouselChange,"indicator-position":`outside`},n.carouselAttrs),{default:z(()=>[(A(!0),x(v,null,M(n.sources,(e,t)=>(A(),y(o,{key:t},{default:z(()=>[S(`img`,{src:e.src,class:`cv-gallery-image`},null,8,tr)]),_:2},1024))),128))]),_:1},16,[`initial-index`,`onChange`])):b(``,!0)],64))],64)):b(``,!0)]),_:1},8,[`visible`])}var rr={name:`gallery`,components:{GalleryDialog:H(Xn,[[`render`,nr]])},props:{type:{type:String,default:`image`,validator(e){return[`image`,`video`,`iframe`].includes(e)}},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:{type:String,default:``},thumbStyle:Object,carouselAttrs:Object,title:String,sliceSingle:{type:Boolean,default:!1}},data(){return{}},computed:{computedStyle(){let e=this.width||this.size,t=this.height||this.size;return this.type===`iframe`&&(e=e?e+`px`:`360px`,t=t?t+`px`:`auto`),Object.assign({},{width:e,height:t,display:`block`},this.thumbStyle)},thumbs(){return this.computedSources.map(e=>e.thumb)},computedSources(){let e=this.source;if(typeof e==`string`)return[this.getStringSource(e)];if(e instanceof Array){let t=[];return e.forEach(e=>{e instanceof Object?t.push(this.getObjectSource(e)):typeof e==`string`&&t.push(this.getStringSource(e))}),t}else if(e instanceof Object)return[this.getObjectSource(e)];else return[]}},methods:{handlePreview(e){this.$refs.dialog.startPreview(e)},getStringSource(e){let t=e;return this.type===`image`&&this.thumbSuffix&&(t+=this.thumbSuffix),{type:this.type,src:e,thumb:t}},getObjectSource(e){return e.type=e.thumb?`image`:this.type,e.thumb=e.thumb||e.src,e}}},ir={key:0,class:`cv-gallery`},ar={class:`el-upload-list el-upload-list--picture-card`},or=[`src`],sr={class:`el-upload-list__item-actions`},cr=[`onClick`];function lr(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`GalleryDialog`);return n.source?(A(),x(`div`,ir,[S(`div`,ar,[(A(!0),x(v,null,M(a.computedSources,(t,n)=>(A(),x(`li`,{key:n,class:`el-upload-list__item`},[S(`div`,{style:k(a.computedStyle),class:`cv-gallery-iframe embed-responsive embed-responsive-16by9`},[S(`iframe`,{src:t.thumb,allowfullscreen:`true`,border:`0`,frameborder:`no`,framespacing:`0`,scrolling:`no`},null,8,or)],4),S(`span`,sr,[S(`span`,{onClick:e=>a.handlePreview(n,t)},[w(o,{type:`ElIconVideoPlay`,size:`20`})],8,cr),N(e.$slots,`action`,E({ref_for:!0},{source:t,index:n}))])]))),128))]),w(s,{carouselAttrs:n.carouselAttrs,sliceSingle:n.sliceSingle,sources:a.computedSources,title:n.title,type:n.type,ref:`dialog`},null,8,[`carouselAttrs`,`sliceSingle`,`sources`,`title`,`type`])])):b(``,!0)}var ur=H(rr,[[`render`,lr]]);Hn.install=function(e){e.component(Hn.name,Hn)},Kn.install=function(e){e.component(Kn.name,Kn)},Yn.install=function(e){e.component(Yn.name,Yn)},ur.install=function(e){e.component(ur.name,ur)};var dr={name:`cvRadioOptBase`};function fr(e,t,n,r,i,a){let o=P(`el-radio`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var pr=H(dr,[[`render`,fr]]),mr={name:`cvRadioOptBtn`};function hr(e,t,n,r,i,a){let o=P(`el-radio-button`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var gr=H(mr,[[`render`,hr]]),_r={name:`cvRadioGroup`};function vr(e,t,n,r,i,a){let o=P(`el-radio-group`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var yr=H(_r,[[`render`,vr]]);pr.install=function(e){e.component(pr.name,pr)},gr.install=function(e){e.component(gr.name,gr)},yr.install=function(e){e.component(yr.name,yr)};var br={name:`cvCheckboxOptBase`,extends:s};function xr(e,t,n,r,i,a){let o=P(`el-checkbox`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Sr=H(br,[[`render`,xr]]),Cr={name:`cvCheckboxOptBtn`,extends:c,props:{}};function wr(e,t,n,r,i,a){let o=P(`el-checkbox-button`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Tr=H(Cr,[[`render`,wr]]),Er={name:`cvCheckboxAll`,mixins:[{props:{...l.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 e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]==`string`)this.dataLists.map(t=>{e.push({label:t,value:t})}),this.localOpt=e;else{var t=this.dataField&&this.dataField.label||`label`,n=this.dataField&&this.dataField.value||`value`;this.dataLists.map(r=>{let i=r[t]===0?0:r[t]||``,a=r[n]===0?0:r[n]||``;a=a===0?0:a||i,e.push({label:i,value:a,disabled:r.disabled&&!0||!1}),(r.checked==`true`||r.checked==1)&&(typeof this.localVal==`string`?this.localVal=a:typeof this.localVal==`object`&&this.localVal.push(a))}),this.localOpt=e}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}}],components:{},data(){return{checkAll:!1,isIndeterminate:!0,localOptAll:[]}},methods:{handleCheckAllChange(e){this.localVal=e?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(e){let t=e.length;this.checkAll=t===this.localOptAll.length,this.isIndeterminate=t>0&&t<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(e=>{e.disabled||this.localOptAll.push(e.label)})}}},Dr={class:`cv-checkbox-all`};function Or(e,t,n,r,i,a){let o=P(`el-checkbox`),s=P(`el-checkbox-group`);return A(),x(`div`,Dr,[w(o,{indeterminate:i.isIndeterminate,modelValue:i.checkAll,"onUpdate:modelValue":t[0]||=e=>i.checkAll=e,onChange:a.handleCheckAllChange},{default:z(()=>[...t[2]||=[C(`全选`,-1)]]),_:1},8,[`indeterminate`,`modelValue`,`onChange`]),t[3]||=S(`div`,{style:{margin:`15px 0`}},null,-1),w(s,{modelValue:e.localVal,"onUpdate:modelValue":t[1]||=t=>e.localVal=t,onChange:a.handleCheckedCitiesChange},{default:z(()=>[N(e.$slots,`default`,{},()=>[(A(!0),x(v,null,M(e.localOpt,(t,n)=>(A(),y(o,{value:t.value,key:n,onChange:e.handleChange,disabled:e.disabled||t.disabled},{default:z(()=>[C(F(t.label),1)]),_:2},1032,[`value`,`onChange`,`disabled`]))),128))])]),_:3},8,[`modelValue`,`onChange`])])}var kr=H(Er,[[`render`,Or]]),Ar={name:`cvCheckboxGroup`};function jr(e,t,n,r,i,a){let o=P(`el-checkbox-group`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Mr=H(Ar,[[`render`,jr]]);Sr.install=function(e){e.component(Sr.name,Sr)},Tr.install=function(e){e.component(Tr.name,Tr)},Mr.install=function(e){e.component(Mr.name,Mr)},kr.install=function(e){e.component(kr.name,kr)};function Nr(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function Pr(e,t,n){var r=(n||{}).atBegin;return Nr(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}function Fr(e,t=!1){let n=document.createElement(`link`);n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`type`,`text/css`),n.setAttribute(`id`,e),t?n.setAttribute(`href`,e+`?t=`+new Date().getTime()):n.setAttribute(`href`,e),document.getElementById(e)||document.head.appendChild(n)}function Ir(e,t=!1,n=!0){return new Promise((r,i)=>{let a=document.createElement(`script`);e=e.replace(/([^:]\/)\/+/g,`$1`),a.id=e,a.type=`text/javascript`,t?a.src=e+`?t=`+new Date().getTime():a.src=e,document.getElementById(e)&&n?r():(document.body.appendChild(a),a.onload=()=>{r()})})}function Lr(e){let t=e;try{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`Copy`),e.remove(),document.body.removeChild(e)}catch{navigator.clipboard.writeText(t).then(()=>{}).catch(e=>{})}re({message:`复制成功`,type:`success`})}function Rr(e){if(/^\d{8}T\d{6}Z$/.test(e)){let t=e.replace(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/,`$1-$2-$3T$4:$5:$6Z`);return new Date(t)}return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$/.test(e)?new Date(e):/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?new Date(e.replace(` `,`T`)):new Date(e)}function zr(e){var t=new Date,n=new Date(e),r=t-n,i=Math.floor(r/1e3),a=Math.floor(i/60),o=Math.floor(a/60);if(a<1)var s=i+`秒前`;else if(o<1)var s=a+`分钟前`;else if(o<24)var s=o+`小时前`;else var s=n.toLocaleString();return s}function Br(e,...t){return t.reduce((e,t)=>Object.keys(t).reduce((e,n)=>{let r=t[n];return Hr(r)?e[n]=Br(e[n]?e[n]:{},r):Ur(r)?e[n]=r.map((t,r)=>{if(Hr(t)){let i=e[n]?e[n]:[];return Br(i[r]?i[r]:{},t)}else return t}):e[n]=r,e},e),e)}function Vr(e,t){let{[t[0]]:n,...r}=e;return Object.keys(e).reduce((n,r)=>(t.includes(r)||(n[r]=e[r]),n),{})}function Hr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ur(e){return typeof Array.isArray==`function`?Array.isArray(e):Object.prototype.toString.call(e)===`[object Array]`}function Wr(e){return Ur(e)?e.length===0:Hr(e)?Object.keys(e).length===0:e===``||e==null}function Gr(e,t){return Wr(e)?t:e}function Kr(e){let t=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`],n=e.lastIndexOf(`.`),r=e.substring(n+1);return t.indexOf(r.toLowerCase())!=-1}function qr(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)}function Jr(e){return e==null?``:String(e)}Number(document.documentMode),(function(){return document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent(`on`+t,n)}})(),(function(){return document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent(`on`+t,n)}})();function Yr(e){return window.URL?window.URL.createObjectURL(e):window.webkitURL?window.webkitURL.createObjectURL(e):``}var Xr=(()=>{let e={svg:[`image/svg+xml`,`image/svg`],jpg:[`image/jpeg`,`image/jpg`],jpeg:[`image/jpeg`],png:[`image/png`],gif:[`image/gif`],webp:[`image/webp`],bmp:[`image/bmp`,`image/x-bmp`,`image/x-ms-bmp`],ico:[`image/x-icon`,`image/vnd.microsoft.icon`],tiff:[`image/tiff`,`image/tif`,`image/x-tiff`],apng:[`image/apng`],avif:[`image/avif`],heic:[`image/heic`],pdf:[`application/pdf`],txt:[`text/plain`],csv:[`text/csv`],json:[`application/json`],xml:[`application/xml`],doc:[`application/msword`],docx:[`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],xls:[`application/vnd.ms-excel`],xlsx:[`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],ppt:[`application/vnd.ms-powerpoint`],pptx:[`application/vnd.openxmlformats-officedocument.presentationml.presentation`],zip:[`application/zip`],rar:[`application/x-rar-compressed`],"7z":[`application/x-7z-compressed`],mp3:[`audio/mpeg`],mp4:[`video/mp4`],mov:[`video/quicktime`],avi:[`video/x-msvideo`],wav:[`audio/wav`]},t={},n={};for(let[r,i]of Object.entries(e)){t[r]=i[0];for(let e of i)n[e]=r}return{extensionToMime:t,mimeToExtension:n}})();function Zr(e){if(!e)return`jpg`;let t=e.toLowerCase().trim();return Xr.mimeToExtension[t]||`jpg`}function Qr(e){if(!e)return``;let t=e.replace(/^\./,``).toLowerCase();return Xr.extensionToMime[t]||``}function $r(){let e=new Date;return[e.getFullYear(),String(e.getMonth()+1).padStart(2,`0`),String(e.getDate()).padStart(2,`0`),String(e.getHours()).padStart(2,`0`),String(e.getMinutes()).padStart(2,`0`),String(e.getSeconds()).padStart(2,`0`)].join(``)+Math.random().toString(36).substring(2,10)}var ei={name:`cvGeoCity`,mixins:[],components:{},emits:[`update:province`,`update:city`,`update:district`,`update:provinceCode`,`update:cityCode`,`update:districtCode`],props:{modelValue:{type:[String,Array,Number],default(){return[]}},province:{type:[String]},provinceCode:{type:[Number,String],default:``},city:{type:[String]},cityCode:{type:[Number,String],default:``},district:{type:[String]},districtCode:{type:[Number,String],default:``},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1}},watch:{modelValue(e){},province(e){this.initProvince()},provinceCode(e){this.initProvince()},cityCode(e){this.initCity()},districtCode(e){this.initDistrict()}},data(){return{provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],local1_code:``,local1_name:``,local2_code:``,local2_name:``,local3_code:``,local3_name:``,local1_flag:!1,local2_flag:!1,local3_flag:!1,hideMunicipality:!1,municipalities:[`110000`,`120000`,`310000`,`500000`,`北京市`,`天津市`,`上海市`,`重庆市`]}},async mounted(){await Ir(this.CDN_URL_UI+`/dict/geo/province-kv-window.js`),await Ir(this.CDN_URL_UI+`/dict/geo/city-kv-window.js`),await Ir(this.CDN_URL_UI+`/dict/geo/district-kv-window.js`),await this.initLoad()},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.local1_flag=!1,this.isCdnLoading=!1,this.getProvinces(),this.initProvince()},200)},initProvince(){if(!this.province&&!this.provinceCode)return!1;this.getProvinces();let e=this.provinceList.find(e=>this.province?e.provinceName===this.province:this.provinceCode&&e.provinceCode===this.provinceCode);e&&(this.local1_code=e.provinceCode,this.changeProvince(e.provinceCode)),this.initCity()},initCity(){if(!this.city&&!this.cityCode)return!1;let e=this.cityList.find(e=>this.city?e.cityName===this.city:this.cityCode&&e.cityCode===this.cityCode);e&&(this.local2_code=e.cityCode,this.changeCity(e.cityCode)),this.initDistrict()},initDistrict(){if(!this.district&&!this.districtCode)return!1;let e=this.districtList.find(e=>this.district?e.districtName===this.district:this.districtCode&&e.districtCode===this.districtCode);e&&this.changeDistrict(e.districtCode)},getProvinces(){if(!this.local1_flag&&typeof this.provinceCdnList==`object`){let e=[];for(let t in this.provinceCdnList)e.push({provinceCode:t,provinceName:this.provinceCdnList[t]});this.provinceList=e,this.local1_flag=!0}},changeProvince(e){this._getNeedCity(),this.local2_flag=!0,this.local2_code=``,this.local2_name=``,this.local3_code=``,this.local3_name=``,this.local1_code=e,this.local1_name=this.provinceList.find(t=>t.provinceCode===e)?.provinceName,this.handleChoose()},_getNeedCity(){let e=[],t=this.local1_code.substring(0,2);for(let n in this.cityCdnList)n.substring(0,2)==t&&e.push({cityCode:n,cityName:this.cityCdnList[n]});this.cityList=e},getCities(){this.local2_flag||this.provinceCode&&(this._getNeedCity(),this.local2_flag=!0)},changeCity(e){this._getNeedDistrict(),this.local3_flag=!0,this.local3_name=``,this.local3_code=``,this.local2_code=e,this.local2_name=this.cityList.find(t=>t.cityCode===e)?.cityName,this.handleChoose()},_getNeedDistrict(){let e=[],t=this.local2_code.substring(0,4);for(let n in this.districtCdnList)n.substring(0,4)==t&&e.push({districtCode:n,districtName:this.districtCdnList[n]});this.districtList=e},getDistrict(){this.local3_flag||this.local2_code&&this._getNeedDistrict()},changeDistrict(e){this.local3_code=e,this.local3_name=this.districtList.find(t=>t.districtCode===e)?.districtName,this.handleChoose()},handleChoose(){this.$emit(`update:province`,this.local1_name),this.$emit(`update:provinceCode`,this.local1_code),this.$emit(`update:city`,this.local2_name),this.$emit(`update:cityCode`,this.local2_code),this.$emit(`update:district`,this.local3_name),this.$emit(`update:districtCode`,this.local3_code)}}},ti={class:`cv-geo-city`},ni={key:0},ri={key:1};function ii(e,t,n,r,i,a){let o=P(`el-option`),s=P(`el-select`),c=Ne(`loading`);return B((A(),x(`div`,ti,[S(`div`,null,[w(s,{modelValue:i.local1_code,"onUpdate:modelValue":t[0]||=e=>i.local1_code=e,onFocus:a.getProvinces,onChange:a.changeProvince,placeholder:`省`,filterable:``},{default:z(()=>[(A(!0),x(v,null,M(i.provinceList,(e,t)=>(A(),y(o,{key:e.provinceCode,label:e.provinceName,value:e.provinceCode},{default:z(()=>[C(F(e.provinceName),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onFocus`,`onChange`])]),n.cityHide?b(``,!0):(A(),x(`div`,ni,[w(s,{modelValue:i.local2_code,"onUpdate:modelValue":t[1]||=e=>i.local2_code=e,onFocus:a.getCities,onChange:a.changeCity,placeholder:`市`,filterable:``},{default:z(()=>[(A(!0),x(v,null,M(i.cityList,(e,t)=>(A(),y(o,{key:e.cityCode,label:e.cityName,value:e.cityCode},{default:z(()=>[C(F(e.cityName),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onFocus`,`onChange`])])),!n.cityHide&&!n.districtHide?(A(),x(`div`,ri,[w(s,{modelValue:i.local3_code,"onUpdate:modelValue":t[2]||=e=>i.local3_code=e,onFocus:a.getDistrict,onChange:a.changeDistrict,placeholder:`区/县`,filterable:``},{default:z(()=>[(A(!0),x(v,null,M(i.districtList,(e,t)=>(A(),y(o,{key:e.districtCode,label:e.districtName,value:e.districtCode},{default:z(()=>[C(F(e.districtName),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onFocus`,`onChange`])])):b(``,!0)])),[[c,i.isCdnLoading]])}var ai=H(ei,[[`render`,ii]]),oi={computed:{componentName(){return this.$options.name}},methods:{_mergeAttrs(e){let t=this.$cvUiParams||{},n=e&&t[e]||{},r=t[this.componentName]||{},i=Object.assign({},n,r);return Object.assign({},i,this.$attrs)}}},si={name:`cvGeoMap`,mixins:[oi],emits:[`update:address`,`update:latitude`,`update:longitude`,`update:name`,`update:city`],props:{title:{type:[String],default:`选择经纬度地点`},mapKey:{type:[String],default:``},mapSecret:{type:[String],default:``},mapType:{type:[String],default:`qq`},address:{type:[String]},name:{type:[String]},city:{type:[String]},latitude:{type:[Number,String]},longitude:{type:[Number,String]}},watch:{address(e){this.localAddress=e},latitude(e){this.localLatitude=e},longitude(e){this.localLongitude=e},name(e){this.localName=e},city(e){this.localCity=e}},computed:{localMapKey(){return this._mergeAttrs(`geo`).mapKey},localMapSecret(){return this._mergeAttrs(`geo`).mapSecret},mapSrc(){let e=this.localMapKey;if(this.mapType==`qq`){if(!this.localMapKey)return``;let t=`https://apis.map.qq.com/tools/locpicker`;return t+=`?search=1&type=1&key=${e}&referer=myapp`,this.latitude&&this.longitude&&(t+=`&coord=${this.latitude},${this.longitude}`),t}else if(this.mapType==`amap`){if(!this.localMapKey||!this.localMapSecret)return``;let t=`https://m.amap.com/picker/`;return t+=`?zoom=15&radius=1000&total=20&key=${e}&jscode=${localMapSecret}`,this.latitude&&this.longitude&&(t+=`¢er=${this.longitude},${this.latitude}`),t}else return this.$message.info(`目前不支持百度地图`),``}},data(){return{localMapShow:!1,localAddress:``,localLatitude:``,localLongitude:``,localName:``,localCity:``}},mounted(){this.initData()},methods:{initData(){let e=this;window.addEventListener(`message`,t=>{let n=t.data;n&&n.module==`locationPicker`&&(e.localAddress=n.poiaddress||``,e.localName=n.poiname||``,e.localCity=n.cityname||``,e.localLatitude=n.latlng.lat||``,e.localLongitude=n.latlng.lng||``)},!1)},handleMapClose(){this.localMapShow=!1},handleMapOpen(){this.localMapShow=!0},handleConfirm(){this.$emit(`update:address`,this.localAddress),this.$emit(`update:longitude`,this.localLongitude),this.$emit(`update:latitude`,this.localLatitude),this.$emit(`update:name`,this.localName),this.$emit(`update:city`,this.localCity),this.handleMapClose()},handleCopy(e){this.$cvCopy(e)}}},ci={class:`cv-geo-map__wrap`},li={class:`cv-geo-map__box`},ui={style:{width:`100%`,height:`510px`}},di=[`src`],fi={class:`cv-geo-map__info`},pi={key:0,class:`cv-geo-map__address`},mi={key:1,class:`cv-geo-map__jwd`};function hi(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-tooltip`),c=P(`el-button`),l=P(`el-scrollbar`),u=P(`el-dialog`);return A(),x(v,null,[S(`div`,ci,[S(`div`,li,[w(s,{class:`item`,effect:`dark`,content:`请点击查找位置选择位置`,placement:`bottom`},{default:z(()=>[w(o,{modelValue:i.localAddress,"onUpdate:modelValue":t[0]||=e=>i.localAddress=e},null,8,[`modelValue`])]),_:1}),w(c,{type:`primary`,icon:`ElIconSearch`,onClick:a.handleMapOpen},{default:z(()=>[...t[5]||=[C(`请查找位置`,-1)]]),_:1},8,[`onClick`])])]),w(u,{modelValue:i.localMapShow,"onUpdate:modelValue":t[4]||=e=>i.localMapShow=e,title:n.title,width:`520`,"before-close":a.handleMapClose},{footer:z(()=>[S(`div`,fi,[i.localAddress?(A(),x(`div`,pi,[t[6]||=S(`span`,{class:`cv-geo-map__label`},`已选:`,-1),w(s,{class:`item`,effect:`dark`,content:`点击复制`,placement:`bottom`},{default:z(()=>[S(`span`,{class:`cv-geo-map__value`,onClick:t[1]||=e=>a.handleCopy(i.localAddress)},F(i.localAddress),1)]),_:1})])):b(``,!0),i.localAddress?(A(),x(`div`,mi,[t[7]||=S(`span`,{class:`cv-geo-map__label`},`经度:`,-1),w(s,{class:`item`,effect:`dark`,content:`点击复制`,placement:`bottom`},{default:z(()=>[S(`span`,{class:`cv-geo-map__value`,onClick:t[2]||=e=>a.handleCopy(i.localLongitude)},F(i.localLongitude),1)]),_:1}),t[8]||=S(`span`,{class:`cv-geo-map__label`},`纬度:`,-1),w(s,{class:`item`,effect:`dark`,content:`点击复制`,placement:`bottom`},{default:z(()=>[S(`span`,{class:`cv-geo-map__value`,onClick:t[3]||=e=>a.handleCopy(i.localLatitude)},F(i.localLatitude),1)]),_:1})])):b(``,!0)]),S(`div`,null,[w(c,{onClick:a.handleMapClose},{default:z(()=>[...t[9]||=[C(`取消`,-1)]]),_:1},8,[`onClick`]),w(c,{type:`primary`,onClick:a.handleConfirm,disabled:!i.localAddress},{default:z(()=>[...t[10]||=[C(`确认选择`,-1)]]),_:1},8,[`onClick`,`disabled`])])]),default:z(()=>[S(`div`,ui,[w(l,{style:{height:`510px`}},{default:z(()=>[S(`iframe`,{id:`mapPage`,width:`100%`,height:`100%`,style:{height:`500px`},frameborder:`0`,src:a.mapSrc},null,8,di)]),_:1})])]),_:1},8,[`modelValue`,`title`,`before-close`])],64)}var gi=H(si,[[`render`,hi]]);ai.install=function(e){e.component(ai.name,ai)},gi.install=function(e){e.component(gi.name,gi)};var _i={...oe,extends:oe,name:`cvSelectOpt`},vi={name:`cvSelectBase`,emits:[`onChoose`,`change`,`update:modelValue`],props:{...ue.props,modelValue:{type:[String,Array,Number],default(){return``}},emptyValues:{type:[Array],default:[null,void 0]},dataLists:{type:[Array],default(){return[]}},dataField:{type:[Object],default(){return{}}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:`请选择`}},watch:{modelValue(e){this.localVal=e},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(e){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(e,t){this.$emit(`onChoose`,e,t)},handleChange(){this.$emit(`change`,this.localVal),this.$emit(`update:modelValue`,this.localVal)},_parseLocalOpt(){let e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]==`string`)this.dataLists.map(t=>{e.push({label:t,value:t})}),this.localOpt=e;else{var t=this.dataField&&this.dataField.label||`label`,n=this.dataField&&this.dataField.value||`value`;this.dataLists.map(r=>{let i=r[t]===0?0:r[t]||``,a=r[n]===0?0:r[n]||``;if(a=a===0?0:a||i,this.dataDisabled.length>0)for(let e in this.dataDisabled)this.dataDisabled[e][n]==a&&(r.disabled=!0);e.push({label:i,value:a,disabled:r.disabled&&!0||!1}),(r.checked==`true`||r.checked==1)&&(typeof this.localVal==`string`?this.localVal=a:typeof this.localVal==`object`&&this.localVal.push(a))}),this.localOpt=e}}}};function yi(e,t,n,r,i,a){let o=P(`el-option`),s=P(`el-select`);return A(),y(s,E({class:`cv-select-base`},e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,size:e.size,filterable:``,clearable:``}),{default:z(()=>[N(e.$slots,`default`,{},()=>[(A(!0),x(v,null,M(i.localOpt,(e,t)=>(A(),y(o,{key:t,label:e.label,value:e.value,disabled:e.disabled,onClick:n=>a.handleChoose(e,t)},null,8,[`label`,`value`,`disabled`,`onClick`]))),128))])]),_:3},16,[`modelValue`,`size`])}var bi=H(vi,[[`render`,yi]]),xi={name:`cvSelectTree`,emits:[`update:modelValue`,`change`],props:{...ue.props,modelValue:{type:[String,Array,Number],default(){return``}},dataLists:{type:[Array],default(){return[]}},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(){return[]}},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(){return`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(){return{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 e=this.$refs[this.refID+`tree`].getNode(this.localVal);e&&(this.localTitle=e.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 e=document.querySelectorAll(`.cv-select-tree .el-scrollbar .el-select-dropdown__wrap`)[0],t=document.querySelectorAll(`.cv-select-tree .el-scrollbar .el-scrollbar__bar`);e.style.cssText=`margin: 0px; max-height: none; overflow: hidden;`,t.forEach(e=>e.style.width=0)})},handleNodeClick(e,t,n){e.disabled||(this.localTitle=e[this.dataField.label],this.localVal=e[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(e=>e.classList.remove(`is-current`))},handleChange(){this.$emit(`change`,this.localVal),this.$emit(`update:modelValue`,this.localVal)},_parseLocalOpt(){let e=this.dataLists;this.dataField&&this.dataField.label;let t=this.dataField&&this.dataField.value||`value`,n=this.dataField&&this.dataField.children||`children`,r=this.dataDisabled;i(e);function i(e){for(let a in e)r.map(n=>{e[a][t]==n[t]&&(e[a].disabled=!0)}),e[a][n]&&i(e[a][n])}this.localOpt=e}}};function Si(e,t,n,r,i,a){let o=P(`el-tree`),s=P(`el-option`),c=P(`el-select`);return A(),y(c,E(e.$props,{ref:n.refID,"popper-class":`cv-select-tree`,modelValue:i.localTitle,onClear:a.clearHandle}),{default:z(()=>[w(s,{value:i.localTitle,label:i.localTitle,class:`options`},{default:z(()=>[w(o,{"highlight-current":``,id:n.refID+`tree`,ref:n.refID+`tree`,accordion:n.accordion,showCheckbox:n.showCheckbox,data:i.localOpt,props:n.dataField,"node-key":n.dataField.value,onNodeClick:a.handleNodeClick,"default-expand-all":n.defaultExpandAll},null,8,[`id`,`accordion`,`showCheckbox`,`data`,`props`,`node-key`,`onNodeClick`,`default-expand-all`])]),_:1},8,[`value`,`label`])]),_:1},16,[`modelValue`,`onClear`])}var Ci=H(xi,[[`render`,Si],[`__scopeId`,`data-v-a62c37b7`]]);_i.install=function(e){e.component(_i.name,_i)},bi.install=function(e){e.component(bi.name,bi)},Ci.install=function(e){e.component(Ci.name,Ci)};var wi={name:`cvCascaderBase`,components:{},props:{...o.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default(){return[]}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:`请选择`},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default(){return{}}},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 e=this.dataLists,t=this.dataField&&this.dataField.value||`value`,n=this.dataDisabled;r(e);function r(e){for(let i in e)n.map(n=>{e[i][t]==n[t]&&(e[i].disabled=!0)}),e[i].children&&r(e[i].children)}this.localOpt=e},getCheckedNodes(){}}},Ti={class:`cv-cascader-base block`};function Ei(e,t,n,r,i,a){let o=P(`el-cascader`);return A(),x(`div`,Ti,[w(o,E(e.$props,{props:a.props2,modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,options:i.localOpt,onChange:a.handleChange,onGetCheckedNodes:a.getCheckedNodes}),null,16,[`props`,`modelValue`,`options`,`onChange`,`onGetCheckedNodes`])])}var Di=H(wi,[[`render`,Ei]]);Di.install=function(e){e.component(Di.name,Di)};var Oi={props:{...he.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat==`timestamp`){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(e=>{if(!isNaN(e)&&e.toString().length==10)return e*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat==`timestamp`){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(e=>{if(!isNaN(e)&&e.toString().length==13)return parseInt(e/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit(`update:modelValue`,e)}else !isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit(`update:modelValue`,e));return}this.$emit(`update:modelValue`,this.localVal)}},data(){return{localVal:``}},created(){},methods:{}},ki={name:`cvTimeBase`,mixins:[Oi],props:{format:{type:String,default:`HH:mm:ss`},valueFormat:{type:String,default:`HH:mm:ss`},placeholder:{type:[String,Number],default:`选择时间`}}};function Ai(e,t,n,r,i,a){let o=P(`el-time-picker`);return A(),y(o,E({class:`cv-timePicker-base`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,format:n.format,"picker-options":{}}),null,16,[`modelValue`,`format`])}var ji=H(ki,[[`render`,Ai]]),Mi={name:`cvTimeRange`,mixins:[Oi],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:`结束时间`}}};function Ni(e,t,n,r,i,a){let o=P(`el-time-picker`);return A(),y(o,E({class:`cv-timePicker-range`},e.$props,{"is-range":``,modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,format:n.format,"range-separator":n.rangeSeparator,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder}),null,16,[`modelValue`,`format`,`range-separator`,`start-placeholder`,`end-placeholder`])}var Pi=H(Mi,[[`render`,Ni]]),Fi={name:`cvTimeSelect`};function Ii(e,t,n,r,i,a){let o=P(`el-time-select`);return A(),y(o,E({class:`cv-time-select`},e.$props),null,16)}var Li=H(Fi,[[`render`,Ii]]),Ri={props:{...u.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat==`timestamp`){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(e=>{if(!isNaN(e)&&e.toString().length==10)return e*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat==`timestamp`){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(e=>{if(!isNaN(e)&&e.toString().length==13)return parseInt(e/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit(`update:modelValue`,e)}else !isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit(`update:modelValue`,e));return}this.$emit(`update:modelValue`,this.localVal)}},data(){return{localVal:``}}},zi={name:`cvDateBase`,mixins:[Ri],props:{format:{type:String,default:`YYYY-MM-DD`},valueFormat:{type:String,default:`YYYY-MM-DD`},placeholder:{type:[String,Number],default:`选择日期`}},data(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:`今天`,onClick(e){e.$emit(`pick`,new Date)}},{text:`昨天`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,t)}},{text:`一周前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*7),e.$emit(`pick`,t)}},{text:`一个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*30),e.$emit(`pick`,t)}},{text:`三个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*90),e.$emit(`pick`,t)}},{text:`六个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*180),e.$emit(`pick`,t)}},{text:`一年前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*365),e.$emit(`pick`,t)}}]}}}};function Bi(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),y(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`date`,"value-format":n.valueFormat,placeholder:n.placeholder,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`placeholder`,`picker-options`])}var Vi=H(zi,[[`render`,Bi]]),Hi={name:`cvDateRange`,mixins:[Ri],props:{valueFormat:{type:String,default:`yyyy-MM-dd`},startPlaceholder:{type:[String,Number],default:`开始日期`},rangeSeparator:{type:[String,Number],default:`至`},endPlaceholder:{type:[String,Number],default:`结束日期`}},data(){return{localPickerOptions:{shortcuts:[{text:`今天`,onClick(e){let t=new Date,n=new Date;e.$emit(`pick`,[n,t])}},{text:`昨天`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24),t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,[n,t])}},{text:`最近一周`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*7),e.$emit(`pick`,[n,t])}},{text:`最近一个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*30),e.$emit(`pick`,[n,t])}},{text:`最近三个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*90),e.$emit(`pick`,[n,t])}},{text:`最近六个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*180),e.$emit(`pick`,[n,t])}},{text:`最近一年`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*365),e.$emit(`pick`,[n,t])}}]}}}};function Ui(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),y(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`daterange`,"value-format":n.valueFormat,"range-separator":n.rangeSeparator,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`range-separator`,`start-placeholder`,`end-placeholder`,`picker-options`])}var Wi=H(Hi,[[`render`,Ui]]),Gi={name:`cvDatetimeBase`,mixins:[Ri],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(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:`今天`,onClick(e){e.$emit(`pick`,new Date)}},{text:`昨天`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,t)}},{text:`一周前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*7),e.$emit(`pick`,t)}},{text:`一个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*30),e.$emit(`pick`,t)}},{text:`三个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*90),e.$emit(`pick`,t)}},{text:`六个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*180),e.$emit(`pick`,t)}},{text:`一年前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*365),e.$emit(`pick`,t)}}]}}}};function Ki(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),y(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`datetime`,"value-format":n.valueFormat,placeholder:n.placeholder,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`placeholder`,`picker-options`])}var qi=H(Gi,[[`render`,Ki]]),Ji={name:`cvDatetimeRange`,mixins:[Ri],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(){return{localPickerOptions:{shortcuts:[{text:`今天`,onClick(e){let t=new Date,n=new Date;e.$emit(`pick`,[n,t])}},{text:`昨天`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24),t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,[n,t])}},{text:`最近一周`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*7),e.$emit(`pick`,[n,t])}},{text:`最近一个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*30),e.$emit(`pick`,[n,t])}},{text:`最近三个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*90),e.$emit(`pick`,[n,t])}},{text:`最近六个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*180),e.$emit(`pick`,[n,t])}},{text:`最近一年`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*365),e.$emit(`pick`,[n,t])}}]}}}};function Yi(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),y(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`datetimerange`,"value-format":n.valueFormat,"range-separator":n.rangeSeparator,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder,align:`right`,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`range-separator`,`start-placeholder`,`end-placeholder`,`picker-options`])}var Xi=H(Ji,[[`render`,Yi]]),Zi={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(e){(e===null||e===``)&&(this.end===null||this.end===``)?this.internalValue=[null,null]:this.internalValue[0]=e},end(e){(this.start===null||this.start===``)&&(e===null||e===``)?this.internalValue=[null,null]:this.internalValue[1]=e}},computed:{dateUtil(){return{getStartOfDay(e=new Date){let t=new Date(e);return t.setHours(0,0,0,0),t},getEndOfDay(e=new Date){let t=new Date(e);return t.setHours(23,59,59,999),t},getYesterday(){let e=new Date;return e.setDate(e.getDate()-1),e},getDaysAgo(e){let t=new Date;return t.setDate(t.getDate()-(e-1)),t},getFirstDayOfMonth(){let e=new Date;return e.setDate(1),e},getFirstDayOfYear(){let e=new Date;return e.setMonth(0,1),e}}},refinedShortcuts(){return[{text:`本日`,value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:`昨天`,value:()=>{let e=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(e),this.dateUtil.getEndOfDay(e)]}},{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=[null,null]:this.internalValue=[this.start,this.end]},handleDateChange(e){e?(this.$emit(`update:start`,e[0]),this.$emit(`update:end`,e[1])):(this.$emit(`update:start`,null),this.$emit(`update:end`,null)),this.$emit(`change`,e)},handleCalendarChange(e){}},created(){this.syncInternalValue()}};function Qi(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),y(o,{modelValue:i.internalValue,"onUpdate:modelValue":t[0]||=e=>i.internalValue=e,type:`datetimerange`,shortcuts:a.refinedShortcuts,"range-separator":`至`,"start-placeholder":`开始时间`,"end-placeholder":`结束时间`,"value-format":`YYYY-MM-DD HH:mm:ss`,"default-time":i.defaultTime,onChange:a.handleDateChange,onCalendarChange:a.handleCalendarChange,clearable:``,class:`screen-date-picker`},null,8,[`modelValue`,`shortcuts`,`default-time`,`onChange`,`onCalendarChange`])}var $i=H(Zi,[[`render`,Qi]]);ji.install=function(e){e.component(ji.name,ji)},Pi.install=function(e){e.component(Pi.name,Pi)},Li.install=function(e){e.component(Li.name,Li)},Vi.install=function(e){e.component(Vi.name,Vi)},Wi.install=function(e){e.component(Wi.name,Wi)},qi.install=function(e){e.component(qi.name,qi)},Xi.install=function(e){e.component(Xi.name,Xi)},$i.install=function(e){e.component($i.name,$i)};var ea={name:`cvSwitchBase`,props:{...de.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:{}};function ta(e,t,n,r,i,a){let o=P(`el-switch`);return A(),y(o,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e}),null,16,[`modelValue`])}var na=H(ea,[[`render`,ta]]);na.install=function(e){e.component(na.name,na)};var ra={name:`cvCodeSms`,mixins:[],components:{},props:{..._.props,maxlength:{type:[Number,String],default:6},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},apiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(e){this.localMobile=e},modelValue(e){this.localVal=e}},data(){return{localVal:this.modelValue,localMobile:``,nextTime:0,diyPlaceholder:`短信验证码`,btnDisabled:!1,btnText:`获取验证码`,btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(e){this.$message(e)},getSmsCode(){if(!this.localMobile){this.showDiyMsg(`手机号不正确`),this.$emit(`onGetSms`,!1);return}if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile)){this.showDiyMsg(`手机号格式不正确`),this.$emit(`onGetSms`,!1);return}if(!this.codeUrl&&!this.apiFunc){this.showDiyMsg(`短信接口地址不能为空`);return}this.btnDisabled=!0,!this.btnIntervalObj&&this.btnDisabled&&(this.btnText=`请稍后...`,this.apiFunc?this.apiFunc({postType:`sendSms`,cto_sms_type:`alterMobile`,sendCode:`发送验证码`,[this.mobileParam]:this.localMobile}).then(e=>{let t=e;t.status==200?(this.showDiyMsg(`发送成功!`),setTimeout(()=>{if(this.codeSign){let e=t.data&&t.data.sign||``;this.diyPlaceholder=`识别码:`+e}this.smsCodeWaitTime()},500)):(this.showDiyMsg(`短信获取失败,请检查网络`),this.btnDisabled=!1,this.btnText=`获取验证码`)}).catch(e=>{this.btnDisabled=!1,this.btnText=`获取验证码`}):(this.btnDisabled=!1,this.btnText=`重新获取验证码`))},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let e=this.nextTime-Date.parse(new Date)/1e3;e<=0?(clearInterval(this.btnIntervalObj),this.btnText=`重新获取验证码`,this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=e.toString()+`s`)},100)},updateInput(e){this.$emit(`update:modelValue`,this.localVal)}}};function ia(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-input`);return A(),y(s,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,clearable:``,placeholder:i.diyPlaceholder,onInput:a.updateInput}),{append:z(()=>[w(o,{onClick:a.getSmsCode,disabled:i.btnDisabled},{default:z(()=>[C(F(i.btnText),1)]),_:1},8,[`onClick`,`disabled`])]),_:1},16,[`modelValue`,`placeholder`,`onInput`])}var aa=H(ra,[[`render`,ia]]);aa.install=function(e){e.component(aa.name,aa)};var oa={props:{fileType:{type:[Array],default:[]},fileSize:{type:[Number],default:2},fileUnit:{type:[String],default:``},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5}}},sa={class:`cv-upload-tip-box`},ca={key:0},la={key:1};function ua(e,t,n,r,i,a){return A(),x(`div`,sa,[t[0]||=S(`span`,null,`最多上传`,-1),S(`b`,null,F(n.limit),1),S(`span`,null,F(n.fileUnit),1),n.fileType.length?(A(),x(`b`,ca,F(n.fileType.length?n.fileType.join(`/`):``),1)):b(``,!0),n.fileType.length?(A(),x(`span`,la,`格式`)):b(``,!0),S(`span`,null,`文件;且每`+F(n.fileUnit)+`不超过`,1),S(`b`,null,F(n.fileSize)+`MB`,1)])}var da={inheritAttrs:!1,emits:[`update:modelValue`,`update:initValue`,`delete`,`error`,`success`],components:{uploadTip:H(oa,[[`render`,ua]])},mixins:[oi],props:{multiple:{type:[Boolean],default:!1},limit:{type:[Number,String],default:1},drag:{type:Boolean,default:!1},httpRequest:{type:[Function],default:()=>{}},accept:String,beforeRemove:Function,upResponseFn:{type:[Function],default:null},signatureFn:{type:Function,default:null},signatureType:{type:[String],default:`aliyun_oss_type2`},signatureParam:{type:[Object],default:()=>({})}},data(){return{cropShow:!1,upIngPercent:0,upIngLoading:!1,upIngFileInfo:{}}},computed:{fileTypeStr(){return this.fileType.join(`,`)},tipAttr(){return{fileType:this.fileType||[],fileSize:this.fileSize||``,multiple:this?.multiple||!1,limit:this.limit?parseInt(this.limit):5}},mergeAttrs(){let e=this._mergeAttrs(`upload`);return this.$props.signatureType&&(e.signatureType=this.$props.signatureType),this.$props.signatureFn&&(e.signatureFn=this.$props.signatureFn),this.$props.signatureParam&&(e.signatureParam=this.$props.signatureParam),typeof e.upResponseFn!=`function`&&(e.upResponseFn=null),Object.assign({},e,this.$attrs)}},methods:{_commonBeforeUpload(e){e.type;let t=e.name||``;e.size/1024/1024;let n=t.split(`.`).pop().toLowerCase(),r=this.fileType.join(`、`);return this.fileType.includes(n)?e>this.fileSize?(ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`),!1):!0:(ExtendMessage.error(`文件格式错误,请上传类型 如:${r}格式文件`),!1)},_commonRemove(){return new Promise((e,t)=>{this.$confirm(`提示`,{title:`确定删除??`,showCancelButton:!0,confirmButtonText:`确定`,cancelButtonText:`取消`,type:`warning`}).then(()=>{e(!0)}).catch(()=>{t(!1)})})},initHttpRequest(){},initOnProgress(e){this.upIngPercent=Number(e.percentage.toFixed(0))},initOnSuccess(e,t){},initOnExceed(){this.$message.error(`最多上传${this.limit}个文件`)}}};function fa(e){let t=[],n=Object.prototype.toString.call(e);if(n===`[object String]`)t.push(pa(e));else if(n===`[object Object]`)e.name&&e.url&&t.push(e);else if(n===`[object Array]`)for(let n in e){let r=e[n],i=Object.prototype.toString.call(r);i===`[object String]`?t.push(pa(r)):i===`[object Object]`&&r.name&&r.url&&t.push(r)}return t}function pa(e){let t=e.lastIndexOf(`/`),n=e.substring(t+1,e.length),r=``;return n.lastIndexOf(`.`)>-1&&(r=n.slice(n.lastIndexOf(`.`)+1),r=`image/`+r),{name:n,url:e,type:r,status:`success`}}function ma(e){return 1024**e}function ha(e){return e?e<ma(1)?e+` B`:e<ma(2)?(e/ma(1)).toFixed(2)+` KB`:e<ma(3)?(e/ma(2)).toFixed(2)+` MB`:e<ma(4)?(e/ma(3)).toFixed(2)+` GB`:(e/ma(4)).toFixed(2)+` TB`:`-`}function ga(e){if(!e)return!0;let t=e?.expiration_last;if(!t)return!0;let n=Rr(t),r=new Date;return isNaN(n.getTime())?!0:n.getTime()-r.getTime()<=6e4}async function _a(e,t){if(!e||typeof e!=`function`)return!1;let n=null;if(ga(n)){let r=await e({...t});if(r&&r.data&&r.status==200)n=r.data||{};else throw re.error(`获取STS令牌失败`),Error(`获取STS令牌失败 ${r?.message}`)}return{...n,pass:!!n}}async function va(e,t,n,r){e||=`aliyun_oss_type2`,r||={};let i=await _a(t,{upload_type:e,...n});if(!i.pass)return re.error(`获取oss上传凭证异常`);if(e==`oss_upload1`){let e={bucket:i.bucket,region:i.endpoint.split(`.`)[0],accessKeyId:i.accessKeyId,accessKeySecret:i.accessKeySecret,stsToken:i.securityToken,expiration:i.expiration,...r,refreshSTSToken:async()=>{let e=await _a(t);return{accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,stsToken:e.securityToken}},refreshSTSTokenInterval:new Date(i.expiration)-new Date-1e3*60};return new OSS(e)}else if(e==`aliyun_oss_type2`)return i;throw Error(`上传类型错误`)}async function ya(e,t,n){let r={},i=new FormData;i.append(`success_action_status`,t.success_action_status||`200`),i.append(`policy`,t.policy),i.append(`signature`,t.signature),i.append(`x-oss-signature`,t.signature),i.append(`x-oss-signature-version`,`OSS4-HMAC-SHA256`),i.append(`x-oss-credential`,t.x_oss_credential),i.append(`x-oss-date`,t.x_oss_date),i.append(`x-oss-security-token`,t.security_token);let a=t.key;if(t.key||(a=t.dir+`/`+e.name),i.append(`key`,a),t.callback&&i.append(`callback`,t.callback),t.callback_var&&Hr(t.callback_var))for(let e in t.callback_var)t.callback_var.hasOwnProperty(e)&&i.append(e,t.callback_var[e]);return i.append(`file`,e),fetch(t.host,{method:`POST`,body:i,headers:r}).then(e=>{if(e.ok)return e.json()}).then(e=>{if(e&&e.success)return e.data}).catch(e=>{})}async function ba(e,t,n,r){if(!n||typeof n!=`function`)return re.error(`签名方法错误`),Promise.reject();try{let i=$r(),a=Zr(e.type),o=`${i}.${a}`,s=await n({upload_type:t,...r,save_extension:a}).then(e=>e.data||{}).catch(e=>(re.error(`签名失败`),Promise.reject()));if(!s)return Promise.reject();if(s.name&&(o=`${s.name}.${a}`),e instanceof Blob&&(e=new File([e],o,{type:e.type,lastModified:Date.now()})),e)return await ya(e,s)}catch{return Promise.reject()}}var xa=!1,Sa=.2,Ca=``,wa=typeof navigator<`u`&&navigator.userAgent.indexOf(`Firefox`)>-1,Ta=typeof window<`u`&&(!!window.ActiveXObject||`ActiveXObject`in window),Ea=(e,t,n)=>{let r=e.deltaY||e.wheelDelta,i=t;wa&&(r*=30),Ta&&(r=-r);let a=Sa/n.width*r;a<0&&(i+=Math.abs(a)),a>0&&t>Math.abs(a)&&(i-=Math.abs(a));let o=a<0?`add`:`reduce`;return o!==Ca&&(Ca=o,Sa=.2),xa||window.setTimeout(()=>{xa=!1,Sa+=.01},100),xa=!0,i},Da=(e,t)=>e*t,Oa=typeof document<`u`&&`onwheel`in document.createElement(`div`)?`wheel`:`mousewheel`,ka=.2,Aa=100,ja=be({name:`cropper-loading`,props:{isVisible:{type:Boolean,default:!1}},render(){let{$slots:e}=this;return this.isVisible?w(`section`,{class:`cropper-loading`},[e.default?e.default():w(`p`,{class:`cropper-loading-spin`},[w(`i`,null,[w(`svg`,{viewBox:`0 0 1024 1024`,focusable:`false`,"data-icon":`loading`,width:`1.5em`,height:`1.5em`,fill:`currentColor`,"aria-hidden":`true`},[w(`path`,{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`},null)])]),w(`span`,null,null)])]):``}}),Ma=(e,t=0)=>{if(typeof e==`number`)return e;let n=e.trim();if(n.endsWith(`%`)){let e=Number.parseFloat(n);return!Number.isFinite(e)||t<=0?0:t*e/100}let r=Number.parseFloat(n);return Number.isFinite(r)?r:0},Na=e=>typeof e==`number`?`${e}px`:e,Pa=e=>{if(!Number.isFinite(e))return 0;let t=(e%360+360)%360;return Object.is(t,-0)?0:t},Fa=e=>{let{props:t,cropperRef:n,layoutContainer:r,imgs:i,cropping:a}=e,o=ve(()=>({...t.wrapper,width:Na(t.wrapper.width),height:Na(t.wrapper.height)})),s=j({...t.cropLayout}),c=ve(()=>({width:Ma(s.value.width,r.wrapLayout.width),height:Ma(s.value.height,r.wrapLayout.height)})),l=()=>{if(!n.value)return;let e=Number.parseFloat((window.getComputedStyle(n.value).width||``).replace(`px`,``)),t=Number.parseFloat((window.getComputedStyle(n.value).height||``).replace(`px`,``));Number.isFinite(e)&&Number.isFinite(t)&&(r.wrapLayout={width:e,height:t})},u=ve(()=>{let e=r.wrapLayout.width,t=r.wrapLayout.height,n=c.value.width,i=c.value.height;return{width:e>0?Math.min(n,e):n,height:t>0?Math.min(i,t):i}}),d=ve(()=>{let e=r.wrapLayout.width,t=r.wrapLayout.height;return e<=0||t<=0?!0:u.value.width<e||u.value.height<t});return{wrapperStyle:o,innerCropLayout:s,cropLayoutStyle:c,effectiveCropLayoutStyle:u,shouldShowCropBox:d,isFullCropMode:ve(()=>!!i.value&&a.value&&!d.value),updateWrapLayoutFromDom:l}},Ia={};Ia.getData=e=>new Promise((t,n)=>{let r={};La(e).then(e=>{r.arrayBuffer=e,r.orientation=Va(e),t(r)}).catch(e=>{n(e)})});function La(e){let t=null;return new Promise((n,r)=>{if(e.src)if(/^data\:/i.test(e.src))t=za(e.src),n(t);else if(/^blob\:/i.test(e.src)){var i=new FileReader;i.onload=function(e){t=e.target?.result??null,n(t)},Ra(e.src,function(e){i.readAsArrayBuffer(e)})}else{var a=new XMLHttpRequest;a.onload=function(){if(this.status==200||this.status===0)t=a.response,n(t);else throw`Could not load image`;a=null},a.open(`GET`,e.src,!0),a.responseType=`arraybuffer`,a.send(null)}else r(`img error`)})}function Ra(e,t){var n=new XMLHttpRequest;n.open(`GET`,e,!0),n.responseType=`blob`,n.onload=function(){(this.status==200||this.status===0)&&t(this.response)},n.send()}function za(e){e=e.replace(/^data\:([^\;]+)\;base64,/gim,``);for(var t=atob(e),n=t.length,r=new ArrayBuffer(n),i=new Uint8Array(r),a=0;a<n;a++)i[a]=t.charCodeAt(a);return r}function Ba(e,t,n){var r=``,i;for(i=t,n+=t;i<n;i++)r+=String.fromCharCode(e.getUint8(i));return r}function Va(e){var t=new DataView(e),n=t.byteLength,r,i,a,o,s,c,l,u,d,f;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(d=2;d<n;){if(t.getUint8(d)===255&&t.getUint8(d+1)===225){l=d;break}d++}if(l&&(i=l+4,a=l+10,Ba(t,i,4)===`Exif`&&(c=t.getUint16(a),s=c===18761,(s||c===19789)&&t.getUint16(a+2,s)===42&&(o=t.getUint32(a+4,s),o>=8&&(u=a+o)))),u){for(n=t.getUint16(u,s),f=0;f<n;f++)if(d=u+f*12+2,t.getUint16(d,s)===274){d+=8,r=t.getUint16(d,s);break}}return r}var Ha=class{ctx;img;handle;constructor(){this.ctx=null,this.img=null,this.handle={1:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height),e),2:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(this.img.width,0),this.ctx.scale(-1,1)),e),3:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(this.img.width/2,this.img.height/2),this.ctx.rotate(180*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e),4:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(0,this.img.height),this.ctx.scale(1,-1)),e),5:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.rotate(.5*Math.PI),this.ctx.scale(1,-1)),e),6:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.translate(this.img.height/2,this.img.width/2),this.ctx.rotate(90*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e),7:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.rotate(.5*Math.PI),this.ctx.translate(this.img.width,-this.img.height),this.ctx.scale(-1,1)),e),8:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.translate(this.img.height/2,this.img.width/2),this.ctx.rotate(-90*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e)}}render(e,t,n){if(this.ctx=t.getContext(`2d`),this.img=e,this.handle[n]){let e=this.handle[n](t);return this.ctx=e.getContext(`2d`),this.ctx.drawImage(this.img,0,0,this.img.width,this.img.height),this.ctx.restore(),e}else return t.width=e.width,t.height=e.height,this.ctx.drawImage(this.img,0,0,this.img.width,this.img.height),t}},Ua=(e,t,n)=>{let r=`default`;for(let e of Object.keys(Wa))if(e===n){r=n;break}let i=Wa[r];return i(e,t,n)},Wa={contain:(e,t)=>{let n=1,{width:r,height:i}={...e},a=t.width,o=t.height;return r>a&&(n=a/r),i*n>o&&(n=o/i),n},cover:(e,t)=>{let n=1,{width:r,height:i}={...e},a=t.width,o=t.height;return n=a/r,i*n<o&&(n=o/i),n},default:(e,t,n)=>{let r=1;if(n===`original`)return r;let{width:i,height:a}={...e},o=t.width,s=t.height,c=n.split(` `);try{let t=c[0];if(t.search(`px`)!==-1&&(t=t.replace(`px`,``),i=parseFloat(t),r=i/e.width),t.search(`%`)!==-1&&(t=t.replace(`%`,``),i=parseFloat(t)/100*o,r=i/e.width),c.length===2&&t===`auto`){let t=c[1];t.search(`px`)!==-1&&(t=t.replace(`px`,``),a=parseFloat(t),r=a/e.height),t.search(`%`)!==-1&&(t=t.replace(`%`,``),a=parseFloat(t)/100*s,r=a/e.height)}}catch{r=1}return r}},Ga=new Ha,Ka=async e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e,e.substr(0,4)!==`data`&&(r.crossOrigin=``)}),qa=e=>Ia.getData(e),Ja=(e,t,n)=>t&&Ga.render(e,t,n),Ya=e=>{if(typeof navigator>`u`)return[`0`,`0`,`0`];let t=navigator.userAgent.split(` `),n=``,r=[`0`,`0`,`0`],i=new RegExp(e,`i`);for(let e=0;e<t.length;e++)i.test(t[e])&&(n=t[e]);return n&&(r=n.split(`/`)[1].split(`.`)),r},Xa=e=>{if(Number(Ya(`chrome`)[0])>=81)return-1;if(Number(Ya(`safari`)[0])>=605){let e=Ya(`version`);if(Number(e[0])>13&&Number(e[1])>1)return-1}let t=typeof navigator<`u`?navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/):null;if(t){let n=t[1].split(`_`).map(e=>Number(e));return n[0]>13||n[0]>=13&&n[1]>=4||Number(Ya(`Firefox`)[0])>=97?-1:e}return e},Za=(e,t,n)=>Ua(e,t,n),Qa=(e,t)=>{let{scale:n,imgStyle:r,layoutStyle:i,rotate:a}=e,o={width:n*r.width,height:n*r.height},s=(i.width-o.width)/2,c=(i.height-o.height)/2;t&&(s=t.x,c=t.y);let l=((o.width-r.width)/2+s)/n,u=((o.height-r.height)/2+c)/n;return{imgExhibitionStyle:{width:`${r.width}px`,height:`${r.height}px`,transform:`scale(${n}, ${n}) translate3d(${l}px, ${u}px, 0px) rotateZ(${a}deg)`},imgAxis:{x:s,y:c,scale:n,rotate:a}}},$a=(e,t,n)=>new Promise((r,i)=>{e.toBlob(e=>{if(e){r(e);return}i(Error(`canvas toBlob failed`))},`image/${t}`,n)}),eo=async e=>e?/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG|WEBP|webp)$/.test(e.name)?new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{let n=``,r=e.target;n=typeof r.result==`object`&&r.result?window.URL.createObjectURL(new Blob([r.result])):r.result,t(n)},r.onerror=n,r.readAsArrayBuffer(e)}):(alert(`图片类型必须是.gif,jpeg,jpg,png,bmp,webp中的一种`),``):``,to=(e,t,n=0,r=1)=>{let i=document.createElement(`canvas`),a=i.getContext(`2d`),{width:o,height:s}=t,c=0,l=0,u=0;return o*=r,s*=r,i.width=o,i.height=s,n&&(u=Math.ceil(Math.sqrt(o*o+s*s)),i.width=u,i.height=u,a.translate(u/2,u/2),a.rotate(n*Math.PI/180),c=-u/2+(u-o)/2,l=-u/2+(u-s)/2),a.drawImage(e,c,l,o,s),a.restore(),i},no=async e=>{let{type:t=`base64`,url:n,sourceCanvas:r,imgLayout:i,imgAxis:a,cropAxis:o,cropLayout:s,outputType:c,outputSize:l=1,full:u=!0,original:d=!1,maxSideLength:f,cropping:p}=e,m=document.createElement(`canvas`),h=m.getContext(`2d`),g=null;if(!r){if(!n)throw Error("getCropImgData: either `sourceCanvas` or `url` must be provided");try{g=await Ka(n)}catch{g=new Image}}return new Promise((e,n)=>{try{let ee=Number.isFinite(f)?f:3e3,_=Number.isFinite(a.scale)&&a.scale>0?a.scale:1,te=d?1/_:1,ne=d?1:Math.max(1,_),re=d?1:_/ne,ie={x:o.x*te,y:o.y*te},ae={width:s.width*te,height:s.height*te},oe={...a,x:a.x*te,y:a.y*te},se;se=r?!a.rotate&&ne===1?r:ro(r,i,a.rotate,ne):to(g,i,a.rotate,ne);let ce=oe.x-ie.x,le=oe.y-ie.y,ue=ae.width,de=ae.height;if(p||(ue=se.width*re,de=se.height*re,ce=0,le=0),a.rotate&&p){let e=i.width*(d?1:_),t=i.height*(d?1:_);ce-=(se.width*re-e)/2,le-=(se.height*re-t)/2}let fe=u&&typeof window<`u`?Math.max(1,window.devicePixelRatio||1):1;if(ee>0){let e=Math.max(ue*fe,de*fe);e>ee&&(fe*=ee/e)}if(m.width=Math.max(1,Math.round(ue*fe)),m.height=Math.max(1,Math.round(de*fe)),h.scale(fe,fe),h.imageSmoothingEnabled=!0,`imageSmoothingQuality`in h&&(h.imageSmoothingQuality=`high`),h.drawImage(se,ce,le,se.width*re,se.height*re),h.restore(),t===`blob`){$a(m,c,l).then(e).catch(n);return}e(m.toDataURL(`image/${c}`,l))}catch(e){n(e)}})},ro=(e,t,n=0,r=1)=>{let i=document.createElement(`canvas`),a=i.getContext(`2d`),{width:o,height:s}=t,c=0,l=0,u=0;return o*=r,s*=r,i.width=o,i.height=s,n&&(u=Math.ceil(Math.sqrt(o*o+s*s)),i.width=u,i.height=u,a.translate(u/2,u/2),a.rotate(n*Math.PI/180),c=-u/2+(u-o)/2,l=-u/2+(u-s)/2),a.drawImage(e,c,l,o,s),a.restore(),i},io=(e,t,n,r)=>{let i={left:0,right:0,top:0,bottom:0,scale:1},a=n.rotate*Math.PI/180,o=[{x:e.x,y:e.y},{x:e.x+t.width,y:e.y},{x:e.x+t.width,y:e.y+t.height},{x:e.x,y:e.y+t.height}].map(e=>oo(e,-a)),s=Math.max(...o.map(e=>e.x))-Math.min(...o.map(e=>e.x)),c=Math.max(...o.map(e=>e.y))-Math.min(...o.map(e=>e.y)),l=Math.max(n.scale,s/r.width,c/r.height),u=r.width*l,d=r.height*l,f=u/2,p=d/2,m=Math.max(...o.map(e=>e.x-f)),h=Math.min(...o.map(e=>e.x+f)),g=Math.max(...o.map(e=>e.y-p)),ee=Math.min(...o.map(e=>e.y+p)),_=oo({x:n.x+f,y:n.y+p},-a),te=oo({x:ao(_.x,m,h),y:ao(_.y,g,ee)},a);return i.scale=l,i.left=te.x-f,i.right=te.x-f,i.top=te.y-p,i.bottom=te.y-p,i},ao=(e,t,n)=>Math.min(Math.max(e,t),n),oo=(e,t)=>({x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)}),so=(e,t,n,r)=>{let i=``,a=``,o=io(e,t,n,r),s=o.scale,c=.5;return n.x>o.left+c?i=`left`:n.x<o.right-c&&(i=`right`),n.y>o.top+c?a=`top`:n.y<o.bottom-c&&(a=`bottom`),{landscape:i,portrait:a,scale:s,boundary:o,imgAxis:n}},co={easeInOut:(e,t,n,r)=>(e=e/r*2,e<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t)},lo=(e,t,n,r)=>{if(n<=0||e===t)return r&&r(t),()=>0;let i=0,a=Math.max(1,Math.ceil(n/17)),o=0,s=()=>{let n=co.easeInOut(i,e,t-e,a);i++,i<=a?(r&&r(n),o=requestAnimationFrame(s)):r&&r(t)};return s(),()=>o},uo=class{handlers;constructor(){this.handlers=new Map}addHandler(e,t){let n=this.handlers.get(e),r=[];n&&(r=[...n]),r.push(t),this.handlers.set(e,r)}fire(e){let t=this.handlers.get(e.type);t&&t.forEach(t=>{t(e)})}removeHandler(e,t){let n=this.handlers.get(e);if(!n)return;let r=0;for(let e=n.length;r<e&&n[r]!==t;r++);n.splice(r,1),this.handlers.set(e,n)}},fo=typeof window<`u`&&`ontouchstart`in window,po=typeof window<`u`&&`onmouseup`in window,mo=class{element;pre;watcher;touches;constructor(e){this.element=e,this.touches=null,this.pre={x:0,y:0},this.watcher=new uo}fire(e){this.watcher.fire(e)}getAxis(e){return{x:e.clientX,y:e.clientY}}getTouchPair(e){return e.length<2?null:[e[0],e[1]]}start(e){e.preventDefault(),e.which===1&&(this.pre=this.getAxis(e),this.fire({type:`down`,event:e}),window.addEventListener(`mousemove`,this.move),window.addEventListener(`mouseup`,this.stop))}startTouch(e){let t=e.touches[0];if(!t)return;this.pre={x:t.clientX,y:t.clientY},this.fire({type:`down`,event:e});let n=this.getTouchPair(e.touches);n?(this.touches=n,window.addEventListener(`touchmove`,this.scaleTouch,{passive:!1}),window.removeEventListener(`touchmove`,this.moveTouch)):(window.addEventListener(`touchmove`,this.moveTouch,{passive:!1}),window.removeEventListener(`touchmove`,this.scaleTouch)),window.addEventListener(`touchend`,this.stopTouch)}move(e){e.preventDefault();let t=this.getAxis(e);this.fire({type:`down-to-move`,event:e,change:{x:t.x-this.pre.x,y:t.y-this.pre.y}}),this.pre=t}moveTouch(e){e.preventDefault();let t=e.touches[0];t&&(this.fire({type:`down-to-move`,event:e,change:{x:t.clientX-this.pre.x,y:t.clientY-this.pre.y}}),this.pre={x:t.clientX,y:t.clientY})}getLen(e){return Math.sqrt(e.x*e.x+e.y*e.y)}getScale(e,t){let n={x:e[1].clientX-e[0].clientX,y:e[1].clientY-e[0].clientY},r={x:t[1].clientX-t[0].clientX,y:t[1].clientY-t[0].clientY};return this.getLen(n)/this.getLen(r)}scaleTouch(e){e.preventDefault();let t=this.getTouchPair(e.touches);!t||!this.touches||(this.fire({type:`down-to-scale`,event:e,scale:this.getScale(t,this.touches)}),this.touches=t)}stop(e){this.fire({type:`up`,event:e}),window.removeEventListener(`mousemove`,this.move),window.removeEventListener(`mouseup`,this.stop)}stopTouch(e){this.fire({type:`up`,event:e}),this.touches=null,window.removeEventListener(`touchmove`,this.moveTouch),window.removeEventListener(`touchmove`,this.scaleTouch),window.removeEventListener(`touchend`,this.stopTouch)}on(e,t){this.watcher.addHandler(e,t),!(e!==`down-to-move`&&e!==`down-to-scale`&&e!==`up`)&&(po&&(this.start=this.start.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.element.addEventListener(`mousedown`,this.start)),fo&&(this.startTouch=this.startTouch.bind(this),this.moveTouch=this.moveTouch.bind(this),this.scaleTouch=this.scaleTouch.bind(this),this.stopTouch=this.stopTouch.bind(this),this.element.addEventListener(`touchstart`,this.startTouch,{passive:!1})))}off(e,t){this.watcher.removeHandler(e,t),!(e!==`down-to-move`&&e!==`down-to-scale`&&e!==`up`)&&(po&&(this.element.removeEventListener(`mousedown`,this.start),window.removeEventListener(`mousemove`,this.move),window.removeEventListener(`mouseup`,this.stop)),fo&&(this.element.removeEventListener(`touchstart`,this.startTouch),window.removeEventListener(`touchmove`,this.moveTouch),window.removeEventListener(`touchmove`,this.scaleTouch),window.removeEventListener(`touchend`,this.stopTouch)))}},ho=e=>{let{cropperImg:t,cropperBox:n,layout:r,cropping:i,centerBox:a,centerWrapper:o,effectiveCropLayoutStyle:s,getBoundaryDuration:c,queueRealTimeEmit:l}=e,u=j(null),d=j(!1),f=null,p=null,m=e=>{let t=Qa({scale:r.imgAxis.scale,imgStyle:{...r.imgLayout},layoutStyle:{...r.wrapLayout},rotate:r.imgAxis.rotate},e);r.imgExhibitionStyle=t.imgExhibitionStyle,r.imgAxis=t.imgAxis,l()},h=()=>{if(d.value=!1,!a.value&&!o.value)return;let e=c(),t;t=a.value?so({...r.cropAxis},{...s.value},{...r.imgAxis},{...r.imgLayout}):so({x:0,y:0},{...r.wrapLayout},{...r.imgAxis},{...r.imgLayout}),r.imgAxis.scale<t.scale&&lo(r.imgAxis.scale,t.scale,e,e=>{g(e,!0)}),t.landscape===`left`&&lo(r.imgAxis.x,t.boundary.left,e,e=>{m({x:e,y:r.imgAxis.y})}),t.landscape===`right`&&lo(r.imgAxis.x,t.boundary.right,e,e=>{m({x:e,y:r.imgAxis.y})}),t.portrait===`top`&&lo(r.imgAxis.y,t.boundary.top,e,e=>{m({x:r.imgAxis.x,y:e})}),t.portrait===`bottom`&&lo(r.imgAxis.y,t.boundary.bottom,e,e=>{m({x:r.imgAxis.x,y:e})}),l()},g=(e,t=!1)=>{let n={x:r.imgAxis.x,y:r.imgAxis.y};t||(n.x-=r.imgLayout.width*(e-r.imgAxis.scale)/2,n.y-=r.imgLayout.height*(e-r.imgAxis.scale)/2);let i=Qa({scale:e,imgStyle:{...r.imgLayout},layoutStyle:{...r.wrapLayout},rotate:r.imgAxis.rotate},n);r.imgExhibitionStyle=i.imgExhibitionStyle,r.imgAxis=i.imgAxis,l(),u.value!==null&&clearTimeout(u.value);let a=c();u.value=setTimeout(()=>{h()},a)},ee=e=>{let t=s.value.width,n=s.value.height,a=r.wrapLayout.width-t,o=r.wrapLayout.height-n;e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x>a&&(e.x=a),e.y>o&&(e.y=o),r.cropAxis=e,i.value=!0,l()},_=()=>{r.cropAxis={x:0,y:0},i.value=!1},te=e=>{if(!e.change)return;let t={x:e.change.x+r.imgAxis.x,y:e.change.y+r.imgAxis.y};if(a.value||o.value){let n=a.value?so({...r.cropAxis},{...s.value},{...r.imgAxis},{...r.imgLayout}):so({x:0,y:0},{...r.wrapLayout},{...r.imgAxis},{...r.imgLayout});(n.landscape!==``||n.portrait!==``)&&(t.x=r.imgAxis.x+e.change.x*ka,t.y=r.imgAxis.y+e.change.y*ka)}m(t)},ne=e=>{d.value=!0,e.scale&&g(Da(e.scale,r.imgAxis.scale))},re=e=>{!d.value&&e.change&&ee({x:e.change.x+r.cropAxis.x,y:e.change.y+r.cropAxis.y})},ie=()=>{ae();let e=t.value;e&&(f=new mo(e),f.on(`down-to-move`,te),f.on(`down-to-scale`,ne),f.on(`up`,h))},ae=()=>{f&&=(f.off(`down-to-move`,te),f.off(`up`,h),f.off(`down-to-scale`,ne),null)},oe=()=>{se();let e=n.value;e&&(p=new mo(e),p.on(`down-to-move`,re),p.on(`down-to-scale`,ne),p.on(`up`,h))},se=()=>{p&&=(p.off(`down-to-move`,re),p.off(`down-to-scale`,ne),p.off(`up`,h),null)};return{bindMoveImg:ie,unbindMoveImg:ae,bindMoveCrop:oe,unbindMoveCrop:se,setScale:g,setImgAxis:m,reboundImg:h,checkedCrop:ee,clearCrop:_}},go=e=>{let{imgs:t,cropping:n,effectiveCropLayoutStyle:r,layout:i,emit:a}=e,o=0,s=()=>{if(!t.value||!n.value)return null;let e=i.imgAxis.scale,a=`scale(${e}, ${e}) translate3d(${(i.imgLayout.width*(e-1)/2+(i.imgAxis.x-i.cropAxis.x))/e}px, ${(i.imgLayout.height*(e-1)/2+(i.imgAxis.y-i.cropAxis.y))/e}px, 0) rotateZ(${i.imgAxis.rotate}deg)`,o=r.value.width,s=r.value.height;return{w:o,h:s,url:t.value,img:{width:`${i.imgLayout.width}px`,height:`${i.imgLayout.height}px`,transform:a},html:`<div class="show-preview" style="width: ${o}px; height: ${s}px; overflow: hidden"><div style="width: ${o}px; height: ${s}px"><img src="${t.value}" style="width: ${i.imgLayout.width}px; height: ${i.imgLayout.height}px; transform: ${a}"></div></div>`}},c=()=>{let e=s();e&&(a(`real-time`,e),a(`realTime`,e))};return ke(()=>{o&&=(cancelAnimationFrame(o),0)}),{queueRealTimeEmit:()=>{o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=0,c()})},getRealTimePreview:s}},_o=e=>{let{layout:t,imgs:n,cropping:r,cropLayoutStyle:i,effectiveCropLayoutStyle:a,shouldShowCropBox:o,checkedCrop:s,queueRealTimeEmit:c}=e;return{renderCrop:e=>{let{width:n,height:r}=t.wrapLayout,a=i.value.width,o=i.value.height;n>0&&(a=Math.min(a,n)),r>0&&(o=Math.min(o,r));let c={x:(n-a)/2,y:(r-o)/2};s(e?{...e}:c)},computedClassDrag:()=>{let e=[`cropper-drag-box`];return r.value&&o.value&&e.push(`cropper-modal`),e.join(` `)},getCropBoxStyle:()=>{let e={width:`${a.value.width}px`,height:`${a.value.height}px`,transform:`translate3d(${t.cropAxis.x}px, ${t.cropAxis.y}px, 0)`};return t.cropExhibitionStyle.div=e,e},getCropImgStyle:()=>{let e=t.imgAxis.scale,n=(t.imgLayout.width*(e-1)/2+(t.imgAxis.x-t.cropAxis.x))/e,r=(t.imgLayout.height*(e-1)/2+(t.imgAxis.y-t.cropAxis.y))/e,i={width:`${t.imgLayout.width}px`,height:`${t.imgLayout.height}px`,transform:`scale(${e}, ${e}) translate3d(${n}px, ${r}px, 0) rotateZ(${t.imgAxis.rotate}deg)`};return t.cropExhibitionStyle.img=i,i},isFullCropMode:ve(()=>!!n.value&&r.value&&!o.value),onCropAxisChanged:()=>{c()}}},vo=e=>{let{canvas:t,outputType:n,outputSize:r,full:i,original:a,maxSideLength:o,cropLayout:s,cropping:c,url:l}=e,u=e=>typeof e?.value<`u`?e.value:e,d=()=>{if(l)return typeof l?.value<`u`?l.value:l},f=(l=`base64`)=>t.value?no({type:l,outputType:n.value,outputSize:r.value,full:i.value,original:a.value,maxSideLength:o.value,sourceCanvas:t.value,url:d(),imgAxis:{...u(e.imgAxis)},imgLayout:{...u(e.imgLayout)},cropLayout:{...s.value},cropAxis:{...u(e.cropAxis)},cropping:c.value}):Promise.reject(Error(`No image canvas available`));return{getCropData:f,getCropBlob:()=>f(`blob`)}},yo=e=>{typeof e==`string`&&e.startsWith(`blob:`)&&URL.revokeObjectURL(e)},bo=async e=>{try{let t=new Image;if(t.src=e,typeof t.decode==`function`){await t.decode();return}await new Promise(e=>{t.onload=()=>e(),t.onerror=()=>e()})}catch{}},xo=()=>new Promise(e=>{requestAnimationFrame(()=>e())}),So=e=>{if(typeof window>`u`)return 1;let t=(e?e():window.devicePixelRatio)||1;return Math.min(Math.max(1,t),2)},Co=async(e,t)=>{let{previewMaxSide:n,getWrapLayout:r,getDevicePixelRatio:i}=t,a=Number(n),o=Number.isFinite(a)&&a>0?a:1/0,s=r(),c=Math.max(1,Math.max(s.width||0,s.height||0)*So(i)),l=Math.max(e.width,e.height),u=Math.min(1,Math.min(o,c)/Math.max(1,l)),d=e;if(u<1){let t=Math.max(1,Math.round(e.width*u)),n=Math.max(1,Math.round(e.height*u)),r=document.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);i.imageSmoothingEnabled=!0,`imageSmoothingQuality`in i&&(i.imageSmoothingQuality=`high`),i.drawImage(e,0,0,t,n),d=r}return new Promise((e,t)=>{d.toBlob(async n=>{if(!n){t(Error(`Failed to create preview blob`));return}let r=URL.createObjectURL(n);await bo(r),e(r)},`image/png`,1)})},wo=e=>{let{canvas:t,imgs:n,imgLoading:r,cropping:i,filter:a,mode:o,defaultRotate:s,layout:c,updateWrapLayoutFromDom:l,createPreviewUrl:u,imgLoadEmit:d,renderCrop:f,reboundImg:p,queueRealTimeEmit:m}=e,h=0,g=!1,ee=e=>{if(t.value){if(a.value){let e=t.value;e=a.value(e)??e,t.value=e}_(e)}},_=e=>{if(t.value)try{l(),c.imgLayout={width:t.value.width,height:t.value.height};let a=Qa({scale:Za({...c.imgLayout},{...c.wrapLayout},o.value),imgStyle:{...c.imgLayout},layoutStyle:{...c.wrapLayout},rotate:Pa(s.value)});c.imgExhibitionStyle=a.imgExhibitionStyle,c.imgAxis=a.imgAxis;let d=n.value;u(t.value).then(async t=>{if(g||e!==h){yo(t);return}n.value=t,yo(d),i.value&&f(),p(),m(),await Te(),await xo(),r.value=!1}).catch(t=>{g||e!==h||(n.value=``,r.value=!1)})}catch{r.value=!1}},te=async e=>{let i=++h;r.value=!0;let a=n.value;n.value=``,yo(a),t.value=null;let o;try{o=await Ka(e),d({type:`success`,message:`图片加载成功`})}catch(e){return d({type:`error`,message:`图片加载失败${e}`}),r.value=!1,!1}let s={orientation:-1};try{s=await qa(o)}catch{s.orientation=1}let c=s.orientation||-1;c=Xa(c);let l=document.createElement(`canvas`);try{l=Ja(o,l,c)??l}catch{}return g||i!==h?(r.value=!1,!1):(t.value=l,ee(i),!0)},ne=()=>{g=!0,h+=1,yo(n.value)};return ke(()=>{ne()}),{checkedImg:te,markUnmounted:ne}},To=e=>{let{cropperRef:t,isDrag:n,onUpload:r}=e,i=e=>{e.preventDefault();let t=e.dataTransfer;n.value=!1,eo(t.files[0]).then(e=>{e&&r(e)})},a=e=>{e.preventDefault(),n.value=!0},o=e=>{e.preventDefault(),n.value=!1};return De(()=>{let e=t.value;e&&(e.addEventListener(`dragover`,a,!1),e.addEventListener(`dragend`,o,!1),e.addEventListener(`drop`,i,!1))}),ke(()=>{t.value?.removeEventListener(`drop`,i,!1),t.value?.removeEventListener(`dragover`,a,!1),t.value?.removeEventListener(`dragend`,o,!1)}),{drop:i,dragover:a,dragend:o}},Eo=e=>{let{isIE:t,supportWheel:n,changeImgSize:r,setScale:i}=e,a=e=>typeof e?.value<`u`?e.value:e,o=t=>{t.preventDefault();let n=a(e.imgAxis),o=a(e.imgLayout);i(r(t,n.scale,o))},s=()=>{typeof window>`u`||(t?window.addEventListener(n,o):window.addEventListener(n,o,{passive:!1}))},c=()=>{typeof window>`u`||window.removeEventListener(n,o)};return ke(()=>{c()}),{mouseInCropper:s,mouseOutCropper:c}},Do=e=>{let{img:t,imgs:n,imgLoading:r,cropping:i,filter:a,mode:o,defaultRotate:s,cropLayout:c,wrapperStyle:l,cropLayoutStyle:u,shouldShowCropBox:d,centerBox:f,centerWrapper:p,innerCropLayout:m,layout:h,checkedImg:g,bindMoveImg:ee,bindMoveCrop:_,unbindMoveCrop:te,renderCrop:ne,setImgAxis:re,reboundImg:ie,updateWrapLayoutFromDom:ae,normalizeRotate:oe,setRotate:se}=e;R(t,e=>{e&&e!==n.value&&g(e)}),R(n,e=>{e&&(Te(()=>{ee()}),i.value&&d.value&&Te(()=>{_()}))}),R(i,e=>{e&&d.value&&Te(()=>{_()})}),R(a,()=>{r.value=!0,g(t.value)}),R(o,()=>{r.value=!0,g(t.value)}),R(s,e=>{se(oe(e))}),R(c,e=>{m.value={...e}},{deep:!0}),R(l,async()=>{await Te(),ae(),n.value&&(i.value&&ne({...h.cropAxis}),re({x:h.imgAxis.x,y:h.imgAxis.y}),ie())},{deep:!0,flush:`post`}),R(u,()=>{n.value&&(i.value&&ne({...h.cropAxis}),ie())},{deep:!0}),R(d,e=>{if(n.value){if(e&&i.value){Te(()=>{_()});return}te()}},{flush:`post`}),R(f,e=>{e&&ie()}),R(p,e=>{e&&ie()})},Oo=e=>{let{imgs:t,img:n,imgLoading:r,layout:i,innerCropLayout:a,checkedImg:o,updateWrapLayoutFromDom:s,renderCrop:c,checkedCrop:l,reboundImg:u,queueRealTimeEmit:d}=e,f=(e,n=!0)=>{let{x:r,y:a,scale:o}=i.imgAxis,s={x:r,y:a},c=Qa({scale:o,imgStyle:{...i.imgLayout},layoutStyle:{...i.wrapLayout},rotate:e},s);i.imgExhibitionStyle=c.imgExhibitionStyle,i.imgAxis=c.imgAxis,d(),n&&t.value&&u()};return{setRotate:f,rotateLeft:()=>{f(i.imgAxis.rotate-90)},rotateRight:()=>{f(i.imgAxis.rotate+90)},rotateClear:()=>{f(0)},reload:()=>n.value?o(n.value):(t.value=``,r.value=!1,!1),setRotateAngle:e=>{f(Pa(e))},setCropLayout:e=>{a.value={...e},t.value&&(s(),c(),u())},setCropAxis:e=>{t.value&&(s(),l({...e}),u())}}},ko=()=>({imgLayout:{width:0,height:0},wrapLayout:{width:0,height:0},imgAxis:{x:0,y:0,scale:0,rotate:0},imgExhibitionStyle:{width:``,height:``,transform:``},cropAxis:{x:0,y:0},cropExhibitionStyle:{div:{},img:{}}}),Ao=e=>{let{centerBox:t,centerWrapper:n,centerBoxDelay:r,centerWrapperDelay:i}=e;return{getBoundaryDuration:()=>t.value?Math.max(0,r.value):n.value?Math.max(0,i.value):Aa}},jo=e=>{let{previewMaxSide:t,getWrapLayout:n}=e;return{createPreviewUrl:e=>Co(e,{previewMaxSide:t.value,getWrapLayout:n})}},Mo=e=>({imgLoadEmit:t=>{e(`img-load`,t)},imgUploadEmit:t=>{e(`img-upload`,t)},emitRealTime:(t,n)=>{if(t===`real-time`){e(`real-time`,n);return}e(`realTime`,n)}}),No=[`onMouseover`,`onMouseout`],Po={key:0,class:`cropper-box cropper-fade-in`},Fo=[`src`],Io=[`src`],Lo={key:2,class:`cropper-full-mask cropper-fade-in`},Ro={key:3,class:`drag`},zo=be({__name:`vue-cropper`,props:{img:{default:``},wrapper:{default:()=>({width:300,height:300})},cropLayout:{default:()=>({width:200,height:200})},color:{default:`#fff`},filter:{type:[Function,null],default:null},outputType:{default:`png`},outputSize:{default:1},full:{type:Boolean,default:!0},original:{type:Boolean,default:!1},maxSideLength:{default:3e3},previewMaxSide:{default:2048},mode:{default:`cover`},cropColor:{default:`#fff`},defaultRotate:{default:0},centerBox:{type:Boolean,default:!1},centerWrapper:{type:Boolean,default:!1},centerBoxDelay:{default:Aa},centerWrapperDelay:{default:Aa}},emits:[`img-load`,`img-upload`,`real-time`,`realTime`],setup(e,{expose:t,emit:n}){let r=e,i=j(),a=j(),o=j(),s=n,c=j(!1),l=j(``),u=j(null),d=je(ko()),f=j(!1),p=j(!0),{img:m,filter:h,mode:g,defaultRotate:ee,outputType:_,outputSize:te,full:ne,original:re,maxSideLength:ie,previewMaxSide:ae,centerBox:oe,cropLayout:se,centerWrapper:ce,centerBoxDelay:le,centerWrapperDelay:ue}=Be(r),{wrapperStyle:de,innerCropLayout:fe,cropLayoutStyle:pe,effectiveCropLayoutStyle:me,shouldShowCropBox:he,isFullCropMode:v,updateWrapLayoutFromDom:ge}=Fa({props:r,cropperRef:i,layoutContainer:d,imgs:l,cropping:p}),{getBoundaryDuration:_e}=Ao({centerBox:oe,centerWrapper:ce,centerBoxDelay:le,centerWrapperDelay:ue}),{imgLoadEmit:ve,imgUploadEmit:y,emitRealTime:C}=Mo(s),{queueRealTimeEmit:be}=go({imgs:l,cropping:p,effectiveCropLayoutStyle:me,layout:d,emit:C}),{bindMoveImg:xe,unbindMoveImg:Se,bindMoveCrop:T,unbindMoveCrop:Ce,setScale:we,setImgAxis:E,reboundImg:Te,checkedCrop:O}=ho({cropperImg:a,cropperBox:o,layout:d,cropping:p,centerBox:oe,centerWrapper:ce,effectiveCropLayoutStyle:me,getBoundaryDuration:_e,queueRealTimeEmit:be});To({cropperRef:i,isDrag:f,onUpload:y});let{renderCrop:Ee,computedClassDrag:Oe,getCropBoxStyle:Ae,getCropImgStyle:Me}=_o({layout:d,imgs:l,cropping:p,cropLayoutStyle:pe,effectiveCropLayoutStyle:me,shouldShowCropBox:he,checkedCrop:O,queueRealTimeEmit:be}),M=ze(d,`imgAxis`),P=ze(d,`imgLayout`),{getCropData:Ne,getCropBlob:Pe}=vo({canvas:u,outputType:_,outputSize:te,full:ne,original:re,maxSideLength:ie,imgAxis:M,imgLayout:P,cropAxis:ze(d,`cropAxis`),cropLayout:me,cropping:p,url:m}),{createPreviewUrl:Fe}=jo({previewMaxSide:ae,getWrapLayout:()=>(ge(),{...d.wrapLayout})}),{checkedImg:Ie}=wo({canvas:u,imgs:l,imgLoading:c,cropping:p,filter:h,mode:g,defaultRotate:ee,layout:d,updateWrapLayoutFromDom:ge,createPreviewUrl:Fe,imgLoadEmit:ve,renderCrop:()=>Ee(),reboundImg:Te,queueRealTimeEmit:be}),{mouseInCropper:F,mouseOutCropper:Le}=Eo({isIE:Ta,supportWheel:Oa,changeImgSize:Ea,imgAxis:M,imgLayout:P,setScale:we});Do({img:m,imgs:l,imgLoading:c,cropping:p,filter:h,mode:g,defaultRotate:ee,cropLayout:se,wrapperStyle:de,cropLayoutStyle:pe,shouldShowCropBox:he,centerBox:oe,centerWrapper:ce,innerCropLayout:fe,layout:d,checkedImg:Ie,bindMoveImg:xe,bindMoveCrop:T,unbindMoveCrop:Ce,renderCrop:Ee,setImgAxis:E,reboundImg:Te,updateWrapLayoutFromDom:ge,normalizeRotate:Pa,setRotate:e=>Re(e)});let{setRotate:Re,rotateLeft:Ve,rotateRight:He,rotateClear:L,reload:R,setRotateAngle:B,setCropLayout:We,setCropAxis:Ge}=Oo({imgs:l,img:m,imgLoading:c,layout:d,innerCropLayout:fe,checkedImg:Ie,updateWrapLayoutFromDom:ge,renderCrop:Ee,checkedCrop:O,reboundImg:Te,queueRealTimeEmit:be});De(()=>{r.img?Ie(r.img):l.value=``}),ke(()=>{Se(),Ce()});let Ke=Ue();return t({getCropData:Ne,getCropBlob:Pe,rotateLeft:Ve,rotateRight:He,rotateClear:L,reload:R,setRotateAngle:B,setCropLayout:We,setCropAxis:Ge}),(t,n)=>(A(),x(`section`,{class:`vue-cropper`,style:k(I(de)),ref_key:`cropperRef`,ref:i,onMouseover:I(F),onMouseout:I(Le)},[l.value?(A(),x(`section`,Po,[S(`section`,{class:`cropper-box-canvas`,style:k(d.imgExhibitionStyle)},[S(`img`,{src:l.value,alt:`cropper-next-vue`},null,8,Fo)],4),S(`section`,{class:D(I(Oe)()),ref_key:`cropperImg`,ref:a},null,2)])):b(``,!0),p.value&&l.value&&I(he)?(A(),x(`section`,{key:1,class:`cropper-crop-box cropper-fade-in`,style:k(I(Ae)())},[S(`span`,{class:`cropper-view-box`,style:k({outlineColor:e.cropColor})},[I(m)?(A(),x(`img`,{key:0,src:l.value,style:k(I(Me)()),alt:`cropper-img`},null,12,Io)):b(``,!0)],4),S(`span`,{class:`cropper-face cropper-move`,ref_key:`cropperBox`,ref:o},null,512)],4)):b(``,!0),I(v)?(A(),x(`section`,Lo)):b(``,!0),f.value?(A(),x(`section`,Ro,[N(t.$slots,`drag`,{},()=>[n[0]||=S(`p`,null,`拖动图片到此`,-1)])])):b(``,!0),w(I(ja),{"is-visible":c.value},ye({_:2},[I(Ke).loading?{name:`default`,fn:z(()=>[N(t.$slots,`loading`)]),key:`0`}:void 0]),1032,[`is-visible`])],44,No))}});typeof window<`u`&&(window.requestAnimationFrame||(window.requestAnimationFrame=e=>window.setTimeout(e,17)),window.cancelAnimationFrame||(window.cancelAnimationFrame=e=>{window.clearTimeout(e)})),{version:`0.2.0`}.version;var Bo={class:`cv-upload-crop-box`},Vo={class:`cv-upload-crop-left-box`},Ho={class:`cv-upload-crop-left-opt`},Uo={class:`cv-upload-crop-left-opt2`},Wo={class:`cv-upload-crop-left-opt2`},Go={class:`cv-upload-crop-right-box`},Ko=[`innerHTML`],qo={title:`头像上传`,name:`cvUploadAvatar`,mixins:[da],components:{UploadCrop:Object.assign({props:{loading:{type:[Boolean],default:!1},modelValue:{type:[Boolean],default:!1},src:{type:[String],default:``},size:{type:[Number],default:120},title:{type:[String],default:`裁剪`}},emits:[`update:modelValue`,`onSubmit`,`onClose`],data(){return{cropDialogVisible:!1,cropAutoCrop:!0,cropFixedBox:!0,cropOutputType:`png`,cropPreviews:{},cropVisible:!1,cropBeforelImage:``,cropAfterImage:``,cropLocalWidth:this.size,cropLocalHeight:this.size}},watch:{modelValue(e){this.cropDialogVisible=e,this.cropInit()},src(e){this.cropInit()}},computed:{cropAttrs(){return{info:!0,autoCrop:this.cropAutoCrop,fixedBox:this.cropFixedBox,autoCropWidth:this.cropLocalWidth,autoCropHeight:this.cropLocalHeight,outputType:this.cropOutputType}}},mounted(){},methods:{cropInit(){this.cropBeforelImage=this.src||``},cropDialoClose(){this.cropBeforelImage=``,this.cropPreviews=``,this.cropVisible=!1,this.cropDialogVisible=!1,this.$emit(`update:modelValue`,!1),this.$emit(`onClose`,!1)},cropDialogOpened(){this.$nextTick(()=>{this.cropVisible=!0})},cropSubmit(){this._submit_blob()},_submit_blob(){this.$refs.cvAvatartCropper.getCropBlob(e=>{this.$emit(`onSubmit`,{file:e})})},_submit_base64(){this.$refs.cvAvatartCropper.getCropData(e=>{let t=new Image;t.src=e,t.onload=async()=>{imageCompress(t)}})},cropRotateRefresh(){},cropRotateLeft(){this.$refs.cvAvatartCropper.rotateLeft()},cropRotateRight(){this.$refs.cvAvatartCropper.rotateRight()},cropChangeScale(e){e||=1,this.$refs.cvAvatartCropper.changeScale(e)},cropRealTime(e){this.cropPreviews=e}}},{__name:`UploadCrop`,setup(e){return(t,n)=>{let r=P(`el-button`),i=P(`el-tooltip`),a=P(`el-input`),o=P(`el-dialog`),s=Ne(`loading`);return A(),y(o,{title:e.title,modelValue:t.cropDialogVisible,"onUpdate:modelValue":n[7]||=e=>t.cropDialogVisible=e,width:`800px`,"append-to-body":``,onOpened:t.cropDialogOpened,onClose:t.cropDialoClose},{footer:z(()=>[w(r,{type:`primary`,onClick:t.cropSubmit,loading:e.loading,disabled:e.loading},{default:z(()=>[...n[12]||=[C(`提 交`,-1)]]),_:1},8,[`onClick`,`loading`,`disabled`])]),default:z(()=>[B((A(),x(`div`,Bo,[S(`div`,Vo,[t.cropVisible?(A(),y(I(zo),E({key:0,ref:`cvAvatartCropper`,img:t.cropBeforelImage},t.cropAttrs,{onRealTime:t.cropRealTime}),null,16,[`img`,`onRealTime`])):b(``,!0),S(`div`,Ho,[N(t.$slots,`default`),w(i,{effect:`dark`,content:`重置`,placement:`top`},{default:z(()=>[w(r,{icon:`ElIconRefresh`,onClick:n[0]||=e=>t.cropRotateRefresh()})]),_:1}),w(i,{effect:`dark`,content:`放大`,placement:`top`},{default:z(()=>[w(r,{icon:`ElIconZoomIn`,onClick:n[1]||=e=>t.cropChangeScale(1)})]),_:1}),w(i,{effect:`dark`,content:`缩小`,placement:`top`},{default:z(()=>[w(r,{icon:`ElIconZoomOut`,onClick:n[2]||=e=>t.cropChangeScale(-1)})]),_:1}),w(i,{effect:`dark`,content:`向左旋转`,placement:`top`},{default:z(()=>[w(r,{icon:`ElIconRefreshLeft`,onClick:n[3]||=e=>t.cropRotateLeft()})]),_:1}),w(i,{effect:`dark`,content:`向右旋转`,placement:`top`},{default:z(()=>[w(r,{icon:`ElIconRefreshRight`,onClick:n[4]||=e=>t.cropRotateRight()})]),_:1})]),S(`div`,Uo,[w(a,{size:`small`},{prepend:z(()=>[...n[8]||=[C(`X\xA0坐标`,-1)]]),_:1}),w(a,{size:`small`},{prepend:z(()=>[...n[9]||=[C(`Y\xA0坐标`,-1)]]),_:1})]),S(`div`,Wo,[w(a,{size:`small`,modelValue:t.cropLocalWidth,"onUpdate:modelValue":n[5]||=e=>t.cropLocalWidth=e},{prepend:z(()=>[...n[10]||=[C(`宽度`,-1)]]),_:1},8,[`modelValue`]),w(a,{size:`small`,modelValue:t.cropLocalHeight,"onUpdate:modelValue":n[6]||=e=>t.cropLocalHeight=e},{prepend:z(()=>[...n[11]||=[C(`高度`,-1)]]),_:1},8,[`modelValue`])])]),S(`div`,Go,[S(`div`,{class:`cv-upload-crop-preview`,innerHTML:t.cropPreviews.html},null,8,Ko)])])),[[s,e.loading]])]),_:3},8,[`title`,`modelValue`,`onOpened`,`onClose`])}}})},props:{modelValue:{type:[String],default:``},initValue:{type:[String],default:``},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>[`png`,`jpg`,`jpeg`,`gif`]},showSize:{type:Number,default:120},crop:{type:[Boolean],default:!0},signatureParam:{type:[Object],default:()=>({save_sign:`avatar`})}},data(){return{localValue:``,localList:[],upAccept:`image/*`}},computed:{localRef(){return`cvUploadAvatar`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,accept:this.upAccept,limit:1,multiple:!1,drag:!1,disabled:this.upIngLoading,showFileList:!1}},showStyle(){return{width:this.showSize+`px`,height:this.showSize+`px`,lineHeight:this.showSize+`px`}}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.localValue=this.initValue||``},cropDialogOpen(){this.cropShow=!0,this.$nextTick(()=>{this._init_parse()})},initBeforeUpload(e){if(!this._commonBeforeUpload(e))return this.upIngLoading=!1,!1;if(this.crop){let t=new FileReader;t.readAsDataURL(e),t.onload=()=>{this.localValue=t.result},this.$refs.cvUploadAvatar.clearFiles()}},async onHttpRequest(e){let{file:t}=e;this.upIngLoading=!0,await ba(t,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(e=>{this.$nextTick(()=>{this.$emit(`update:modelValue`,e.full_path),this.$emit(`update:initValue`,e.cdn_full_path)}),re.success(`上传成功`),this.upIngLoading=!1,this.cropShow=!1}).catch(()=>{this.upIngLoading=!1})}}},Jo=[`src`];function Yo(e,t,n,r,i,a){let o=P(`upload-tip`),s=P(`cv-icons`),c=P(`el-button`),l=P(`el-tooltip`),u=P(`el-upload`),d=P(`upload-crop`);return A(),x(`div`,{class:`cv-upload-avatar-wrap`,onClick:t[2]||=(...e)=>a.cropDialogOpen&&a.cropDialogOpen(...e)},[n.initValue?b(``,!0):(A(),x(`div`,{key:0,class:`cv-upload-avatar-box cv-upload-avatar-empty`,style:k(a.showStyle)},[...t[3]||=[S(`div`,{class:`cv-upload-avatar__text`},`上传头像`,-1)]],4)),n.initValue?(A(),x(`div`,{key:1,class:`cv-upload-avatar-box`,style:k(a.showStyle)},[S(`img`,{class:`cv-upload-avatar__img`,src:n.initValue},null,8,Jo)],4)):b(``,!0),w(o,E(e.tipAttr,{fileUnit:`张`,multiple:!1,limit:1}),null,16),n.crop?(A(),y(d,{key:2,modelValue:e.cropShow,"onUpdate:modelValue":t[0]||=t=>e.cropShow=t,title:`修改头像`,size:n.showSize,onOnSubmit:a.onHttpRequest,onOnClose:t[1]||=t=>e.upIngLoading=!1,loading:e.upIngLoading,src:i.localValue},{default:z(()=>[w(u,E(a.handlerAttr,{"before-upload":a.initBeforeUpload,"http-request":e.initHttpRequest}),{default:z(()=>[w(l,{effect:`dark`,content:`选择图片`,placement:`top`},{default:z(()=>[w(c,{style:{"margin-right":`10px`},loading:e.upIngLoading,disabled:e.upIngLoading},{default:z(()=>[w(s,{type:`actionPlus`,size:`14`,style:{"margin-right":`10px`}}),t[4]||=C(` 选择 `,-1)]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1},16,[`before-upload`,`http-request`])]),_:1},8,[`modelValue`,`size`,`onOnSubmit`,`loading`,`src`])):b(``,!0)])}var Xo=H(qo,[[`render`,Yo]]);function Zo(e){return e?typeof e==`string`||typeof e==`number`?[e]:Object.prototype.toString.call(e)===`[object Object]`?[]:[...e]:[]}function Qo(e,t){let n=[];Array.isArray(e)&&e.length>0&&n.push(...e),Array.isArray(t)&&t.length>0&&n.push(...t),typeof t==`string`&&n.push(t);let r=[];for(let e in n){let t=n[e],i=Object.prototype.toString.call(t);i===`[object String]`?r.push(t):i===`[object Object]`&&t.url&&r.push(t.url)}return r}var $o={title:`图片上传`,name:`cvUploadImage`,mixins:[da],components:{},props:{modelValue:{type:[String,Number,Array,Object],default:``},initValue:{type:[String,Number,Array],default:()=>``},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>[`png`,`jpg`,`jpeg`,`gif`]},showSize:{type:Number,default:150},showBig:{type:[Boolean],default:!1},crop:{type:[Boolean],default:!1},galleryLabel:{type:String,default:``},lazy:{type:Boolean,default:!0},drag:{type:Boolean,default:!1},signatureParam:{type:[Object],default:()=>({save_sign:`image`})}},data(){return{localValue:[],localList:[],previewShow:!1,previewTitle:``,previewUrl:``,upAccept:`image/*`}},computed:{localRef(){return`cvUploadImage`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,accept:this.upAccept,limit:parseInt(this.limit),multiple:this.multiple,drag:!!this.drag,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!(this.localList.length>=this.limit)},showStyle(){let e=this.showSize+`px`;return(this.showBig||this.drag)&&(e=this.showSize*2+`px`),{width:e,height:this.showSize+`px`,lineHeight:this.showSize+`px`}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue==`string`&&this.modelValue.includes(`,`)){let e=String(this.modelValue).split(`,`).map(e=>e.trim());this.localValue=Zo(e)}else this.localValue=Zo(this.modelValue);else this.localValue=[]},_init_parse_list(){this.initValue?this.localList=fa(this.initValue):this.localList=[]},initOnChange(e,t){},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){let{file:t}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await ba(t,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(e=>{this.$nextTick(()=>{this.updateValue(e.filelog_id,e.cdn_full_path)}),re.success(`上传成功`),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},updateValue(e,t){if(this.multiple){let t=Qo(this.localValue,e).join(`,`);this.$emit(`update:modelValue`,t)}else this.$emit(`update:modelValue`,e);if(this.multiple){let e=Qo(this.localList,t);this.$emit(`update:initValue`,e)}else this.$emit(`update:initValue`,t)},handleItemPreview(e,t){e.raw,e.type.includes(`image`)?(this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0):window.open(e.url)},doRemove(e){this.multiple?(this.localValue.splice(e,1),this.localList.splice(e,1)):(this.localValue=``,this.localList=[]),this.updateValue(null,null)},handleItemRemove(e,t){if(this.beforeRemove&&typeof this.beforeRemove==`function`){let e=this.multiple?this.localValue[t]:this.localValue,n=this.beforeRemove(e,this.localValue);n&&n.then?n.then(()=>{this.doRemove(t)},()=>{}):n!==!1&&this.doRemove(t)}else this.doRemove(t)},handleItemEdit(e,t){ae.prompt(`请输入文件地址`,`编辑`,{confirmButtonText:`OK`,cancelButtonText:`Cancel`,inputValue:e.url||``,inputErrorMessage:`格式不正确`}).then(({value:e})=>{let n=e.split(`/`).pop(),r=n.split(`.`).pop().toLowerCase();if(!this.fileType.includes(r)){let e=this.fileType.join(`、`);return re.error(`文件格式错误,请填写类型,如:${e} 格式文件`),!1}let i=Qr(r);if(!i)return re.error(`文件格式错误`),!1;qr(e)||this.mergeAttrs?.baseDomain&&(e=this.mergeAttrs?.baseDomain+e);let a={name:n,status:`success`,type:i,uid:Date.now(),url:e};this.localList[t]=a}).catch(()=>{})},handleItemCrop(e,t){}}},es={class:`cv-upload-image cv-upload-common`},ts={class:`cv-upload-list-box el-upload-list el-upload-list--picture-card`},ns=[`tabindex`],rs={class:`el-upload-list__item-status-label`},is={class:`el-upload-list__item-actions`},as=[`onClick`],os={class:`el-upload-list__item-delete`},ss={class:`el-upload-list__item-delete`},cs=[`onClick`],ls={style:{margin:`0 auto`}},us=[`src`];function ds(e,t,n,r,i,a){let o=P(`el-image`),s=P(`cv-icons`),c=P(`el-upload`),l=P(`upload-tip`),u=P(`el-dialog`),d=Ne(`loading`);return A(),x(`div`,es,[S(`div`,ts,[(A(!0),x(v,null,M(i.localList,(e,t)=>(A(),x(`section`,{class:`el-upload-list__item is-success`,key:t,tabindex:t,style:k(a.showStyle)},[w(o,{class:`el-upload-list__item-thumbnail`,lazy:n.lazy,src:e.url,style:k(a.showStyle),fit:`contain`},null,8,[`lazy`,`src`,`style`]),S(`label`,rs,[w(s,{type:`actionCheck`,color:`#ffffff`,size:`12`})]),S(`span`,is,[S(`span`,{class:`el-upload-list__item-preview`,onClick:t=>a.handleItemPreview(e)},[w(s,{type:`ElIconZoomIn`,size:`20`})],8,as),S(`span`,os,[w(s,{type:`actionDelete`,size:`20`,onClick:n=>a.handleItemRemove(e,t)},null,8,[`onClick`])]),S(`span`,ss,[w(s,{type:`ElIconEdit`,size:`20`,onClick:n=>a.handleItemEdit(e,t)},null,8,[`onClick`])]),n.crop?(A(),x(`span`,{key:0,class:`el-upload-list__item-preview`,onClick:t=>a.handleItemCrop(e)},[w(s,{type:`ElIconCrop`,size:`20`})],8,cs)):b(``,!0)])],12,ns))),128)),a.showUpload?(A(),y(c,E({key:0,class:`cv-upload-common-handle`},a.handlerAttr,{"file-list":i.localList,"before-upload":a.initBeforeUpload,"http-request":a.initHttpRequest,"on-change":a.initOnChange,"on-exceed":e.initOnExceed,style:a.showStyle}),{default:z(()=>[B((A(),x(`div`,{class:`cv-upload-common__ing`,style:k(a.showStyle)},[n.drag?(A(),x(v,{key:0},[w(s,{type:`arrowUploadFilled`,size:`24`}),t[1]||=S(`div`,{class:`el-upload__text`},[C(` 将文件拖到此处,或 `),S(`em`,null,`点击上传`)],-1)],64)):(A(),y(s,{key:1,type:`actionPlus`,size:n.showSize/3},null,8,[`size`]))],4)),[[d,e.upIngLoading]])]),_:1},16,[`file-list`,`before-upload`,`http-request`,`on-change`,`on-exceed`,`style`])):b(``,!0)]),w(l,E(e.tipAttr,{fileUnit:`张`}),null,16),w(u,{modelValue:i.previewShow,"onUpdate:modelValue":t[0]||=e=>i.previewShow=e,title:i.previewTitle,"append-to-body":``},{default:z(()=>[S(`div`,ls,[S(`img`,{width:`100%`,src:i.previewUrl,style:{"max-width":`300px`}},null,8,us)])]),_:1},8,[`modelValue`,`title`])])}var fs=H($o,[[`render`,ds]]),ps={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 ms(e){return`https://10ui.cn/ions/type/${ps[e]}.svg`}var hs={name:`uploadList`,props:{files:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(e){return e.lastIndexOf(`.`)>-1&&ms[e.slice(e.lastIndexOf(`.`)+1).toLowerCase()]||ms.file},getSize(e){return e&&!isNaN(Number(e))?e:``},parsePercentage(e){return parseInt(e,10)},handleDownload(e){e.url},handleDelete(e,t){this.$confirm(`确认删除该文件吗? `).then(()=>{this.$emit(`remove`,e,t)}).catch(()=>{})}}},gs=[`src`],_s={class:`cv-upload-list__item-content-action`};function vs(e,t,n,r,i,a){let o=P(`el-link`);return A(),y(_e,{class:`cv-upload-file-list el-upload-list el-upload-list--text`,name:`el-list`,tag:`ul`},{default:z(()=>[(A(!0),x(v,null,M(n.files,(e,r)=>(A(),x(`li`,{key:e.uid,class:`el-upload-list__item cv-upload-list__item-content`},[w(o,{href:e.url,underline:!1,target:`_blank`},{default:z(()=>[S(`img`,{src:a.getExtension(e.name),class:`el-upload-list__item-content-name-icon`},null,8,gs),S(`span`,null,F(e.name),1)]),_:2},1032,[`href`]),S(`div`,_s,[w(o,{underline:!1},{default:z(()=>[C(F(a.getSize(e.size)),1)]),_:2},1024),n.isCanDownload?(A(),y(o,{key:0,underline:!1,onClick:t=>a.handleDownload(e)},{default:z(()=>[...t[0]||=[C(`下载`,-1)]]),_:1},8,[`onClick`])):b(``,!0),!n.disabled&&n.isCanDelete?(A(),y(o,{key:1,underline:!1,onClick:t=>a.handleDelete(r,e),type:`danger`},{default:z(()=>[...t[1]||=[C(` 删除 `,-1)]]),_:1},8,[`onClick`])):b(``,!0)])]))),128))]),_:1})}var ys={title:`文件上传`,inheritAttrs:!1,name:`cvUploadFile`,mixins:[da],components:{uploadList:H(hs,[[`render`,vs]])},props:{modelValue:{type:[String,Object,Array],default:``},initValue:{type:[String,Object,Array],default:``},fileSize:{type:[Number],default:5},fileType:{type:[Array],default:[`txt`,`png`,`jpg`,`xlsx`,`xls`]},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5},disabled:Boolean,isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0},isCanUploadSame:{type:Boolean,default:!0}},data(){return{localValue:[],localList:[]}},computed:{localRef(){return`cvUploadFile`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,limit:parseInt(this.limit),multiple:this.multiple,drag:!1,disabled:this.upIngLoading,showFileList:!0}},list(){let e=1;return this.modelValue?(Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]).map(t=>(typeof t==`string`&&(t={name:t,url:t}),t.uid=t.uid||new Date().getTime()+ e++,t)):[]}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.initValue?this.localList=fa(this.initValue):this.localList=[]},initOnChange(e,t){this.localList=t},initBeforeUpload(e){return this._commonBeforeUpload(e)?!this.isCanUploadSame&&this.localList.some(t=>t.name+t.size===e.name+e.size)?(this.$message.error(`此文件已上传!`),!1):!0:!1},upFileError(e){this.$message.error(`上传失败, 请重试`),this.$emit(`error`,e)},upFileSuccess(e,t){this.upResponseFn&&typeof this.upResponseFn==`function`&&(e=this.upResponseFn(e,t,this.localList)),this.multiple?this.$emit(`update:modelValue`,[...this.localList,e]):this.$emit(`update:modelValue`,e),this.$emit(`success`,e,this.localList)},handleRemove(e,t){if(this.beforeRemove&&typeof this.beforeRemove==`function`){let e=this.beforeRemove(this.localList[t],this.localList);e&&e.then?e.then(()=>{this._do_remove(t)},()=>{}):e!==!1&&this._do_remove(t)}else this._do_remove(t)},_do_remove(e){if(this.$emit(`remove`,this.list[e],this.list),this.localList.splice(e,1),this.multiple){let t=[...this.list];t.splice(e,1),this.$emit(`update:modelValue`,t||[])}else this.$emit(`update:modelValue`,null)}}},bs={class:`cv-upload-file`};function xs(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-upload`),c=P(`upload-tip`),l=P(`upload-list`);return A(),x(`div`,bs,[w(s,E({class:`cv-upload-file-uploader`},a.handlerAttr,{"file-list":i.localList,"onUpdate:fileList":t[0]||=e=>i.localList=e,"before-upload":a.initBeforeUpload,"on-change":a.initOnChange,"on-exceed":e.initOnExceed,"on-error":a.upFileError,"on-success":a.upFileSuccess}),{default:z(()=>[w(o,{type:`primary`,icon:`ElIconUpload`},{default:z(()=>[...t[1]||=[C(`上传文件`,-1)]]),_:1})]),_:1},16,[`file-list`,`before-upload`,`on-change`,`on-exceed`,`on-error`,`on-success`]),w(c,E(e.tipAttr,{fileUnit:`个`}),null,16),w(l,{disabled:n.disabled,files:a.list,isCanDelete:n.isCanDelete,isCanDownload:n.isCanDownload,onRemove:a.handleRemove},null,8,[`disabled`,`files`,`isCanDelete`,`isCanDownload`,`onRemove`])])}var Ss=H(ys,[[`render`,xs]]),Cs={title:`视频上传`,name:`cvUploadVideo`,mixins:[da],components:{},props:{modelValue:{type:[String],default:``},initValue:{type:[String],default:``},fileSize:{type:[Number],default:10},fileType:{type:Array,default:[`mp4`,`mp3`]},showSize:{type:Number,default:360},signatureParam:{type:[Object],default:()=>({save_sign:`video`})}},data(){return{localValue:``,localList:``,previewShow:!1,previewTitle:``,previewUrl:``,upAccept:`video/*`}},computed:{localRef(){return`cvUploadVideo`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,accept:this.upAccept,limit:1,multiple:!1,drag:!0,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!this.localValue},showStyle(){return{width:this.showSize+`px`,height:this.showSize/5*3+`px`,lineHeight:this.showSize+`px`}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){this._init_parse_value(),this._init_parse_list()},methods:{_init_parse_value(){this.modelValue?this.localValue=Zo(this.modelValue):this.localValue=``},_init_parse_list(){this.initValue?this.localList=fa(this.initValue):this.localList=``},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){let{file:t}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await ba(t,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(e=>{this.$nextTick(()=>{this.$emit(`update:modelValue`,e.full_path),this.$emit(`update:initValue`,e.cdn_full_path)}),ExtendMessage.success(`上传成功`),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},handleItemPreview(e,t){this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0},doRemove(e){this.localValue=``,this.localList=``,this.$emit(`update:modelValue`,``),this.$emit(`update:initValue`,``)},handleItemRemove(e,t){if(this.beforeRemove&&typeof this.beforeRemove==`function`){let e=this.multiple?this.localValue[t]:this.localValue,n=this.beforeRemove(e,this.localValue);n&&n.then?n.then(()=>{this.doRemove(t)},()=>{}):n!==!1&&this.doRemove(t)}else this.doRemove(t)}}},ws={class:`cv-upload-video`},Ts={class:`cv-upload-list-box el-upload-list el-upload-list--picture-card`},Es=[`tabindex`],Ds=[`src`],Os={class:`el-upload-list__item-status-label`},ks={class:`el-upload-list__item-actions`},As=[`onClick`],js={class:`el-upload-list__item-delete`},Ms={class:`el-upload-list__item-delete`},Ns={key:0,style:{width:`500px`,height:`300px`,margin:`0 auto`}},Ps=[`src`];function Fs(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-progress`),c=P(`el-upload`),l=P(`upload-tip`),u=P(`el-dialog`);return A(),x(`div`,ws,[S(`div`,Ts,[i.localList?(A(!0),x(v,{key:0},M(i.localList,(t,n)=>(A(),x(`section`,{class:`el-upload-list__item is-success`,key:n,tabindex:n,style:k(a.showStyle)},[S(`video`,{class:`el-upload-list__item-thumbnail`,autoplay:!1,src:t.url,style:k(a.showStyle)},` 您的浏览器不支持视频播放 `,12,Ds),S(`label`,Os,[w(o,{type:`actionCheck`,color:`#ffffff`,size:`12`})]),S(`span`,ks,[S(`span`,{class:`el-upload-list__item-preview`,onClick:e=>a.handleItemPreview(t)},[w(o,{type:`ElIconVideoPlay`,size:`20`})],8,As),S(`span`,js,[w(o,{type:`actionDelete`,size:`20`,onClick:e=>a.handleItemRemove(t,n)},null,8,[`onClick`])]),S(`span`,Ms,[w(o,{type:`ElIconEdit`,size:`20`,onClick:r=>e.handleItemEdit(t,n)},null,8,[`onClick`])])])],12,Es))),128)):b(``,!0),a.showUpload?(A(),y(c,E({key:1,class:`cv-upload-handler`},a.handlerAttr,{"before-upload":a.initBeforeUpload,"http-request":a.initHttpRequest,style:a.showStyle}),{default:z(()=>[e.upIngPercent>0?(A(),y(s,{key:0,percentage:e.upIngPercent,style:{"margin-top":`20px`},type:`circle`},null,8,[`percentage`])):(A(),x(`div`,{key:1,class:`cv-upload-video__ing`,style:k(a.showStyle)},[w(o,{type:`arrowUploadFilled`,size:`24`}),t[1]||=S(`div`,{class:`el-upload__text`},[C(` 将视频拖到此处,或 `),S(`em`,null,`点击上传`)],-1)],4))]),_:1},16,[`before-upload`,`http-request`,`style`])):b(``,!0)]),w(l,E(e.tipAttr,{fileUnit:`个`,limit:1}),null,16),w(u,{modelValue:i.previewShow,"onUpdate:modelValue":t[0]||=e=>i.previewShow=e,title:i.previewTitle,"append-to-body":``},{default:z(()=>[i.previewShow?(A(),x(`div`,Ns,[S(`video`,{autoplay:!0,src:i.previewUrl,controls:`controls`,style:{width:`500px`,height:`300px`}},` 您的浏览器不支持视频播放 `,8,Ps)])):b(``,!0)]),_:1},8,[`modelValue`,`title`])])}var Is=H(Cs,[[`render`,Fs]]),Ls={name:`cvUploadOss`,mixins:[{emits:[`get-unlist`,`on-close`,`on-update`,`on-delete`],props:{modelValue:{type:Array,default:()=>[]},model:{type:String,default:``},accept:{type:String,default:``},multiple:{type:Boolean,default:!1}},data(){return{audioInfo:{},file:null,fileList:[],fileHash:``,tempCheckpoint:null,uploadId:``,uploadStatus:null,showAudio:!1,percentage:0,uploadName:``,client:null,year:new Date().getFullYear(),uploadDisabled:!0,resumeDisabled:!0,pauseDisabled:!0,dialogVisible:!1,isDoing:!1,unList:[],fileMap:{},map_max_key:0,partSize:1024*1024,parallel:4,checkpoints:{}}},watch:{dialogVisible:{handler(e){e||(this.fileList=[],this.$refs.upload.uploadFiles=[])}},fileList:{handler(e){if(e.length){this.dialogVisible=!0;let t=[],n=[];e.forEach(e=>{e.raw.name.indexOf(`.`)===-1&&(e.errMsg=`不支持此格式上传`),e.percentage===100?t.push(e):n.push(e)}),t.length===e.length?(this.pauseDisabled=!0,this.isDoing=!0):this.isDoing=!1,this.unList=n}},deep:!0}},mounted(){window.addEventListener(`online`,this.resumeUpload)},methods:{filterSize:ha,handleExceed(){this.$confirm(`上传文件数量不能超过100个,请重新选择!`,`操作提示`,{confirmButtonText:`确 定`,cancelButtonText:`取 消`,type:`warning`}).then(()=>{this.fileList=[],this.dialogVisible=!1}).catch(()=>{this.fileList=[]})},handleDeleteChangeFile(e){this.fileList.splice(e,1),this.fileList.length||(this.dialogVisible=!1)},fileTypeIcon(e){let{type:t}=e.raw,n=t.indexOf(`video`)!==-1,r=t.indexOf(`image`)!==-1,i=t.indexOf(`audio`)!==-1,a=t.indexOf(`zip`)!==-1,o=t.indexOf(`wordprocessingml`)!==-1,s=t.indexOf(`pdf`)!==-1,c=t.indexOf(`text`)!==-1,l=t.indexOf(`sheet`)!==-1;return n?`MP4`:r?`JPG1`:i?`mp3-1`:a?`yasuo`:o?`DOCX`:s?`wenjianleixing-biaozhuntu-PDFwendang`:c?`div-1`:l?`excel1`:`weizhiwenjian`},handleClose(){this.$emit(`on-close`),this.isDoing?this.dialogVisible=!1:this.$confirm(`正在上传文件,关闭后上传文件会丢失!是否继续?`,`操作提示`,{confirmButtonText:`确 定`,cancelButtonText:`取 消`,type:`warning`}).then(()=>{this.$emit(`get-unlist`),this.fileList.forEach(e=>{e.client&&e.percentage<100&&e.client.cancel()}),this.dialogVisible=!1}).catch(()=>{})},async handleBeforeUpload(e){},handleStopChangeFile(e,t){t.isPlay=!t.isPlay,this.fileList.splice(e,1,t),t.isPlay?this.resumeMultipartUpload(t):t.client.cancel()},async starUpload(){this.uploadDisabled=!0,this.pauseDisabled=!1,this.multipartUpload()},async multipartUpload(){if(!this.file){re.error(`请选择文件`);return}this.fileList.forEach(async e=>{e.isLoading=!0,await this.ossUploadHandle(e,this.fileList)})},async resumeUpload(){this.pauseDisabled=!1,this.uploadDisabled=!0,this.resumeDisabled=!0,await this.resumeMultipartUpload()},stopUpload(){this.resumeDisabled=!1,this.pauseDisabled=!0,this.fileList.forEach(e=>{e.client.cancel(),e.isPlay=!1})},async change(e,t){this.fileMap[e]=t,this.map_max_key=e},async handle_network_speed_change(e,t,n){e-this.map_max_key>=1e4&&(this.fileMap={});for(let r=e;r<=t;r++){let e=await this.fileMap[r];e?await this.change(r,e+n):await this.change(r,n)}},handle_network_speed(e,t,n){let r=e.rt/1e3,i=new Date(e.headers.date).getTime(),a=i-r,o=parseInt(t/r);return n===0&&(o=0),o===0||this.handle_network_speed_change(a,i,o),o?ha(o):0},async resetUpload(e,t){JSON.stringify(e).indexOf(`Error`)!==-1&&(t.client&&t.client.cancel(),t.client=await va(this.signatureType,this.apiFunc),await this.resumeMultipartUpload(t))},async resumeMultipartUpload(e){if(e){let{tempCheckpoint:t}=e;this.resumeUploadFile(e,t)}else Object.values(this.checkpoints).forEach(e=>{let{uploadId:t}=e,n=this.fileList.findIndex(e=>e.upload===t),r=this.fileList[n];this.resumeUploadFile(r,e)})},async resumeUploadFile(e,t){let{uploadId:n,file:r,name:i}=t;try{let{raw:a,percentage:o}=e;e.partSize=0,o<100&&a.name.indexOf(`.`)!==-1&&e.client.multipartUpload(n,r,{parallel:this.parallel,partSize:this.partSize,progress:async(t,n,r)=>{await this.onUploadProgress(e,t,n,r,i)},checkpoint:t}).then(()=>{delete this.checkpoints[t.uploadId],this.$emit(`update:modelValue`,this.fileList),this.resumeDisabled=!0,this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1),this.onCreatePanFile(e)}).catch(async t=>{await this.resetUpload(t,e)})}catch{}},async onUploadProgress(e,t,n,r,i){n&&(this.checkpoints[n.uploadId]=n,e.speed=this.handle_network_speed(r,this.partSize,t),e.tempCheckpoint=n,e.abortCheckpoint=n,e.upload=n.uploadId),e.isPlay=!0,e.isPlay&&(e.isLoading=!1),e.uploadName=i,e.percentage=Number((t*100).toFixed(2))},async ossUploadHandle(e){let t={pass:!0,filePath:``};try{let{raw:t,percentage:n}=e,r=t,i=await va(this.signatureType,this.apiFunc,{},{secure:!0});if(this.signatureType==`aliyun_oss_type1`){if(e.client=i,e.partSize=0,n<100&&t.name.indexOf(`.`)!==-1){let t=i.dir+r.name;await e.client.multipartUpload(t,r,{parallel:this.parallel,partSize:this.partSize,progress:async(n,r,i)=>{await this.onUploadProgress(e,n,r,i,t)}}).then(()=>{this.$emit(`upload:modelValue`,this.fileList),this.resumeDisabled=!0,this.onCreatePanFile(e),this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1)}).catch(async e=>{})}}else this.signatureType==`aliyun_oss_type2`&&ya(r,i)}catch(e){t={...e,pass:!1,filePath:``}}return t},getToday(){let e=new Date;return`${e.getFullYear()}${e.getMonth()+1}${e.getDate()}${e.getHours()}${e.getMinutes()}${e.getSeconds()}`},handleChange(e,t){t.forEach(e=>{e.client=null,e.isPlay=!1,e.isLoading=!1,e.abortCheckpoint=!1}),this.fileList=t,this.file=e.raw,this.uploadDisabled=!1,this.pauseDisabled=this.resumeDisabled=!0},handleDeleteFile(e){let t=e.indexOf(this.model);e.substring(t,e.length),this.$emit(`on-delete`),this.fileList=[],re.success(`删除成功`)},async onCreatePanFile(e){await this.getParams(e),this.$emit(`on-update`)},handleMediaRes(e){return{image:async function(e){return new Promise(t=>{var n=new FileReader;n.onload=function(e){var n=e.target.result,r=new Image;r.onload=function(){t({Width:this.width,Height:this.height})},r.src=n},n.readAsDataURL(e)})},audio:async function(e){return new Promise(t=>{var n=new FileReader;n.onload=function(e){var n=e.target.result,r=new Audio;r.onloadeddata=function(){let e=r.duration;t({Duration:e*1e3})},r.src=n},n.readAsDataURL(e)})},video:async function(e){return new Promise(t=>{var n=URL.createObjectURL(e);let r=document.createElement(`video`);r.src=n,r.onloadeddata=function(){t({CoverImg:``,Duration:this.duration*1e3,Width:this.videoWidth,Height:this.videoHeight})}})}}[e]},captureImage(e,t){return t||=`3000 `,e+`?x-oss-process=video/snapshot,t_`+t+`,f_jpg`},async getParams(e){let{type:t}=e.raw,n=t.indexOf(`video`)!==-1,r=t.indexOf(`image`)!==-1,i=t.indexOf(`audio`)!==-1,a=``;n?a=`video`:r?t.indexOf(`adobe`)===-1&&(a=`image`):i&&(a=`audio`);let o;return(n||r||i)&&a&&(o=await this.handleMediaRes(a)(e.raw)),{ResTitle:e.name,ResDescribe:``,OssKey:e.uploadName,ContentType:t||`application/octet-stream`,ContentLength:e.size,...o}}}}]},Rs={class:`oss-upload`},zs={class:`cv-upload-task-hd-title`},Bs={class:`cv-upload-task-hd-num`},Vs={class:`cv-upload-task-opts`},Hs={class:`cv-upload-task-lists`},Us={class:`cv-upload-task-item-name`},Ws={class:`name`},Gs={class:`file-name-item`},Ks={key:0,class:`speed`},qs={key:1,class:`speed`},Js={key:2,class:`success`},Ys={class:`total`},Xs={key:0,class:`name error`},Zs={class:`cv-upload-task-item-tool`},Qs=[`onClick`],$s=[`onClick`];function ec(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-upload`),c=P(`el-progress`),l=P(`cv-icons`),u=P(`el-dialog`);return A(),x(`div`,Rs,[w(s,{ref:`upload`,action:``,"show-file-list":!1,multiple:``,"on-change":e.handleChange,"before-upload":e.handleBeforeUpload,"auto-upload":!1,limit:100,"on-exceed":e.handleExceed,accept:e.accept},{default:z(()=>[w(o,{type:`primary`,icon:`ElIconUpload`,round:``},{default:z(()=>[...t[1]||=[C(`上 传`,-1)]]),_:1})]),_:1},8,[`on-change`,`before-upload`,`on-exceed`,`accept`]),w(u,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[0]||=t=>e.dialogVisible=t,width:`650px`,height:`500`,"destroy-on-close":``,"close-on-click-modal":!1,"before-close":e.handleClose,style:{height:`500px`}},{header:z(()=>[S(`div`,zs,[t[2]||=S(`span`,null,`上传`,-1),S(`span`,Bs,F(e.fileList.length-e.unList.length)+`/`+F(e.fileList.length),1)])]),default:z(()=>[S(`div`,Vs,[w(o,{type:`primary`,icon:`ElIconVideoPlay`,disabled:e.uploadDisabled,onClick:e.starUpload},{default:z(()=>[...t[3]||=[C(`开始上传`,-1)]]),_:1},8,[`disabled`,`onClick`]),w(o,{type:`success`,icon:`ElIconRefreshRight`,disabled:e.resumeDisabled,onClick:e.resumeUpload},{default:z(()=>[...t[4]||=[C(`继续`,-1)]]),_:1},8,[`disabled`,`onClick`]),w(o,{type:`danger`,icon:`ElIconVideoPause`,disabled:e.pauseDisabled,onClick:e.stopUpload},{default:z(()=>[...t[5]||=[C(`暂停`,-1)]]),_:1},8,[`disabled`,`onClick`])]),S(`div`,Hs,[(A(!0),x(v,null,M(e.fileList,(t,n)=>(A(),x(`div`,{class:`cv-upload-task-item-box`,key:n},[S(`div`,Us,[S(`div`,Ws,[S(`span`,Gs,F(n+1)+`.`+F(t.name),1),t.isLoading&&!t.isPlay?(A(),x(`span`,Ks,`准备就绪`)):b(``,!0),t.isPlay&&t.percentage!==100?(A(),x(`span`,qs,F(t.speed)+`/s`,1)):b(``,!0),t.percentage===100?(A(),x(`span`,Js,`完成`)):b(``,!0),S(`div`,Ys,F(e.filterSize(t.size)),1)]),t.errMsg?(A(),x(`span`,Xs,F(t.errMsg),1)):b(``,!0),t.percentage<100&&!t.errMsg?(A(),y(c,{key:1,percentage:t.percentage},null,8,[`percentage`])):(A(),y(c,{key:2,percentage:t.percentage,status:t.errMsg?`exception`:`success`},null,8,[`percentage`,`status`]))]),S(`div`,Zs,[!t.percentage||0<t.percentage<100&&!t.isPlay?(A(),x(`span`,{key:0,class:`icon delete`,onClick:t=>e.handleDeleteChangeFile(n)},[w(l,{type:`actionClose`})],8,Qs)):b(``,!0),t.percentage&&t.percentage!==100?(A(),x(`span`,{key:1,class:D([`icon`,t.isPlay?`delete`:`success`]),onClick:r=>e.handleStopChangeFile(n,t)},[t.isPlay?(A(),y(l,{key:0,type:`ElIconVideoPause`})):(A(),y(l,{key:1,type:`ElIconCaretRight`}))],10,$s)):b(``,!0)])]))),128))])]),_:1},8,[`modelValue`,`before-close`])])}var tc=H(Ls,[[`render`,ec],[`__scopeId`,`data-v-3bdfcd8c`]]);Xo.install=function(e){e.component(Xo.name,Xo)},fs.install=function(e){e.component(fs.name,fs)},Ss.install=function(e){e.component(Ss.name,Ss)},Is.install=function(e){e.component(Is.name,Is)},tc.install=function(e){e.component(tc.name,tc)};var nc={name:`cvTabsJump`,props:{tabPosition:{type:String,default:`top`}},provide(){return{addChildComponents:e=>{this.childComponents.push(e)},clearChildClass:()=>{this.childComponents.map(e=>{e.className=null})}}},data(){return{childComponents:[]}},computed:{tabPositionClass(){return this.tabPosition==`left`?`left`:this.tabPosition==`right`?`right`:this.tabPosition==`bottom`?`bottom`:`top`}},created(){},mounted(){}},rc={class:`tabs-header`};function ic(e,t,n,r,i,a){return A(),x(`div`,{class:D([`cv-tabs-jump`,a.tabPositionClass])},[S(`div`,rc,[N(e.$slots,`default`)])],2)}var ac=H(nc,[[`render`,ic]]),oc={name:`cvTabPane`,emits:[`click`],inject:[`addChildComponents`,`clearChildClass`],data(){return{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`)}}},sc={key:1};function cc(e,t,n,r,i,a){return B((A(),x(`div`,{class:D([`cv-tab-pane`,i.className]),onClick:t[0]||=(...e)=>a.handleClick&&a.handleClick(...e)},[e.$slots.label?N(e.$slots,`label`,{key:0}):(A(),x(`span`,sc,F(n.label),1))],2)),[[L,i.isshow]])}var lc=H(oc,[[`render`,cc]]);ac.install=function(e){e.component(ac.name,ac)},lc.install=function(e){e.component(lc.name,lc)};var uc={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(){return{localCode:``}},watch:{modelValue(e){this.localCode=e,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(e,t){for(let e=0;e<t;e++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum(e,t){return Math.floor(Math.random()*(t-e)+e)},randomColor(e,t){let n=this.randomNum(e,t),r=this.randomNum(e,t),i=this.randomNum(e,t);return`rgb(`+n+`,`+r+`,`+i+`)`},drawPic(){let e=document.getElementById(`cv-draw-captcha`).getContext(`2d`);e.textBaseline=`bottom`,e.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),e.fillRect(0,0,this.contentWidth,this.contentHeight);for(let t=0;t<this.localCode.length;t++)this.drawText(e,this.localCode[t],t);this.drawLine(e),this.drawDot(e)},drawText(e,t,n){e.fillStyle=this.randomColor(this.colorMin,this.colorMax),e.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+`px SimHei`;let r=(n+1)*(this.contentWidth/(this.localCode.length+1)),i=this.randomNum(this.fontSizeMax,this.contentHeight-5);var a=this.randomNum(-45,45);e.translate(r,i),e.rotate(a*Math.PI/180),e.fillText(t,0,0),e.rotate(-a*Math.PI/180),e.translate(-r,-i)},drawLine(e){for(let t=0;t<5;t++)e.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.stroke()},drawDot(e){for(let t=0;t<80;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),e.fill()}}},dc={class:`cv-draw-captcha`},fc=[`width`,`height`];function pc(e,t,n,r,i,a){return A(),x(`div`,dc,[S(`canvas`,{id:`cv-draw-captcha`,width:n.contentWidth,height:n.contentHeight,onClick:t[0]||=(...e)=>a.refreshCode&&a.refreshCode(...e)},null,8,fc)])}var mc=H(uc,[[`render`,pc]]),hc={name:`cvDrawQrcode`,data(){return{}}};function gc(e,t,n,r,i,a){return A(),x(`div`,null,`二维码`)}var _c=H(hc,[[`render`,gc]]);mc.install=function(e){e.component(mc.name,mc)},_c.install=function(e){e.component(_c.name,_c)};var vc={name:`cvTagBase`,mixins:[],components:{},emits:[`update:modelValue`,`exceed-max-length`],props:{...me.props,modelValue:{type:[Array,String],default:()=>[]},closable:{type:Boolean,default:!1},disableTransitions:{type:Boolean,default:!1},effect:{type:String,default:`light`},color:{type:String,default:``},hit:{type:Boolean,default:!1},type:{type:[String],default:`primary`},size:{type:[String],default:`large`},disabled:{type:Boolean,default:!1},maxlength:{type:Number,default:3,validator:e=>e>0}},watch:{modelValue(e){this._init_parse_value()},localVal(e){this._parse_last()}},data(){return{localVal:``}},mounted(){this._init_parse_value()},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue==`string`&&this.modelValue.includes(`,`)){let e=String(this.modelValue).split(`,`).map(e=>e.trim());this.localVal=Zo(e)}else this.localVal=Zo(this.modelValue)},_parse_last(){let e=this.localVal,t=e.join(`,`);this.$emit(`update:modelValue`,t),e.length>=this.maxlength&&this.$emit(`exceed-max-length`,e.length)},addTag(){this.disabled||this.localVal.length>=this.maxlength||(this.localVal.push(`新标签`),this.$nextTick(()=>{let e=this.localVal.length,t=this.$refs[`newTag${e-1}`][0],n=document.createRange();n.selectNodeContents(t),window.getSelection().removeAllRanges(),window.getSelection().addRange(n),this._parse_last()}))},checkTag(e){if(this.disabled)return;let t=this.$refs[`newTag${e}`][0].innerText.trim();t.length==0?this.localVal.pop():this.localVal[e]=t,this._parse_last()},removeTag(e){this.disabled||(this.localVal.splice(e,1),this._parse_last())}}},yc={class:`cv-tag-base`},bc=[`contenteditable`,`onKeyup`,`onBlur`],xc={key:1,class:`cv-tag-maxlength-hint`};function Sc(e,t,n,r,i,a){let o=P(`el-tag`),s=P(`cv-icons`);return A(),x(`div`,yc,[(A(!0),x(v,null,M(i.localVal,(e,t)=>(A(),y(o,E({class:`cv-tag-content`},{ref_for:!0},{closable:!n.disabled&&n.closable,disableTransitions:n.disableTransitions,effect:n.effect,type:n.type,color:n.color,hit:n.hit,size:n.size},{key:t,onClose:e=>a.removeTag(t),disabled:n.disabled}),{default:z(()=>[S(`div`,{class:`cv-tag-item`,contenteditable:!n.disabled&&`plaintext-only`,ref_for:!0,ref:`newTag${t}`,onKeyup:We(e=>!n.disabled&&a.checkTag(t),[`enter`]),onBlur:e=>!n.disabled&&a.checkTag(t)},F(e),41,bc)]),_:2},1040,[`onClose`,`disabled`]))),128)),!n.disabled&&i.localVal.length<n.maxlength?(A(),y(s,{key:0,type:`circlePlus`,size:`20`,onClick:t[0]||=e=>a.addTag()})):b(``,!0),!n.disabled&&i.localVal.length>=n.maxlength?(A(),x(`span`,xc,`已达到最大数量 (`+F(n.maxlength)+`)`,1)):b(``,!0)])}var Cc=H(vc,[[`render`,Sc]]);Cc.install=function(e){e.component(Cc.name,Cc)};var wc={name:`cvTransferTable`,props:{modelValue:{type:[Array],default(){return[]}},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((e,t)=>{try{e({total:0,data:null})}catch{t()}})}},titleTexts:{type:Array,default(){return[`待选项`,`已选项`]}},buttonTexts:{type:Array,default(){return[]}},queryTexts:{type:Array,default(){return[`查询`,`筛选`]}},leftColumns:{type:Array,default(){return[]}},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:`300px`},maxHeight:{type:String,default:`500px`},tableRowKey:{type:Function,default(e){return e&&e&&e.id}}},data(){return{leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}},watch:{modelValue(e){this.rightTableData=e}},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(e=>!this.rightTableData.some(t=>this.checkObjectIsEqual(e,t)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){let e=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(t=>e.some(e=>{let n=t[e],r=this.rightConditionTemp[e].trim();return n?String(n).indexOf(r)>-1:!0}))}return this.rightTableData}},methods:{handleLeftSelectionChange(e){this.leftSelection=e},handleRightSelectionChange(e){this.rightSelection=e},handleLeftRowClick(e){this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))||this.$refs.leftTable.toggleRowSelection(e)},handleRightRowClick(e){this.$refs.rightTable.toggleRowSelection(e)},handleSizeChange(e){this.pageSize=e,this.handlePaginationCallBack()},handleCurrentChange(e){this.pageIndex=e,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){let e={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,e).then(e=>{e&&Array.isArray(e.data)&&(this.leftTableData=e.data,this.totalSize=e.total),this.$nextTick(()=>{this.leftTableData.forEach(e=>{let t=this.rightTableData.some(t=>this.checkObjectIsEqual(t,e));this.$refs.leftTable.toggleRowSelection(e,t)})})})}},handleRowStyle({row:e}){return this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))?{color:`blue`}:{}},handleSelectable(e){return!this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))},addToRight(){for(let e of this.leftSelection)this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))||this.rightTableData.push(e);this.$emit(`update:modelValue`,this.rightTableData)},addToLeft(){this.rightSelection.forEach(e=>{let t=this.rightTableData.findIndex(t=>this.checkObjectIsEqual(t,e));if(t!==-1){this.rightTableData.splice(t,1);let n=this.leftTableData.find(t=>this.checkObjectIsEqual(t,e));n&&this.$refs.leftTable.toggleRowSelection(n,!1)}}),this.$emit(`update:modelValue`,this.rightTableData)},onLeftQuerySubmit(){this.handlePaginationCallBack()},onRightQuerySubmit(){this.rightConditionTemp=JSON.parse(JSON.stringify(this.rightQueryCondition))},checkObjectIsEqual(e,t){return this.tableRowKey(e)===this.tableRowKey(t)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(let e in this.leftQueryCondition)this.leftQueryCondition[e]=void 0;for(let e in this.rightQueryCondition)this.rightQueryCondition[e]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},Tc={class:`cv-transfer-table`},Ec={class:`transfer-panel`},Dc={class:`transfer-panel-header`},Oc={key:0},kc={style:{padding:`5px`}},Ac={class:`transfer-buttons`},jc={key:0,class:`button-text`},Mc={key:0,class:`button-text`},Nc={class:`transfer-panel`},Pc={class:`transfer-panel-header`},Fc={key:0},Ic={style:{padding:`5px`}};function Lc(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-form-item`),c=P(`el-form`),l=P(`el-table-column`),u=P(`el-table`),d=P(`el-pagination`),f=P(`cv-icons`);return A(),x(`div`,Tc,[S(`div`,Ec,[S(`p`,Dc,[S(`span`,null,F(n.titleTexts&&n.titleTexts[0]),1),S(`span`,null,F(i.leftSelection.length)+`/`+F(i.leftTableData.length),1)]),n.showQuery?(A(),x(`div`,Oc,[w(c,{inline:!0,model:i.leftQueryCondition,class:`cv-transfer-form`},{default:z(()=>[N(e.$slots,`leftCondition`,{scope:i.leftQueryCondition}),w(s,null,{default:z(()=>[w(o,{type:`primary`,onClick:t[0]||=e=>a.onLeftQuerySubmit()},{default:z(()=>[C(F(n.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,[`model`])])):b(``,!0),w(u,{ref:`leftTable`,"max-height":n.maxHeight,height:n.minHeight,data:i.leftTableData,"row-key":n.tableRowKey,"row-style":a.handleRowStyle,onRowClick:a.handleLeftRowClick,onSelectionChange:a.handleLeftSelectionChange,border:``,stripe:``},{default:z(()=>[w(l,{width:`40px`,type:`selection`,selectable:a.handleSelectable},null,8,[`selectable`]),(A(!0),x(v,null,M(n.leftColumns,t=>(A(),y(l,{prop:t.id,key:t.id,label:t.label,width:t.width},{default:z(n=>[N(e.$slots,`default`,{scope:{row:n.row,col:t}},()=>[S(`span`,null,F(n.row[t.id]),1)])]),_:2},1032,[`prop`,`label`,`width`]))),128))]),_:3},8,[`max-height`,`height`,`data`,`row-key`,`row-style`,`onRowClick`,`onSelectionChange`]),S(`div`,kc,[n.showPagination?(A(),y(d,{key:0,onSizeChange:a.handleSizeChange,onCurrentChange:a.handleCurrentChange,"current-page":i.pageIndex,"page-sizes":[10,20,50,100],"page-size":i.pageSize,"pager-count":5,total:i.totalSize,layout:`total, sizes, prev, pager, next`},null,8,[`onSizeChange`,`onCurrentChange`,`current-page`,`page-size`,`total`])):b(``,!0)])]),S(`div`,Ac,[w(o,{type:`primary`,class:D(a.buttonClasses),disabled:a.disabledLeftButton,onClick:a.addToRight},{default:z(()=>[n.buttonTexts[0]===void 0?b(``,!0):(A(),x(`span`,jc,F(n.buttonTexts[0]),1)),w(f,{type:`ElIconArrowRight`})]),_:1},8,[`class`,`disabled`,`onClick`]),w(o,{type:`primary`,class:D(a.buttonClasses),disabled:i.rightSelection.length===0,onClick:a.addToLeft},{default:z(()=>[w(f,{type:`ElIconArrowLeft`}),n.buttonTexts[1]===void 0?b(``,!0):(A(),x(`span`,Mc,F(n.buttonTexts[1]),1))]),_:1},8,[`class`,`disabled`,`onClick`])]),S(`div`,Nc,[S(`p`,Pc,[S(`span`,null,F(n.titleTexts&&n.titleTexts[1]),1),S(`span`,null,F(i.rightSelection.length)+`/`+F(i.rightTableData.length),1)]),n.showQuery?(A(),x(`div`,Fc,[w(c,{inline:!0,model:i.rightQueryCondition,class:`cv-transfer-form`},{default:z(()=>[N(e.$slots,`rightCondition`,{scope:i.rightQueryCondition}),w(s,null,{default:z(()=>[w(o,{type:`primary`,onClick:t[1]||=e=>a.onRightQuerySubmit()},{default:z(()=>[C(F(n.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,[`model`])])):b(``,!0),w(u,{ref:`rightTable`,"max-height":n.maxHeight,height:n.minHeight,data:a.calcRightTableData,"row-key":n.tableRowKey,onRowClick:a.handleRightRowClick,onSelectionChange:a.handleRightSelectionChange,border:``,stripe:``},{default:z(()=>[w(l,{width:`40px`,type:`selection`}),(A(!0),x(v,null,M(n.rightColumns||n.leftColumns,t=>(A(),y(l,{prop:t.id,key:t.id,label:t.label,width:t.width},{default:z(n=>[N(e.$slots,`default`,{scope:{row:n.row,col:t}},()=>[S(`span`,null,F(n.row[t.id]),1)])]),_:2},1032,[`prop`,`label`,`width`]))),128))]),_:3},8,[`max-height`,`height`,`data`,`row-key`,`onRowClick`,`onSelectionChange`]),S(`div`,Ic,[n.showPagination?(A(),y(d,{key:0,total:i.rightTableData.length,layout:`total`},null,8,[`total`])):b(``,!0)])])])}var Rc=H(wc,[[`render`,Lc]]);Rc.install=function(e){e.component(Rc.name,Rc)};var zc={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...fe.props,modelValue:{type:[Array,Object],default(){return[]}},headerCellStyle:{type:[Function,Object],default:()=>({})}},data(){return{loadDataList:[]}},watch:{modelValue(e){this.loadDataList=e},loadDataList(e){this.$emit(`update:modelValue`,e)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(e){this.loadPageCurr=e,this.getData()},handleSizeChange(e){this.loadPageLimit=e,this.getData()}}},Bc={name:`cvTableBase`,mixins:[Ft,zc],props:{align:{type:String,default:`left`},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default(){return{}}},tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}},watch:{tableRefresh(e,t){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit(`selection-change`,e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||this.paginationGroup[0],Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},Vc={class:`cv-table-list`},Hc={key:0,class:`cv-tablie-list-page page`};function Uc(e,t,n,r,i,a){let o=P(`el-table`),s=P(`cv-icons`),c=P(`el-button`),l=P(`el-pagination`),u=Ne(`loading`);return A(),x(`div`,Vc,[B((A(),y(o,E(e.$props,{data:e.loadDataList,style:{width:`100%`},onSelectionChange:a.handleSelectionChange}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`data`,`onSelectionChange`])),[[u,e.loadDataLoading]]),n.showPagebreak?B((A(),x(`div`,Hc,[w(c,{onClick:a.refresh,style:{float:`left`,margin:`0 10px 0 0`,padding:`5px 10px`}},{default:z(()=>[w(s,{type:`ElIconRefresh`,size:`14`})]),_:1},8,[`onClick`]),w(l,{background:``,onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"pager-count":i.paginationCount,"page-sizes":i.paginationGroup,"current-page":e.loadPageCurr,"page-size":e.loadPageLimit,layout:`total, sizes, prev, pager, next, jumper`,total:e.loadDataTotal},null,8,[`onSizeChange`,`onCurrentChange`,`pager-count`,`page-sizes`,`current-page`,`page-size`,`total`])],512)),[[L,e.loadDataLoading===!1]]):b(``,!0)])}var Wc=H(Bc,[[`render`,Uc]]),Gc={name:`cvTableTree`,mixins:[Ft,zc],props:{tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{searchData:{},tableConfDef:{tablePrimary:``,childName:`children`},pager_count:7,page:1}},watch:{tableRefresh(e,t){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit(`selection-change`,e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},Kc={class:`cv-table-tree`};function qc(e,t,n,r,i,a){let o=P(`el-table`),s=Ne(`loading`);return A(),x(`div`,Kc,[B((A(),y(o,E(e.$props,{data:e.loadDataList,style:{width:`100%`},onSelectionChange:a.handleSelectionChange,"row-key":e.loadConfigSetting.tablePrimary,"tree-props":{children:e.loadConfigSetting.childName,hasChildren:`hasChildren`}}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`data`,`onSelectionChange`,`row-key`,`tree-props`])),[[s,e.loadDataLoading]])])}var Jc=H(Gc,[[`render`,qc]]),Yc={name:`cvTableEditor`,mixins:[Ft,zc],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default(){return{}}}},data(){return{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(e,t,n,r){switch(this.cell_click_index=e.index,this.cell_click_label=t.label,t.label){case`taskid`:this.cell_click_index=e.index,this.cell_click_label=t.label;break;case`taskname`:this.cell_click_index=e.index,this.cell_click_label=t.label;break;default:return}},handleChangeTData(e){}}},Xc={class:`cv-table-editor`};function Zc(e,t,n,r,i,a){let o=P(`el-table`),s=Ne(`loading`);return A(),x(`div`,Xc,[B((A(),y(o,E(e.$props,{data:e.loadDataList,style:{width:`100%`},"row-class-name":`cv-tbed-tr`}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`data`])),[[s,e.loadDataLoading]])])}var Qc=H(Yc,[[`render`,Zc]]),$c={name:`cvTbColumnIndex`,inject:{pageCurr:{default:1},pageLimit:{default:10}},props:{...pe.props,fixed:{type:[String],default:`left`},align:{type:String,default:`center`},width:{type:[String,Number],default:55},continuity:{type:[Boolean,String],default:!1}},data(){return{}},created(){},methods:{indexMethod(e){return this.continuity&&this.pageCurr&&this.pageLimit?e+1+(this.pageCurr-1)*this.pageLimit:e+1}}};function el(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,E(e.$props,{type:`index`,index:a.indexMethod}),null,16,[`index`])}var tl=H($c,[[`render`,el]]),nl={name:`cvTbColumnCheck`,props:{...pe.props,fixed:{type:[String],default:`left`},align:{type:[String],default:`center`},width:{type:[String,Number],default:55}},data(){return{}},created(){}};function rl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,E(e.$props,{type:`selection`}),null,16)}var il=H(nl,[[`render`,rl]]),al={name:`cvTbColumnText`,props:{...pe.props},data(){return{}},created(){},methods:{getContentText(e){let t=e.row[this.prop];return this.formatter&&(t=this.formatter(e.row,e.column)),t}}},ol={style:{display:`contents`}};function sl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,O(T(e.$props)),{default:z(t=>[S(`div`,ol,F(t.row[e.prop]),1)]),_:1},16)}var cl=H(al,[[`render`,sl]]),ll={name:`cvTbColumnImg`,props:{...pe.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data(){return{localImgWidth:`50px`,localImgHeight:`50px`,localImgArr:[],localImgOne:``}},created(){this.imgWidth&&(this.localImgWidth=this.imgWidth.indexOf(`px`)===-1?this.imgWidth+`px`:this.imgWidth),this.imgHeight&&(this.localImgHeight=this.imgHeight.indexOf(`px`)===-1?this.imgHeight+`px`:this.imgHeight)},methods:{handleImgOne(e){let t=e[this.prop]||null;if(t){if(Object.prototype.toString.call(t)===`[object Array]`)return t[0];if(Object.prototype.toString.call(t)===`[object String]`)return t}},handleImgArr(e){let t=e[this.prop]||null;if(t){if(Object.prototype.toString.call(t)===`[object Array]`)return t;if(Object.prototype.toString.call(t)===`[object String]`)return[t]}},handleImgLeng(e){let t=e[this.prop]||null;if(t){if(Object.prototype.toString.call(t)===`[object Array]`)return t.length;if(Object.prototype.toString.call(t)===`[object String]`)return 1}else return 0}}},ul={key:0,class:`cv-table-column-img-mark`},dl={class:`cv-table-column-img-text`};function fl(e,t,n,r,i,a){let o=P(`el-image`),s=P(`el-table-column`);return A(),y(s,O(T(e.$props)),{default:z(e=>[S(`div`,{class:`cv-table-column-img-box`,style:k({width:i.localImgWidth,height:i.localImgHeight})},[w(o,{style:k({width:i.localImgWidth,height:i.localImgHeight}),fit:`scale-down`,lazy:``,src:a.handleImgOne(e.row),"preview-src-list":a.handleImgArr(e.row),"preview-teleported":!0},{error:z(()=>[...t[0]||=[S(`span`,{class:`el-image__error cv-table-column-img-err`},[C(` 暂无 `),S(`br`),C(` 图片 `)],-1)]]),_:1},8,[`style`,`src`,`preview-src-list`]),a.handleImgLeng(e.row)>1?(A(),x(`p`,ul,[S(`span`,dl,F(a.handleImgLeng(e.row))+`张`,1)])):b(``,!0)],4)]),_:1},16)}var pl=H(ll,[[`render`,fl]]),ml={name:`cvTbColumnOpt`,props:{...pe.props,fixed:{type:[String],default:`right`},label:{type:[String],default:`操作`}},data(){return{}},created(){}};function hl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,O(T(e.$props)),{default:z(t=>[N(e.$slots,`default`,O(T({row:t.row,$index:t.$index,scope:t})))]),_:3},16)}var gl=H(ml,[[`render`,hl]]),_l={name:`cvTbColumnBase`,props:{...pe.props,width:{type:[String,Number],default:``}},data(){return{}},created(){}};function vl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,O(T(e.$props)),{default:z(t=>[N(e.$slots,`default`,O(T({row:t.row,$index:t.$index,scope:t})))]),_:3},16)}var yl=H(_l,[[`render`,vl]]),bl={name:`cvTbColumnExpand`,props:{...pe.props},data(){return{}},created(){}};function xl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,E(e.$props,{type:`expand`}),{default:z(t=>[N(e.$slots,`default`,O(T({row:t.row,$index:t.$index,props:t})))]),_:3},16)}var Sl=H(bl,[[`render`,xl]]),Cl={name:`cvTbColumnEnum`,props:{...pe.props,dataLists:{type:[Object,Array],default:()=>({})}},data(){return{}},created(){},methods:{dealTypeEnum(e){let t=Object.keys(this.dataLists);return e[this.prop]?this.dataLists[e[this.prop]]||``:this.dataLists[t[0]]||``}}};function wl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),y(o,O(T(e.$props)),{default:z(e=>[S(`span`,null,F(a.dealTypeEnum(e.row)),1)]),_:1},16)}var Tl=H(Cl,[[`render`,wl]]),El={name:`cvTbEditSearch`,props:{...pe.props,modelValue:{type:[String],default:``},align:{type:[String],default:`left`}},data(){return{isEditIndex:null,localVal:``,autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:``,searchCurrTbIndex:0,searchIsSelect:!1}},watch:{modelValue(e){},localVal(e){this.$emit(`update:modelValue`,e)}},directives:{edfocus:{mounted:e=>{}}},created(){},methods:{searchEdit(e,t){this.isEditIndex=t,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${t}`].focus()})},searchSave(e,t){this.isEditIndex=null},searchSelect(e,t,n){this.searchIsSelect=!0,this.localTableData[n]=Object.assign(this.localTableData[n],e),this.localTableData[n].row_num=1,e.row_attr?this.localTableData[n].row_name=e.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${e.row_attr} ]</span>`:this.localTableData[n].row_name=e.row_name},searchFocus(e,t){this.searchCurrClass=`cvtegac`+e,this.searchCurrTbIndex=e},searchBlur(e,t){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(e,t){this.searchIsSelect=!1,this.searchResList=[];let n=this.searchSett;if(n.searchMockData!=null&&n.searchMockData){if(typeof n.searchMockData==`object`){let e=this.sortOutData(n.searchMockData);this.tableData=e,this.$message({message:e.msg||``,type:`warning`,duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else n.searchFunc&&typeof n.searchFunc==`function`&&n.searchFunc({page:1,pagesize:20,keyword:e,...n.searchParam}).then(n=>{this.searchResList=[...n.data],this.searchParseData(e,t)})},searchParseData(e,t){var n=[],r=[];let i=this.searchSett;if(this.searchResList.length>0){for(let e in this.searchResList){let t=this.searchResList[e];t.row_price=t[i.searchField.row_price],t.row_stock=t[i.searchField.row_stock],t.row_attr=t[i.searchField.row_attr],t.row_name=t[i.searchField.row_name],t.row_unit=t[i.searchField.row_unit],t.row_id=t[i.searchField.row_id],t.value=t.row_name,r.push(t)}n=r}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t(n)},600)},inputSearchFilter(e){return t=>t.value.toLowerCase().indexOf(e.toLowerCase())===0},searchIconClick(){this.isEditIndex=null}}},Dl={class:`name`},Ol={class:`addr`},kl={class:`addr`},Al={class:`droplist-item`},jl={class:`name`},Ml={key:0,class:`attr`},Nl={class:`price`},Pl={class:`rest`},Fl=[`onClick`];function Il(e,t,n,r,i,a){let o=P(`ElIconCircleClose`),s=P(`el-icon`),c=P(`el-autocomplete`),l=P(`el-table-column`);return A(),y(l,E(e.$props,{"class-name":`cv-table-editor-search-column`}),{default:z(t=>[i.isEditIndex==t.$index?(A(),y(c,E({key:0,ref:`cv-tbce-autocomplete${t.$index}`},i.autocompleteAttr,{modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n,"popper-class":`cv-tbce-autocomplete cvtegac${t.$index}`,"fetch-suggestions":a.searchQuery,onSelect:e=>a.searchSelect(e,t.row,t.$index),onFocus:e=>a.searchFocus(t.$index,e),onBlur:e=>a.searchBlur(t.row,t.$index)}),{suffix:z(()=>[w(s,{onClick:e=>a.searchIconClick(t.row,t.$index)},{default:z(()=>[w(o)]),_:1},8,[`onClick`])]),default:z(({item:t})=>[N(e.$slots,`default`,{item:t},()=>[S(`div`,Dl,F(t.row_name),1),S(`span`,Ol,`价格:`+F(t.row_price),1),S(`span`,kl,F(t.row_rest),1),S(`div`,Al,[S(`div`,jl,[C(F(t.row_name)+` `,1),t.row_attr?(A(),x(`div`,Ml,`[ `+F(t.row_attr)+`]`,1)):b(``,!0)]),S(`div`,Nl,`¥ `+F(t.row_price),1),S(`div`,Pl,F(t.attr_stock),1)])],!0)]),_:2},1040,[`modelValue`,`onUpdate:modelValue`,`popper-class`,`fetch-suggestions`,`onSelect`,`onFocus`,`onBlur`])):(A(),x(`span`,{key:1,class:`showtext`,onClick:e=>a.searchEdit(t.row,t.$index)},F(t.row[e.prop]),9,Fl))]),_:3},16)}var Ll=H(El,[[`render`,Il],[`__scopeId`,`data-v-2f76009a`]]),Rl={name:`cvTbEditOpt`,props:{tableData:{type:[Array],default:()=>[]},...pe.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(){return{localTbData:[]}},watch:{tableData(e){this.localTbData=e}},created(){this.localTbData=this.tableData},methods:{optHdDelete(e,t){this.localTbData.splice(e,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}};function zl(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`),c=P(`el-table-column`);return A(),y(c,O(T(e.$props)),{default:z(e=>[n.btnAdd?(A(),y(s,{key:0,plain:``,style:{padding:`5px`,width:`26px`,height:`26px`},onClick:t[0]||=e=>a.optHdAdd()},{default:z(()=>[w(o,{type:`actionPlus`})]),_:1})):b(``,!0),n.btnDel?(A(),y(s,{key:1,plain:``,style:{padding:`5px`,width:`26px`,height:`26px`},onClick:t=>a.optHdDelete(e.$index,e.row)},{default:z(()=>[w(o,{type:`actionClose`})]),_:1},8,[`onClick`])):b(``,!0)]),_:1},16)}var Bl=H(Rl,[[`render`,zl]]),Vl={name:`cvTbEditText`,props:{...pe.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(){return{currValue:``,isEditIndex:null,isErrIndex:[]}},directives:{edfocus:{mounted:e=>{e.querySelector(`input`).focus()},inserted:function(e){e.querySelector(`input`).focus()}}},created(){},methods:{textIsError(e){return this.isErrIndex&&this.isErrIndex[e]&&this.isErrIndex[e][this.prop]},textHdEdit(e,t){this.isEditIndex=t},textHdClear(e,t){},textHdSave(e,t){this.isEditIndex=null;let n=e[this.prop];if(this.toFixed!=``){let t=parseInt(this.toFixed);isNaN(n)||(e[this.prop]=parseFloat(n).toFixed(t))}else e[this.prop]=n}},render22(e,t){let n=this;return e(`el-table-column`,{props:{...this.$props},scopedSlots:{default:t=>{this.currValue=t.row[this.prop];let r=t.$index;return this.isEditIndex==r?e(`el-input`,{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:e=>{e.keyCode===13&&(this.$emit(`update:param`,e.target.value),this.callback&&this.callback())}},on:{blur:e=>{this.$emit(`update:param`,e.target.value),this.callback&&this.callback()},input:function(e){n.currValue=e||e.target.value},blur:e=>{this.isEditIndex=null,n.currValue=e||e.target.value}}},this.currValue):e(`span`,{class:{showtext:!0},on:{click:()=>{this.isEditIndex=r}}},this.currValue)}}})}},Hl=[`onClick`];function Ul(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-table-column`),c=Ne(`edfocus`);return A(),y(s,E(e.$props,{"class-name":`cv-table-editor-text-column`}),{default:z(t=>[i.isEditIndex==t.$index&&!n.editAttr.disabled?B((A(),y(o,E({key:0},n.editAttr,{clearable:n.editClearable,style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n,onBlur:Ge(e=>a.textHdSave(t.row,t.$index),[`prevent`]),onClear:e=>a.textHdClear(t.row,t.$index)}),null,16,[`clearable`,`style`,`class`,`modelValue`,`onUpdate:modelValue`,`onBlur`,`onClear`])),[[c]]):(A(),x(`span`,{key:1,class:`showtext`,onClick:e=>a.textHdEdit(t.row,t.$index)},F(t.row[e.prop]),9,Hl))]),_:1},16)}var Wl=H(Vl,[[`render`,Ul]]),Gl={name:`cvTbEditRadio`,props:{...pe.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(){return{}},created(){}};function Kl(e,t,n,r,i,a){let o=P(`el-radio`),s=P(`el-radio-group`),c=P(`el-table-column`);return A(),y(c,O(T(e.$props)),{default:z(t=>[w(s,E({style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n},n.editAttr),{default:z(()=>[(A(!0),x(v,null,M(n.dataLists,(e,t)=>(A(),y(o,{key:t,label:e[n.dataField.label],value:e[n.dataField.value]},{default:z(()=>[C(F(e[n.dataField.label]),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},16,[`style`,`class`,`modelValue`,`onUpdate:modelValue`])]),_:1},16)}var ql=H(Gl,[[`render`,Kl]]),Jl={name:`cvTbEditCheckbox`,props:{...pe.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(){return{localVal:[]}},created(){},methods:{handleParseValue(e){this.localVal=[]}}};function Yl(e,t,n,r,i,a){let o=P(`el-checkbox`),s=P(`el-checkbox-group`),c=P(`el-table-column`);return A(),y(c,O(T(e.$props)),{default:z(t=>[t.row[e.prop]?(A(),y(s,E({key:0,style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n},n.editAttr),{default:z(()=>[(A(!0),x(v,null,M(n.dataLists,(e,t)=>(A(),y(o,{key:t,label:e[n.dataField.label],value:e[n.dataField.value]},{default:z(()=>[C(F(e[n.dataField.label]),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},16,[`style`,`class`,`modelValue`,`onUpdate:modelValue`])):b(``,!0)]),_:1},16)}var Xl=H(Jl,[[`render`,Yl]]),Zl={name:`cvTbEditSelect`,props:{...pe.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(){return{}},created(){}};function Ql(e,t,n,r,i,a){let o=P(`el-option`),s=P(`el-select`),c=P(`el-table-column`);return A(),y(c,O(T(e.$props)),{default:z(t=>[w(s,E({style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n},n.editAttr),{default:z(()=>[(A(!0),x(v,null,M(n.dataLists,(e,t)=>(A(),y(o,{key:t,label:e[n.dataField.label],value:e[n.dataField.value]},{default:z(()=>[C(F(e[n.dataField.label]),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},16,[`style`,`class`,`modelValue`,`onUpdate:modelValue`])]),_:1},16)}var $l=H(Zl,[[`render`,Ql]]);Wc.install=function(e){e.component(Wc.name,Wc)},Jc.install=function(e){e.component(Jc.name,Jc)},Qc.install=function(e){e.component(Qc.name,Qc)},tl.install=function(e){e.component(tl.name,tl)},il.install=function(e){e.component(il.name,il)},cl.install=function(e){e.component(cl.name,cl)},pl.install=function(e){e.component(pl.name,pl)},gl.install=function(e){e.component(gl.name,gl)},yl.install=function(e){e.component(yl.name,yl)},Sl.install=function(e){e.component(Sl.name,Sl)},Tl.install=function(e){e.component(Tl.name,Tl)},Ll.install=function(e){e.component(Ll.name,Ll)},Bl.install=function(e){e.component(Bl.name,Bl)},Wl.install=function(e){e.component(Wl.name,Wl)},ql.install=function(e){e.component(ql.name,ql)},Xl.install=function(e){e.component(Xl.name,Xl)},$l.install=function(e){e.component($l.name,$l)};var eu={},tu={width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function nu(e,t){return A(),x(`svg`,tu,[...t[0]||=[S(`rect`,{width:`12`,height:`12`,rx:`2`,fill:`#86909C`},null,-1),S(`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)]])}var ru=H(eu,[[`render`,nu]]),iu={},au={width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`icon`};function ou(e,t){return A(),x(`svg`,au,[...t[0]||=[S(`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)]])}var su=H(iu,[[`render`,ou]]),cu={},lu={class:`comment-common-icon`};function uu(e,t){return A(),x(`i`,lu,[...t[0]||=[S(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:``},[S(`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)]])}var du=H(cu,[[`render`,uu]]),fu={},pu={width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`icon`};function mu(e,t){return A(),x(`svg`,pu,[...t[0]||=[S(`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)]])}var hu=H(fu,[[`render`,mu]]),gu={},_u={class:`comment-common-icon`};function vu(e,t){return A(),x(`i`,_u,[...t[0]||=[S(`svg`,{viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},[S(`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)]])}var yu=H(gu,[[`render`,vu]]),bu={},xu={class:`comment-common-icon`,style:{color:`#1e80ff`}};function Su(e,t){return A(),x(`i`,xu,[...t[0]||=[S(`svg`,{viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`1534`},[S(`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)]])}var Cu=H(bu,[[`render`,Su]]),wu={},Tu={class:`comment-common-icon`};function Eu(e,t){return A(),x(`i`,Tu,[...t[0]||=[S(`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`},[S(`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)]])}var Du=H(wu,[[`render`,Eu]]),Ou={},ku={width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:``};function Au(e,t){return A(),x(`svg`,ku,[...t[0]||=[S(`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)]])}var ju=H(Ou,[[`render`,Au]]),Mu={},Nu={class:`comment-common-icon`};function Pu(e,t){return A(),x(`i`,Nu,[...t[0]||=[S(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:``},[S(`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)]])}var Fu=H(Mu,[[`render`,Pu]]),Iu={},Lu={class:`comment-common-icon`};function Ru(e,t){return A(),x(`i`,Lu,[...t[0]||=[S(`svg`,{viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`1320`,width:`200`,height:`200`},[S(`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)]])}var zu=H(Iu,[[`render`,Ru]]),Bu={class:`cv-comment-emoji`},Vu={class:`face-tooltip-head select-none`},Hu=[`onClick`],Uu=[`src`],Wu={class:`emoji-body select-none`},Gu={style:{padding:`0 5px`}},Ku=[`onClick`],qu={class:`emoji-btn select-none`},Ju={key:0},Yu=H(Object.assign({name:`CompInputEmoji`},{__name:`input-emoji`,props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:`bottom`},emits:[`addEmoji`],setup(e,{emit:t}){let n=e,r=j(0),i=j(0),a=j([,,]),{emojiList:o,faceList:s}=n.emoji;function c(e){switch(r.value=e,e){case 0:i.value=0;break;case 1:i.value=-50,a.value[1]=o[1];break}}function l(){a.value[0]=o[0]}return(t,n)=>(A(),x(`div`,Bu,[w(I(ce),{placement:e.placement,"popper-class":`emoji-popover`,width:250,trigger:`click`,onBeforeEnter:l},{reference:z(()=>[S(`div`,qu,[t.$slots.default?N(t.$slots,`default`,{key:1},void 0,!0):(A(),x(`div`,Ju,[w(I(su)),n[0]||=S(`span`,null,`表情`,-1)]))])]),default:z(()=>[S(`div`,Vu,[(A(!0),x(v,null,M(I(s),(e,t)=>(A(),x(`label`,{key:t,class:D(r.value==t?`active`:``),onClick:e=>c(t)},[S(`img`,{src:e,alt:``},null,8,Uu)],10,Hu))),128))]),S(`div`,Wu,[S(`div`,{class:`emjio-container`,style:k({transform:`translateX(${i.value}%)`})},[(A(!0),x(v,null,M(a.value,(e,n)=>(A(),x(`div`,{key:n,class:`emoji-wrapper`},[w(I(le),null,{default:z(()=>[S(`div`,Gu,[(A(!0),x(v,null,M(e,(e,n)=>(A(),x(`span`,{key:n,class:`emoji-item`,onClick:e=>t.$emit(`addEmoji`,n)},[w(I(g),{src:e,title:String(n),class:`emoji`,style:{width:`24px`,height:`24px`,margin:`5px`},lazy:``},null,8,[`src`,`title`])],8,Ku))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,[`placement`])]))}}),[[`__scopeId`,`data-v-2fb59975`]]),Xu={class:`cv-comment-editor`},Zu=[`placeholder`,`innerHTML`],Qu=[`src`],$u=[`onClick`],ed={key:0,class:`cv-comment-editor__action`},td=H({__name:`input-box`,props:{placeholder:``,contentBtn:``,parentId:``,reply:``},emits:[`hide`,`close`],setup(t,{expose:n,emit:r}){let a=t,o=j(``),s=j(),c=j(!1),l=j(!1),u=j(),d=j(!0),f=j(),p=j(),m=j([]),h=j([]),g=je({imgLength:0}),ee={minHeight:64},_=j(),te=j(!1),re=j(),ie=ve(()=>ee.minHeight+`px`),ae=ve(()=>ee.minHeight==30?`4px 10px`:`8px 12px`),oe=r,{upload:se,submit:ce,focus:le}=we(`InjectInputBox`),ue=we(`InjectionEmojiApi`);R(()=>o.value,e=>{te.value||(s.value=e)});function de(){ce({content:a.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${a.reply.user.username}:</span> ${o.value}`:o.value,parentId:Gr(a.parentId,null),reply:a.reply,files:h.value,clear:()=>{Se(),oe(`close`)}})}function fe(e){Wr(o.value)&&!g.imgLength&&(l.value=!1,oe(`hide`,e))}function pe(e){te.value=!0,c.value=!0,l.value=!0,Te(()=>{f.value=document.querySelector(`div[id^='el-popper-container']`)}),le()}function me(e){_.value=window.getSelection()?.getRangeAt(0),u.value?.innerHTML||(c.value=!1),te.value=!1}function he(e){let{innerHTML:t}=e?.target||e;o.value=t||``,Wr(o.value.replace(/ |<br>| /g,``))?d.value=!0:d.value=!1}function _e(e){let t=window.getSelection();t&&(t.removeAllRanges(),_.value||=(ye(),t.getRangeAt(0)),_.value.deleteContents(),_.value.insertNode(_.value.createContextualFragment(e)),_.value.collapse(!1),t.addRange(_.value),o.value=u?.value?.innerHTML||``,Wr(o.value.replace(/ |<br>| /g,``))?d.value=!0:d.value=!1)}function y(){u.value&&(u.value.innerHTML=``,o.value=u.value.innerHTML,c.value=!1)}function ye(){Te(()=>{u.value?.focus()})}function be(e){e.ctrlKey&&e.key==`Enter`&&(Wr(o.value.replace(/ |<br>| /g,``))?ne({message:`内容不能为空`,type:`info`}):de())}function xe(e){m.value.length=0,h.value.length=0;let t=p.value?.files;if(g.imgLength=Gr(t?.length,0),t)for(let e=0;e<t.length;e++){let n=t[e].name,r=Yr(t[e]);h.value.push(t[e]),Kr(n)?m.value.push(r):ne({type:`warn`,message:`请选择图片类型文件!`,duration:2500})}}function Se(){y(),m.value.length=0,h.value=[],d.value=!0}function T(e){m?.value?.splice(e,1)}return De(()=>{u.value?.addEventListener(`keyup`,e=>{let t=e.target;t.innerHTML==`<br>`&&(t.innerHTML=``)})}),n({focus:()=>ye()}),(t,n)=>B((A(),x(`div`,Xu,[S(`div`,{class:D([`cv-comment-editor__box`,{active:c.value,"input-active":l.value}])},[S(`div`,{ref_key:`editorRef`,ref:u,class:`rich-input`,contenteditable:`true`,placeholder:a.placeholder,onFocus:pe,onInput:he,onBlur:me,onKeydown:We(be,[`enter`]),innerHTML:s.value,style:k({minHeight:ie.value,padding:ae.value})},null,44,Zu),S(`div`,{ref_key:`imageRef`,ref:re,class:`image-preview-box`},[(A(!0),x(v,null,M(m.value,(e,t)=>(A(),x(`div`,{key:t,class:`image-preview`},[S(`img`,{src:e,alt:``},null,8,Qu),S(`div`,{class:`clean-btn`,onClick:e=>T(t)},[w(I(ru))],8,$u)]))),128))],512)],2),w(ge,{name:`fade`},{default:z(()=>[l.value?(A(),x(`div`,ed,[S(`div`,null,[w(Yu,{emoji:I(ue),onAddEmoji:n[0]||=e=>_e(e)},null,8,[`emoji`]),S(`div`,{class:`picture`,onClick:n[1]||=(...e)=>p.value?.click&&p.value?.click(...e)},[w(I(hu)),n[2]||=S(`span`,null,`图片`,-1),S(`input`,{id:`comment-upload`,ref_key:`inputRef`,ref:p,type:`file`,multiple:``,onChange:xe},null,544)])]),S(`div`,null,[n[3]||=S(`span`,{style:{"margin-right":`10px`}},[C(` 文明上网理性发言,请遵守 `),S(`a`,{href:`###`,target:`_blank`},`《新闻评论服务协议》`)],-1),w(I(i),{type:`primary`,disabled:d.value,onClick:de},{default:z(()=>[C(F(a.contentBtn),1)]),_:1},8,[`disabled`])])])):b(``,!0)]),_:1})])),[[I(e),fe,f.value]])}},[[`__scopeId`,`data-v-e3fd437e`]]),nd={class:`u-fold`},rd={class:`action-box select-none`},id=H(Object.assign({name:`UFold`},{__name:`fold`,props:{line:{type:[Number,String],default:5}},setup(e){He(e=>({v15491e60:n.value}));let t=e,n=ve(()=>{let e=Math.trunc(Number(t.line));return e>0?e:1}),r=j(!0),i=j(!1),a=j(),o;return De(()=>{o=new ResizeObserver(e=>{r.value&&a.value&&(i.value=a.value.offsetHeight<a.value.scrollHeight)}),o.observe(a.value)}),ke(()=>{o.disconnect()}),(e,t)=>(A(),x(`div`,nd,[S(`div`,{class:D([`txt-box`,{"over-hidden":r.value}])},[S(`div`,{ref_key:`divBox`,ref:a},[N(e.$slots,`default`,{},void 0,!0)],512)],2),S(`div`,rd,[i.value&&e.unfold?(A(),x(`div`,{key:0,class:`expand-btn`,onClick:t[0]||=e=>r.value=!r.value},F(r.value?`展开`:`收起`),1)):b(``,!0)])]))}}),[[`__scopeId`,`data-v-94334818`]]),ad={__name:`user-card`,props:{uid:``},setup(e){let t=j({}),{showInfo:n}=we(`InjectContentBox`),r=we(`InjectSlots`),i=()=>Ce(`div`,r.card(t.value));return(a,o)=>I(r).card?(A(),y(I(ce),{key:0,placement:`top`,width:300,"show-after":300,onBeforeEnter:o[0]||=()=>I(n)(e.uid,e=>t.value=e)},{reference:z(()=>[N(a.$slots,`default`)]),default:z(()=>[w(i)]),_:3})):N(a.$slots,`default`,{key:1})}};function od(e,t){return Se()?(Oe(e,t),!0):!1}var sd=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var cd=Object.prototype.toString,ld=e=>cd.call(e)===`[object Object]`;function ud(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}function dd(e){return Array.isArray(e)?e:[e]}function fd(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=Ie(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},Ve(t))}return r&&(a.value=!0,sd&&l()),od(c),{isPending:Fe(a),start:l,stop:c}}function pd(e,t,n){return R(e,t,{...n,immediate:!0})}var md=sd?window:void 0;sd&&window.document;var hd=sd?window.navigator:void 0;sd&&window.location;function gd(e){let t=Ve(e);return t?.$el??t}function _d(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=ve(()=>{let t=dd(Ve(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return pd(()=>[n.value?.map(e=>gd(e))??[md].filter(e=>e!=null),dd(Ve(n.value?e[1]:e[0])),dd(I(n.value?e[2]:e[1])),Ve(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=ld(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function vd(){let e=Ie(!1),t=xe();return t&&De(()=>{e.value=!0},t),e}function yd(e){let t=vd();return ve(()=>(t.value,!!e()))}function bd(e,t={}){let{controls:n=!1,navigator:r=hd}=t,i=yd(()=>r&&`permissions`in r),a=Ie(),o=typeof e==`string`?{name:e}:e,s=Ie(),c=()=>{s.value=a.value?.state??`prompt`};_d(a,`change`,c,{passive:!0});let l=ud(async()=>{if(i.value){if(!a.value)try{a.value=await r.permissions.query(o)}catch{a.value=void 0}finally{c()}if(n)return Re(a.value)}});return l(),n?{state:s,isSupported:i,query:l}:s}function xd(e={}){let{navigator:t=hd,read:n=!1,source:r,copiedDuring:i=1500,legacy:a=!1}=e,o=yd(()=>t&&`clipboard`in t),s=bd(`clipboard-read`),c=bd(`clipboard-write`),l=ve(()=>o.value||a),u=Ie(``),d=Ie(!1),f=Ie(!1),p=fd(()=>d.value=!1,i,{immediate:!1}),m=0;async function h(){let e=!(o.value&&ne(s.value));if(!e)try{u.value=await t.clipboard.readText()}catch{e=!0}e&&(u.value=te())}l.value&&n&&_d([`copy`,`cut`],h,{passive:!0});async function g(e){let n=e??Ve(r);if(l.value&&n!=null){f.value=!0;let e=!(o.value&&ne(c.value));if(!e)try{let e=ee(n);await t.clipboard.write([e])}catch{e=!0}if(e)if(typeof n==`string`)u.value=n,_(n);else{let e=++m,t=await n();t!=null&&e===m&&(u.value=t,_(t))}d.value=!0,p.start(),f.value=!1}}function ee(e){return typeof e==`string`?(u.value=e,new ClipboardItem({"text/plain":e})):new ClipboardItem({"text/plain":e().then((e=``)=>(u.value=e,new Blob([e],{type:`text/plain`})))})}function _(e){let t=document.createElement(`textarea`);t.value=e,t.style.position=`absolute`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function te(){var e,t;return((e=document)==null||(t=e.getSelection)==null||(t=t.call(e))==null?void 0:t.toString())??``}function ne(e){return e===`granted`||e===`prompt`}return{copyPending:Fe(f),isSupported:l,text:Fe(u),copied:Fe(d),copy:g}}var Sd={class:`comment-list-actbox__right`},Cd={class:`operation-warp`},wd={class:`dialog-footer`},Td={__name:`comment-operate`,props:{data:{type:[Object],default:()=>({})}},setup(e){let{copy:t}=xd(),n=j(!1),r=j({report_type:``,report_content:``}),i=e;function a(){let e=i.data||{};n.value=!1,ne({type:`info`,message:`举报成功: `+e.id})}function o(e){let r=i.data||{};switch(e){case`remove`:setTimeout(()=>{commentRef.value?.remove(r)},200);break;case`report`:n.value=!0;break;case`copy`:t(r.content),ne({type:`info`,message:`复制成功`})}}return(e,t)=>{let i=P(`el-dropdown-item`),s=P(`el-dropdown-menu`),c=P(`el-dropdown`),l=P(`el-radio`),u=P(`el-radio-group`),d=P(`el-form-item`),f=P(`el-input`),p=P(`el-form`),m=P(`el-button`),h=P(`el-dialog`);return A(),x(`div`,Sd,[w(c,{trigger:`click`,onCommand:t[0]||=e=>o(e)},{dropdown:z(()=>[w(s,null,{default:z(()=>[w(i,{command:`report`},{default:z(()=>[...t[5]||=[C(`举报`,-1)]]),_:1}),w(i,{command:`remove`},{default:z(()=>[...t[6]||=[C(`删除`,-1)]]),_:1}),w(i,{divided:``,command:`copy`},{default:z(()=>[...t[7]||=[C(`复制`,-1)]]),_:1})]),_:1})]),default:z(()=>[S(`div`,Cd,[w(I(yu))])]),_:1}),w(h,{title:`举报`,modelValue:n.value,"onUpdate:modelValue":t[4]||=e=>n.value=e,width:`400px`,style:{width:`90%`,"max-width":`400px`}},{footer:z(()=>[S(`span`,wd,[w(m,{onClick:t[3]||=e=>n.value=!1},{default:z(()=>[...t[13]||=[C(`取消`,-1)]]),_:1}),w(m,{type:`primary`,onClick:a},{default:z(()=>[...t[14]||=[C(`提交`,-1)]]),_:1})])]),default:z(()=>[w(p,{"label-position":`top`},{default:z(()=>[w(d,{label:`您为什么要举报此信息?`},{default:z(()=>[w(u,{modelValue:r.value.report_type,"onUpdate:modelValue":t[1]||=e=>r.value.report_type=e},{default:z(()=>[w(l,{value:`色情淫秽`},{default:z(()=>[...t[8]||=[C(`色情淫秽`,-1)]]),_:1}),w(l,{value:`骚扰谩骂`},{default:z(()=>[...t[9]||=[C(`骚扰谩骂`,-1)]]),_:1}),w(l,{value:`广告欺诈`},{default:z(()=>[...t[10]||=[C(`广告欺诈`,-1)]]),_:1}),w(l,{value:`反动`},{default:z(()=>[...t[11]||=[C(`反动`,-1)]]),_:1}),w(l,{value:`其他`},{default:z(()=>[...t[12]||=[C(`其他`,-1)]]),_:1})]),_:1},8,[`modelValue`])]),_:1}),w(d,{label:`举报说明(可选):`},{default:z(()=>[w(f,{type:`textarea`,modelValue:r.value.report_content,"onUpdate:modelValue":t[2]||=e=>r.value.report_content=e,maxlength:`200`,placeholder:`描述恶意行为`,rows:`3`},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`modelValue`])])}}},Ed={class:`comment-sub`},Dd=[`href`],Od={class:`comment-primary`},kd={class:`comment-main`},Ad={key:1,class:`user-info`},jd=[`href`],Md={class:`username`},Nd={class:`name`,style:{"max-width":`10em`}},Pd={blank:`true`,class:`rank`},Fd=[`innerHTML`],Id={class:`address`,style:{color:`#939393`,"font-size":`12px`}},Ld={class:`time`},Rd={class:`content`},zd=[`innerHTML`],Bd={class:`imgbox`,style:{display:`flex`}},Vd={class:`comment-list-actbox select-none`},Hd={class:`comment-list-actbox__left`},Ud={key:2},Wd={class:`comment-list-actbox__right`},Gd={key:2},Kd=H({__name:`content-box`,props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:``}},setup(e){let t=e,r=je({active:!1}),i=j(),a=j(),o=ve(()=>{let e=t.data.contentImg;return Wr(e)?[]:e?.split(`||`)}),{allEmoji:s}=we(`InjectionEmojiApi`),{like:c,user:l,relativeTime:u}=we(`InjectContentBox`);function d(){r.active=!r.active,r.active&&Te(()=>{i.value?.focus()})}function f(e){let t=e.target;a.value?.contains(t)||(r.active=!1)}let p=we(`InjectSlots`),m=()=>Ce(`div`,p.info(t.data)),h=(e,t)=>(t=t.replace(/\[.+?\]/g,t=>{let n=e[t];return n?[`<img src="`,n,`" width="20" height="20" alt="`,t,`" title="`,t,`" style="margin: 0 1px; vertical-align: text-bottom"`,`/>`].join(``):t}),t),ee=ve(()=>h(s,t.data.content)),_=e=>{switch(e){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(s,h)=>(A(),x(`div`,{class:D([`comment`,{reply:t.reply}])},[S(`div`,Ed,[w(ad,{uid:I(Jr)(e.data.uid)},{default:z(()=>[S(`a`,{href:e.data.user.homeLink,target:`_blank`,class:`no-underline`,style:{display:`block`}},[w(I(n),{style:{"margin-top":`5px`},size:40,fit:`cover`,src:e.data.user.avatar},{default:z(()=>[...h[2]||=[S(`img`,{src:`https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png`},null,-1)]]),_:1},8,[`src`])],8,Dd)]),_:1},8,[`uid`])]),S(`div`,Od,[S(`div`,kd,[I(p).info?(A(),y(m,{key:0})):(A(),x(`div`,Ad,[w(ad,{uid:I(Jr)(e.data.uid)},{default:z(()=>[S(`a`,{href:e.data.user.homeLink,target:`_blank`,class:`no-underline`,style:{display:`block`}},[S(`div`,Md,[S(`span`,Nd,F(e.data.user.username),1),S(`span`,Pd,[S(`i`,{class:`comment-common-icon`,style:{"font-size":`24px`},innerHTML:_(e.data.user.level)},null,8,Fd)])])],8,jd)]),_:1},8,[`uid`]),S(`span`,Id,`\xA0\xA0`+F(e.data.address),1),S(`time`,Ld,F(I(u)?I(zr)(e.data.createTime):e.data.createTime),1)])),S(`div`,Rd,[w(id,{unfold:``},{default:z(()=>[S(`div`,{innerHTML:ee.value},null,8,zd),S(`div`,Bd,[(A(!0),x(v,null,M(o.value,(e,t)=>(A(),y(I(g),{key:t,src:e,style:{height:`72px`,padding:`8px 4px`},lazy:``,"preview-src-list":o.value,"initial-index":t},null,8,[`src`,`preview-src-list`,`initial-index`]))),128))])]),_:1})]),S(`div`,Vd,[S(`div`,Hd,[S(`div`,{"data-tip":`点赞`,class:`item`,onClick:h[0]||=t=>I(c)(I(Jr)(e.data.id))},[I(l).likeIds.map(String).indexOf(I(Jr)(e.data.id))==-1?(A(),y(I(Du),{key:0})):(A(),y(I(Cu),{key:1})),e.data.likes==0?b(``,!0):(A(),x(`span`,Ud,F(e.data.likes),1))]),S(`div`,{"data-tip":`回复`,ref_key:`btnRef`,ref:a,class:D([`item`,{active:r.active}]),onClick:d},[w(I(zu)),S(`span`,null,F(r.active?`取消回复`:`回复`),1)],2)]),S(`div`,Wd,[N(s.$slots,`operate`,{},()=>[w(Td,{data:t.data},null,8,[`data`])],!0)])]),r.active?(A(),x(`div`,Gd,[w(td,{ref_key:`commentRef`,ref:i,"parent-id":I(Jr)(e.id),placeholder:`回复 @${e.data.user.username}...`,reply:e.data,"content-btn":`发布`,style:{"margin-top":`12px`},onHide:f,onClose:h[1]||=e=>r.active=!1},null,8,[`parent-id`,`placeholder`,`reply`])])):b(``,!0)]),N(s.$slots,`default`,{},void 0,!0)])],2))}},[[`__scopeId`,`data-v-cfe79df7`]]),qd={key:0,class:`reply-box`},Jd={class:`reply-list`},Yd={key:0,class:`fetch-more`},Xd={key:0},Zd={key:1},Qd={key:0},$d={key:1,class:`fetch-more`},ef=H({__name:`reply-box`,props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:``}},setup(e){let t=e,n=je({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:r,replyShowSize:i,comments:a,page:o}=we(`InjectReplyBox`),s=ve(()=>{let e={total:0,length:0,list:[]};if(t.data){let n=t.data.list.length;e={total:t.data.total,length:n,list:t.data.list}}if(!n.over){let t=e.list.slice(0,i);e.list=t}return o&&(e.list=e.list.slice(0,5)),e}),c=()=>{n.over=!0},l=e=>{a.value.forEach(n=>{n.id==t.id&&(n.reply&&=e)})},u=e=>{n.pageNum=e,r(t.id,e,n.pageSize,e=>l(e))},d=e=>{n.pageSize=e,r(t.id,n.pageNum,e,e=>l(e))};return(t,r)=>s.value.length>0?(A(),x(`div`,qd,[S(`div`,Jd,[(A(!0),x(v,null,M(s.value.list,(t,n)=>(A(),y(Kd,{id:e.id,key:n,data:t,reply:``},null,8,[`id`,`data`]))),128)),s.value.length>I(i)?(A(),x(`div`,Yd,[n.loading?(A(),x(`span`,Xd,`加载中...`)):(A(),x(`div`,Zd,[n.over?b(``,!0):(A(),x(`div`,Qd,[C(` 共`+F(s.value.total)+`条回复, `,1),S(`span`,{class:`fetch-more-comment select-none`,onClick:c},[r[0]||=C(` 点击查看 `,-1),w(I(ju))])]))]))])):b(``,!0),n.over&&I(o)?(A(),x(`div`,$d,[w(I(se),{small:``,"hide-on-single-page":``,layout:`total, prev, pager, next`,total:s.value.total,"page-size":n.pageSize,onCurrentChange:u,onSizeChange:d},null,8,[`total`,`page-size`])])):b(``,!0)])])):b(``,!0)}},[[`__scopeId`,`data-v-16e0a50b`]]),tf={key:0,class:`comment-list`},nf={__name:`comment-list`,props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup(e){return(t,n)=>e.data?(A(),x(`div`,tf,[(A(!0),x(v,null,M(e.data,(e,t)=>(A(),y(Kd,{id:I(Jr)(e.id),key:t,data:e},{default:z(()=>[w(ef,{id:I(Jr)(e.id),data:e.reply},null,8,[`id`,`data`])]),_:2},1032,[`id`,`data`]))),128))])):b(``,!0)}},rf={class:`cv-comment-base`},af={class:`cv-comment-form`},of={class:`cv-comment-form__content`},sf={class:`cv-comment-form__avatar`},cf={class:`cv-comment-list-wrapper`},lf=Object.assign({name:`cvCommentBase`},{__name:`comment`,props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:[`submit`,`like`,`replyPage`,`showInfo`,`focus`],setup(e,{expose:t,emit:n}){let r=e,{user:i,comments:a,showSize:o,replyShowSize:s,total:c}=Be(r.config),l=n;Ae(`InjectInputBox`,{upload:r.upload,submit:({content:e,parentId:t,reply:n,files:r,clear:i})=>{l(`submit`,{content:e,parentId:t,reply:n,files:r,finish:e=>{if(i(),t){let n=a.value.find(e=>e.id==t);if(n){let t=n.reply;t?(t.list.unshift(e),t.total++):n.reply={total:1,list:[e]}}}else a.value.unshift(e)}})},focus:()=>l(`focus`)});let u=(e,t)=>{let n=null;a.value.forEach(r=>{n=r.id==e?r:r.reply?.list.find(t=>t.id==e),n&&(n.likes+=t)})};return Ae(`InjectContentBox`,{user:i,like:e=>{let t=r.config.user.likeIds;l(`like`,e,()=>{if(t.findIndex(t=>t==e)==-1)t.push(e),u(e,1);else{let n=t.findIndex(t=>t==e);n!=-1&&(t.splice(n,1),u(e,-1))}})},relativeTime:Gr(r.relativeTime,!1),showInfo:(e,t)=>l(`showInfo`,e,t)}),Ae(`InjectReplyBox`,{page:r.page,replyPage:(e,t,n,r)=>{l(`replyPage`,{parentId:e,pageNum:t,pageSize:n,finish:r})},replyShowSize:Gr(s,3),comments:a}),Ae(`InjectionEmojiApi`,r.config.emoji),Ae(`InjectSlots`,Ue()),t({remove:e=>{let{parentId:t,id:n}=e;if(t){let e=a.value.find(e=>e.id==t)?.reply;if(e){let t=e.list.findIndex(e=>e.id==n);t!=-1&&(e.list.splice(t,1),e.total--)}}else{let e=a.value.findIndex(e=>e.id==n);e!=-1&&a.value.splice(e,1)}}}),(t,n)=>{let r=P(`el-avatar`);return A(),x(`div`,rf,[S(`div`,af,[n[1]||=S(`div`,{class:`cv-comment-form__header`},[S(`span`,{class:`cv-comment-form__hdtitle`},`评论`)],-1),S(`div`,of,[S(`div`,sf,[w(r,{size:40,src:e.config.user.avatar},{default:z(()=>[...n[0]||=[S(`img`,{src:`https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png`},null,-1)]]),_:1},8,[`src`])]),w(td,{placeholder:`输入评论(Enter换行,Ctrl + Enter发送)`,"content-btn":`发表评论`})])]),N(t.$slots,`default`,{},()=>[n[2]||=S(`div`,{class:`title`},`全部评论`,-1)]),S(`div`,cf,[w(nf,{data:I(a),total:I(c),"show-size":I(Gr)(I(o),5)},null,8,[`data`,`total`,`show-size`])])])}}}),uf={class:`comment-scroll`},df=[`infinite-scroll-disabled`],ff={class:`scroll-btn`},pf={key:1},mf={key:2},hf=Object.assign({name:`cvCommentScroll`},{__name:`comment-scroll`,props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:[`more`],setup(e,{emit:t}){let n=e,r=j(!1),i=j(!1),a=t,o=ve(()=>i.value&&n.disable),s=ve(()=>!i.value||r.value||o.value),c=Pr(()=>{a(`more`),r.value=!1},500),l=()=>{r.value=!0,c()};return(e,t)=>{let n=P(`el-link`),a=Ne(`infinite-scroll`);return A(),x(`div`,uf,[B((A(),x(`div`,{"infinite-scroll-disabled":s.value,"infinite-scroll-distance":`2`},[N(e.$slots,`default`),S(`div`,ff,[i.value?b(``,!0):(A(),y(n,{key:0,type:`primary`,underline:`never`,onClick:t[0]||=e=>i.value=!i.value},{default:z(()=>[...t[1]||=[C(`加载更多`,-1)]]),_:1})),r.value?(A(),x(`p`,pf,`加载中...`)):b(``,!0),o.value?(A(),x(`p`,mf,`没有更多了`)):b(``,!0)])],8,df)),[[a,l]])])}}}),gf={class:`cv-comment-nav-wrap`},_f={class:`cv-comment-nav__sort`},vf=Object.assign({name:`cvCommentNav`},{__name:`comment-nav`,props:{modelValue:!1},emits:[`update:modelValue`,`sorted`],setup(e,{emit:t}){let n=e,r=t,i=ve({get(){return n.modelValue},set(e){r(`update:modelValue`,e),r(`sorted`,e)}});return(e,t)=>(A(),x(`div`,gf,[t[4]||=S(`span`,{class:`cv-comment-nav__title`},`全部评论`,-1),S(`div`,_f,[S(`div`,{class:D([`item select-none`,{active:i.value}]),onClick:t[0]||=e=>i.value=!0},[w(I(Fu)),t[2]||=C(` 最新 `,-1)],2),S(`div`,{class:D([`item select-none`,{active:!i.value}]),onClick:t[1]||=e=>i.value=!1},[w(I(du)),t[3]||=C(` 最热 `,-1)],2)])]))}});lf.install=function(e){e.component(lf.name,lf)},hf.install=function(e){e.component(hf.name,hf)},vf.install=function(e){e.component(vf.name,vf)};var yf={name:`cvIcons`,props:{type:{type:String,default:``},color:{type:String,default:`currentColor`},size:{type:[Number,String],default:14},rotate:{type:Boolean,default(){return!1}}},computed:{mergeIconStyle(){let e=``;return e=typeof this.size==`string`&&(this.size.includes(`px`)||this.size.includes(`rpx`))?this.size:`${parseFloat(this.size)}px`,{color:this.color,"font-size":e}}},data(){return{}},created(){},methods:{}};function bf(e,t,n,r,i,a){return A(),x(`i`,{style:k(a.mergeIconStyle),class:D([`cv-icon`,n.rotate?`cv-icons-turn`:`cv-icon-`+n.type])},null,6)}var xf=H(yf,[[`render`,bf]]),Sf={name:`cvIconSvg`,props:{...h.prop,type:{type:[String],default:``},size:{type:[String,Number],default:12},name:{type:[String],default:``}},data(){return{}},computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+`px`:this.size,color:props.color}}},created(){},methods:{}},Cf={key:0,"aria-hidden":`true`},wf=[`xlink:href`];function Tf(e,t,n,r,i,a){let o=P(`el-icon`);return A(),y(o,O(T(e.$props)),{default:z(()=>[N(e.$slots,`default`,{},()=>[(A(),y(Pe(n.type)))]),n.name?(A(),x(`svg`,Cf,[S(`use`,{"xlink:href":n.name},null,8,wf)])):b(``,!0)]),_:3},16)}var Ef=H(Sf,[[`render`,Tf]]);function Df(e){let t=e.trim();return/^https?:\/\//.test(t)}var Of={emits:[`click`],props:{name:{type:String,required:!0,validator:e=>e.trim().length>0},size:{type:[Number,String],default:24},color:{type:String,default:`#333333`},hoverColor:{type:String,default:`currentColor`},hoverEffect:{type:Boolean,default:!1}},data(){return{iconType:`svg`}},computed:{maskIconUrl(){if(Df(this.name))return this.name;let e=`https://10ui.cn/icons`,t=this.name||``,n=``;t=t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),t=t.replace(/^-|-$/g,``),t=t.toLowerCase().trim();let r=/-(filled|bold)$/;if(r.test(t)){let e=t.match(r)[1],i=t.slice(0,t.lastIndexOf(`-${e}`));n=i?`${i.split(`-`).filter(e=>e.trim().length>0).join(`/`)}-${e}`:t}else n=t.includes(`-`)?t.split(`-`).filter(e=>e.trim().length>0).join(`/`):t;switch(this.iconType?.toLowerCase()||`png`){case`svg`:return`${e}/${n}.svg`;case`png`:return`${e}/png/${n}.png`;default:return`${e}/png/${n}.png`}},iconSize(){return typeof this.size==`string`&&(this.size.includes(`px`)||this.size.includes(`rpx`))?this.size:`${parseFloat(this.size)}px`},iconStyle(){let e={width:this.iconSize,height:this.iconSize,backgroundColor:this.color,WebkitMaskImage:`url(${this.maskIconUrl})`,maskImage:`url(${this.maskIconUrl})`,WebkitMaskSize:`contain`,maskSize:`contain`,WebkitMaskRepeat:`no-repeat`,maskRepeat:`no-repeat`,WebkitMaskPosition:`center`,maskPosition:`center`};return this.hoverEffect&&(e.transition=`background-color 0.2s ease`),e}}},kf={name:`cvMaskSvg`,mixins:[Of]},Af=()=>{He(e=>({v4d7c194c:e.hoverColor}))},jf=kf.setup;kf.setup=jf?(e,t)=>(Af(),jf(e,t)):Af;function Mf(e,t,n,r,i,a){return A(),x(`div`,{class:`cv-mask-icon`,style:k(e.iconStyle),onClick:t[0]||=t=>e.$emit(`click`,t)},null,4)}var Nf=H(kf,[[`render`,Mf],[`__scopeId`,`data-v-bff5bc9b`]]),Pf={name:`cvMaskPng`,mixins:[Of],data(){return{iconType:`png`}}},Ff=()=>{He(e=>({v6bb780e0:e.hoverColor}))},If=Pf.setup;Pf.setup=If?(e,t)=>(Ff(),If(e,t)):Ff;function Lf(e,t,n,r,i,a){return A(),x(`div`,{class:`cv-mask-icon`,style:k(e.iconStyle),onTap:t[0]||=t=>e.$emit(`click`,t)},null,36)}var Rf=H(Pf,[[`render`,Lf],[`__scopeId`,`data-v-4f8ce869`]]);xf.install=function(e){e.component(xf.name,xf)},Ef.install=function(e){e.component(Ef.name,Ef)},Nf.install=function(e){e.component(Nf.name,Nf)},Rf.install=function(e){e.component(Rf.name,Rf)};var zf={class:`u-emoji`},Bf={class:`face-tooltip-head select-none`},Vf=[`onClick`],Hf=[`src`],Uf={class:`emoji-body select-none`},Wf={style:{padding:`0 5px`}},Gf=[`onClick`],Kf={class:`emoji-btn select-none`},qf={key:0},Jf=H(Object.assign({name:`cvEmoji`},{__name:`emoji`,props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:`bottom`},emits:[`addEmoji`],setup(e,{emit:t}){let n=e,r=j(0),i=j(0),a=j([,,]),{emojiList:o,faceList:s}=n.emoji;function c(e){switch(r.value=e,e){case 0:i.value=0;break;case 1:i.value=-50,a.value[1]=o[1];break}}function l(){a.value[0]=o[0]}return(t,n)=>(A(),x(`div`,zf,[w(I(ce),{placement:e.placement,"popper-class":`emoji-popover`,width:250,trigger:`click`,onBeforeEnter:l},{reference:z(()=>[S(`div`,Kf,[t.$slots.default?N(t.$slots,`default`,{key:1},void 0,!0):(A(),x(`div`,qf,[...n[0]||=[S(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`icon`},[S(`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),S(`span`,null,`表情`,-1)]]))])]),default:z(()=>[S(`div`,Bf,[(A(!0),x(v,null,M(I(s),(e,t)=>(A(),x(`label`,{key:t,class:D(r.value==t?`active`:``),onClick:e=>c(t)},[S(`img`,{src:e,alt:``},null,8,Hf)],10,Vf))),128))]),S(`div`,Uf,[S(`div`,{class:`emjio-container`,style:k({transform:`translateX(${i.value}%)`})},[(A(!0),x(v,null,M(a.value,(e,n)=>(A(),x(`div`,{key:n,class:`emoji-wrapper`},[w(I(le),null,{default:z(()=>[S(`div`,Wf,[(A(!0),x(v,null,M(e,(e,n)=>(A(),x(`span`,{key:n,class:`emoji-item`,onClick:e=>t.$emit(`addEmoji`,n)},[w(I(g),{src:e,title:String(n),class:`emoji`,style:{width:`24px`,height:`24px`,margin:`5px`},lazy:``},null,8,[`src`,`title`])],8,Gf))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,[`placement`])]))}}),[[`__scopeId`,`data-v-da53b6ed`]]),Yf={class:`cv-chat-message`},Xf={class:`chat-list`},Zf={class:`content`},Qf={key:0,class:`username`},$f=[`innerHTML`],ep={__name:`message`,props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(e,{expose:t}){let{allEmoji:r}=we(`InjectionEmojiApi`),i=j();t({scroll:()=>{Te(()=>{let e=document.querySelector(`.chat-item:last-child`);i.value.setScrollTop(e.offsetTop)})}});let a=(e,t)=>(t=t.replace(/\[.+?\]/g,t=>{let n=e[t];return n?[`<img src="`,n,`" width="20" height="20" alt="`,t,`" title="`,t,`" style="margin: 0 1px; vertical-align: text-bottom"`,`/>`].join(``):t}),t);return(t,o)=>(A(),x(`div`,Yf,[w(I(le),{ref_key:`scrollbarRef`,ref:i},{default:z(()=>[S(`div`,Xf,[(A(!0),x(v,null,M(e.data,(t,i)=>(A(),x(`div`,{key:i,class:D([{self:e.userId==t.id},`chat-item`])},[S(`div`,null,[w(I(n),null,{default:z(()=>[...o[0]||=[S(`img`,{src:`https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png`},null,-1)]]),_:1})]),S(`div`,Zf,[e.userId==t.id?b(``,!0):(A(),x(`div`,Qf,F(t.username),1)),S(`div`,{class:`card-box`,innerHTML:a(I(r),t.content)},null,8,$f)]),o[1]||=S(`div`,{class:`date`},null,-1)],2))),128))])]),_:1},512)]))}},tp={class:`cv-chat-wrap`},np={class:`header`},rp={id:`chat-footer`,class:`footer`},ip=H(Object.assign({name:`cvChat`},{__name:`chat`,props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:[`submit`],setup(e,{emit:t}){let n=e,r=j(!1),a=j(``),o=j(),{data:s}=n,c=t,l=e=>{let{ctrlKey:t,key:n}=e;t&&n==`Enter`&&d()},u=()=>{a.value=``,o.value.scroll()},d=()=>{let e=a.value;e.trim()?(e=e.replace(/\n/g,`<br/>`),c(`submit`,{clear:u,content:e})):ne({type:`error`,message:`内容不能为空`})},f=e=>{let t=document.getElementById(`emojiInput`),n=t.selectionStart,r=t.selectionEnd,i=t.value;if(n===null||r===null)return;let o=i.substring(0,n)+e+i.substring(r);t.value=o,t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,a.value=o};return Ae(`InjectionEmojiApi`,n.emoji),(t,n)=>{let c=P(`cvIcons`);return A(),x(`div`,tp,[S(`div`,{class:D([{active:r.value},`chat-container translate`])},[S(`div`,np,[w(c,{size:`32`},{default:z(()=>[...n[2]||=[S(`svg`,{viewBox:`0 0 1318 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},[S(`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`}),S(`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`}),S(`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`}),S(`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`}),S(`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}),n[3]||=S(`div`,{style:{"margin-left":`12px`}},[S(`div`,null,`聊天室`),S(`div`,{style:{"font-size":`12px`}},`当前2人在线`)],-1)]),w(ep,{ref_key:`messageRef`,ref:o,data:I(s),"user-id":e.userId},null,8,[`data`,`user-id`]),S(`div`,rp,[w(I(ee),{id:`emojiInput`,modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`textarea`,autosize:{minRows:1,maxRows:4},placeholder:`请输入内容`,onKeydown:We(l,[`enter`])},null,8,[`modelValue`]),w(Jf,{style:{margin:`0 8px 0`},emoji:e.emoji,placement:`top-end`,onAddEmoji:f},{default:z(()=>[...n[4]||=[S(`svg`,{width:`22`,height:`22`,viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`7186`},[S(`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`]),w(c,{size:`18`,class:D([{".cv-chat-wrap submit-btn":a.value.trim()!=``},`select-none cursor-pointer`]),style:{"padding-bottom":`5px`},onClick:d},{default:z(()=>[...n[5]||=[S(`svg`,{viewBox:`0 0 1025 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`15072`},[S(`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),w(I(i),{class:`chat-btn`,onClick:n[1]||=e=>r.value=!r.value},{default:z(()=>[...n[6]||=[C(`chat`,-1)]]),_:1})])}}}),[[`__scopeId`,`data-v-c77a9347`]]);ip.install=function(e){e.component(ip.name,ip)};var ap={key:0},op=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(e){let t=e,{data:n,vertical:r,suffixIcon:i,prefixIcon:a,size:o,height:s,delay:c,spped:l,color:u,background:d}=t,f=je({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),p=j({}),m=j({style:{cssText:``}}),h=ve(()=>t.delay>2e3?t.delay:2e3),g=()=>{Te(()=>{f.boxWidth=p.value.offsetWidth,f.textWidth=m.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${f.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${f.boxWidth}px;} 100% {left: -${f.textWidth}px;}}`),ee(),setTimeout(()=>{_()},t.delay)})},ee=()=>{f.oneTime=f.textWidth/t.spped,f.twoTime=(f.textWidth+f.boxWidth)/t.spped},_=()=>{f.order===1?(m.value?.style&&(m.value.style.cssText=`animation: oneAnimation ${f.oneTime}s linear; opactity: 1;}`),f.order=2):m.value?.style&&(m.value.style.cssText=`animation: twoAnimation ${f.twoTime}s linear infinite; opacity: 1;`)},te=()=>{m.value.addEventListener(`animationend`,()=>{_()},!1)};return De(()=>{t.vertical||(g(),te())}),(e,t)=>{let c=P(`el-carousel-item`),l=P(`el-carousel`),f=P(`cvIcons`);return A(),x(`div`,{class:`cv-notice-bar`,style:k({background:I(d),height:`${I(s)}px`})},[I(r)?(A(),x(`div`,ap,[w(l,{height:`40px`,direction:`vertical`,autoplay:!0,"indicator-position":`none`,interval:h.value},{default:z(()=>[(A(!0),x(v,null,M(I(n),e=>(A(),y(c,{key:e},{default:z(()=>[C(F(e),1)]),_:2},1024))),128))]),_:1},8,[`interval`])])):(A(),x(`div`,{key:1,style:k({color:I(u),fontSize:`${I(o)}px`}),class:`cv-notice-bar-wrap`},[I(a)?(A(),y(f,{key:0,type:I(a)},null,8,[`type`])):b(``,!0),S(`div`,{ref_key:`boxRef`,ref:p,class:`text-box`},[S(`div`,{ref_key:`textRef`,ref:m,class:`text`},F(I(n)),513)],512),I(i)?(A(),y(f,{key:1,type:I(i)},null,8,[`type`])):b(``,!0)],4))],4)}}});op.install=function(e){e.component(op.name,op)};var sp=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:``,autoDestroy:!0,extensions:[Ke]}),cp={Change:`change`,Update:`update`,Focus:`focus`,Blur:`blur`,Ready:`ready`,ModelUpdate:`update:modelValue`},lp=({onUpdate:e,onChange:t,onFocus:n,onBlur:r,...i})=>Ye.create({doc:i.doc,selection:i.selection,extensions:[...Array.isArray(i.extensions)?i.extensions:[i.extensions],Ze.updateListener.of(i=>{e(i),i.docChanged&&t(i.state.doc.toString(),i),i.focusChanged&&(i.view.hasFocus?n(i):r(i))})]}),up=e=>{let t=new qe;return{compartment:t,run:n=>{t.get(e.state)?e.dispatch({effects:t.reconfigure(n)}):e.dispatch({effects:Xe.appendConfig.of(t.of(n))})}}},dp=(e,t)=>{let{compartment:n,run:r}=up(e);return i=>{let a=n.get(e.state);r(i??a!==t?t:[])}},fp=e=>{let t=()=>e.state.doc.toString(),n=n=>{n!==t()&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:n}})},r=()=>e.focus(),{run:i}=up(e),a=dp(e,[Ze.editable.of(!1),Ye.readOnly.of(!0)]),o=dp(e,Qe.of([et])),{run:s}=up(e),c=e=>{s([Ye.tabSize.of(e),nt.of(` `.repeat(e))])},{run:l}=up(e),u=e=>{l([Ye.phrases.of(e)])},{run:d}=up(e),f=e=>{d($e(e))},{run:p}=up(e);return{focus:r,getDoc:t,setDoc:n,reExtensions:i,toggleDisabled:a,toggleIndentWithTab:o,setTabSize:c,setPhrases:u,setPlaceholder:f,setStyle:(e={})=>{p(Ze.theme({"&":{...e}}))}}},pp=be({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:{[cp.Change]:(e,t)=>!0,[cp.Update]:e=>!0,[cp.Focus]:e=>!0,[cp.Blur]:e=>!0,[cp.Ready]:e=>!0,[cp.ModelUpdate]:(e,t)=>!0},setup(e,t){let n=Ie(),r=Ie(),i=Ie(),a={...sp},o=ve(()=>{let t={};return Object.keys(Re(e)).forEach(n=>{n!==`modelValue`&&(t[n]=e[n]??a[n])}),t});return De(()=>{r.value=lp({doc:e.modelValue,selection:o.value.selection,extensions:a.extensions??[],onFocus:e=>t.emit(cp.Focus,e),onBlur:e=>t.emit(cp.Blur,e),onUpdate:e=>t.emit(cp.Update,e),onChange:(n,r)=>{n!==e.modelValue&&(t.emit(cp.Change,n,r),t.emit(cp.ModelUpdate,n,r))}}),i.value=new Ze({state:r.value,parent:n.value,root:o.value.root}),i.value.contentDOM.addEventListener(`scroll`,e=>{});let s=fp(i.value);R(()=>e.modelValue,e=>{e!==s.getDoc()&&s.setDoc(e)}),R(()=>e.extensions,e=>s.reExtensions(e||[]),{immediate:!0}),R(()=>o.value.disabled,e=>s.toggleDisabled(e),{immediate:!0}),R(()=>o.value.indentWithTab,e=>s.toggleIndentWithTab(e),{immediate:!0}),R(()=>o.value.tabSize,e=>s.setTabSize(e),{immediate:!0}),R(()=>o.value.phrases,e=>s.setPhrases(e||{}),{immediate:!0}),R(()=>o.value.placeholder,e=>s.setPlaceholder(e),{immediate:!0}),R(()=>o.value.style,e=>s.setStyle(e),{immediate:!0}),o.value.autofocus&&s.focus(),t.emit(cp.Ready,{state:r.value,view:i.value,container:n.value,editorTools:s})}),Ee(()=>{o.value.autoDestroy&&i.value&&i.value.destroy()}),()=>Ce(`div`,{class:`cv-editor-codemirror`,ref:n})}}),mp=`#e5c07b`,hp=`#e06c75`,gp=`#56b6c2`,_p=`#ffffff`,vp=`#abb2bf`,yp=`#7d8799`,bp=`#61afef`,xp=`#98c379`,Sp=`#d19a66`,Cp=`#c678dd`,wp=`#21252b`,Tp=`#2c313a`,Ep=`#282c34`,Dp=`#353a42`,Op=`#3E4451`,kp=`#528bff`,Ap=[Ze.theme({"&":{color:vp,backgroundColor:Ep},".cm-content":{caretColor:kp},".cm-cursor, .cm-dropCursor":{borderLeftColor:kp},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Op},".cm-panels":{backgroundColor:wp,color:vp},".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:Ep,color:yp,border:`none`},".cm-activeLineGutter":{backgroundColor:Tp},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:Dp},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Dp,borderBottomColor:Dp},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Tp,color:vp}}},{dark:!0}),rt(tt.define([{tag:V.keyword,color:Cp},{tag:[V.name,V.deleted,V.character,V.propertyName,V.macroName],color:hp},{tag:[V.function(V.variableName),V.labelName],color:bp},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Sp},{tag:[V.definition(V.name),V.separator],color:vp},{tag:[V.typeName,V.className,V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:mp},{tag:[V.operator,V.operatorKeyword,V.url,V.escape,V.regexp,V.link,V.special(V.string)],color:gp},{tag:[V.meta,V.comment],color:yp},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.strikethrough,textDecoration:`line-through`},{tag:V.link,color:yp,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:hp},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Sp},{tag:[V.processingInstruction,V.string,V.inserted],color:xp},{tag:V.invalid,color:_p}]))],U={name:`materialLight`,dark:!1,background:`#FAFAFA`,foreground:`#90A4AE`,selection:`#80CBC440`,cursor:`#272727`,dropdownBackground:`#FAFAFA`,dropdownBorder:`#00000010`,activeLine:`#c2c2c222`,lineNumber:`#CFD8DC`,lineNumberActive:`#7E939E`,matchingBracket:`#FAFAFA`,keyword:`#7C4DFF`,storage:`#7C4DFF`,variable:`#90A4AE`,parameter:`#90A4AE`,function:`#6182B8`,string:`#91B859`,constant:`#F76D47`,type:`#8796B0`,class:`#FFB62C`,number:`#F76D47`,comment:`#90A4AE`,heading:`#91B859`,invalid:`#E53935`,regexp:`#39ADB5`},jp=[Ze.theme({"&":{color:U.foreground,backgroundColor:U.background},".cm-content":{caretColor:U.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:U.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:U.selection},".cm-panels":{backgroundColor:U.dropdownBackground,color:U.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:U.dropdownBackground,outline:`1px solid ${U.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:U.selection},".cm-activeLine":{backgroundColor:U.activeLine},".cm-selectionMatch":{backgroundColor:U.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:U.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:U.background,color:U.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:U.background},".cm-lineNumbers .cm-gutterElement":{color:U.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:U.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:U.foreground},".cm-tooltip":{border:`1px solid ${U.dropdownBorder}`,backgroundColor:U.dropdownBackground,color:U.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:U.foreground,borderBottomColor:U.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:U.selection,color:U.foreground}}},{dark:U.dark}),rt(tt.define([{tag:V.keyword,color:U.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:U.variable},{tag:[V.propertyName],color:U.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:U.string},{tag:[V.function(V.variableName),V.labelName],color:U.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:U.constant},{tag:[V.definition(V.name),V.separator],color:U.variable},{tag:[V.className],color:U.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:U.number},{tag:[V.typeName],color:U.type,fontStyle:U.type},{tag:[V.operator,V.operatorKeyword],color:U.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:U.regexp},{tag:[V.meta,V.comment],color:U.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:U.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:U.variable},{tag:V.invalid,color:U.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],W={name:`materialDark`,dark:!0,background:`#263238`,foreground:`#EEFFFF`,selection:`#80CBC420`,cursor:`#FFCC00`,dropdownBackground:`#263238`,dropdownBorder:`#FFFFFF10`,activeLine:`#4c616c22`,lineNumber:`#37474F`,lineNumberActive:`#607a86`,matchingBracket:`#263238`,keyword:`#C792EA`,storage:`#C792EA`,variable:`#EEFFFF`,parameter:`#EEFFFF`,function:`#82AAFF`,string:`#C3E88D`,constant:`#F78C6C`,type:`#B2CCD6`,class:`#FFCB6B`,number:`#F78C6C`,comment:`#546E7A`,heading:`#C3E88D`,invalid:`#FF5370`,regexp:`#89DDFF`},Mp=[Ze.theme({"&":{color:W.foreground,backgroundColor:W.background},".cm-content":{caretColor:W.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:W.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:W.selection},".cm-panels":{backgroundColor:W.dropdownBackground,color:W.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:W.dropdownBackground,outline:`1px solid ${W.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:W.selection},".cm-activeLine":{backgroundColor:W.activeLine},".cm-selectionMatch":{backgroundColor:W.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:W.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:W.background,color:W.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:W.background},".cm-lineNumbers .cm-gutterElement":{color:W.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:W.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:W.foreground},".cm-tooltip":{border:`1px solid ${W.dropdownBorder}`,backgroundColor:W.dropdownBackground,color:W.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:W.foreground,borderBottomColor:W.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:W.selection,color:W.foreground}}},{dark:W.dark}),rt(tt.define([{tag:V.keyword,color:W.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:W.variable},{tag:[V.propertyName],color:W.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:W.string},{tag:[V.function(V.variableName),V.labelName],color:W.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:W.constant},{tag:[V.definition(V.name),V.separator],color:W.variable},{tag:[V.className],color:W.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:W.number},{tag:[V.typeName],color:W.type,fontStyle:W.type},{tag:[V.operator,V.operatorKeyword],color:W.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:W.regexp},{tag:[V.meta,V.comment],color:W.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:W.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:W.variable},{tag:V.invalid,color:W.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],G={name:`solarizedLight`,dark:!1,background:`#FDF6E3`,foreground:`#586E75`,selection:`#EEE8D5`,cursor:`#657B83`,dropdownBackground:`#FDF6E3`,dropdownBorder:`#D3AF86`,activeLine:`#d5bd5c22`,lineNumber:`#586E75`,lineNumberActive:`#567983`,matchingBracket:`#EEE8D5`,keyword:`#859900`,storage:`#586E75`,variable:`#268BD2`,parameter:`#268BD2`,function:`#268BD2`,string:`#2AA198`,constant:`#CB4B16`,type:`#CB4B16`,class:`#CB4B16`,number:`#D33682`,comment:`#93A1A1`,heading:`#268BD2`,invalid:`#DC322F`,regexp:`#DC322F`},Np=[Ze.theme({"&":{color:G.foreground,backgroundColor:G.background},".cm-content":{caretColor:G.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:G.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:G.selection},".cm-panels":{backgroundColor:G.dropdownBackground,color:G.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:G.dropdownBackground,outline:`1px solid ${G.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:G.selection},".cm-activeLine":{backgroundColor:G.activeLine},".cm-selectionMatch":{backgroundColor:G.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:G.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:G.background,color:G.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:G.background},".cm-lineNumbers .cm-gutterElement":{color:G.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:G.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:G.foreground},".cm-tooltip":{border:`1px solid ${G.dropdownBorder}`,backgroundColor:G.dropdownBackground,color:G.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:G.foreground,borderBottomColor:G.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:G.selection,color:G.foreground}}},{dark:G.dark}),rt(tt.define([{tag:V.keyword,color:G.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:G.variable},{tag:[V.propertyName],color:G.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:G.string},{tag:[V.function(V.variableName),V.labelName],color:G.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:G.constant},{tag:[V.definition(V.name),V.separator],color:G.variable},{tag:[V.className],color:G.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:G.number},{tag:[V.typeName],color:G.type,fontStyle:G.type},{tag:[V.operator,V.operatorKeyword],color:G.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:G.regexp},{tag:[V.meta,V.comment],color:G.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:G.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:G.variable},{tag:V.invalid,color:G.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],K={name:`solarizedDark`,dark:!0,background:`#002B36`,foreground:`#93A1A1`,selection:`#274642`,cursor:`#D30102`,dropdownBackground:`#002B36`,dropdownBorder:`#2AA19899`,activeLine:`#005b7022`,lineNumber:`#93A1A1`,lineNumberActive:`#949494`,matchingBracket:`#073642`,keyword:`#859900`,storage:`#93A1A1`,variable:`#268BD2`,parameter:`#268BD2`,function:`#268BD2`,string:`#2AA198`,constant:`#CB4B16`,type:`#CB4B16`,class:`#CB4B16`,number:`#D33682`,comment:`#586E75`,heading:`#268BD2`,invalid:`#DC322F`,regexp:`#DC322F`},Pp=[Ze.theme({"&":{color:K.foreground,backgroundColor:K.background},".cm-content":{caretColor:K.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:K.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:K.selection},".cm-panels":{backgroundColor:K.dropdownBackground,color:K.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:K.dropdownBackground,outline:`1px solid ${K.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:K.selection},".cm-activeLine":{backgroundColor:K.activeLine},".cm-selectionMatch":{backgroundColor:K.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:K.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:K.background,color:K.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:K.background},".cm-lineNumbers .cm-gutterElement":{color:K.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:K.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:K.foreground},".cm-tooltip":{border:`1px solid ${K.dropdownBorder}`,backgroundColor:K.dropdownBackground,color:K.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:K.foreground,borderBottomColor:K.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:K.selection,color:K.foreground}}},{dark:K.dark}),rt(tt.define([{tag:V.keyword,color:K.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:K.variable},{tag:[V.propertyName],color:K.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:K.string},{tag:[V.function(V.variableName),V.labelName],color:K.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:K.constant},{tag:[V.definition(V.name),V.separator],color:K.variable},{tag:[V.className],color:K.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:K.number},{tag:[V.typeName],color:K.type,fontStyle:K.type},{tag:[V.operator,V.operatorKeyword],color:K.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:K.regexp},{tag:[V.meta,V.comment],color:K.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:K.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:K.variable},{tag:V.invalid,color:K.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],q={name:`dracula`,dark:!0,background:`#282A36`,foreground:`#F8F8F2`,selection:`#44475A`,cursor:`#F8F8F2`,dropdownBackground:`#282A36`,dropdownBorder:`#191A21`,activeLine:`#53576c22`,lineNumber:`#6272A4`,lineNumberActive:`#F8F8F2`,matchingBracket:`#44475A`,keyword:`#FF79C6`,storage:`#FF79C6`,variable:`#F8F8F2`,parameter:`#F8F8F2`,function:`#50FA7B`,string:`#F1FA8C`,constant:`#BD93F9`,type:`#8BE9FD`,class:`#8BE9FD`,number:`#BD93F9`,comment:`#6272A4`,heading:`#BD93F9`,invalid:`#FF5555`,regexp:`#F1FA8C`},Fp=[Ze.theme({"&":{color:q.foreground,backgroundColor:q.background},".cm-content":{caretColor:q.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:q.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:q.selection},".cm-panels":{backgroundColor:q.dropdownBackground,color:q.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:q.dropdownBackground,outline:`1px solid ${q.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:q.selection},".cm-activeLine":{backgroundColor:q.activeLine},".cm-selectionMatch":{backgroundColor:q.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:q.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:q.background,color:q.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:q.background},".cm-lineNumbers .cm-gutterElement":{color:q.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:q.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:q.foreground},".cm-tooltip":{border:`1px solid ${q.dropdownBorder}`,backgroundColor:q.dropdownBackground,color:q.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:q.foreground,borderBottomColor:q.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:q.selection,color:q.foreground}}},{dark:q.dark}),rt(tt.define([{tag:V.keyword,color:q.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:q.variable},{tag:[V.propertyName],color:q.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:q.string},{tag:[V.function(V.variableName),V.labelName],color:q.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:q.constant},{tag:[V.definition(V.name),V.separator],color:q.variable},{tag:[V.className],color:q.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:q.number},{tag:[V.typeName],color:q.type,fontStyle:q.type},{tag:[V.operator,V.operatorKeyword],color:q.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:q.regexp},{tag:[V.meta,V.comment],color:q.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:q.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:q.variable},{tag:V.invalid,color:q.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],J={name:`githubLight`,dark:!1,background:`#fff`,foreground:`#444d56`,selection:`#0366d625`,cursor:`#044289`,dropdownBackground:`#fff`,dropdownBorder:`#e1e4e8`,activeLine:`#c6c6c622`,lineNumber:`#1b1f234d`,lineNumberActive:`#24292e`,matchingBracket:`#34d05840`,keyword:`#d73a49`,storage:`#d73a49`,variable:`#e36209`,parameter:`#24292e`,function:`#005cc5`,string:`#032f62`,constant:`#005cc5`,type:`#005cc5`,class:`#6f42c1`,number:`#005cc5`,comment:`#6a737d`,heading:`#005cc5`,invalid:`#cb2431`,regexp:`#032f62`},Ip=[Ze.theme({"&":{color:J.foreground,backgroundColor:J.background},".cm-content":{caretColor:J.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:J.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:J.selection},".cm-panels":{backgroundColor:J.dropdownBackground,color:J.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:J.dropdownBackground,outline:`1px solid ${J.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:J.selection},".cm-activeLine":{backgroundColor:J.activeLine},".cm-selectionMatch":{backgroundColor:J.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:J.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:J.background,color:J.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:J.background},".cm-lineNumbers .cm-gutterElement":{color:J.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:J.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:J.foreground},".cm-tooltip":{border:`1px solid ${J.dropdownBorder}`,backgroundColor:J.dropdownBackground,color:J.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:J.foreground,borderBottomColor:J.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:J.selection,color:J.foreground}}},{dark:J.dark}),rt(tt.define([{tag:V.keyword,color:J.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:J.variable},{tag:[V.propertyName],color:J.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:J.string},{tag:[V.function(V.variableName),V.labelName],color:J.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:J.constant},{tag:[V.definition(V.name),V.separator],color:J.variable},{tag:[V.className],color:J.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:J.number},{tag:[V.typeName],color:J.type,fontStyle:J.type},{tag:[V.operator,V.operatorKeyword],color:J.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:J.regexp},{tag:[V.meta,V.comment],color:J.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:J.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:J.variable},{tag:V.invalid,color:J.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Y={name:`githubDark`,dark:!0,background:`#24292e`,foreground:`#d1d5da`,selection:`#3392FF44`,cursor:`#c8e1ff`,dropdownBackground:`#24292e`,dropdownBorder:`#1b1f23`,activeLine:`#4d566022`,lineNumber:`#444d56`,lineNumberActive:`#e1e4e8`,matchingBracket:`#17E5E650`,keyword:`#f97583`,storage:`#f97583`,variable:`#ffab70`,parameter:`#e1e4e8`,function:`#79b8ff`,string:`#9ecbff`,constant:`#79b8ff`,type:`#79b8ff`,class:`#b392f0`,number:`#79b8ff`,comment:`#6a737d`,heading:`#79b8ff`,invalid:`#f97583`,regexp:`#9ecbff`},Lp=[Ze.theme({"&":{color:Y.foreground,backgroundColor:Y.background},".cm-content":{caretColor:Y.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:Y.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Y.selection},".cm-panels":{backgroundColor:Y.dropdownBackground,color:Y.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:Y.dropdownBackground,outline:`1px solid ${Y.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Y.selection},".cm-activeLine":{backgroundColor:Y.activeLine},".cm-selectionMatch":{backgroundColor:Y.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Y.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:Y.background,color:Y.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:Y.background},".cm-lineNumbers .cm-gutterElement":{color:Y.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:Y.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:Y.foreground},".cm-tooltip":{border:`1px solid ${Y.dropdownBorder}`,backgroundColor:Y.dropdownBackground,color:Y.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Y.foreground,borderBottomColor:Y.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:Y.selection,color:Y.foreground}}},{dark:Y.dark}),rt(tt.define([{tag:V.keyword,color:Y.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:Y.variable},{tag:[V.propertyName],color:Y.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:Y.string},{tag:[V.function(V.variableName),V.labelName],color:Y.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Y.constant},{tag:[V.definition(V.name),V.separator],color:Y.variable},{tag:[V.className],color:Y.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:Y.number},{tag:[V.typeName],color:Y.type,fontStyle:Y.type},{tag:[V.operator,V.operatorKeyword],color:Y.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:Y.regexp},{tag:[V.meta,V.comment],color:Y.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:Y.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Y.variable},{tag:V.invalid,color:Y.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],X={name:`aura`,dark:!0,background:`#21202e`,foreground:`#edecee`,selection:`#3d375e7f`,cursor:`#a277ff`,dropdownBackground:`#21202e`,dropdownBorder:`#3b334b`,activeLine:`#4d4b6622`,lineNumber:`#a394f033`,lineNumberActive:`#cdccce`,matchingBracket:`#a394f033`,keyword:`#a277ff`,storage:`#a277ff`,variable:`#edecee`,parameter:`#edecee`,function:`#ffca85`,string:`#61ffca`,constant:`#61ffca`,type:`#82e2ff`,class:`#82e2ff`,number:`#61ffca`,comment:`#6d6d6d`,heading:`#a277ff`,invalid:`#ff6767`,regexp:`#61ffca`},Rp=[Ze.theme({"&":{color:X.foreground,backgroundColor:X.background},".cm-content":{caretColor:X.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:X.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:X.selection},".cm-panels":{backgroundColor:X.dropdownBackground,color:X.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:X.dropdownBackground,outline:`1px solid ${X.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:X.selection},".cm-activeLine":{backgroundColor:X.activeLine},".cm-selectionMatch":{backgroundColor:X.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:X.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:X.background,color:X.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:X.background},".cm-lineNumbers .cm-gutterElement":{color:X.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:X.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:X.foreground},".cm-tooltip":{border:`1px solid ${X.dropdownBorder}`,backgroundColor:X.dropdownBackground,color:X.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:X.foreground,borderBottomColor:X.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:X.selection,color:X.foreground}}},{dark:X.dark}),rt(tt.define([{tag:V.keyword,color:X.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:X.variable},{tag:[V.propertyName],color:X.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:X.string},{tag:[V.function(V.variableName),V.labelName],color:X.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:X.constant},{tag:[V.definition(V.name),V.separator],color:X.variable},{tag:[V.className],color:X.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:X.number},{tag:[V.typeName],color:X.type,fontStyle:X.type},{tag:[V.operator,V.operatorKeyword],color:X.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:X.regexp},{tag:[V.meta,V.comment],color:X.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:X.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:X.variable},{tag:V.invalid,color:X.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Z={name:`tokyoNight`,dark:!0,background:`#1a1b26`,foreground:`#787c99`,selection:`#515c7e40`,cursor:`#c0caf5`,dropdownBackground:`#1a1b26`,dropdownBorder:`#787c99`,activeLine:`#43455c22`,lineNumber:`#363b54`,lineNumberActive:`#737aa2`,matchingBracket:`#16161e`,keyword:`#bb9af7`,storage:`#bb9af7`,variable:`#c0caf5`,parameter:`#c0caf5`,function:`#7aa2f7`,string:`#9ece6a`,constant:`#bb9af7`,type:`#0db9d7`,class:`#c0caf5`,number:`#ff9e64`,comment:`#444b6a`,heading:`#89ddff`,invalid:`#ff5370`,regexp:`#b4f9f8`},zp=[Ze.theme({"&":{color:Z.foreground,backgroundColor:Z.background},".cm-content":{caretColor:Z.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:Z.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Z.selection},".cm-panels":{backgroundColor:Z.dropdownBackground,color:Z.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:Z.dropdownBackground,outline:`1px solid ${Z.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Z.selection},".cm-activeLine":{backgroundColor:Z.activeLine},".cm-selectionMatch":{backgroundColor:Z.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Z.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:Z.background,color:Z.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:Z.background},".cm-lineNumbers .cm-gutterElement":{color:Z.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:Z.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:Z.foreground},".cm-tooltip":{border:`1px solid ${Z.dropdownBorder}`,backgroundColor:Z.dropdownBackground,color:Z.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Z.foreground,borderBottomColor:Z.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:Z.selection,color:Z.foreground}}},{dark:Z.dark}),rt(tt.define([{tag:V.keyword,color:Z.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:Z.variable},{tag:[V.propertyName],color:Z.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:Z.string},{tag:[V.function(V.variableName),V.labelName],color:Z.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Z.constant},{tag:[V.definition(V.name),V.separator],color:Z.variable},{tag:[V.className],color:Z.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:Z.number},{tag:[V.typeName],color:Z.type,fontStyle:Z.type},{tag:[V.operator,V.operatorKeyword],color:Z.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:Z.regexp},{tag:[V.meta,V.comment],color:Z.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:Z.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Z.variable},{tag:V.invalid,color:Z.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Q={name:`tokyoNightStorm`,dark:!0,background:`#24283b`,foreground:`#7982a9`,selection:`#6f7bb630`,cursor:`#c0caf5`,dropdownBackground:`#24283b`,dropdownBorder:`#7982a9`,activeLine:`#4d547722`,lineNumber:`#3b4261`,lineNumberActive:`#737aa2`,matchingBracket:`#1f2335`,keyword:`#bb9af7`,storage:`#bb9af7`,variable:`#c0caf5`,parameter:`#c0caf5`,function:`#7aa2f7`,string:`#9ece6a`,constant:`#bb9af7`,type:`#2ac3de`,class:`#c0caf5`,number:`#ff9e64`,comment:`#565f89`,heading:`#89ddff`,invalid:`#ff5370`,regexp:`#b4f9f8`},Bp=[Ze.theme({"&":{color:Q.foreground,backgroundColor:Q.background},".cm-content":{caretColor:Q.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:Q.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Q.selection},".cm-panels":{backgroundColor:Q.dropdownBackground,color:Q.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:Q.dropdownBackground,outline:`1px solid ${Q.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Q.selection},".cm-activeLine":{backgroundColor:Q.activeLine},".cm-selectionMatch":{backgroundColor:Q.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Q.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:Q.background,color:Q.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:Q.background},".cm-lineNumbers .cm-gutterElement":{color:Q.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:Q.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:Q.foreground},".cm-tooltip":{border:`1px solid ${Q.dropdownBorder}`,backgroundColor:Q.dropdownBackground,color:Q.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Q.foreground,borderBottomColor:Q.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:Q.selection,color:Q.foreground}}},{dark:Q.dark}),rt(tt.define([{tag:V.keyword,color:Q.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:Q.variable},{tag:[V.propertyName],color:Q.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:Q.string},{tag:[V.function(V.variableName),V.labelName],color:Q.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Q.constant},{tag:[V.definition(V.name),V.separator],color:Q.variable},{tag:[V.className],color:Q.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:Q.number},{tag:[V.typeName],color:Q.type,fontStyle:Q.type},{tag:[V.operator,V.operatorKeyword],color:Q.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:Q.regexp},{tag:[V.meta,V.comment],color:Q.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:Q.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Q.variable},{tag:V.invalid,color:Q.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],$={name:`tokyoNightDay`,dark:!1,background:`#e1e2e7`,foreground:`#6a6f8e`,selection:`#8591b840`,cursor:`#3760bf`,dropdownBackground:`#e1e2e7`,dropdownBorder:`#6a6f8e`,activeLine:`#a7aaba22`,lineNumber:`#b3b6cd`,lineNumberActive:`#68709a`,matchingBracket:`#e9e9ec`,keyword:`#9854f1`,storage:`#9854f1`,variable:`#3760bf`,parameter:`#3760bf`,function:`#2e7de9`,string:`#587539`,constant:`#9854f1`,type:`#07879d`,class:`#3760bf`,number:`#b15c00`,comment:`#9da3c2`,heading:`#006a83`,invalid:`#ff3e64`,regexp:`#2e5857`},Vp=[Ze.theme({"&":{color:$.foreground,backgroundColor:$.background},".cm-content":{caretColor:$.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:$.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:$.selection},".cm-panels":{backgroundColor:$.dropdownBackground,color:$.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:$.dropdownBackground,outline:`1px solid ${$.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:$.selection},".cm-activeLine":{backgroundColor:$.activeLine},".cm-selectionMatch":{backgroundColor:$.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:$.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:$.background,color:$.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:$.background},".cm-lineNumbers .cm-gutterElement":{color:$.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:$.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:$.foreground},".cm-tooltip":{border:`1px solid ${$.dropdownBorder}`,backgroundColor:$.dropdownBackground,color:$.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$.foreground,borderBottomColor:$.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:$.selection,color:$.foreground}}},{dark:$.dark}),rt(tt.define([{tag:V.keyword,color:$.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:$.variable},{tag:[V.propertyName],color:$.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:$.string},{tag:[V.function(V.variableName),V.labelName],color:$.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:$.constant},{tag:[V.definition(V.name),V.separator],color:$.variable},{tag:[V.className],color:$.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:$.number},{tag:[V.typeName],color:$.type,fontStyle:$.type},{tag:[V.operator,V.operatorKeyword],color:$.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:$.regexp},{tag:[V.meta,V.comment],color:$.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:$.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:$.variable},{tag:V.invalid,color:$.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Hp={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:`input...`,backgroundColor:`white`,language:`markdown`,theme:`oneDark`,phrases:`en-us`},Up={emits:[`update:config`],components:{CodemirrorEditor:pp},data(){return{codemrrConfig:{...Hp},codemrrThemes:{oneDark:Ap,materialLight:jp,materialDark:Mp,solarizedLight:Np,solarizedDark:Pp,dracula:Fp,githubLight:Ip,githubDark:Lp,aura:Rp,tokyoNight:zp,tokyoNightStorm:Bp,tokyoNightDay:Vp},codemrrLanguages:{javascript:it(),js:it(),html:at(),markdown:st(),json:ot(),vue:ct(),java:ut(),php:lt(),python:ft(),go:mt(),mysql:dt(),sql:dt(),xml:pt(),css:ht()},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 e=Object.keys(this.codemrrThemes);return[`default`].concat(e)},optionPhrases(){return[`en-us`,`de-de`]},optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){let e=[];return e.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&e.push(this.codemrrThemes[this.codemrrConfig.theme]),e},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(e){this.$emit(`update:config`,e)}}},Wp={props:{editorID:{type:[String],required:!1,default(){return``}}},data(){return{editorRefEL:null}},computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((Math.random()*1e3).toFixed(0)+``)}}};function Gp(e,t){var n=document.createElement(`a`);if(n.setAttribute(`href`,`data:text/plain;charset=UTF-8,`+encodeURIComponent(e)),n.setAttribute(`download`,t),n.style.display=`none`,document.createEvent){let e=document.createEvent(`MouseEvents`);e.initEvent(`click`,!0,!0),n.dispatchEvent(e)}else n.click()}function Kp(e){return e<10?`0`+e:e}var qp={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},Jp={name:`SvgImgMap`},Yp={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`};function Xp(e,t,n,r,i,a){return A(),x(`svg`,Yp,[...t[0]||=[S(`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),S(`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)]])}var Zp=H(Jp,[[`render`,Xp]]),Qp={name:`SvgUploadFile`},$p={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`};function em(e,t,n,r,i,a){return A(),x(`svg`,$p,[...t[0]||=[S(`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),S(`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)]])}var tm=H(Qp,[[`render`,em]]),nm={name:`SvgToc`},rm={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`};function im(e,t,n,r,i,a){return A(),x(`svg`,rm,[...t[0]||=[S(`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),S(`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)]])}var am=H(nm,[[`render`,im]]),om={name:`SvgCopy`},sm={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`};function cm(e,t,n,r,i,a){return A(),x(`svg`,sm,[...t[0]||=[S(`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),S(`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),S(`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),S(`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)]])}var lm=H(om,[[`render`,cm]]),um={name:`SvgLanguage`},dm={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`};function fm(e,t,n,r,i,a){return A(),x(`svg`,dm,[...t[0]||=[S(`path`,{d:`M200.313605 806.764028h487.993851v78.708685h-487.993851z`,fill:`#6C7280`,"p-id":`13072`},null,-1),S(`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),S(`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),S(`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)]])}var pm={components:{SvgImgMap:Zp,SvgUploadFile:tm,SvgToc:am,SvgCopy:lm,SvgLanguage:H(um,[[`render`,fm]])},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(){return{}}},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data(){return{actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:``}},computed:{lastExpFileName(){let e=new Date,t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),i=e.getHours(),a=e.getMinutes(),o=t+`-`+Kp(n)+`-`+Kp(r)+`_`+Kp(i)+`-`+Kp(a);return this.exportFileName||o},toolConfig(){let{toolbars:e={}}=this;return{...qp,...e}}},created(){this.actionPreview=this.isPreview||!1},methods:{toggleSlideDown(){this.slideDown=!this.slideDown},actionPhrasesSet(e){this.codemrrConfig.phrases=e,this.actionPhrasesDropdown=!1},actionLanguageSet(e){this.codemrrConfig.language=e,this.actionLanguageDropdown=!1},actionBgColorSet(e){this.codemrrConfig.backgroundColor=e,this.actionBgColorDropdown=!1},actionThemesSet(e){this.codemrrConfig.theme=e,this.actionThemeDropdown=!1,this.$emit(`on-act-theme`,e)},actionFullscreenSet(e){this.actionFullscreen=e;let t=this.$refs[this.editorWrapRefID];e?t.classList.add(`fullscreen`):t.classList.remove(`fullscreen`),this.actionCurrent(`fullscreen`,e)},actionChooseImage(){let e=document.createElement(`input`);e.type=`file`,e.accept=`image/*`,e.onchange=()=>{let t=e.files;t[0]&&(this.$emit(`on-act-choose-image`,t[0]),e.value=``)},e.click()},actionInsBg(){let e=this.getLastPoint(),t=e.content||!1;t?this.insertContent(`==`+t+`==`,!1):(this.insertContent(`====`,!1),this.setCursor(e.line,e.ch+1))},actionUndo(){if(this.editorViewInst){let e=this.editorViewInst.state.behavior(Ye.effect(Ye.undo));this.editorViewInst.update([{changes:{from:0,to:e.doc.length,insert:e.doc},selection:Je.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:Ye.redo()})},actionInsStrong(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`**`+t+`**`)):this.insertContent(e.start,`****`)},actionInsItalic(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`*`+t+`*`)):this.insertContent(e.start,`**`)},actionInsOverline(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`~~`+t+`~~`)):this.insertContent(e.start,`~~~~`)},actionInsUnderline(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`<u>`+t+`</u>`)):this.insertContent(e.start,`<u></u>`)},actionInsTitle(e){let t={1:`# `,2:`## `,3:`### `,4:`#### `,5:`##### `,6:`###### `}[e],n=this.getLastPoint(),r=n.content||!1,i=`
|
|
1
|
+
import{ClickOutside as e,ElAutocomplete as t,ElAvatar as n,ElBadge as r,ElButton as i,ElButton as a,ElCascader as o,ElCheckbox as s,ElCheckboxButton as c,ElCheckboxGroup as l,ElDatePicker as u,ElDialog as d,ElDrawer as f,ElForm as p,ElFormItem as m,ElIcon as h,ElImage as g,ElInput as ee,ElInput as _,ElInputNumber as te,ElMessage as ne,ElMessage as v,ElMessageBox as re,ElMessageBox as ie,ElOption as ae,ElPagination as oe,ElPopover as se,ElScrollbar as ce,ElSelect as le,ElSwitch as ue,ElTable as de,ElTableColumn as fe,ElTag as pe,ElTimePicker as me}from"element-plus";import{Fragment as y,Transition as he,TransitionGroup as ge,computed as _e,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as ve,createTextVNode as w,createVNode as T,defineComponent as ye,getCurrentInstance as be,getCurrentScope as xe,guardReactiveProps as Se,h as Ce,inject as we,mergeProps as E,nextTick as Te,normalizeClass as D,normalizeProps as O,normalizeStyle as k,onBeforeUnmount as Ee,onMounted as De,onScopeDispose as Oe,onUnmounted as ke,openBlock as A,provide as Ae,reactive as je,ref as j,render as Me,renderList as M,renderSlot as N,resolveComponent as P,resolveDirective as Ne,resolveDynamicComponent as Pe,shallowReadonly as Fe,shallowRef as Ie,toDisplayString as F,toHandlers as Le,toRaw as Re,toRef as ze,toRefs as Be,toValue as Ve,unref as I,useCssVars as He,useSlots as Ue,vShow as L,watch as R,withCtx as z,withDirectives as B,withKeys as We,withModifiers as Ge}from"vue";import{basicSetup as Ke}from"codemirror";import{Compartment as qe,EditorSelection as Je,EditorState as Ye,StateEffect as Xe}from"@codemirror/state";import{EditorView as Ze,keymap as Qe,placeholder as $e}from"@codemirror/view";import{indentWithTab as et}from"@codemirror/commands";import{HighlightStyle as tt,indentUnit as nt,syntaxHighlighting as rt}from"@codemirror/language";import{tags as V}from"@lezer/highlight";import{javascript as it}from"@codemirror/lang-javascript";import{html as at}from"@codemirror/lang-html";import{json as ot}from"@codemirror/lang-json";import{markdown as st}from"@codemirror/lang-markdown";import{vue as ct}from"@codemirror/lang-vue";import{php as lt}from"@codemirror/lang-php";import{java as ut}from"@codemirror/lang-java";import{sql as dt}from"@codemirror/lang-sql";import{python as ft}from"@codemirror/lang-python";import{xml as pt}from"@codemirror/lang-xml";import{go as mt}from"@codemirror/lang-go";import{css as ht}from"@codemirror/lang-css";import gt from"html-to-md";var H=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},_t={name:`cvBadge`,extends:{ExtendBadge:r},props:{...r.props},created(){},computed:{isShow(){return this.value?!(this.value>0):!0}},data(){return{}}};function vt(e,t,n,r,i,a){let o=P(`el-badge`);return A(),b(o,E(e.$props,{hidden:a.isShow}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`hidden`])}var yt=H(_t,[[`render`,vt]]);yt.install=function(e){e.component(yt.name,yt)};var bt={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(){return{}},methods:{}};function xt(e,t,n,r,i,a){let o=P(`el-row`);return A(),b(o,E({class:`cv-row`},{type:n.type,justify:n.justify,align:n.align,tag:n.tag},{gutter:parseInt(n.gutter)}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`gutter`])}var St=H(bt,[[`render`,xt]]),Ct={name:`cvCol`,props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data(){return{}},methods:{}};function wt(e,t,n,r,i,a){let o=P(`el-col`);return A(),b(o,{class:`cv-col`,span:parseInt(n.span),offset:parseInt(n.offset)},{default:z(()=>[N(e.$slots,`default`)]),_:3},8,[`span`,`offset`])}var Tt=H(Ct,[[`render`,wt]]);St.install=function(e){e.component(St.name,St)},Tt.install=function(e){e.component(Tt.name,Tt)};var Et={name:`cvBtnBase`,emits:[`click`],props:{...a.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:``}},data(){return{loadingStatus:!1}},computed:{filteredProps(){let{autoLoading:e,...t}=this.$props;return t},hasDefaultContent(){let e=this.$slots.default?.();return e&&e.length>0}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit(`click`,()=>{this.loadingStatus=!1})}catch(e){throw this.loadingStatus=!1,e}}}};function Dt(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`);return e.$slots.default||a.hasDefaultContent?(A(),b(s,E({key:0,class:`cv-btn`},a.filteredProps,{loading:i.loadingStatus,onClick:a.handleClick}),{default:z(()=>[n.svg?(A(),b(o,{key:0,type:n.svg,size:`14`,color:`currentColor`},null,8,[`type`])):x(``,!0),N(e.$slots,`default`)]),_:3},16,[`loading`,`onClick`])):(A(),b(s,E({key:1,class:`cv-btn`},a.filteredProps,{loading:i.loadingStatus,onClick:a.handleClick}),{default:z(()=>[n.svg?(A(),b(o,{key:0,type:n.svg,size:`14`,color:`currentColor`},null,8,[`type`])):x(``,!0)]),_:1},16,[`loading`,`onClick`]))}var Ot=H(Et,[[`render`,Dt]]),kt={name:`cvBtnText`,emits:[`click`],props:{...a.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:``}},data(){return{loadingStatus:!1}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit(`click`,()=>{this.loadingStatus=!1})}catch(e){throw this.loadingStatus=!1,e}}}};function At(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`);return A(),b(s,E({class:`cv-btn`},e.$props,{link:``,loading:i.loadingStatus,onClick:a.handleClick}),{default:z(()=>[n.svg?(A(),b(o,{key:0,type:n.svg,size:`14`,color:`currentColor`},null,8,[`type`])):x(``,!0),N(e.$slots,`default`)]),_:3},16,[`loading`,`onClick`])}var jt=H(kt,[[`render`,At]]);Ot.install=function(e){e.component(Ot.name,Ot)},jt.install=function(e){e.component(jt.name,jt)};var Mt={name:`cvAutocompleteBase`,props:{...t.props},data(){return{localVal:``,loadingStatus:!1}},created(){},methods:{async querySearchAsync(e,t){}}};function Nt(e,t,n,r,i,a){let o=P(`el-autocomplete`);return A(),b(o,E({modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e},e.$props,{"fetch-suggestions":a.querySearchAsync}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`modelValue`,`fetch-suggestions`])}var Pt=H(Mt,[[`render`,Nt]]),Ft={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data(){return{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:`code`,statusCode:0,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`){let e=this.loadConfigSetting,t={...e.where};t[e.request.pageName]=this.loadPageCurr,t[e.request.limitName]=this.loadPageLimit,t=Object.assign(t,this.searchData),this.loadConfigSetting.apiFunc(t).then(n=>{this.loadPageCurr=t[e.request.pageName],this.loadEnding();let r=this.sortOutData(n);if(r.status!=e.response.statusCode){ExtendMessage({message:r.msg,type:`error`,duration:1300});return}if(r.data.length===0){ExtendMessage({message:`没有更多数据了`,type:`warning`,duration:1300});return}let i=r[e.response.dataName]||[];this.dataParse&&typeof this.dataParse==`function`&&(i=this.dataParse.call(null,i)),this.loadDataList.push(...i),this.loadDataTotal=r[e.response.countName]||0}).catch(e=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(e){let t=this.loadConfigSetting.response,n={},r=[],i=[];n.status=e[t.statusName],n.msg=e[t.msgName],n.total=e[t.countName],r=e[t.dataName];for(let e in r)i[e]=r[e];return n.data=i,n}}},It={name:`cvAutocompleteLoad`,mixins:[Ft],emits:[`update:modelValue`,`input`],props:{...t.props,modelValue:{type:[String,Object,Number],default:()=>({})},placeholder:{type:[String],default:`请输入内容`},popperClass:{type:[String],default:`cv-autocomplete-load`},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default(){return`cvAutocompleteLoad-`+ +new Date+((Math.random()/1e4).toFixed(0)+``)}},compConfig:{type:[Object],default:()=>({})}},data(){return{localVal:``,searchList:[],compConfigDef:{searchField:[`value`]},timeout:null,loadingMore:!1}},directives:{loadmore:{mounted(e,t){let n=((e,t)=>{let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}})(e=>{let{scrollTop:n,scrollHeight:r,clientHeight:i}=e.target;r-(n+i)<10&&!t.instance.loading&&t.value()},200),r=new MutationObserver(()=>{let t=e.querySelector(`.el-autocomplete-suggestion__wrap`);t&&!e.__scrollHandler__&&(t.addEventListener(`scroll`,n),e.__scrollHandler__=n,r.disconnect())});r.observe(e,{childList:!0,subtree:!0})},beforeUnmount(e){if(e.__scrollHandler__){let t=e.querySelector(`.el-autocomplete-suggestion__wrap`);t&&t.removeEventListener(`scroll`,e.__scrollHandler__),delete e.__scrollHandler__}}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||10,Object.assign(e.where,this.searchData),this.loadConfigSetting=e},getMoreData(){if(!(this.loadingMore||this.loadDataList.length>=this.loadDataTotal))try{this.loadingMore=!0,this.loadPageCurr++,this.loadGetData()}finally{this.loadingMore=!1}},getData(){this.loadPageCurr=1,this.loadDataList=[],this.loadGetData()},async querySearchAsync(e,t){this.loadPageCurr=1,this.loadDataLoading=!0;var n=this.loadDataList||[];let r=[],i=this.loadConfigSetting.searchField||[`value`];if(e=e.toLowerCase(),r=e?n.filter(this.createFilter(e,i)):n,r.length>0)t(r.map(e=>({...e,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadDataList.length<this.loadDataTotal&&this.loadPageCurr++,this.searchData.keyword=e,this.loadDataList=[],await this.loadGetData();let n=this.loadDataList.map(e=>({...e,is_last_tip:!1}));n.push({is_last_tip:!0}),t(n)}catch{}finally{this.lookFlag=!0}},createFilter(e,t){return n=>t.some(t=>(n[t]+``).toLowerCase().indexOf(e)!==-1)},handleChange(e){},handleSelect(e){this.$emit(`update:modelValue`,e)}}};function Lt(e,t,n,r,i,a){let o=P(`cv-icon-svg`),s=P(`el-autocomplete`),c=Ne(`loadmore`);return B((A(),S(`div`,null,[T(s,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[1]||=e=>i.localVal=e,"fetch-suggestions":a.querySearchAsync,onChange:a.handleChange,onSelect:a.handleSelect,teleported:!1,"popper-append-to-body":!1}),{load:z(()=>[...t[2]||=[]]),default:z(({item:n})=>[n.is_last_tip?x(``,!0):N(e.$slots,`default`,O(E({key:0},{item:n}))),n.is_last_tip?(A(),S(`div`,{key:1,class:`cv-autocomolete-nodata`,onClick:t[0]||=Ge((...e)=>a.getData&&a.getData(...e),[`stop`]),disabled:``},[t[3]||=w(` 没有更多数据了 `,-1),T(o,{type:`ElIconRefreshLeft`}),t[4]||=w(` 刷新按钮 `,-1)])):x(``,!0)]),_:3},16,[`modelValue`,`fetch-suggestions`,`onChange`,`onSelect`])])),[[c,a.getMoreData]])}var Rt=H(It,[[`render`,Lt]]);Pt.install=function(e){e.component(Pt.name,Pt)},Rt.install=function(e){e.component(Rt.name,Rt)};var zt={...p,name:`cvFormBase`,extends:p,provide(){return{elForm:this}},props:{...p.props,labelWidth:{type:[String,Number],default:`auto`},labelPosition:{type:String,default:`right`}},watch:{model(){}},data(){return{}}};function Bt(e,t,n,r,i,a){let o=P(`el-form`);return A(),b(o,E({class:`cv-form-base`},{...e.$props,...e.$attrs},Le(e.$attrs)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Vt=H(zt,[[`render`,Bt]]),Ht={name:`cvFormInline`,provide(){return{elForm:this}},props:{...p.props},watch:{},data(){return{form:{}}}};function Ut(e,t,n,r,i,a){let o=P(`el-form`);return A(),b(o,E({class:`cv-form-base`},e.$props,Le(e.$attrs),{inline:!0}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Wt=H(Ht,[[`render`,Ut]]),Gt={name:`cvFormItem`,extends:m,props:{...m.props},data(){return{localLabelWidth:``,localError:``}},created(){},methods:{}},Kt={key:0,class:`cv-form-item__tip`};function qt(e,t,n,r,i,a){let o=P(`el-form-item`);return A(),b(o,O(Se({...e.$props,...e.$attrs})),{default:z(()=>[N(e.$slots,`default`),e.$slots.tip?(A(),S(`div`,Kt,[N(e.$slots,`tip`)])):x(``,!0)]),_:3},16)}var Jt=H(Gt,[[`render`,qt]]);Vt.install=function(e){e.component(Vt.name,Vt)},Wt.install=function(e){e.component(Wt.name,Wt)},Jt.install=function(e){e.component(Jt.name,Jt)};var Yt={extends:_,emits:[`update:modelValue`,`change`],props:{..._.props,modelValue:{type:[Number,String],default:``},placeholder:{type:[Number,String],default:``},disabled:{type:Boolean,default:!1}},watch:{modelValue(e){this.localVal=e},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(e){this.localError=e||`请输入正确的`+this.label},_diyValidate(){},_isCheckValue(){let e=this?.rules.split(`|`);this.localError=``;for(let t in e){let n=e[t].split(`:`),r=n[0]||``,i=n[1]||``;switch(r){case`require`:if(this.localVal==``){this._showError(this.label+`不能为空`);return}break;case`max`:if(this.localVal.length>i){this._showError(this.label+`最大长度不超过`+i);return}break;case`min`:if(this.localVal.length<i){this._showError(this.label+`最小长度不小于`+i);return}break;default:this._diyValidate(r);break}}}}},Xt={name:`cvInputText`,mixins:[Yt],props:{},data(){return{}},methods:{}};function Zt(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`text`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入`,clearable:``}),ve({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.prepend?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var Qt=H(Xt,[[`render`,Zt]]),$t={name:`cvInputMobile`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function en(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`number`,oninput:`if(value.length>11)value=value.slice(0,11)`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入11位大陆手机号`,clearable:``}),ve({prepend:z(()=>[t[1]||=w(`+86`,-1)]),_:2},[e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`0`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var tn=H($t,[[`render`,en]]),nn={name:`cvInputEmail`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function rn(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`text`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入邮箱`,clearable:``}),ve({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var an=H(nn,[[`render`,rn]]),on={name:`cvInputPassword`,mixins:[Yt],components:{},props:{showPassword:{type:Boolean,default:!1}},data(){return{}},methods:{}};function sn(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`password`},{disabled:e.disabled,showPassword:n.showPassword},{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入密码`,clearable:``}),ve({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var cn=H(on,[[`render`,sn]]),ln={name:`cvInputNumber`,mixins:[Yt],props:{},data(){return{}},methods:{}};function un(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({class:`cv-number`,type:`number`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入整数`,clearable:``}),ve({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var dn=H(ln,[[`render`,un]]),fn={name:`cvInputIdcard`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function pn(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`text`,oninput:`if(value.length>18)value=value.slice(0,18)`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入身份证`,clearable:``,maxlength:`18`}),ve({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var mn=H(fn,[[`render`,pn]]),hn={name:`cvInputDigit`,mixins:[Yt],components:{},props:{},data(){return{}},methods:{}};function gn(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`number`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入`,clearable:``}),ve({_:2},[e.$slots.prepend?{name:`prepend`,fn:z(()=>[N(e.$slots,`prepend`)]),key:`0`}:void 0,e.$slots.append?{name:`append`,fn:z(()=>[N(e.$slots,`append`)]),key:`1`}:void 0]),1040,[`modelValue`,`onChange`,`onInput`,`placeholder`])}var _n=H(hn,[[`render`,gn]]),vn={name:`cvTextarea`,mixins:[Yt],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit(`btnClick`,this.localVal)}}};function yn(e,t,n,r,i,a){let o=P(`el-input`);return A(),b(o,E({type:`textarea`},{disabled:e.disabled,rows:a.lastRow,autosize:n.autosize},{rows:a.lastRow,modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入内容`,clearable:``}),null,16,[`rows`,`modelValue`,`onInput`,`placeholder`])}var bn=H(vn,[[`render`,yn]]),xn={name:`cvTextareaBtn`,mixins:[Yt],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:``},btnIcon:{type:[String],default:``},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit(`btnClick`,this.localVal)}}},Sn={class:`cv-textab-group`},Cn={class:`cv-textab-group__append`},wn={class:`cv-textab_slot-wrap`};function Tn(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-button`);return A(),S(`div`,Sn,[T(o,E({type:`textarea`},{disabled:e.disabled,rows:a.lastRow,autosize:n.autosize},{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入内容`,clearable:``}),null,16,[`modelValue`,`onInput`,`placeholder`]),C(`div`,Cn,[C(`div`,wn,[N(e.$slots,`default`,{},()=>[T(s,{class:`cv-textab_slotbtn`,type:`primary`,size:e.size,onClick:a.onSubmit},{default:z(()=>[n.btnIcon?(A(),S(`i`,{key:0,class:D(n.btnIcon),style:{"margin-right":`5px`}},null,2)):x(``,!0),w(` `+F(n.btnText),1)]),_:1},8,[`size`,`onClick`])])])])])}var En=H(xn,[[`render`,Tn]]),Dn={name:`cvInputBtn`,mixins:[Yt],emits:[`btnClick`],components:{},props:{btnText:{type:[Number,String],default:`确定`},btnIcon:{type:[String],default:``}},data(){return{}},methods:{onSubmit(){this.$emit(`btnClick`,this.localVal)}}},On={class:`cv-input-group`},kn={class:`cv-input-group__append`};function An(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-button`);return A(),S(`div`,On,[T(o,E({type:`text`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:`请输入`,clearable:``}),null,16,[`modelValue`,`onChange`,`onInput`,`placeholder`]),C(`div`,kn,[N(e.$slots,`default`,{},()=>[T(s,{class:`cv-input-btn__slotbtn`,type:`primary`,size:e.size,onClick:a.onSubmit},{default:z(()=>[n.btnIcon?(A(),S(`i`,{key:0,class:D(n.btnIcon),style:{"margin-right":`5px`}},null,2)):x(``,!0),w(` `+F(n.btnText),1)]),_:1},8,[`size`,`onClick`])])])])}var jn=H(Dn,[[`render`,An]]),Mn={data(){return{formData:{}}}};function Nn(e,t,n,r,i,a){return A(),S(`div`)}var Pn=H(Mn,[[`render`,Nn]]);tn.install=function(e){e.component(tn.name,tn)},an.install=function(e){e.component(an.name,an)},cn.install=function(e){e.component(cn.name,cn)},dn.install=function(e){e.component(dn.name,dn)},mn.install=function(e){e.component(mn.name,mn)},_n.install=function(e){e.component(_n.name,_n)},bn.install=function(e){e.component(bn.name,bn)},En.install=function(e){e.component(En.name,En)},jn.install=function(e){e.component(jn.name,jn)},Pn.install=function(e){e.component(Pn.name,Pn)};var Fn={name:`cvInputCounter`,extends:te,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data(){return{localVal:0}},created(){},methods:{handleChange(e){this.$emit(`update:modelValue`,this.localVal)}}};function In(e,t,n,r,i,a){let o=P(`el-input-number`);return A(),b(o,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,onChange:a.handleChange,step:e.step}),null,16,[`modelValue`,`onChange`,`step`])}var Ln=H(Fn,[[`render`,In]]);Ln.install=function(e){e.component(Ln.name,Ln)};var Rn={name:`cvShowText`,mixins:[],components:{},props:{text:{type:[Number,String,Object],default:``}},data(){return{}},created(){},methods:{}},zn={class:`cv-show-text`},Bn=[`innerHTML`];function Vn(e,t,n,r,i,a){return A(),S(`div`,zn,[n.text?(A(),S(`div`,{key:0,innerHTML:n.text},null,8,Bn)):x(``,!0),n.text?x(``,!0):N(e.$slots,`default`,{key:1})])}var Hn=H(Rn,[[`render`,Vn]]),Un={name:`cvShowImage`,mixins:[],components:{},props:{url:{type:[String,Array,Object],default:``},width:{type:[String],default:`100px`},height:{type:[String],default:`100px`}},data(){return{localUrl:``}},watch:{url:{handler(){this.localUrl=typeof this.url==`string`?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},Wn={class:`cv-show-image`};function Gn(e,t,n,r,i,a){let o=P(`el-image`);return A(),S(`div`,Wn,[(A(!0),S(y,null,M(i.localUrl,(e,t)=>(A(),b(o,{style:k(`width:`+n.width+`; height:`+n.height+`; margin-right:10px`),key:t,src:e,"preview-src-list":i.localUrl},null,8,[`style`,`src`,`preview-src-list`]))),128))])}var Kn=H(Un,[[`render`,Gn]]),qn={name:`cvShowTip`,props:{borderColor:{type:[String],default:`#50bfff`},bgColor:{type:[String],default:`#ecf8ff`}},data(){return{backgroundColor:`#ecf8ff`,borderLeft:`5px solid #50bfff`}},created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}};function Jn(e,t,n,r,i,a){return A(),S(`div`,{class:`cv-show-tip`,style:k({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[N(e.$slots,`default`)],4)}var Yn=H(qn,[[`render`,Jn]]),Xn={name:`cv-gallery-dialog`,props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data(){return{isShowCarousel:!1,sourceTitle:``,initialIndex:0,isShowPreview:!1}},methods:{startPreview(e){this.isShowPreview=!0,this.initialIndex=e,this.sourceTitle=this.sources[e].title},handleCarouselChange(e){this.sources[e]&&this.sources[e].title?this.sourceTitle=this.sources[e].title:this.sourceTitle=``}}},Zn=[`src`],Qn={key:0,class:`cv-gallery-iframe embed-responsive embed-responsive-16by9`},$n=[`src`],er=[`src`],tr=[`src`];function nr(e,t,n,r,i,a){let o=P(`el-carousel-item`),s=P(`el-carousel`),c=P(`el-dialog`);return A(),b(c,{visible:i.isShowPreview,"append-to-body":``,onOpen:t[0]||=e=>i.isShowCarousel=!0,onClosed:t[1]||=e=>i.isShowCarousel=!1,style:{"text-align":`center`}},{header:z(()=>[w(F(i.sourceTitle||n.title),1)]),default:z(()=>[n.type===`video`?(A(),S(y,{key:0},[i.isShowPreview?(A(),S(`video`,{key:0,src:n.sources[i.initialIndex].src,autoplay:`autoplay`,class:`cv-gallery-video`,controls:`controls`,width:`100%`},null,8,Zn)):x(``,!0)],64)):n.type===`iframe`?(A(),S(y,{key:1},[i.isShowPreview?(A(),S(`div`,Qn,[C(`iframe`,{src:n.sources[i.initialIndex].src,allowfullscreen:`true`,border:`0`,frameborder:`no`,framespacing:`0`,scrolling:`no`},null,8,$n)])):x(``,!0)],64)):n.type===`image`?(A(),S(y,{key:2},[n.sliceSingle&&n.sources[i.initialIndex]||n.sources.length===1?(A(),S(`img`,{key:0,src:n.sources[i.initialIndex].src,class:`cv-gallery-image`},null,8,er)):(A(),S(y,{key:1},[i.isShowCarousel?(A(),b(s,E({key:0,"initial-index":i.initialIndex,onChange:a.handleCarouselChange,"indicator-position":`outside`},n.carouselAttrs),{default:z(()=>[(A(!0),S(y,null,M(n.sources,(e,t)=>(A(),b(o,{key:t},{default:z(()=>[C(`img`,{src:e.src,class:`cv-gallery-image`},null,8,tr)]),_:2},1024))),128))]),_:1},16,[`initial-index`,`onChange`])):x(``,!0)],64))],64)):x(``,!0)]),_:1},8,[`visible`])}var rr={name:`gallery`,components:{GalleryDialog:H(Xn,[[`render`,nr]])},props:{type:{type:String,default:`image`,validator(e){return[`image`,`video`,`iframe`].includes(e)}},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:{type:String,default:``},thumbStyle:Object,carouselAttrs:Object,title:String,sliceSingle:{type:Boolean,default:!1}},data(){return{}},computed:{computedStyle(){let e=this.width||this.size,t=this.height||this.size;return this.type===`iframe`&&(e=e?e+`px`:`360px`,t=t?t+`px`:`auto`),Object.assign({},{width:e,height:t,display:`block`},this.thumbStyle)},thumbs(){return this.computedSources.map(e=>e.thumb)},computedSources(){let e=this.source;if(typeof e==`string`)return[this.getStringSource(e)];if(e instanceof Array){let t=[];return e.forEach(e=>{e instanceof Object?t.push(this.getObjectSource(e)):typeof e==`string`&&t.push(this.getStringSource(e))}),t}else if(e instanceof Object)return[this.getObjectSource(e)];else return[]}},methods:{handlePreview(e){this.$refs.dialog.startPreview(e)},getStringSource(e){let t=e;return this.type===`image`&&this.thumbSuffix&&(t+=this.thumbSuffix),{type:this.type,src:e,thumb:t}},getObjectSource(e){return e.type=e.thumb?`image`:this.type,e.thumb=e.thumb||e.src,e}}},ir={key:0,class:`cv-gallery`},ar={class:`el-upload-list el-upload-list--picture-card`},or=[`src`],sr={class:`el-upload-list__item-actions`},cr=[`onClick`];function lr(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`GalleryDialog`);return n.source?(A(),S(`div`,ir,[C(`div`,ar,[(A(!0),S(y,null,M(a.computedSources,(t,n)=>(A(),S(`li`,{key:n,class:`el-upload-list__item`},[C(`div`,{style:k(a.computedStyle),class:`cv-gallery-iframe embed-responsive embed-responsive-16by9`},[C(`iframe`,{src:t.thumb,allowfullscreen:`true`,border:`0`,frameborder:`no`,framespacing:`0`,scrolling:`no`},null,8,or)],4),C(`span`,sr,[C(`span`,{onClick:e=>a.handlePreview(n,t)},[T(o,{type:`ElIconVideoPlay`,size:`20`})],8,cr),N(e.$slots,`action`,E({ref_for:!0},{source:t,index:n}))])]))),128))]),T(s,{carouselAttrs:n.carouselAttrs,sliceSingle:n.sliceSingle,sources:a.computedSources,title:n.title,type:n.type,ref:`dialog`},null,8,[`carouselAttrs`,`sliceSingle`,`sources`,`title`,`type`])])):x(``,!0)}var ur=H(rr,[[`render`,lr]]);Hn.install=function(e){e.component(Hn.name,Hn)},Kn.install=function(e){e.component(Kn.name,Kn)},Yn.install=function(e){e.component(Yn.name,Yn)},ur.install=function(e){e.component(ur.name,ur)};var dr={name:`cvRadioOptBase`};function fr(e,t,n,r,i,a){let o=P(`el-radio`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var pr=H(dr,[[`render`,fr]]),mr={name:`cvRadioOptBtn`};function hr(e,t,n,r,i,a){let o=P(`el-radio-button`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var gr=H(mr,[[`render`,hr]]),_r={name:`cvRadioGroup`};function vr(e,t,n,r,i,a){let o=P(`el-radio-group`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var yr=H(_r,[[`render`,vr]]);pr.install=function(e){e.component(pr.name,pr)},gr.install=function(e){e.component(gr.name,gr)},yr.install=function(e){e.component(yr.name,yr)};var br={name:`cvCheckboxOptBase`,extends:s};function xr(e,t,n,r,i,a){let o=P(`el-checkbox`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Sr=H(br,[[`render`,xr]]),Cr={name:`cvCheckboxOptBtn`,extends:c,props:{}};function wr(e,t,n,r,i,a){let o=P(`el-checkbox-button`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Tr=H(Cr,[[`render`,wr]]),Er={name:`cvCheckboxAll`,mixins:[{props:{...l.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 e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]==`string`)this.dataLists.map(t=>{e.push({label:t,value:t})}),this.localOpt=e;else{var t=this.dataField&&this.dataField.label||`label`,n=this.dataField&&this.dataField.value||`value`;this.dataLists.map(r=>{let i=r[t]===0?0:r[t]||``,a=r[n]===0?0:r[n]||``;a=a===0?0:a||i,e.push({label:i,value:a,disabled:r.disabled&&!0||!1}),(r.checked==`true`||r.checked==1)&&(typeof this.localVal==`string`?this.localVal=a:typeof this.localVal==`object`&&this.localVal.push(a))}),this.localOpt=e}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}}],components:{},data(){return{checkAll:!1,isIndeterminate:!0,localOptAll:[]}},methods:{handleCheckAllChange(e){this.localVal=e?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(e){let t=e.length;this.checkAll=t===this.localOptAll.length,this.isIndeterminate=t>0&&t<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(e=>{e.disabled||this.localOptAll.push(e.label)})}}},Dr={class:`cv-checkbox-all`};function Or(e,t,n,r,i,a){let o=P(`el-checkbox`),s=P(`el-checkbox-group`);return A(),S(`div`,Dr,[T(o,{indeterminate:i.isIndeterminate,modelValue:i.checkAll,"onUpdate:modelValue":t[0]||=e=>i.checkAll=e,onChange:a.handleCheckAllChange},{default:z(()=>[...t[2]||=[w(`全选`,-1)]]),_:1},8,[`indeterminate`,`modelValue`,`onChange`]),t[3]||=C(`div`,{style:{margin:`15px 0`}},null,-1),T(s,{modelValue:e.localVal,"onUpdate:modelValue":t[1]||=t=>e.localVal=t,onChange:a.handleCheckedCitiesChange},{default:z(()=>[N(e.$slots,`default`,{},()=>[(A(!0),S(y,null,M(e.localOpt,(t,n)=>(A(),b(o,{value:t.value,key:n,onChange:e.handleChange,disabled:e.disabled||t.disabled},{default:z(()=>[w(F(t.label),1)]),_:2},1032,[`value`,`onChange`,`disabled`]))),128))])]),_:3},8,[`modelValue`,`onChange`])])}var kr=H(Er,[[`render`,Or]]),Ar={name:`cvCheckboxGroup`};function jr(e,t,n,r,i,a){let o=P(`el-checkbox-group`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`)]),_:3},16)}var Mr=H(Ar,[[`render`,jr]]);Sr.install=function(e){e.component(Sr.name,Sr)},Tr.install=function(e){e.component(Tr.name,Tr)},Mr.install=function(e){e.component(Mr.name,Mr)},kr.install=function(e){e.component(kr.name,kr)};function Nr(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function Pr(e,t,n){var r=(n||{}).atBegin;return Nr(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}function Fr(e,t=!1){let n=document.createElement(`link`);n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`type`,`text/css`),n.setAttribute(`id`,e),t?n.setAttribute(`href`,e+`?t=`+new Date().getTime()):n.setAttribute(`href`,e),document.getElementById(e)||document.head.appendChild(n)}function Ir(e,t=!1,n=!0){return new Promise((r,i)=>{let a=document.createElement(`script`);e=e.replace(/([^:]\/)\/+/g,`$1`),a.id=e,a.type=`text/javascript`,t?a.src=e+`?t=`+new Date().getTime():a.src=e,document.getElementById(e)&&n?r():(document.body.appendChild(a),a.onload=()=>{r()})})}function Lr(e){let t=e;try{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`Copy`),e.remove(),document.body.removeChild(e)}catch{navigator.clipboard.writeText(t).then(()=>{}).catch(e=>{})}v({message:`复制成功`,type:`success`})}function Rr(e){if(/^\d{8}T\d{6}Z$/.test(e)){let t=e.replace(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/,`$1-$2-$3T$4:$5:$6Z`);return new Date(t)}return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$/.test(e)?new Date(e):/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?new Date(e.replace(` `,`T`)):new Date(e)}function zr(e){var t=new Date,n=new Date(e),r=t-n,i=Math.floor(r/1e3),a=Math.floor(i/60),o=Math.floor(a/60);if(a<1)var s=i+`秒前`;else if(o<1)var s=a+`分钟前`;else if(o<24)var s=o+`小时前`;else var s=n.toLocaleString();return s}function Br(e,...t){return t.reduce((e,t)=>Object.keys(t).reduce((e,n)=>{let r=t[n];return Hr(r)?e[n]=Br(e[n]?e[n]:{},r):Ur(r)?e[n]=r.map((t,r)=>{if(Hr(t)){let i=e[n]?e[n]:[];return Br(i[r]?i[r]:{},t)}else return t}):e[n]=r,e},e),e)}function Vr(e,t){let{[t[0]]:n,...r}=e;return Object.keys(e).reduce((n,r)=>(t.includes(r)||(n[r]=e[r]),n),{})}function Hr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ur(e){return typeof Array.isArray==`function`?Array.isArray(e):Object.prototype.toString.call(e)===`[object Array]`}function Wr(e){return Ur(e)?e.length===0:Hr(e)?Object.keys(e).length===0:e===``||e==null}function Gr(e,t){return Wr(e)?t:e}function Kr(e){let t=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`],n=e.lastIndexOf(`.`),r=e.substring(n+1);return t.indexOf(r.toLowerCase())!=-1}function qr(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)}function Jr(e){return e==null?``:String(e)}Number(document.documentMode),(function(){return document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent(`on`+t,n)}})(),(function(){return document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent(`on`+t,n)}})();function Yr(e){return window.URL?window.URL.createObjectURL(e):window.webkitURL?window.webkitURL.createObjectURL(e):``}var Xr=(()=>{let e={svg:[`image/svg+xml`,`image/svg`],jpg:[`image/jpeg`,`image/jpg`],jpeg:[`image/jpeg`],png:[`image/png`],gif:[`image/gif`],webp:[`image/webp`],bmp:[`image/bmp`,`image/x-bmp`,`image/x-ms-bmp`],ico:[`image/x-icon`,`image/vnd.microsoft.icon`],tiff:[`image/tiff`,`image/tif`,`image/x-tiff`],apng:[`image/apng`],avif:[`image/avif`],heic:[`image/heic`],pdf:[`application/pdf`],txt:[`text/plain`],csv:[`text/csv`],json:[`application/json`],xml:[`application/xml`],doc:[`application/msword`],docx:[`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],xls:[`application/vnd.ms-excel`],xlsx:[`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],ppt:[`application/vnd.ms-powerpoint`],pptx:[`application/vnd.openxmlformats-officedocument.presentationml.presentation`],zip:[`application/zip`],rar:[`application/x-rar-compressed`],"7z":[`application/x-7z-compressed`],mp3:[`audio/mpeg`],mp4:[`video/mp4`],mov:[`video/quicktime`],avi:[`video/x-msvideo`],wav:[`audio/wav`]},t={},n={};for(let[r,i]of Object.entries(e)){t[r]=i[0];for(let e of i)n[e]=r}return{extensionToMime:t,mimeToExtension:n}})();function Zr(e){if(!e)return`jpg`;let t=e.toLowerCase().trim();return Xr.mimeToExtension[t]||`jpg`}function Qr(e){if(!e)return``;let t=e.replace(/^\./,``).toLowerCase();return Xr.extensionToMime[t]||``}function $r(){let e=new Date;return[e.getFullYear(),String(e.getMonth()+1).padStart(2,`0`),String(e.getDate()).padStart(2,`0`),String(e.getHours()).padStart(2,`0`),String(e.getMinutes()).padStart(2,`0`),String(e.getSeconds()).padStart(2,`0`)].join(``)+Math.random().toString(36).substring(2,10)}var ei={name:`cvGeoCity`,mixins:[],components:{},emits:[`update:province`,`update:city`,`update:district`,`update:provinceCode`,`update:cityCode`,`update:districtCode`],props:{modelValue:{type:[String,Array,Number],default(){return[]}},province:{type:[String]},provinceCode:{type:[Number,String],default:``},city:{type:[String]},cityCode:{type:[Number,String],default:``},district:{type:[String]},districtCode:{type:[Number,String],default:``},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1}},watch:{modelValue(e){},province(e){this.initProvince()},provinceCode(e){this.initProvince()},cityCode(e){this.initCity()},districtCode(e){this.initDistrict()}},data(){return{provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],local1_code:``,local1_name:``,local2_code:``,local2_name:``,local3_code:``,local3_name:``,local1_flag:!1,local2_flag:!1,local3_flag:!1,hideMunicipality:!1,municipalities:[`110000`,`120000`,`310000`,`500000`,`北京市`,`天津市`,`上海市`,`重庆市`]}},async mounted(){await Ir(this.CDN_URL_UI+`/dict/geo/province-kv-window.js`),await Ir(this.CDN_URL_UI+`/dict/geo/city-kv-window.js`),await Ir(this.CDN_URL_UI+`/dict/geo/district-kv-window.js`),await this.initLoad()},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.local1_flag=!1,this.isCdnLoading=!1,this.getProvinces(),this.initProvince()},200)},initProvince(){if(!this.province&&!this.provinceCode)return!1;this.getProvinces();let e=this.provinceList.find(e=>this.province?e.provinceName===this.province:this.provinceCode&&e.provinceCode===this.provinceCode);e&&(this.local1_code=e.provinceCode,this.changeProvince(e.provinceCode)),this.initCity()},initCity(){if(!this.city&&!this.cityCode)return!1;let e=this.cityList.find(e=>this.city?e.cityName===this.city:this.cityCode&&e.cityCode===this.cityCode);e&&(this.local2_code=e.cityCode,this.changeCity(e.cityCode)),this.initDistrict()},initDistrict(){if(!this.district&&!this.districtCode)return!1;let e=this.districtList.find(e=>this.district?e.districtName===this.district:this.districtCode&&e.districtCode===this.districtCode);e&&this.changeDistrict(e.districtCode)},getProvinces(){if(!this.local1_flag&&typeof this.provinceCdnList==`object`){let e=[];for(let t in this.provinceCdnList)e.push({provinceCode:t,provinceName:this.provinceCdnList[t]});this.provinceList=e,this.local1_flag=!0}},changeProvince(e){this._getNeedCity(),this.local2_flag=!0,this.local2_code=``,this.local2_name=``,this.local3_code=``,this.local3_name=``,this.local1_code=e,this.local1_name=this.provinceList.find(t=>t.provinceCode===e)?.provinceName,this.handleChoose()},_getNeedCity(){let e=[],t=this.local1_code.substring(0,2);for(let n in this.cityCdnList)n.substring(0,2)==t&&e.push({cityCode:n,cityName:this.cityCdnList[n]});this.cityList=e},getCities(){this.local2_flag||this.provinceCode&&(this._getNeedCity(),this.local2_flag=!0)},changeCity(e){this._getNeedDistrict(),this.local3_flag=!0,this.local3_name=``,this.local3_code=``,this.local2_code=e,this.local2_name=this.cityList.find(t=>t.cityCode===e)?.cityName,this.handleChoose()},_getNeedDistrict(){let e=[],t=this.local2_code.substring(0,4);for(let n in this.districtCdnList)n.substring(0,4)==t&&e.push({districtCode:n,districtName:this.districtCdnList[n]});this.districtList=e},getDistrict(){this.local3_flag||this.local2_code&&this._getNeedDistrict()},changeDistrict(e){this.local3_code=e,this.local3_name=this.districtList.find(t=>t.districtCode===e)?.districtName,this.handleChoose()},handleChoose(){this.$emit(`update:province`,this.local1_name),this.$emit(`update:provinceCode`,this.local1_code),this.$emit(`update:city`,this.local2_name),this.$emit(`update:cityCode`,this.local2_code),this.$emit(`update:district`,this.local3_name),this.$emit(`update:districtCode`,this.local3_code)}}},ti={class:`cv-geo-city`},ni={key:0},ri={key:1};function ii(e,t,n,r,i,a){let o=P(`el-option`),s=P(`el-select`),c=Ne(`loading`);return B((A(),S(`div`,ti,[C(`div`,null,[T(s,{modelValue:i.local1_code,"onUpdate:modelValue":t[0]||=e=>i.local1_code=e,onFocus:a.getProvinces,onChange:a.changeProvince,placeholder:`省`,filterable:``},{default:z(()=>[(A(!0),S(y,null,M(i.provinceList,(e,t)=>(A(),b(o,{key:e.provinceCode,label:e.provinceName,value:e.provinceCode},{default:z(()=>[w(F(e.provinceName),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onFocus`,`onChange`])]),n.cityHide?x(``,!0):(A(),S(`div`,ni,[T(s,{modelValue:i.local2_code,"onUpdate:modelValue":t[1]||=e=>i.local2_code=e,onFocus:a.getCities,onChange:a.changeCity,placeholder:`市`,filterable:``},{default:z(()=>[(A(!0),S(y,null,M(i.cityList,(e,t)=>(A(),b(o,{key:e.cityCode,label:e.cityName,value:e.cityCode},{default:z(()=>[w(F(e.cityName),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onFocus`,`onChange`])])),!n.cityHide&&!n.districtHide?(A(),S(`div`,ri,[T(s,{modelValue:i.local3_code,"onUpdate:modelValue":t[2]||=e=>i.local3_code=e,onFocus:a.getDistrict,onChange:a.changeDistrict,placeholder:`区/县`,filterable:``},{default:z(()=>[(A(!0),S(y,null,M(i.districtList,(e,t)=>(A(),b(o,{key:e.districtCode,label:e.districtName,value:e.districtCode},{default:z(()=>[w(F(e.districtName),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onFocus`,`onChange`])])):x(``,!0)])),[[c,i.isCdnLoading]])}var ai=H(ei,[[`render`,ii]]),oi={computed:{componentName(){return this.$options.name}},methods:{_mergeAttrs(e){let t=this.$cvUiParams||{},n=e&&t[e]||{},r=t[this.componentName]||{},i=Object.assign({},n,r);return Object.assign({},i,this.$attrs)}}},si={name:`cvGeoMap`,mixins:[oi],emits:[`update:address`,`update:latitude`,`update:longitude`,`update:name`,`update:city`],props:{title:{type:[String],default:`选择经纬度地点`},mapKey:{type:[String],default:``},mapSecret:{type:[String],default:``},mapType:{type:[String],default:`qq`},address:{type:[String]},name:{type:[String]},city:{type:[String]},latitude:{type:[Number,String]},longitude:{type:[Number,String]}},watch:{address(e){this.localAddress=e},latitude(e){this.localLatitude=e},longitude(e){this.localLongitude=e},name(e){this.localName=e},city(e){this.localCity=e}},computed:{localMapKey(){return this._mergeAttrs(`geo`).mapKey},localMapSecret(){return this._mergeAttrs(`geo`).mapSecret},mapSrc(){let e=this.localMapKey;if(this.mapType==`qq`){if(!this.localMapKey)return``;let t=`https://apis.map.qq.com/tools/locpicker`;return t+=`?search=1&type=1&key=${e}&referer=myapp`,this.latitude&&this.longitude&&(t+=`&coord=${this.latitude},${this.longitude}`),t}else if(this.mapType==`amap`){if(!this.localMapKey||!this.localMapSecret)return``;let t=`https://m.amap.com/picker/`;return t+=`?zoom=15&radius=1000&total=20&key=${e}&jscode=${localMapSecret}`,this.latitude&&this.longitude&&(t+=`¢er=${this.longitude},${this.latitude}`),t}else return this.$message.info(`目前不支持百度地图`),``}},data(){return{localMapShow:!1,localAddress:``,localLatitude:``,localLongitude:``,localName:``,localCity:``}},mounted(){this.initData()},methods:{initData(){let e=this;window.addEventListener(`message`,t=>{let n=t.data;n&&n.module==`locationPicker`&&(e.localAddress=n.poiaddress||``,e.localName=n.poiname||``,e.localCity=n.cityname||``,e.localLatitude=n.latlng.lat||``,e.localLongitude=n.latlng.lng||``)},!1)},handleMapClose(){this.localMapShow=!1},handleMapOpen(){this.localMapShow=!0},handleConfirm(){this.$emit(`update:address`,this.localAddress),this.$emit(`update:longitude`,this.localLongitude),this.$emit(`update:latitude`,this.localLatitude),this.$emit(`update:name`,this.localName),this.$emit(`update:city`,this.localCity),this.handleMapClose()},handleCopy(e){this.$cvCopy(e)}}},ci={class:`cv-geo-map__wrap`},li={class:`cv-geo-map__box`},ui={style:{width:`100%`,height:`510px`}},di=[`src`],fi={class:`cv-geo-map__info`},pi={key:0,class:`cv-geo-map__address`},mi={key:1,class:`cv-geo-map__jwd`};function hi(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-tooltip`),c=P(`el-button`),l=P(`el-scrollbar`),u=P(`el-dialog`);return A(),S(y,null,[C(`div`,ci,[C(`div`,li,[T(s,{class:`item`,effect:`dark`,content:`请点击查找位置选择位置`,placement:`bottom`},{default:z(()=>[T(o,{modelValue:i.localAddress,"onUpdate:modelValue":t[0]||=e=>i.localAddress=e},null,8,[`modelValue`])]),_:1}),T(c,{type:`primary`,icon:`ElIconSearch`,onClick:a.handleMapOpen},{default:z(()=>[...t[5]||=[w(`请查找位置`,-1)]]),_:1},8,[`onClick`])])]),T(u,{modelValue:i.localMapShow,"onUpdate:modelValue":t[4]||=e=>i.localMapShow=e,title:n.title,width:`520`,"before-close":a.handleMapClose},{footer:z(()=>[C(`div`,fi,[i.localAddress?(A(),S(`div`,pi,[t[6]||=C(`span`,{class:`cv-geo-map__label`},`已选:`,-1),T(s,{class:`item`,effect:`dark`,content:`点击复制`,placement:`bottom`},{default:z(()=>[C(`span`,{class:`cv-geo-map__value`,onClick:t[1]||=e=>a.handleCopy(i.localAddress)},F(i.localAddress),1)]),_:1})])):x(``,!0),i.localAddress?(A(),S(`div`,mi,[t[7]||=C(`span`,{class:`cv-geo-map__label`},`经度:`,-1),T(s,{class:`item`,effect:`dark`,content:`点击复制`,placement:`bottom`},{default:z(()=>[C(`span`,{class:`cv-geo-map__value`,onClick:t[2]||=e=>a.handleCopy(i.localLongitude)},F(i.localLongitude),1)]),_:1}),t[8]||=C(`span`,{class:`cv-geo-map__label`},`纬度:`,-1),T(s,{class:`item`,effect:`dark`,content:`点击复制`,placement:`bottom`},{default:z(()=>[C(`span`,{class:`cv-geo-map__value`,onClick:t[3]||=e=>a.handleCopy(i.localLatitude)},F(i.localLatitude),1)]),_:1})])):x(``,!0)]),C(`div`,null,[T(c,{onClick:a.handleMapClose},{default:z(()=>[...t[9]||=[w(`取消`,-1)]]),_:1},8,[`onClick`]),T(c,{type:`primary`,onClick:a.handleConfirm,disabled:!i.localAddress},{default:z(()=>[...t[10]||=[w(`确认选择`,-1)]]),_:1},8,[`onClick`,`disabled`])])]),default:z(()=>[C(`div`,ui,[T(l,{style:{height:`510px`}},{default:z(()=>[C(`iframe`,{id:`mapPage`,width:`100%`,height:`100%`,style:{height:`500px`},frameborder:`0`,src:a.mapSrc},null,8,di)]),_:1})])]),_:1},8,[`modelValue`,`title`,`before-close`])],64)}var gi=H(si,[[`render`,hi]]);ai.install=function(e){e.component(ai.name,ai)},gi.install=function(e){e.component(gi.name,gi)};var _i={...ae,extends:ae,name:`cvSelectOpt`},vi={name:`cvSelectBase`,emits:[`onChoose`,`change`,`update:modelValue`],props:{...le.props,modelValue:{type:[String,Array,Number],default(){return``}},emptyValues:{type:[Array],default:[null,void 0]},dataLists:{type:[Array],default(){return[]}},dataField:{type:[Object],default(){return{}}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:`请选择`}},watch:{modelValue(e){this.localVal=e},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(e){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(e,t){this.$emit(`onChoose`,e,t)},handleChange(){this.$emit(`change`,this.localVal),this.$emit(`update:modelValue`,this.localVal)},_parseLocalOpt(){let e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]==`string`)this.dataLists.map(t=>{e.push({label:t,value:t})}),this.localOpt=e;else{var t=this.dataField&&this.dataField.label||`label`,n=this.dataField&&this.dataField.value||`value`;this.dataLists.map(r=>{let i=r[t]===0?0:r[t]||``,a=r[n]===0?0:r[n]||``;if(a=a===0?0:a||i,this.dataDisabled.length>0)for(let e in this.dataDisabled)this.dataDisabled[e][n]==a&&(r.disabled=!0);e.push({label:i,value:a,disabled:r.disabled&&!0||!1}),(r.checked==`true`||r.checked==1)&&(typeof this.localVal==`string`?this.localVal=a:typeof this.localVal==`object`&&this.localVal.push(a))}),this.localOpt=e}}}};function yi(e,t,n,r,i,a){let o=P(`el-option`),s=P(`el-select`);return A(),b(s,E({class:`cv-select-base`},e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,size:e.size,filterable:``,clearable:``}),{default:z(()=>[N(e.$slots,`default`,{},()=>[(A(!0),S(y,null,M(i.localOpt,(e,t)=>(A(),b(o,{key:t,label:e.label,value:e.value,disabled:e.disabled,onClick:n=>a.handleChoose(e,t)},null,8,[`label`,`value`,`disabled`,`onClick`]))),128))])]),_:3},16,[`modelValue`,`size`])}var bi=H(vi,[[`render`,yi]]),xi={name:`cvSelectTree`,emits:[`update:modelValue`,`change`],props:{...le.props,modelValue:{type:[String,Array,Number],default(){return``}},dataLists:{type:[Array],default(){return[]}},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(){return[]}},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(){return`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(){return{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 e=this.$refs[this.refID+`tree`].getNode(this.localVal);e&&(this.localTitle=e.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 e=document.querySelectorAll(`.cv-select-tree .el-scrollbar .el-select-dropdown__wrap`)[0],t=document.querySelectorAll(`.cv-select-tree .el-scrollbar .el-scrollbar__bar`);e.style.cssText=`margin: 0px; max-height: none; overflow: hidden;`,t.forEach(e=>e.style.width=0)})},handleNodeClick(e,t,n){e.disabled||(this.localTitle=e[this.dataField.label],this.localVal=e[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(e=>e.classList.remove(`is-current`))},handleChange(){this.$emit(`change`,this.localVal),this.$emit(`update:modelValue`,this.localVal)},_parseLocalOpt(){let e=this.dataLists;this.dataField&&this.dataField.label;let t=this.dataField&&this.dataField.value||`value`,n=this.dataField&&this.dataField.children||`children`,r=this.dataDisabled;i(e);function i(e){for(let a in e)r.map(n=>{e[a][t]==n[t]&&(e[a].disabled=!0)}),e[a][n]&&i(e[a][n])}this.localOpt=e}}};function Si(e,t,n,r,i,a){let o=P(`el-tree`),s=P(`el-option`),c=P(`el-select`);return A(),b(c,E(e.$props,{ref:n.refID,"popper-class":`cv-select-tree`,modelValue:i.localTitle,onClear:a.clearHandle}),{default:z(()=>[T(s,{value:i.localTitle,label:i.localTitle,class:`options`},{default:z(()=>[T(o,{"highlight-current":``,id:n.refID+`tree`,ref:n.refID+`tree`,accordion:n.accordion,showCheckbox:n.showCheckbox,data:i.localOpt,props:n.dataField,"node-key":n.dataField.value,onNodeClick:a.handleNodeClick,"default-expand-all":n.defaultExpandAll},null,8,[`id`,`accordion`,`showCheckbox`,`data`,`props`,`node-key`,`onNodeClick`,`default-expand-all`])]),_:1},8,[`value`,`label`])]),_:1},16,[`modelValue`,`onClear`])}var Ci=H(xi,[[`render`,Si],[`__scopeId`,`data-v-a62c37b7`]]);_i.install=function(e){e.component(_i.name,_i)},bi.install=function(e){e.component(bi.name,bi)},Ci.install=function(e){e.component(Ci.name,Ci)};var wi={name:`cvCascaderBase`,components:{},props:{...o.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default(){return[]}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:`请选择`},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default(){return{}}},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 e=this.dataLists,t=this.dataField&&this.dataField.value||`value`,n=this.dataDisabled;r(e);function r(e){for(let i in e)n.map(n=>{e[i][t]==n[t]&&(e[i].disabled=!0)}),e[i].children&&r(e[i].children)}this.localOpt=e},getCheckedNodes(){}}},Ti={class:`cv-cascader-base block`};function Ei(e,t,n,r,i,a){let o=P(`el-cascader`);return A(),S(`div`,Ti,[T(o,E(e.$props,{props:a.props2,modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,options:i.localOpt,onChange:a.handleChange,onGetCheckedNodes:a.getCheckedNodes}),null,16,[`props`,`modelValue`,`options`,`onChange`,`onGetCheckedNodes`])])}var Di=H(wi,[[`render`,Ei]]);Di.install=function(e){e.component(Di.name,Di)};var Oi={props:{...me.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat==`timestamp`){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(e=>{if(!isNaN(e)&&e.toString().length==10)return e*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat==`timestamp`){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(e=>{if(!isNaN(e)&&e.toString().length==13)return parseInt(e/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit(`update:modelValue`,e)}else !isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit(`update:modelValue`,e));return}this.$emit(`update:modelValue`,this.localVal)}},data(){return{localVal:``}},created(){},methods:{}},ki={name:`cvTimeBase`,mixins:[Oi],props:{format:{type:String,default:`HH:mm:ss`},valueFormat:{type:String,default:`HH:mm:ss`},placeholder:{type:[String,Number],default:`选择时间`}}};function Ai(e,t,n,r,i,a){let o=P(`el-time-picker`);return A(),b(o,E({class:`cv-timePicker-base`},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,format:n.format,"picker-options":{}}),null,16,[`modelValue`,`format`])}var ji=H(ki,[[`render`,Ai]]),Mi={name:`cvTimeRange`,mixins:[Oi],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:`结束时间`}}};function Ni(e,t,n,r,i,a){let o=P(`el-time-picker`);return A(),b(o,E({class:`cv-timePicker-range`},e.$props,{"is-range":``,modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,format:n.format,"range-separator":n.rangeSeparator,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder}),null,16,[`modelValue`,`format`,`range-separator`,`start-placeholder`,`end-placeholder`])}var Pi=H(Mi,[[`render`,Ni]]),Fi={name:`cvTimeSelect`};function Ii(e,t,n,r,i,a){let o=P(`el-time-select`);return A(),b(o,E({class:`cv-time-select`},e.$props),null,16)}var Li=H(Fi,[[`render`,Ii]]),Ri={props:{...u.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat==`timestamp`){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(e=>{if(!isNaN(e)&&e.toString().length==10)return e*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat==`timestamp`){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(e=>{if(!isNaN(e)&&e.toString().length==13)return parseInt(e/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit(`update:modelValue`,e)}else !isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit(`update:modelValue`,e));return}this.$emit(`update:modelValue`,this.localVal)}},data(){return{localVal:``}}},zi={name:`cvDateBase`,mixins:[Ri],props:{format:{type:String,default:`YYYY-MM-DD`},valueFormat:{type:String,default:`YYYY-MM-DD`},placeholder:{type:[String,Number],default:`选择日期`}},data(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:`今天`,onClick(e){e.$emit(`pick`,new Date)}},{text:`昨天`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,t)}},{text:`一周前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*7),e.$emit(`pick`,t)}},{text:`一个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*30),e.$emit(`pick`,t)}},{text:`三个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*90),e.$emit(`pick`,t)}},{text:`六个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*180),e.$emit(`pick`,t)}},{text:`一年前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*365),e.$emit(`pick`,t)}}]}}}};function Bi(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),b(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`date`,"value-format":n.valueFormat,placeholder:n.placeholder,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`placeholder`,`picker-options`])}var Vi=H(zi,[[`render`,Bi]]),Hi={name:`cvDateRange`,mixins:[Ri],props:{valueFormat:{type:String,default:`yyyy-MM-dd`},startPlaceholder:{type:[String,Number],default:`开始日期`},rangeSeparator:{type:[String,Number],default:`至`},endPlaceholder:{type:[String,Number],default:`结束日期`}},data(){return{localPickerOptions:{shortcuts:[{text:`今天`,onClick(e){let t=new Date,n=new Date;e.$emit(`pick`,[n,t])}},{text:`昨天`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24),t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,[n,t])}},{text:`最近一周`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*7),e.$emit(`pick`,[n,t])}},{text:`最近一个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*30),e.$emit(`pick`,[n,t])}},{text:`最近三个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*90),e.$emit(`pick`,[n,t])}},{text:`最近六个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*180),e.$emit(`pick`,[n,t])}},{text:`最近一年`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*365),e.$emit(`pick`,[n,t])}}]}}}};function Ui(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),b(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`daterange`,"value-format":n.valueFormat,"range-separator":n.rangeSeparator,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`range-separator`,`start-placeholder`,`end-placeholder`,`picker-options`])}var Wi=H(Hi,[[`render`,Ui]]),Gi={name:`cvDatetimeBase`,mixins:[Ri],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(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:`今天`,onClick(e){e.$emit(`pick`,new Date)}},{text:`昨天`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,t)}},{text:`一周前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*7),e.$emit(`pick`,t)}},{text:`一个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*30),e.$emit(`pick`,t)}},{text:`三个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*90),e.$emit(`pick`,t)}},{text:`六个月前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*180),e.$emit(`pick`,t)}},{text:`一年前`,onClick(e){let t=new Date;t.setTime(t.getTime()-3600*1e3*24*365),e.$emit(`pick`,t)}}]}}}};function Ki(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),b(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`datetime`,"value-format":n.valueFormat,placeholder:n.placeholder,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`placeholder`,`picker-options`])}var qi=H(Gi,[[`render`,Ki]]),Ji={name:`cvDatetimeRange`,mixins:[Ri],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(){return{localPickerOptions:{shortcuts:[{text:`今天`,onClick(e){let t=new Date,n=new Date;e.$emit(`pick`,[n,t])}},{text:`昨天`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24),t.setTime(t.getTime()-3600*1e3*24),e.$emit(`pick`,[n,t])}},{text:`最近一周`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*7),e.$emit(`pick`,[n,t])}},{text:`最近一个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*30),e.$emit(`pick`,[n,t])}},{text:`最近三个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*90),e.$emit(`pick`,[n,t])}},{text:`最近六个月`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*180),e.$emit(`pick`,[n,t])}},{text:`最近一年`,onClick(e){let t=new Date,n=new Date;n.setTime(n.getTime()-3600*1e3*24*365),e.$emit(`pick`,[n,t])}}]}}}};function Yi(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),b(o,E(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":t[0]||=t=>e.localVal=t,type:`datetimerange`,"value-format":n.valueFormat,"range-separator":n.rangeSeparator,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder,align:`right`,"picker-options":e.pickerOptions&&i.localPickerOptions}),null,16,[`modelValue`,`value-format`,`range-separator`,`start-placeholder`,`end-placeholder`,`picker-options`])}var Xi=H(Ji,[[`render`,Yi]]),Zi={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(e){(e===null||e===``)&&(this.end===null||this.end===``)?this.internalValue=[null,null]:this.internalValue[0]=e},end(e){(this.start===null||this.start===``)&&(e===null||e===``)?this.internalValue=[null,null]:this.internalValue[1]=e}},computed:{dateUtil(){return{getStartOfDay(e=new Date){let t=new Date(e);return t.setHours(0,0,0,0),t},getEndOfDay(e=new Date){let t=new Date(e);return t.setHours(23,59,59,999),t},getYesterday(){let e=new Date;return e.setDate(e.getDate()-1),e},getDaysAgo(e){let t=new Date;return t.setDate(t.getDate()-(e-1)),t},getFirstDayOfMonth(){let e=new Date;return e.setDate(1),e},getFirstDayOfYear(){let e=new Date;return e.setMonth(0,1),e}}},refinedShortcuts(){return[{text:`本日`,value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:`昨天`,value:()=>{let e=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(e),this.dateUtil.getEndOfDay(e)]}},{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=[null,null]:this.internalValue=[this.start,this.end]},handleDateChange(e){e?(this.$emit(`update:start`,e[0]),this.$emit(`update:end`,e[1])):(this.$emit(`update:start`,null),this.$emit(`update:end`,null)),this.$emit(`change`,e)},handleCalendarChange(e){}},created(){this.syncInternalValue()}};function Qi(e,t,n,r,i,a){let o=P(`el-date-picker`);return A(),b(o,{modelValue:i.internalValue,"onUpdate:modelValue":t[0]||=e=>i.internalValue=e,type:`datetimerange`,shortcuts:a.refinedShortcuts,"range-separator":`至`,"start-placeholder":`开始时间`,"end-placeholder":`结束时间`,"value-format":`YYYY-MM-DD HH:mm:ss`,"default-time":i.defaultTime,onChange:a.handleDateChange,onCalendarChange:a.handleCalendarChange,clearable:``,class:`screen-date-picker`},null,8,[`modelValue`,`shortcuts`,`default-time`,`onChange`,`onCalendarChange`])}var $i=H(Zi,[[`render`,Qi]]);ji.install=function(e){e.component(ji.name,ji)},Pi.install=function(e){e.component(Pi.name,Pi)},Li.install=function(e){e.component(Li.name,Li)},Vi.install=function(e){e.component(Vi.name,Vi)},Wi.install=function(e){e.component(Wi.name,Wi)},qi.install=function(e){e.component(qi.name,qi)},Xi.install=function(e){e.component(Xi.name,Xi)},$i.install=function(e){e.component($i.name,$i)};var ea={name:`cvSwitchBase`,props:{...ue.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:{}};function ta(e,t,n,r,i,a){let o=P(`el-switch`);return A(),b(o,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e}),null,16,[`modelValue`])}var na=H(ea,[[`render`,ta]]);na.install=function(e){e.component(na.name,na)};var ra={name:`cvCodeSms`,mixins:[],components:{},props:{..._.props,maxlength:{type:[Number,String],default:6},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},apiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(e){this.localMobile=e},modelValue(e){this.localVal=e}},data(){return{localVal:this.modelValue,localMobile:``,nextTime:0,diyPlaceholder:`短信验证码`,btnDisabled:!1,btnText:`获取验证码`,btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(e){this.$message(e)},getSmsCode(){if(!this.localMobile){this.showDiyMsg(`手机号不正确`),this.$emit(`onGetSms`,!1);return}if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile)){this.showDiyMsg(`手机号格式不正确`),this.$emit(`onGetSms`,!1);return}if(!this.codeUrl&&!this.apiFunc){this.showDiyMsg(`短信接口地址不能为空`);return}this.btnDisabled=!0,!this.btnIntervalObj&&this.btnDisabled&&(this.btnText=`请稍后...`,this.apiFunc?this.apiFunc({postType:`sendSms`,cto_sms_type:`alterMobile`,sendCode:`发送验证码`,[this.mobileParam]:this.localMobile}).then(e=>{let t=e;this.showDiyMsg(`发送成功!`),setTimeout(()=>{if(this.codeSign){let e=t.data&&t.data.sign||``;this.diyPlaceholder=`识别码:`+e}this.smsCodeWaitTime()},500)}).catch(e=>{this.showDiyMsg(`短信获取失败,请检查网络`),this.btnDisabled=!1,this.btnText=`获取验证码`}):(this.btnDisabled=!1,this.btnText=`重新获取验证码`))},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let e=this.nextTime-Date.parse(new Date)/1e3;e<=0?(clearInterval(this.btnIntervalObj),this.btnText=`重新获取验证码`,this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=e.toString()+`s`)},100)},updateInput(e){this.$emit(`update:modelValue`,this.localVal)}}};function ia(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-input`);return A(),b(s,E(e.$props,{modelValue:i.localVal,"onUpdate:modelValue":t[0]||=e=>i.localVal=e,clearable:``,placeholder:i.diyPlaceholder,onInput:a.updateInput}),{append:z(()=>[T(o,{onClick:a.getSmsCode,disabled:i.btnDisabled},{default:z(()=>[w(F(i.btnText),1)]),_:1},8,[`onClick`,`disabled`])]),_:1},16,[`modelValue`,`placeholder`,`onInput`])}var aa=H(ra,[[`render`,ia]]);aa.install=function(e){e.component(aa.name,aa)};var oa={props:{fileType:{type:[Array],default:[]},fileSize:{type:[Number],default:2},fileUnit:{type:[String],default:``},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5}}},sa={class:`cv-upload-tip-box`},ca={key:0},la={key:1};function ua(e,t,n,r,i,a){return A(),S(`div`,sa,[t[0]||=C(`span`,null,`最多上传`,-1),C(`b`,null,F(n.limit),1),C(`span`,null,F(n.fileUnit),1),n.fileType.length?(A(),S(`b`,ca,F(n.fileType.length?n.fileType.join(`/`):``),1)):x(``,!0),n.fileType.length?(A(),S(`span`,la,`格式`)):x(``,!0),C(`span`,null,`文件;且每`+F(n.fileUnit)+`不超过`,1),C(`b`,null,F(n.fileSize)+`MB`,1)])}var da={inheritAttrs:!1,emits:[`update:modelValue`,`update:initValue`,`delete`,`error`,`success`],components:{uploadTip:H(oa,[[`render`,ua]])},mixins:[oi],props:{multiple:{type:[Boolean],default:!1},limit:{type:[Number,String],default:1},drag:{type:Boolean,default:!1},httpRequest:{type:[Function],default:()=>{}},accept:String,beforeRemove:Function,upResponseFn:{type:[Function],default:null},signatureFn:{type:Function,default:null},signatureType:{type:[String],default:`aliyun_oss_type2`},signatureParam:{type:[Object],default:()=>({})}},data(){return{cropShow:!1,upIngPercent:0,upIngLoading:!1,upIngFileInfo:{}}},computed:{fileTypeStr(){return this.fileType.join(`,`)},tipAttr(){return{fileType:this.fileType||[],fileSize:this.fileSize||``,multiple:this?.multiple||!1,limit:this.limit?parseInt(this.limit):5}},mergeAttrs(){let e=this._mergeAttrs(`upload`);return this.$props.signatureType&&(e.signatureType=this.$props.signatureType),this.$props.signatureFn&&(e.signatureFn=this.$props.signatureFn),this.$props.signatureParam&&(e.signatureParam=this.$props.signatureParam),typeof e.upResponseFn!=`function`&&(e.upResponseFn=null),Object.assign({},e,this.$attrs)}},methods:{_commonBeforeUpload(e){e.type;let t=e.name||``;e.size/1024/1024;let n=t.split(`.`).pop().toLowerCase(),r=this.fileType.join(`、`);return this.fileType.includes(n)?e>this.fileSize?(ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`),!1):!0:(ExtendMessage.error(`文件格式错误,请上传类型 如:${r}格式文件`),!1)},_commonRemove(){return new Promise((e,t)=>{this.$confirm(`提示`,{title:`确定删除??`,showCancelButton:!0,confirmButtonText:`确定`,cancelButtonText:`取消`,type:`warning`}).then(()=>{e(!0)}).catch(()=>{t(!1)})})},initHttpRequest(){},initOnProgress(e){this.upIngPercent=Number(e.percentage.toFixed(0))},initOnSuccess(e,t){},initOnExceed(){this.$message.error(`最多上传${this.limit}个文件`)}}};function fa(e){let t=[],n=Object.prototype.toString.call(e);if(n===`[object String]`)t.push(pa(e));else if(n===`[object Object]`)e.name&&e.url&&t.push(e);else if(n===`[object Array]`)for(let n in e){let r=e[n],i=Object.prototype.toString.call(r);i===`[object String]`?t.push(pa(r)):i===`[object Object]`&&r.name&&r.url&&t.push(r)}return t}function pa(e){let t=e.lastIndexOf(`/`),n=e.substring(t+1,e.length),r=``;return n.lastIndexOf(`.`)>-1&&(r=n.slice(n.lastIndexOf(`.`)+1),r=`image/`+r),{name:n,url:e,type:r,status:`success`}}function ma(e){return 1024**e}function ha(e){return e?e<ma(1)?e+` B`:e<ma(2)?(e/ma(1)).toFixed(2)+` KB`:e<ma(3)?(e/ma(2)).toFixed(2)+` MB`:e<ma(4)?(e/ma(3)).toFixed(2)+` GB`:(e/ma(4)).toFixed(2)+` TB`:`-`}function ga(e){if(!e)return!0;let t=e?.expiration_last;if(!t)return!0;let n=Rr(t),r=new Date;return isNaN(n.getTime())?!0:n.getTime()-r.getTime()<=6e4}async function _a(e,t){if(!e||typeof e!=`function`)return!1;let n=null;if(ga(n)){let r=await e({...t});if(r&&r.data&&r.status==200)n=r.data||{};else throw v.error(`获取STS令牌失败`),Error(`获取STS令牌失败 ${r?.message}`)}return{...n,pass:!!n}}async function va(e,t,n,r){e||=`aliyun_oss_type2`,r||={};let i=await _a(t,{upload_type:e,...n});if(!i.pass)return v.error(`获取oss上传凭证异常`);if(e==`oss_upload1`){let e={bucket:i.bucket,region:i.endpoint.split(`.`)[0],accessKeyId:i.accessKeyId,accessKeySecret:i.accessKeySecret,stsToken:i.securityToken,expiration:i.expiration,...r,refreshSTSToken:async()=>{let e=await _a(t);return{accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,stsToken:e.securityToken}},refreshSTSTokenInterval:new Date(i.expiration)-new Date-1e3*60};return new OSS(e)}else if(e==`aliyun_oss_type2`)return i;throw Error(`上传类型错误`)}async function ya(e,t,n){let r={},i=new FormData;i.append(`success_action_status`,t.success_action_status||`200`),i.append(`policy`,t.policy),i.append(`signature`,t.signature),i.append(`x-oss-signature`,t.signature),i.append(`x-oss-signature-version`,`OSS4-HMAC-SHA256`),i.append(`x-oss-credential`,t.x_oss_credential),i.append(`x-oss-date`,t.x_oss_date),i.append(`x-oss-security-token`,t.security_token);let a=t.key;if(t.key||(a=t.dir+`/`+e.name),i.append(`key`,a),t.callback&&i.append(`callback`,t.callback),t.callback_var&&Hr(t.callback_var))for(let e in t.callback_var)t.callback_var.hasOwnProperty(e)&&i.append(e,t.callback_var[e]);return i.append(`file`,e),fetch(t.host,{method:`POST`,body:i,headers:r}).then(e=>{if(e.ok)return e.json()}).then(e=>{if(e&&e.success)return e.data}).catch(e=>{})}async function ba(e,t,n,r){if(!n||typeof n!=`function`)return v.error(`签名方法错误`),Promise.reject();try{let i=$r(),a=Zr(e.type),o=`${i}.${a}`,s=await n({upload_type:t,...r,save_extension:a}).then(e=>e.data||{}).catch(e=>(v.error(`签名失败`),Promise.reject()));if(!s)return Promise.reject();if(s.name&&(o=`${s.name}.${a}`),e instanceof Blob&&(e=new File([e],o,{type:e.type,lastModified:Date.now()})),e)return await ya(e,s)}catch{return Promise.reject()}}var xa=!1,Sa=.2,Ca=.4,wa=180,Ta=Sa,Ea=``,Da=null,Oa=null,ka=typeof navigator<`u`&&navigator.userAgent.indexOf(`Firefox`)>-1,Aa=typeof window<`u`&&(!!window.ActiveXObject||`ActiveXObject`in window),ja=()=>{xa=!1,Ta=Sa,Ea=``,Da!==null&&(clearTimeout(Da),Da=null),Oa!==null&&(clearTimeout(Oa),Oa=null)},Ma=(e,t,n)=>{let r=e.deltaY||e.wheelDelta,i=t;ka&&(r*=30),Aa&&(r=-r);let a=r<0?`add`:`reduce`;a!==Ea&&(Ea=a,Ta=Sa);let o=Ta/n.width*r;return o<0&&(i+=Math.abs(o)),o>0&&t>Math.abs(o)&&(i-=Math.abs(o)),xa||(xa=!0,Da=window.setTimeout(()=>{xa=!1,Ta=Math.min(Ca,Ta+.01),Da=null},100)),Oa!==null&&clearTimeout(Oa),Oa=window.setTimeout(ja,wa),i},Na=(e,t)=>e*t,Pa=typeof document<`u`&&`onwheel`in document.createElement(`div`)?`wheel`:`mousewheel`,Fa=.2,Ia=100,La=ye({name:`cropper-loading`,props:{isVisible:{type:Boolean,default:!1}},render(){let{$slots:e}=this;return this.isVisible?T(`section`,{class:`cropper-loading`},[e.default?e.default():T(`p`,{class:`cropper-loading-spin`},[T(`i`,null,[T(`svg`,{viewBox:`0 0 1024 1024`,focusable:`false`,"data-icon":`loading`,width:`1.5em`,height:`1.5em`,fill:`currentColor`,"aria-hidden":`true`},[T(`path`,{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`},null)])]),T(`span`,null,null)])]):``}}),Ra=(e,t=0)=>{if(typeof e==`number`)return e;let n=e.trim();if(n.endsWith(`%`)){let e=Number.parseFloat(n);return!Number.isFinite(e)||t<=0?0:t*e/100}let r=Number.parseFloat(n);return Number.isFinite(r)?r:0},za=e=>typeof e==`number`?`${e}px`:e,Ba=e=>{if(!Number.isFinite(e))return 0;let t=(e%360+360)%360;return Object.is(t,-0)?0:t},Va=e=>{let{props:t,cropperRef:n,layoutContainer:r,imgs:i,cropping:a}=e,o=_e(()=>({...t.wrapper,width:za(t.wrapper.width),height:za(t.wrapper.height)})),s=j({...t.cropLayout}),c=_e(()=>({width:Ra(s.value.width,r.wrapLayout.width),height:Ra(s.value.height,r.wrapLayout.height)})),l=()=>{if(!n.value)return;let e=Number.parseFloat((window.getComputedStyle(n.value).width||``).replace(`px`,``)),t=Number.parseFloat((window.getComputedStyle(n.value).height||``).replace(`px`,``));Number.isFinite(e)&&Number.isFinite(t)&&(r.wrapLayout={width:e,height:t})},u=_e(()=>{let e=r.wrapLayout.width,t=r.wrapLayout.height,n=c.value.width,i=c.value.height;return{width:e>0?Math.min(n,e):n,height:t>0?Math.min(i,t):i}}),d=_e(()=>{let e=r.wrapLayout.width,t=r.wrapLayout.height;return e<=0||t<=0?!0:u.value.width<e||u.value.height<t});return{wrapperStyle:o,innerCropLayout:s,cropLayoutStyle:c,effectiveCropLayoutStyle:u,shouldShowCropBox:d,isFullCropMode:_e(()=>!!i.value&&a.value&&!d.value),updateWrapLayoutFromDom:l}},Ha={};Ha.getData=e=>new Promise((t,n)=>{let r={};Ua(e).then(e=>{r.arrayBuffer=e,r.orientation=qa(e),t(r)}).catch(e=>{n(e)})});function Ua(e){let t=null;return new Promise((n,r)=>{if(e.src)if(/^data\:/i.test(e.src))t=Ga(e.src),n(t);else if(/^blob\:/i.test(e.src)){var i=new FileReader;i.onload=function(e){t=e.target?.result??null,n(t)},Wa(e.src,function(e){i.readAsArrayBuffer(e)})}else{var a=new XMLHttpRequest;a.onload=function(){if(this.status==200||this.status===0)t=a.response,n(t);else throw`Could not load image`;a=null},a.open(`GET`,e.src,!0),a.responseType=`arraybuffer`,a.send(null)}else r(`img error`)})}function Wa(e,t){var n=new XMLHttpRequest;n.open(`GET`,e,!0),n.responseType=`blob`,n.onload=function(){(this.status==200||this.status===0)&&t(this.response)},n.send()}function Ga(e){e=e.replace(/^data\:([^\;]+)\;base64,/gim,``);for(var t=atob(e),n=t.length,r=new ArrayBuffer(n),i=new Uint8Array(r),a=0;a<n;a++)i[a]=t.charCodeAt(a);return r}function Ka(e,t,n){var r=``,i;for(i=t,n+=t;i<n;i++)r+=String.fromCharCode(e.getUint8(i));return r}function qa(e){var t=new DataView(e),n=t.byteLength,r,i,a,o,s,c,l,u,d,f;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(d=2;d<n;){if(t.getUint8(d)===255&&t.getUint8(d+1)===225){l=d;break}d++}if(l&&(i=l+4,a=l+10,Ka(t,i,4)===`Exif`&&(c=t.getUint16(a),s=c===18761,(s||c===19789)&&t.getUint16(a+2,s)===42&&(o=t.getUint32(a+4,s),o>=8&&(u=a+o)))),u){for(n=t.getUint16(u,s),f=0;f<n;f++)if(d=u+f*12+2,t.getUint16(d,s)===274){d+=8,r=t.getUint16(d,s);break}}return r}var Ja=class{ctx;img;handle;constructor(){this.ctx=null,this.img=null,this.handle={1:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height),e),2:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(this.img.width,0),this.ctx.scale(-1,1)),e),3:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(this.img.width/2,this.img.height/2),this.ctx.rotate(180*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e),4:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(0,this.img.height),this.ctx.scale(1,-1)),e),5:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.rotate(.5*Math.PI),this.ctx.scale(1,-1)),e),6:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.translate(this.img.height/2,this.img.width/2),this.ctx.rotate(90*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e),7:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.rotate(.5*Math.PI),this.ctx.translate(this.img.width,-this.img.height),this.ctx.scale(-1,1)),e),8:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.translate(this.img.height/2,this.img.width/2),this.ctx.rotate(-90*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e)}}render(e,t,n){if(this.ctx=t.getContext(`2d`),this.img=e,this.handle[n]){let e=this.handle[n](t);return this.ctx=e.getContext(`2d`),this.ctx.drawImage(this.img,0,0,this.img.width,this.img.height),this.ctx.restore(),e}else return t.width=e.width,t.height=e.height,this.ctx.drawImage(this.img,0,0,this.img.width,this.img.height),t}},Ya=(e,t,n)=>{let r=`default`;for(let e of Object.keys(Xa))if(e===n){r=n;break}let i=Xa[r];return i(e,t,n)},Xa={contain:(e,t)=>{let n=1,{width:r,height:i}={...e},a=t.width,o=t.height;return r>a&&(n=a/r),i*n>o&&(n=o/i),n},cover:(e,t)=>{let n=1,{width:r,height:i}={...e},a=t.width,o=t.height;return n=a/r,i*n<o&&(n=o/i),n},default:(e,t,n)=>{let r=1;if(n===`original`)return r;let{width:i,height:a}={...e},o=t.width,s=t.height,c=n.split(` `);try{let t=c[0];if(t.search(`px`)!==-1&&(t=t.replace(`px`,``),i=parseFloat(t),r=i/e.width),t.search(`%`)!==-1&&(t=t.replace(`%`,``),i=parseFloat(t)/100*o,r=i/e.width),c.length===2&&t===`auto`){let t=c[1];t.search(`px`)!==-1&&(t=t.replace(`px`,``),a=parseFloat(t),r=a/e.height),t.search(`%`)!==-1&&(t=t.replace(`%`,``),a=parseFloat(t)/100*s,r=a/e.height)}}catch{r=1}return r}},Za=new Ja,Qa=async e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e,e.substr(0,4)!==`data`&&(r.crossOrigin=``)}),$a=e=>Ha.getData(e),eo=(e,t,n)=>t&&Za.render(e,t,n),to=e=>{if(typeof navigator>`u`)return[`0`,`0`,`0`];let t=navigator.userAgent.split(` `),n=``,r=[`0`,`0`,`0`],i=new RegExp(e,`i`);for(let e=0;e<t.length;e++)i.test(t[e])&&(n=t[e]);return n&&(r=n.split(`/`)[1].split(`.`)),r},no=e=>{if(Number(to(`chrome`)[0])>=81)return-1;if(Number(to(`safari`)[0])>=605){let e=to(`version`);if(Number(e[0])>13&&Number(e[1])>1)return-1}let t=typeof navigator<`u`?navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/):null;if(t){let n=t[1].split(`_`).map(e=>Number(e));return n[0]>13||n[0]>=13&&n[1]>=4||Number(to(`Firefox`)[0])>=97?-1:e}return e},ro=(e,t,n)=>Ya(e,t,n),io=(e,t)=>{let{scale:n,imgStyle:r,layoutStyle:i,rotate:a}=e,o={width:n*r.width,height:n*r.height},s=(i.width-o.width)/2,c=(i.height-o.height)/2;t&&(s=t.x,c=t.y);let l=((o.width-r.width)/2+s)/n,u=((o.height-r.height)/2+c)/n;return{imgExhibitionStyle:{width:`${r.width}px`,height:`${r.height}px`,transform:`scale(${n}, ${n}) translate3d(${l}px, ${u}px, 0px) rotateZ(${a}deg)`},imgAxis:{x:s,y:c,scale:n,rotate:a}}},ao=(e,t,n)=>new Promise((r,i)=>{e.toBlob(e=>{if(e){r(e);return}i(Error(`canvas toBlob failed`))},`image/${t}`,n)}),oo=async e=>e?/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG|WEBP|webp)$/.test(e.name)?new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{let n=``,r=e.target;n=typeof r.result==`object`&&r.result?window.URL.createObjectURL(new Blob([r.result])):r.result,t(n)},r.onerror=n,r.readAsArrayBuffer(e)}):(alert(`图片类型必须是.gif,jpeg,jpg,png,bmp,webp中的一种`),``):``,so=(e,t,n=0,r=1)=>{let i=document.createElement(`canvas`),a=i.getContext(`2d`),{width:o,height:s}=t,c=0,l=0,u=0;return o*=r,s*=r,i.width=o,i.height=s,n&&(u=Math.ceil(Math.sqrt(o*o+s*s)),i.width=u,i.height=u,a.translate(u/2,u/2),a.rotate(n*Math.PI/180),c=-u/2+(u-o)/2,l=-u/2+(u-s)/2),a.drawImage(e,c,l,o,s),a.restore(),i},co=async e=>{let{type:t=`base64`,url:n,sourceCanvas:r,imgLayout:i,imgAxis:a,cropAxis:o,cropLayout:s,outputType:c,outputSize:l=1,full:u=!0,original:d=!1,maxSideLength:f,cropping:p}=e,m=document.createElement(`canvas`),h=m.getContext(`2d`),g=null;if(!r){if(!n)throw Error("getCropImgData: either `sourceCanvas` or `url` must be provided");try{g=await Qa(n)}catch{g=new Image}}return new Promise((e,n)=>{try{let ee=Number.isFinite(f)?f:3e3,_=Number.isFinite(a.scale)&&a.scale>0?a.scale:1,te=d?1/_:1,ne=d?1:Math.max(1,_),v=d?1:_/ne,re={x:o.x*te,y:o.y*te},ie={width:s.width*te,height:s.height*te},ae={...a,x:a.x*te,y:a.y*te},oe;oe=r?!a.rotate&&ne===1?r:lo(r,i,a.rotate,ne):so(g,i,a.rotate,ne);let se=ae.x-re.x,ce=ae.y-re.y,le=ie.width,ue=ie.height;if(p||(le=oe.width*v,ue=oe.height*v,se=0,ce=0),a.rotate&&p){let e=i.width*(d?1:_),t=i.height*(d?1:_);se-=(oe.width*v-e)/2,ce-=(oe.height*v-t)/2}let de=u&&typeof window<`u`?Math.max(1,window.devicePixelRatio||1):1;if(ee>0){let e=Math.max(le*de,ue*de);e>ee&&(de*=ee/e)}if(m.width=Math.max(1,Math.round(le*de)),m.height=Math.max(1,Math.round(ue*de)),h.scale(de,de),h.imageSmoothingEnabled=!0,`imageSmoothingQuality`in h&&(h.imageSmoothingQuality=`high`),h.drawImage(oe,se,ce,oe.width*v,oe.height*v),h.restore(),t===`blob`){ao(m,c,l).then(e).catch(n);return}e(m.toDataURL(`image/${c}`,l))}catch(e){n(e)}})},lo=(e,t,n=0,r=1)=>{let i=document.createElement(`canvas`),a=i.getContext(`2d`),{width:o,height:s}=t,c=0,l=0,u=0;return o*=r,s*=r,i.width=o,i.height=s,n&&(u=Math.ceil(Math.sqrt(o*o+s*s)),i.width=u,i.height=u,a.translate(u/2,u/2),a.rotate(n*Math.PI/180),c=-u/2+(u-o)/2,l=-u/2+(u-s)/2),a.drawImage(e,c,l,o,s),a.restore(),i},uo=(e,t,n,r)=>{let i={left:0,right:0,top:0,bottom:0,scale:1},a=n.rotate*Math.PI/180,o=[{x:e.x,y:e.y},{x:e.x+t.width,y:e.y},{x:e.x+t.width,y:e.y+t.height},{x:e.x,y:e.y+t.height}].map(e=>po(e,-a)),s=Math.max(...o.map(e=>e.x))-Math.min(...o.map(e=>e.x)),c=Math.max(...o.map(e=>e.y))-Math.min(...o.map(e=>e.y)),l=Math.max(n.scale,s/r.width,c/r.height),u=r.width*l,d=r.height*l,f=u/2,p=d/2,m=r.width*n.scale/2,h=r.height*n.scale/2,g=Math.max(...o.map(e=>e.x-f)),ee=Math.min(...o.map(e=>e.x+f)),_=Math.max(...o.map(e=>e.y-p)),te=Math.min(...o.map(e=>e.y+p)),ne=po({x:n.x+m,y:n.y+h},-a),v=po({x:fo(ne.x,g,ee),y:fo(ne.y,_,te)},a);return i.scale=l,i.left=v.x-f,i.right=v.x-f,i.top=v.y-p,i.bottom=v.y-p,i},fo=(e,t,n)=>Math.min(Math.max(e,t),n),po=(e,t)=>({x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)}),mo=(e,t,n,r)=>{let i=``,a=``,o=uo(e,t,n,r),s=o.scale,c=.5;return n.x>o.left+c?i=`left`:n.x<o.right-c&&(i=`right`),n.y>o.top+c?a=`top`:n.y<o.bottom-c&&(a=`bottom`),{landscape:i,portrait:a,scale:s,boundary:o,imgAxis:n}},ho={easeInOut:(e,t,n,r)=>(e=e/r*2,e<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t)},go=(e,t,n,r)=>{if(n<=0||e===t)return r&&r(t),()=>0;let i=0,a=Math.max(1,Math.ceil(n/17)),o=0,s=()=>{let n=ho.easeInOut(i,e,t-e,a);i++,i<=a?(r&&r(n),o=requestAnimationFrame(s)):r&&r(t)};return s(),()=>o},_o=class{handlers;constructor(){this.handlers=new Map}addHandler(e,t){let n=this.handlers.get(e),r=[];n&&(r=[...n]),r.push(t),this.handlers.set(e,r)}fire(e){let t=this.handlers.get(e.type);t&&t.forEach(t=>{t(e)})}removeHandler(e,t){let n=this.handlers.get(e);if(!n)return;let r=0;for(let e=n.length;r<e&&n[r]!==t;r++);n.splice(r,1),this.handlers.set(e,n)}},vo=typeof window<`u`&&`ontouchstart`in window,yo=typeof window<`u`&&`onmouseup`in window,bo=class{element;pre;watcher;touches;constructor(e){this.element=e,this.touches=null,this.pre={x:0,y:0},this.watcher=new _o}fire(e){this.watcher.fire(e)}getAxis(e){return{x:e.clientX,y:e.clientY}}getTouchPair(e){return e.length<2?null:[e[0],e[1]]}start(e){e.preventDefault(),e.which===1&&(this.pre=this.getAxis(e),this.fire({type:`down`,event:e}),window.addEventListener(`mousemove`,this.move),window.addEventListener(`mouseup`,this.stop))}startTouch(e){let t=e.touches[0];if(!t)return;this.pre={x:t.clientX,y:t.clientY},this.fire({type:`down`,event:e});let n=this.getTouchPair(e.touches);n?(this.touches=n,window.addEventListener(`touchmove`,this.scaleTouch,{passive:!1}),window.removeEventListener(`touchmove`,this.moveTouch)):(window.addEventListener(`touchmove`,this.moveTouch,{passive:!1}),window.removeEventListener(`touchmove`,this.scaleTouch)),window.addEventListener(`touchend`,this.stopTouch)}move(e){e.preventDefault();let t=this.getAxis(e);this.fire({type:`down-to-move`,event:e,change:{x:t.x-this.pre.x,y:t.y-this.pre.y}}),this.pre=t}moveTouch(e){e.preventDefault();let t=e.touches[0];t&&(this.fire({type:`down-to-move`,event:e,change:{x:t.clientX-this.pre.x,y:t.clientY-this.pre.y}}),this.pre={x:t.clientX,y:t.clientY})}getLen(e){return Math.sqrt(e.x*e.x+e.y*e.y)}getScale(e,t){let n={x:e[1].clientX-e[0].clientX,y:e[1].clientY-e[0].clientY},r={x:t[1].clientX-t[0].clientX,y:t[1].clientY-t[0].clientY};return this.getLen(n)/this.getLen(r)}scaleTouch(e){e.preventDefault();let t=this.getTouchPair(e.touches);!t||!this.touches||(this.fire({type:`down-to-scale`,event:e,scale:this.getScale(t,this.touches)}),this.touches=t)}stop(e){this.fire({type:`up`,event:e}),window.removeEventListener(`mousemove`,this.move),window.removeEventListener(`mouseup`,this.stop)}stopTouch(e){this.fire({type:`up`,event:e}),this.touches=null,window.removeEventListener(`touchmove`,this.moveTouch),window.removeEventListener(`touchmove`,this.scaleTouch),window.removeEventListener(`touchend`,this.stopTouch)}on(e,t){this.watcher.addHandler(e,t),!(e!==`down-to-move`&&e!==`down-to-scale`&&e!==`up`)&&(yo&&(this.start=this.start.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.element.addEventListener(`mousedown`,this.start)),vo&&(this.startTouch=this.startTouch.bind(this),this.moveTouch=this.moveTouch.bind(this),this.scaleTouch=this.scaleTouch.bind(this),this.stopTouch=this.stopTouch.bind(this),this.element.addEventListener(`touchstart`,this.startTouch,{passive:!1})))}off(e,t){this.watcher.removeHandler(e,t),!(e!==`down-to-move`&&e!==`down-to-scale`&&e!==`up`)&&(yo&&(this.element.removeEventListener(`mousedown`,this.start),window.removeEventListener(`mousemove`,this.move),window.removeEventListener(`mouseup`,this.stop)),vo&&(this.element.removeEventListener(`touchstart`,this.startTouch),window.removeEventListener(`touchmove`,this.moveTouch),window.removeEventListener(`touchmove`,this.scaleTouch),window.removeEventListener(`touchend`,this.stopTouch)))}},xo=e=>{let{cropperImg:t,cropperBox:n,layout:r,cropping:i,centerBox:a,centerWrapper:o,effectiveCropLayoutStyle:s,getBoundaryDuration:c,queueRealTimeEmit:l}=e,u=j(null),d=j(!1),f=null,p=null,m=e=>{let t=io({scale:r.imgAxis.scale,imgStyle:{...r.imgLayout},layoutStyle:{...r.wrapLayout},rotate:r.imgAxis.rotate},e);r.imgExhibitionStyle=t.imgExhibitionStyle,r.imgAxis=t.imgAxis,l()},h=()=>{if(d.value=!1,!a.value&&!o.value)return;let e=c(),t;t=a.value?mo({...r.cropAxis},{...s.value},{...r.imgAxis},{...r.imgLayout}):mo({x:0,y:0},{...r.wrapLayout},{...r.imgAxis},{...r.imgLayout}),r.imgAxis.scale<t.scale&&go(r.imgAxis.scale,t.scale,e,e=>{g(e,!0)}),t.landscape===`left`&&go(r.imgAxis.x,t.boundary.left,e,e=>{m({x:e,y:r.imgAxis.y})}),t.landscape===`right`&&go(r.imgAxis.x,t.boundary.right,e,e=>{m({x:e,y:r.imgAxis.y})}),t.portrait===`top`&&go(r.imgAxis.y,t.boundary.top,e,e=>{m({x:r.imgAxis.x,y:e})}),t.portrait===`bottom`&&go(r.imgAxis.y,t.boundary.bottom,e,e=>{m({x:r.imgAxis.x,y:e})}),l()},g=(e,t=!1)=>{let n={x:r.imgAxis.x,y:r.imgAxis.y};t||(n.x-=r.imgLayout.width*(e-r.imgAxis.scale)/2,n.y-=r.imgLayout.height*(e-r.imgAxis.scale)/2);let i=io({scale:e,imgStyle:{...r.imgLayout},layoutStyle:{...r.wrapLayout},rotate:r.imgAxis.rotate},n);r.imgExhibitionStyle=i.imgExhibitionStyle,r.imgAxis=i.imgAxis,l(),u.value!==null&&clearTimeout(u.value);let a=c();u.value=setTimeout(()=>{h()},a)},ee=e=>{let t=s.value.width,n=s.value.height,a=r.wrapLayout.width-t,o=r.wrapLayout.height-n;e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x>a&&(e.x=a),e.y>o&&(e.y=o),r.cropAxis=e,i.value=!0,l()},_=()=>{r.cropAxis={x:0,y:0},i.value=!1},te=e=>{if(!e.change)return;let t={x:e.change.x+r.imgAxis.x,y:e.change.y+r.imgAxis.y};if(a.value||o.value){let n=a.value?mo({...r.cropAxis},{...s.value},{...r.imgAxis},{...r.imgLayout}):mo({x:0,y:0},{...r.wrapLayout},{...r.imgAxis},{...r.imgLayout});(n.landscape!==``||n.portrait!==``)&&(t.x=r.imgAxis.x+e.change.x*Fa,t.y=r.imgAxis.y+e.change.y*Fa)}m(t)},ne=e=>{d.value=!0,e.scale&&g(Na(e.scale,r.imgAxis.scale))},v=e=>{!d.value&&e.change&&ee({x:e.change.x+r.cropAxis.x,y:e.change.y+r.cropAxis.y})},re=()=>{ie();let e=t.value;e&&(f=new bo(e),f.on(`down-to-move`,te),f.on(`down-to-scale`,ne),f.on(`up`,h))},ie=()=>{f&&=(f.off(`down-to-move`,te),f.off(`up`,h),f.off(`down-to-scale`,ne),null)},ae=()=>{oe();let e=n.value;e&&(p=new bo(e),p.on(`down-to-move`,v),p.on(`down-to-scale`,ne),p.on(`up`,h))},oe=()=>{p&&=(p.off(`down-to-move`,v),p.off(`down-to-scale`,ne),p.off(`up`,h),null)};return{bindMoveImg:re,unbindMoveImg:ie,bindMoveCrop:ae,unbindMoveCrop:oe,setScale:g,setImgAxis:m,reboundImg:h,checkedCrop:ee,clearCrop:_}},So=e=>{let{imgs:t,cropping:n,effectiveCropLayoutStyle:r,layout:i,emit:a}=e,o=0,s=()=>{if(!t.value||!n.value)return null;let e=i.imgAxis.scale,a=`scale(${e}, ${e}) translate3d(${(i.imgLayout.width*(e-1)/2+(i.imgAxis.x-i.cropAxis.x))/e}px, ${(i.imgLayout.height*(e-1)/2+(i.imgAxis.y-i.cropAxis.y))/e}px, 0) rotateZ(${i.imgAxis.rotate}deg)`,o=r.value.width,s=r.value.height;return{w:o,h:s,url:t.value,img:{width:`${i.imgLayout.width}px`,height:`${i.imgLayout.height}px`,transform:a},html:`<div class="show-preview" style="width: ${o}px; height: ${s}px; overflow: hidden"><div style="width: ${o}px; height: ${s}px"><img src="${t.value}" style="width: ${i.imgLayout.width}px; height: ${i.imgLayout.height}px; transform: ${a}"></div></div>`}},c=()=>{let e=s();e&&(a(`real-time`,e),a(`realTime`,e))};return ke(()=>{o&&=(cancelAnimationFrame(o),0)}),{queueRealTimeEmit:()=>{o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=0,c()})},getRealTimePreview:s}},Co=e=>{let{layout:t,imgs:n,cropping:r,cropLayoutStyle:i,effectiveCropLayoutStyle:a,shouldShowCropBox:o,checkedCrop:s,queueRealTimeEmit:c}=e;return{renderCrop:e=>{let{width:n,height:r}=t.wrapLayout,a=i.value.width,o=i.value.height;n>0&&(a=Math.min(a,n)),r>0&&(o=Math.min(o,r));let c={x:(n-a)/2,y:(r-o)/2};s(e?{...e}:c)},computedClassDrag:()=>{let e=[`cropper-drag-box`];return r.value&&o.value&&e.push(`cropper-modal`),e.join(` `)},getCropBoxStyle:()=>{let e={width:`${a.value.width}px`,height:`${a.value.height}px`,transform:`translate3d(${t.cropAxis.x}px, ${t.cropAxis.y}px, 0)`};return t.cropExhibitionStyle.div=e,e},getCropImgStyle:()=>{let e=t.imgAxis.scale,n=(t.imgLayout.width*(e-1)/2+(t.imgAxis.x-t.cropAxis.x))/e,r=(t.imgLayout.height*(e-1)/2+(t.imgAxis.y-t.cropAxis.y))/e,i={width:`${t.imgLayout.width}px`,height:`${t.imgLayout.height}px`,transform:`scale(${e}, ${e}) translate3d(${n}px, ${r}px, 0) rotateZ(${t.imgAxis.rotate}deg)`};return t.cropExhibitionStyle.img=i,i},isFullCropMode:_e(()=>!!n.value&&r.value&&!o.value),onCropAxisChanged:()=>{c()}}},wo=e=>{let{canvas:t,outputType:n,outputSize:r,full:i,original:a,maxSideLength:o,cropLayout:s,cropping:c,url:l}=e,u=e=>typeof e?.value<`u`?e.value:e,d=()=>{if(l)return typeof l?.value<`u`?l.value:l},f=(l=`base64`)=>t.value?co({type:l,outputType:n.value,outputSize:r.value,full:i.value,original:a.value,maxSideLength:o.value,sourceCanvas:t.value,url:d(),imgAxis:{...u(e.imgAxis)},imgLayout:{...u(e.imgLayout)},cropLayout:{...s.value},cropAxis:{...u(e.cropAxis)},cropping:c.value}):Promise.reject(Error(`No image canvas available`));return{getCropData:f,getCropBlob:()=>f(`blob`)}},To=e=>{typeof e==`string`&&e.startsWith(`blob:`)&&URL.revokeObjectURL(e)},Eo=async e=>{try{let t=new Image;if(t.src=e,typeof t.decode==`function`){await t.decode();return}await new Promise(e=>{t.onload=()=>e(),t.onerror=()=>e()})}catch{}},Do=()=>new Promise(e=>{requestAnimationFrame(()=>e())}),Oo=e=>{if(typeof window>`u`)return 1;let t=(e?e():window.devicePixelRatio)||1;return Math.min(Math.max(1,t),2)},ko=async(e,t)=>{let{previewMaxSide:n,getWrapLayout:r,getDevicePixelRatio:i}=t,a=Number(n),o=Number.isFinite(a)&&a>0?a:1/0,s=r(),c=Math.max(1,Math.max(s.width||0,s.height||0)*Oo(i)),l=Math.max(e.width,e.height),u=Math.min(1,Math.min(o,c)/Math.max(1,l)),d=e;if(u<1){let t=Math.max(1,Math.round(e.width*u)),n=Math.max(1,Math.round(e.height*u)),r=document.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);i.imageSmoothingEnabled=!0,`imageSmoothingQuality`in i&&(i.imageSmoothingQuality=`high`),i.drawImage(e,0,0,t,n),d=r}return new Promise((e,t)=>{d.toBlob(async n=>{if(!n){t(Error(`Failed to create preview blob`));return}let r=URL.createObjectURL(n);await Eo(r),e(r)},`image/png`,1)})},Ao=e=>{let{canvas:t,imgs:n,imgLoading:r,cropping:i,filter:a,mode:o,defaultRotate:s,layout:c,updateWrapLayoutFromDom:l,createPreviewUrl:u,imgLoadEmit:d,renderCrop:f,reboundImg:p,queueRealTimeEmit:m}=e,h=0,g=!1,ee=e=>{if(t.value){if(a.value){let e=t.value;e=a.value(e)??e,t.value=e}_(e)}},_=e=>{if(t.value)try{l(),c.imgLayout={width:t.value.width,height:t.value.height};let a=io({scale:ro({...c.imgLayout},{...c.wrapLayout},o.value),imgStyle:{...c.imgLayout},layoutStyle:{...c.wrapLayout},rotate:Ba(s.value)});c.imgExhibitionStyle=a.imgExhibitionStyle,c.imgAxis=a.imgAxis;let d=n.value;u(t.value).then(async t=>{if(g||e!==h){To(t);return}n.value=t,To(d),i.value&&f(),p(),m(),await Te(),await Do(),r.value=!1}).catch(t=>{g||e!==h||(n.value=``,r.value=!1)})}catch{r.value=!1}},te=async e=>{let i=++h;r.value=!0;let a=n.value;n.value=``,To(a),t.value=null;let o;try{o=await Qa(e),d({type:`success`,message:`图片加载成功`})}catch(e){return d({type:`error`,message:`图片加载失败${e}`}),r.value=!1,!1}let s={orientation:-1};try{s=await $a(o)}catch{s.orientation=1}let c=s.orientation||-1;c=no(c);let l=document.createElement(`canvas`);try{l=eo(o,l,c)??l}catch{}return g||i!==h?(r.value=!1,!1):(t.value=l,ee(i),!0)},ne=()=>{g=!0,h+=1,To(n.value)};return ke(()=>{ne()}),{checkedImg:te,markUnmounted:ne}},jo=e=>{let{cropperRef:t,isDrag:n,onUpload:r}=e,i=e=>{e.preventDefault();let t=e.dataTransfer;n.value=!1,oo(t.files[0]).then(e=>{e&&r(e)})},a=e=>{e.preventDefault(),n.value=!0},o=e=>{e.preventDefault(),n.value=!1};return De(()=>{let e=t.value;e&&(e.addEventListener(`dragover`,a,!1),e.addEventListener(`dragend`,o,!1),e.addEventListener(`drop`,i,!1))}),ke(()=>{t.value?.removeEventListener(`drop`,i,!1),t.value?.removeEventListener(`dragover`,a,!1),t.value?.removeEventListener(`dragend`,o,!1)}),{drop:i,dragover:a,dragend:o}},Mo=e=>{let{isIE:t,supportWheel:n,changeImgSize:r,setScale:i}=e,a=e=>typeof e?.value<`u`?e.value:e,o=t=>{t.preventDefault();let n=a(e.imgAxis),o=a(e.imgLayout);i(r(t,n.scale,o))},s=()=>{typeof window>`u`||(t?window.addEventListener(n,o):window.addEventListener(n,o,{passive:!1}))},c=()=>{typeof window>`u`||(window.removeEventListener(n,o),ja())};return ke(()=>{c()}),{mouseInCropper:s,mouseOutCropper:c}},No=e=>{let{img:t,imgs:n,imgLoading:r,cropping:i,filter:a,mode:o,defaultRotate:s,cropLayout:c,wrapperStyle:l,cropLayoutStyle:u,shouldShowCropBox:d,centerBox:f,centerWrapper:p,innerCropLayout:m,layout:h,checkedImg:g,bindMoveImg:ee,bindMoveCrop:_,unbindMoveCrop:te,renderCrop:ne,setImgAxis:v,reboundImg:re,updateWrapLayoutFromDom:ie,normalizeRotate:ae,setRotate:oe}=e;R(t,e=>{e&&e!==n.value&&g(e)}),R(n,e=>{e&&(Te(()=>{ee()}),i.value&&d.value&&Te(()=>{_()}))}),R(i,e=>{e&&d.value&&Te(()=>{_()})}),R(a,()=>{r.value=!0,g(t.value)}),R(o,()=>{r.value=!0,g(t.value)}),R(s,e=>{oe(ae(e))}),R(c,e=>{m.value={...e}},{deep:!0}),R(l,async()=>{await Te(),ie(),n.value&&(i.value&&ne({...h.cropAxis}),v({x:h.imgAxis.x,y:h.imgAxis.y}),re())},{deep:!0,flush:`post`}),R(u,()=>{n.value&&(i.value&&ne({...h.cropAxis}),re())},{deep:!0}),R(d,e=>{if(n.value){if(e&&i.value){Te(()=>{_()});return}te()}},{flush:`post`}),R(f,e=>{e&&re()}),R(p,e=>{e&&re()})},Po=e=>{let{imgs:t,img:n,imgLoading:r,layout:i,innerCropLayout:a,checkedImg:o,updateWrapLayoutFromDom:s,renderCrop:c,checkedCrop:l,reboundImg:u,setScale:d,queueRealTimeEmit:f}=e,p=.1,m=(e=p)=>{let t=Math.abs(Number(e));return Number.isFinite(t)&&t>0?t:p},h=(e,n=!0)=>{let{x:r,y:a,scale:o}=i.imgAxis,s={x:r,y:a},c=io({scale:o,imgStyle:{...i.imgLayout},layoutStyle:{...i.wrapLayout},rotate:e},s);i.imgExhibitionStyle=c.imgExhibitionStyle,i.imgAxis=c.imgAxis,f(),n&&t.value&&u()},g=()=>{h(i.imgAxis.rotate-90)},ee=()=>{h(i.imgAxis.rotate+90)},_=()=>{h(0)},te=()=>n.value?o(n.value):(t.value=``,r.value=!1,!1),ne=e=>{h(Ba(e))},v=e=>{a.value={...e},t.value&&(s(),c(),u())},re=e=>{t.value&&(s(),l({...e}),u())},ie=(e=p)=>{if(!t.value)return;s();let n=Math.max(.01,i.imgAxis.scale+Number(e));d(Number.isFinite(n)?n:i.imgAxis.scale)};return{setRotate:h,rotateLeft:g,rotateRight:ee,rotateClear:_,reload:te,setRotateAngle:ne,setCropLayout:v,setCropAxis:re,changeScale:ie,zoomIn:(e=p)=>{ie(i.imgAxis.scale*m(e))},zoomOut:(e=p)=>{ie(-i.imgAxis.scale*m(e))}}},Fo=()=>({imgLayout:{width:0,height:0},wrapLayout:{width:0,height:0},imgAxis:{x:0,y:0,scale:0,rotate:0},imgExhibitionStyle:{width:``,height:``,transform:``},cropAxis:{x:0,y:0},cropExhibitionStyle:{div:{},img:{}}}),Io=e=>{let{centerBox:t,centerWrapper:n,centerBoxDelay:r,centerWrapperDelay:i}=e;return{getBoundaryDuration:()=>t.value?Math.max(0,r.value):n.value?Math.max(0,i.value):Ia}},Lo=e=>{let{previewMaxSide:t,getWrapLayout:n}=e;return{createPreviewUrl:e=>ko(e,{previewMaxSide:t.value,getWrapLayout:n})}},Ro=e=>({imgLoadEmit:t=>{e(`img-load`,t)},imgUploadEmit:t=>{e(`img-upload`,t)},emitRealTime:(t,n)=>{if(t===`real-time`){e(`real-time`,n);return}e(`realTime`,n)}}),zo=[`onMouseover`,`onMouseout`],Bo={key:0,class:`cropper-box cropper-fade-in`},Vo=[`src`],Ho=[`src`],Uo={key:2,class:`cropper-full-mask cropper-fade-in`},Wo={key:3,class:`drag`},Go=ye({__name:`vue-cropper`,props:{img:{default:``},wrapper:{default:()=>({width:300,height:300})},cropLayout:{default:()=>({width:200,height:200})},color:{default:`#fff`},filter:{type:[Function,null],default:null},outputType:{default:`png`},outputSize:{default:1},full:{type:Boolean,default:!0},original:{type:Boolean,default:!1},maxSideLength:{default:3e3},previewMaxSide:{default:2048},mode:{default:`cover`},cropColor:{default:`#fff`},defaultRotate:{default:0},centerBox:{type:Boolean,default:!1},centerWrapper:{type:Boolean,default:!1},centerBoxDelay:{default:Ia},centerWrapperDelay:{default:Ia}},emits:[`img-load`,`img-upload`,`real-time`,`realTime`],setup(e,{expose:t,emit:n}){let r=e,i=j(),a=j(),o=j(),s=n,c=j(!1),l=j(``),u=j(null),d=je(Fo()),f=j(!1),p=j(!0),{img:m,filter:h,mode:g,defaultRotate:ee,outputType:_,outputSize:te,full:ne,original:v,maxSideLength:re,previewMaxSide:ie,centerBox:ae,cropLayout:oe,centerWrapper:se,centerBoxDelay:ce,centerWrapperDelay:le}=Be(r),{wrapperStyle:ue,innerCropLayout:de,cropLayoutStyle:fe,effectiveCropLayoutStyle:pe,shouldShowCropBox:me,isFullCropMode:y,updateWrapLayoutFromDom:he}=Va({props:r,cropperRef:i,layoutContainer:d,imgs:l,cropping:p}),{getBoundaryDuration:ge}=Io({centerBox:ae,centerWrapper:se,centerBoxDelay:ce,centerWrapperDelay:le}),{imgLoadEmit:_e,imgUploadEmit:b,emitRealTime:w}=Ro(s),{queueRealTimeEmit:ye}=So({imgs:l,cropping:p,effectiveCropLayoutStyle:pe,layout:d,emit:w}),{bindMoveImg:be,unbindMoveImg:xe,bindMoveCrop:Se,unbindMoveCrop:Ce,setScale:we,setImgAxis:E,reboundImg:Te,checkedCrop:O}=xo({cropperImg:a,cropperBox:o,layout:d,cropping:p,centerBox:ae,centerWrapper:se,effectiveCropLayoutStyle:pe,getBoundaryDuration:ge,queueRealTimeEmit:ye});jo({cropperRef:i,isDrag:f,onUpload:b});let{renderCrop:Ee,computedClassDrag:Oe,getCropBoxStyle:Ae,getCropImgStyle:Me}=Co({layout:d,imgs:l,cropping:p,cropLayoutStyle:fe,effectiveCropLayoutStyle:pe,shouldShowCropBox:me,checkedCrop:O,queueRealTimeEmit:ye}),M=ze(d,`imgAxis`),P=ze(d,`imgLayout`),{getCropData:Ne,getCropBlob:Pe}=wo({canvas:u,outputType:_,outputSize:te,full:ne,original:v,maxSideLength:re,imgAxis:M,imgLayout:P,cropAxis:ze(d,`cropAxis`),cropLayout:pe,cropping:p,url:m}),{createPreviewUrl:Fe}=Lo({previewMaxSide:ie,getWrapLayout:()=>(he(),{...d.wrapLayout})}),{checkedImg:Ie}=Ao({canvas:u,imgs:l,imgLoading:c,cropping:p,filter:h,mode:g,defaultRotate:ee,layout:d,updateWrapLayoutFromDom:he,createPreviewUrl:Fe,imgLoadEmit:_e,renderCrop:()=>Ee(),reboundImg:Te,queueRealTimeEmit:ye}),{mouseInCropper:F,mouseOutCropper:Le}=Mo({isIE:Aa,supportWheel:Pa,changeImgSize:Ma,imgAxis:M,imgLayout:P,setScale:we});No({img:m,imgs:l,imgLoading:c,cropping:p,filter:h,mode:g,defaultRotate:ee,cropLayout:oe,wrapperStyle:ue,cropLayoutStyle:fe,shouldShowCropBox:me,centerBox:ae,centerWrapper:se,innerCropLayout:de,layout:d,checkedImg:Ie,bindMoveImg:be,bindMoveCrop:Se,unbindMoveCrop:Ce,renderCrop:Ee,setImgAxis:E,reboundImg:Te,updateWrapLayoutFromDom:he,normalizeRotate:Ba,setRotate:e=>Re(e)});let{setRotate:Re,rotateLeft:Ve,rotateRight:He,rotateClear:L,reload:R,setRotateAngle:B,setCropLayout:We,setCropAxis:Ge,changeScale:Ke,zoomIn:qe,zoomOut:Je}=Po({imgs:l,img:m,imgLoading:c,layout:d,innerCropLayout:de,checkedImg:Ie,updateWrapLayoutFromDom:he,renderCrop:Ee,checkedCrop:O,reboundImg:Te,setScale:we,queueRealTimeEmit:ye});De(()=>{r.img?Ie(r.img):l.value=``}),ke(()=>{xe(),Ce()});let Ye=Ue();return t({getCropData:Ne,getCropBlob:Pe,rotateLeft:Ve,rotateRight:He,rotateClear:L,reload:R,setRotateAngle:B,setCropLayout:We,setCropAxis:Ge,changeScale:Ke,zoomIn:qe,zoomOut:Je}),(t,n)=>(A(),S(`section`,{class:`vue-cropper`,style:k(I(ue)),ref_key:`cropperRef`,ref:i,onMouseover:I(F),onMouseout:I(Le)},[l.value?(A(),S(`section`,Bo,[C(`section`,{class:`cropper-box-canvas`,style:k(d.imgExhibitionStyle)},[C(`img`,{src:l.value,alt:`cropper-next-vue`},null,8,Vo)],4),C(`section`,{class:D(I(Oe)()),ref_key:`cropperImg`,ref:a},null,2)])):x(``,!0),p.value&&l.value&&I(me)?(A(),S(`section`,{key:1,class:`cropper-crop-box cropper-fade-in`,style:k(I(Ae)())},[C(`span`,{class:`cropper-view-box`,style:k({outlineColor:e.cropColor})},[I(m)?(A(),S(`img`,{key:0,src:l.value,style:k(I(Me)()),alt:`cropper-img`},null,12,Ho)):x(``,!0)],4),C(`span`,{class:`cropper-face cropper-move`,ref_key:`cropperBox`,ref:o},null,512)],4)):x(``,!0),I(y)?(A(),S(`section`,Uo)):x(``,!0),f.value?(A(),S(`section`,Wo,[N(t.$slots,`drag`,{},()=>[n[0]||=C(`p`,null,`拖动图片到此`,-1)])])):x(``,!0),T(I(La),{"is-visible":c.value},ve({_:2},[I(Ye).loading?{name:`default`,fn:z(()=>[N(t.$slots,`loading`)]),key:`0`}:void 0]),1032,[`is-visible`])],44,zo))}});typeof window<`u`&&(window.requestAnimationFrame||(window.requestAnimationFrame=e=>window.setTimeout(e,17)),window.cancelAnimationFrame||(window.cancelAnimationFrame=e=>{window.clearTimeout(e)})),{version:`0.3.1`}.version;var Ko={class:`cv-upload-crop-box`},qo={class:`cv-upload-crop-left-box`},Jo={class:`cv-upload-crop-left-opt`},Yo={class:`cv-upload-crop-left-opt2`},Xo={class:`cv-upload-crop-left-opt2`},Zo={class:`cv-upload-crop-right-box`},Qo=[`innerHTML`],$o={title:`头像上传`,name:`cvUploadAvatar`,mixins:[da],components:{UploadCrop:Object.assign({props:{loading:{type:[Boolean],default:!1},modelValue:{type:[Boolean],default:!1},src:{type:[String],default:``},size:{type:[Number],default:120},title:{type:[String],default:`裁剪`}},emits:[`update:modelValue`,`onSubmit`,`onClose`],data(){return{cropDialogVisible:!1,cropAutoCrop:!0,cropFixedBox:!0,cropOutputType:`png`,cropPreviews:{},cropVisible:!1,cropBeforelImage:``,cropAfterImage:``,cropLocalWidth:this.size,cropLocalHeight:this.size}},watch:{modelValue(e){this.cropDialogVisible=e,this.cropInit()},src(e){this.cropInit()}},computed:{cropAttrs(){return{info:!0,autoCrop:this.cropAutoCrop,fixedBox:this.cropFixedBox,autoCropWidth:this.cropLocalWidth,autoCropHeight:this.cropLocalHeight,outputType:this.cropOutputType}}},mounted(){},methods:{cropInit(){this.cropBeforelImage=this.src||``},cropDialoClose(){this.cropBeforelImage=``,this.cropPreviews=``,this.cropVisible=!1,this.cropDialogVisible=!1,this.$emit(`update:modelValue`,!1),this.$emit(`onClose`,!1)},cropDialogOpened(){this.$nextTick(()=>{this.cropVisible=!0})},cropSubmit(){this._submit_blob()},_submit_blob(){this.$refs.cvAvatartCropper.getCropBlob(e=>{this.$emit(`onSubmit`,{file:e})})},_submit_base64(){this.$refs.cvAvatartCropper.getCropData(e=>{let t=new Image;t.src=e,t.onload=async()=>{imageCompress(t)}})},cropRotateRefresh(){},cropRotateLeft(){this.$refs.cvAvatartCropper.rotateLeft()},cropRotateRight(){this.$refs.cvAvatartCropper.rotateRight()},cropChangeScale(e){e||=1,this.$refs.cvAvatartCropper.changeScale(e)},cropRealTime(e){this.cropPreviews=e}}},{__name:`UploadCrop`,setup(e){return(t,n)=>{let r=P(`el-button`),i=P(`el-tooltip`),a=P(`el-input`),o=P(`el-dialog`),s=Ne(`loading`);return A(),b(o,{title:e.title,modelValue:t.cropDialogVisible,"onUpdate:modelValue":n[7]||=e=>t.cropDialogVisible=e,width:`800px`,"append-to-body":``,onOpened:t.cropDialogOpened,onClose:t.cropDialoClose},{footer:z(()=>[T(r,{type:`primary`,onClick:t.cropSubmit,loading:e.loading,disabled:e.loading},{default:z(()=>[...n[12]||=[w(`提 交`,-1)]]),_:1},8,[`onClick`,`loading`,`disabled`])]),default:z(()=>[B((A(),S(`div`,Ko,[C(`div`,qo,[t.cropVisible?(A(),b(I(Go),E({key:0,ref:`cvAvatartCropper`,img:t.cropBeforelImage},t.cropAttrs,{onRealTime:t.cropRealTime}),null,16,[`img`,`onRealTime`])):x(``,!0),C(`div`,Jo,[N(t.$slots,`default`),T(i,{effect:`dark`,content:`重置`,placement:`top`},{default:z(()=>[T(r,{icon:`ElIconRefresh`,onClick:n[0]||=e=>t.cropRotateRefresh()})]),_:1}),T(i,{effect:`dark`,content:`放大`,placement:`top`},{default:z(()=>[T(r,{icon:`ElIconZoomIn`,onClick:n[1]||=e=>t.cropChangeScale(1)})]),_:1}),T(i,{effect:`dark`,content:`缩小`,placement:`top`},{default:z(()=>[T(r,{icon:`ElIconZoomOut`,onClick:n[2]||=e=>t.cropChangeScale(-1)})]),_:1}),T(i,{effect:`dark`,content:`向左旋转`,placement:`top`},{default:z(()=>[T(r,{icon:`ElIconRefreshLeft`,onClick:n[3]||=e=>t.cropRotateLeft()})]),_:1}),T(i,{effect:`dark`,content:`向右旋转`,placement:`top`},{default:z(()=>[T(r,{icon:`ElIconRefreshRight`,onClick:n[4]||=e=>t.cropRotateRight()})]),_:1})]),C(`div`,Yo,[T(a,{size:`small`},{prepend:z(()=>[...n[8]||=[w(`X\xA0坐标`,-1)]]),_:1}),T(a,{size:`small`},{prepend:z(()=>[...n[9]||=[w(`Y\xA0坐标`,-1)]]),_:1})]),C(`div`,Xo,[T(a,{size:`small`,modelValue:t.cropLocalWidth,"onUpdate:modelValue":n[5]||=e=>t.cropLocalWidth=e},{prepend:z(()=>[...n[10]||=[w(`宽度`,-1)]]),_:1},8,[`modelValue`]),T(a,{size:`small`,modelValue:t.cropLocalHeight,"onUpdate:modelValue":n[6]||=e=>t.cropLocalHeight=e},{prepend:z(()=>[...n[11]||=[w(`高度`,-1)]]),_:1},8,[`modelValue`])])]),C(`div`,Zo,[C(`div`,{class:`cv-upload-crop-preview`,innerHTML:t.cropPreviews.html},null,8,Qo)])])),[[s,e.loading]])]),_:3},8,[`title`,`modelValue`,`onOpened`,`onClose`])}}})},props:{modelValue:{type:[String],default:``},initValue:{type:[String],default:``},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>[`png`,`jpg`,`jpeg`,`gif`]},showSize:{type:Number,default:120},crop:{type:[Boolean],default:!0},signatureParam:{type:[Object],default:()=>({save_sign:`avatar`})}},data(){return{localValue:``,localList:[],upAccept:`image/*`}},computed:{localRef(){return`cvUploadAvatar`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,accept:this.upAccept,limit:1,multiple:!1,drag:!1,disabled:this.upIngLoading,showFileList:!1}},showStyle(){return{width:this.showSize+`px`,height:this.showSize+`px`,lineHeight:this.showSize+`px`}}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.localValue=this.initValue||``},cropDialogOpen(){this.cropShow=!0,this.$nextTick(()=>{this._init_parse()})},initBeforeUpload(e){if(!this._commonBeforeUpload(e))return this.upIngLoading=!1,!1;if(this.crop){let t=new FileReader;t.readAsDataURL(e),t.onload=()=>{this.localValue=t.result},this.$refs.cvUploadAvatar.clearFiles()}},async onHttpRequest(e){let{file:t}=e;this.upIngLoading=!0,await ba(t,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(e=>{this.$nextTick(()=>{this.$emit(`update:modelValue`,e.full_path),this.$emit(`update:initValue`,e.cdn_full_path)}),v.success(`上传成功`),this.upIngLoading=!1,this.cropShow=!1}).catch(()=>{this.upIngLoading=!1})}}},es=[`src`];function ts(e,t,n,r,i,a){let o=P(`upload-tip`),s=P(`cv-icons`),c=P(`el-button`),l=P(`el-tooltip`),u=P(`el-upload`),d=P(`upload-crop`);return A(),S(`div`,{class:`cv-upload-avatar-wrap`,onClick:t[2]||=(...e)=>a.cropDialogOpen&&a.cropDialogOpen(...e)},[n.initValue?x(``,!0):(A(),S(`div`,{key:0,class:`cv-upload-avatar-box cv-upload-avatar-empty`,style:k(a.showStyle)},[...t[3]||=[C(`div`,{class:`cv-upload-avatar__text`},`上传头像`,-1)]],4)),n.initValue?(A(),S(`div`,{key:1,class:`cv-upload-avatar-box`,style:k(a.showStyle)},[C(`img`,{class:`cv-upload-avatar__img`,src:n.initValue},null,8,es)],4)):x(``,!0),T(o,E(e.tipAttr,{fileUnit:`张`,multiple:!1,limit:1}),null,16),n.crop?(A(),b(d,{key:2,modelValue:e.cropShow,"onUpdate:modelValue":t[0]||=t=>e.cropShow=t,title:`修改头像`,size:n.showSize,onOnSubmit:a.onHttpRequest,onOnClose:t[1]||=t=>e.upIngLoading=!1,loading:e.upIngLoading,src:i.localValue},{default:z(()=>[T(u,E(a.handlerAttr,{"before-upload":a.initBeforeUpload,"http-request":e.initHttpRequest}),{default:z(()=>[T(l,{effect:`dark`,content:`选择图片`,placement:`top`},{default:z(()=>[T(c,{style:{"margin-right":`10px`},loading:e.upIngLoading,disabled:e.upIngLoading},{default:z(()=>[T(s,{type:`actionPlus`,size:`14`,style:{"margin-right":`10px`}}),t[4]||=w(` 选择 `,-1)]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1},16,[`before-upload`,`http-request`])]),_:1},8,[`modelValue`,`size`,`onOnSubmit`,`loading`,`src`])):x(``,!0)])}var ns=H($o,[[`render`,ts]]);function rs(e){return e?typeof e==`string`||typeof e==`number`?[e]:Object.prototype.toString.call(e)===`[object Object]`?[]:[...e]:[]}function is(e,t){let n=[];Array.isArray(e)&&e.length>0&&n.push(...e),Array.isArray(t)&&t.length>0&&n.push(...t),typeof t==`string`&&n.push(t);let r=[];for(let e in n){let t=n[e],i=Object.prototype.toString.call(t);i===`[object String]`?r.push(t):i===`[object Object]`&&t.url&&r.push(t.url)}return r}var as={title:`图片上传`,name:`cvUploadImage`,mixins:[da],components:{},props:{modelValue:{type:[String,Number,Array,Object],default:``},initValue:{type:[String,Number,Array],default:()=>``},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>[`png`,`jpg`,`jpeg`,`gif`]},showSize:{type:Number,default:150},showBig:{type:[Boolean],default:!1},crop:{type:[Boolean],default:!1},galleryLabel:{type:String,default:``},lazy:{type:Boolean,default:!0},drag:{type:Boolean,default:!1},signatureParam:{type:[Object],default:()=>({save_sign:`image`})}},data(){return{localValue:[],localList:[],previewShow:!1,previewTitle:``,previewUrl:``,upAccept:`image/*`}},computed:{localRef(){return`cvUploadImage`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,accept:this.upAccept,limit:parseInt(this.limit),multiple:this.multiple,drag:!!this.drag,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!(this.localList.length>=this.limit)},showStyle(){let e=this.showSize+`px`;return(this.showBig||this.drag)&&(e=this.showSize*2+`px`),{width:e,height:this.showSize+`px`,lineHeight:this.showSize+`px`}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue==`string`&&this.modelValue.includes(`,`)){let e=String(this.modelValue).split(`,`).map(e=>e.trim());this.localValue=rs(e)}else this.localValue=rs(this.modelValue);else this.localValue=[]},_init_parse_list(){this.initValue?this.localList=fa(this.initValue):this.localList=[]},initOnChange(e,t){},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){let{file:t}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await ba(t,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(e=>{this.$nextTick(()=>{this.updateValue(e.filelog_id,e.cdn_full_path)}),v.success(`上传成功`),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},updateValue(e,t){if(this.multiple){let t=is(this.localValue,e).join(`,`);this.$emit(`update:modelValue`,t)}else this.$emit(`update:modelValue`,e);if(this.multiple){let e=is(this.localList,t);this.$emit(`update:initValue`,e)}else this.$emit(`update:initValue`,t)},handleItemPreview(e,t){e.raw,e.type.includes(`image`)?(this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0):window.open(e.url)},doRemove(e){this.multiple?(this.localValue.splice(e,1),this.localList.splice(e,1)):(this.localValue=``,this.localList=[]),this.updateValue(null,null)},handleItemRemove(e,t){if(this.beforeRemove&&typeof this.beforeRemove==`function`){let e=this.multiple?this.localValue[t]:this.localValue,n=this.beforeRemove(e,this.localValue);n&&n.then?n.then(()=>{this.doRemove(t)},()=>{}):n!==!1&&this.doRemove(t)}else this.doRemove(t)},handleItemEdit(e,t){ie.prompt(`请输入文件地址`,`编辑`,{confirmButtonText:`OK`,cancelButtonText:`Cancel`,inputValue:e.url||``,inputErrorMessage:`格式不正确`}).then(({value:e})=>{let n=e.split(`/`).pop(),r=n.split(`.`).pop().toLowerCase();if(!this.fileType.includes(r)){let e=this.fileType.join(`、`);return v.error(`文件格式错误,请填写类型,如:${e} 格式文件`),!1}let i=Qr(r);if(!i)return v.error(`文件格式错误`),!1;qr(e)||this.mergeAttrs?.baseDomain&&(e=this.mergeAttrs?.baseDomain+e);let a={name:n,status:`success`,type:i,uid:Date.now(),url:e};this.localList[t]=a}).catch(()=>{})},handleItemCrop(e,t){}}},os={class:`cv-upload-image cv-upload-common`},ss={class:`cv-upload-list-box el-upload-list el-upload-list--picture-card`},cs=[`tabindex`],ls={class:`el-upload-list__item-status-label`},us={class:`el-upload-list__item-actions`},ds=[`onClick`],fs={class:`el-upload-list__item-delete`},ps={class:`el-upload-list__item-delete`},ms=[`onClick`],hs={style:{margin:`0 auto`}},gs=[`src`];function _s(e,t,n,r,i,a){let o=P(`el-image`),s=P(`cv-icons`),c=P(`el-upload`),l=P(`upload-tip`),u=P(`el-dialog`),d=Ne(`loading`);return A(),S(`div`,os,[C(`div`,ss,[(A(!0),S(y,null,M(i.localList,(e,t)=>(A(),S(`section`,{class:`el-upload-list__item is-success`,key:t,tabindex:t,style:k(a.showStyle)},[T(o,{class:`el-upload-list__item-thumbnail`,lazy:n.lazy,src:e.url,style:k(a.showStyle),fit:`contain`},null,8,[`lazy`,`src`,`style`]),C(`label`,ls,[T(s,{type:`actionCheck`,color:`#ffffff`,size:`12`})]),C(`span`,us,[C(`span`,{class:`el-upload-list__item-preview`,onClick:t=>a.handleItemPreview(e)},[T(s,{type:`ElIconZoomIn`,size:`20`})],8,ds),C(`span`,fs,[T(s,{type:`actionDelete`,size:`20`,onClick:n=>a.handleItemRemove(e,t)},null,8,[`onClick`])]),C(`span`,ps,[T(s,{type:`ElIconEdit`,size:`20`,onClick:n=>a.handleItemEdit(e,t)},null,8,[`onClick`])]),n.crop?(A(),S(`span`,{key:0,class:`el-upload-list__item-preview`,onClick:t=>a.handleItemCrop(e)},[T(s,{type:`ElIconCrop`,size:`20`})],8,ms)):x(``,!0)])],12,cs))),128)),a.showUpload?(A(),b(c,E({key:0,class:`cv-upload-common-handle`},a.handlerAttr,{"file-list":i.localList,"before-upload":a.initBeforeUpload,"http-request":a.initHttpRequest,"on-change":a.initOnChange,"on-exceed":e.initOnExceed,style:a.showStyle}),{default:z(()=>[B((A(),S(`div`,{class:`cv-upload-common__ing`,style:k(a.showStyle)},[n.drag?(A(),S(y,{key:0},[T(s,{type:`arrowUploadFilled`,size:`24`}),t[1]||=C(`div`,{class:`el-upload__text`},[w(` 将文件拖到此处,或 `),C(`em`,null,`点击上传`)],-1)],64)):(A(),b(s,{key:1,type:`actionPlus`,size:n.showSize/3},null,8,[`size`]))],4)),[[d,e.upIngLoading]])]),_:1},16,[`file-list`,`before-upload`,`http-request`,`on-change`,`on-exceed`,`style`])):x(``,!0)]),T(l,E(e.tipAttr,{fileUnit:`张`}),null,16),T(u,{modelValue:i.previewShow,"onUpdate:modelValue":t[0]||=e=>i.previewShow=e,title:i.previewTitle,"append-to-body":``},{default:z(()=>[C(`div`,hs,[C(`img`,{width:`100%`,src:i.previewUrl,style:{"max-width":`300px`}},null,8,gs)])]),_:1},8,[`modelValue`,`title`])])}var vs=H(as,[[`render`,_s]]),ys={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 bs(e){return`https://10ui.cn/ions/type/${ys[e]}.svg`}var xs={name:`uploadList`,props:{files:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(e){return e.lastIndexOf(`.`)>-1&&bs[e.slice(e.lastIndexOf(`.`)+1).toLowerCase()]||bs.file},getSize(e){return e&&!isNaN(Number(e))?e:``},parsePercentage(e){return parseInt(e,10)},handleDownload(e){e.url},handleDelete(e,t){this.$confirm(`确认删除该文件吗? `).then(()=>{this.$emit(`remove`,e,t)}).catch(()=>{})}}},Ss=[`src`],Cs={class:`cv-upload-list__item-content-action`};function ws(e,t,n,r,i,a){let o=P(`el-link`);return A(),b(ge,{class:`cv-upload-file-list el-upload-list el-upload-list--text`,name:`el-list`,tag:`ul`},{default:z(()=>[(A(!0),S(y,null,M(n.files,(e,r)=>(A(),S(`li`,{key:e.uid,class:`el-upload-list__item cv-upload-list__item-content`},[T(o,{href:e.url,underline:!1,target:`_blank`},{default:z(()=>[C(`img`,{src:a.getExtension(e.name),class:`el-upload-list__item-content-name-icon`},null,8,Ss),C(`span`,null,F(e.name),1)]),_:2},1032,[`href`]),C(`div`,Cs,[T(o,{underline:!1},{default:z(()=>[w(F(a.getSize(e.size)),1)]),_:2},1024),n.isCanDownload?(A(),b(o,{key:0,underline:!1,onClick:t=>a.handleDownload(e)},{default:z(()=>[...t[0]||=[w(`下载`,-1)]]),_:1},8,[`onClick`])):x(``,!0),!n.disabled&&n.isCanDelete?(A(),b(o,{key:1,underline:!1,onClick:t=>a.handleDelete(r,e),type:`danger`},{default:z(()=>[...t[1]||=[w(` 删除 `,-1)]]),_:1},8,[`onClick`])):x(``,!0)])]))),128))]),_:1})}var Ts={title:`文件上传`,inheritAttrs:!1,name:`cvUploadFile`,mixins:[da],components:{uploadList:H(xs,[[`render`,ws]])},props:{modelValue:{type:[String,Object,Array],default:``},initValue:{type:[String,Object,Array],default:``},fileSize:{type:[Number],default:5},fileType:{type:[Array],default:[`txt`,`png`,`jpg`,`xlsx`,`xls`]},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5},disabled:Boolean,isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0},isCanUploadSame:{type:Boolean,default:!0}},data(){return{localValue:[],localList:[]}},computed:{localRef(){return`cvUploadFile`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,limit:parseInt(this.limit),multiple:this.multiple,drag:!1,disabled:this.upIngLoading,showFileList:!0}},list(){let e=1;return this.modelValue?(Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]).map(t=>(typeof t==`string`&&(t={name:t,url:t}),t.uid=t.uid||new Date().getTime()+ e++,t)):[]}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.initValue?this.localList=fa(this.initValue):this.localList=[]},initOnChange(e,t){this.localList=t},initBeforeUpload(e){return this._commonBeforeUpload(e)?!this.isCanUploadSame&&this.localList.some(t=>t.name+t.size===e.name+e.size)?(this.$message.error(`此文件已上传!`),!1):!0:!1},upFileError(e){this.$message.error(`上传失败, 请重试`),this.$emit(`error`,e)},upFileSuccess(e,t){this.upResponseFn&&typeof this.upResponseFn==`function`&&(e=this.upResponseFn(e,t,this.localList)),this.multiple?this.$emit(`update:modelValue`,[...this.localList,e]):this.$emit(`update:modelValue`,e),this.$emit(`success`,e,this.localList)},handleRemove(e,t){if(this.beforeRemove&&typeof this.beforeRemove==`function`){let e=this.beforeRemove(this.localList[t],this.localList);e&&e.then?e.then(()=>{this._do_remove(t)},()=>{}):e!==!1&&this._do_remove(t)}else this._do_remove(t)},_do_remove(e){if(this.$emit(`remove`,this.list[e],this.list),this.localList.splice(e,1),this.multiple){let t=[...this.list];t.splice(e,1),this.$emit(`update:modelValue`,t||[])}else this.$emit(`update:modelValue`,null)}}},Es={class:`cv-upload-file`};function Ds(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-upload`),c=P(`upload-tip`),l=P(`upload-list`);return A(),S(`div`,Es,[T(s,E({class:`cv-upload-file-uploader`},a.handlerAttr,{"file-list":i.localList,"onUpdate:fileList":t[0]||=e=>i.localList=e,"before-upload":a.initBeforeUpload,"on-change":a.initOnChange,"on-exceed":e.initOnExceed,"on-error":a.upFileError,"on-success":a.upFileSuccess}),{default:z(()=>[T(o,{type:`primary`,icon:`ElIconUpload`},{default:z(()=>[...t[1]||=[w(`上传文件`,-1)]]),_:1})]),_:1},16,[`file-list`,`before-upload`,`on-change`,`on-exceed`,`on-error`,`on-success`]),T(c,E(e.tipAttr,{fileUnit:`个`}),null,16),T(l,{disabled:n.disabled,files:a.list,isCanDelete:n.isCanDelete,isCanDownload:n.isCanDownload,onRemove:a.handleRemove},null,8,[`disabled`,`files`,`isCanDelete`,`isCanDownload`,`onRemove`])])}var Os=H(Ts,[[`render`,Ds]]),ks={title:`视频上传`,name:`cvUploadVideo`,mixins:[da],components:{},props:{modelValue:{type:[String],default:``},initValue:{type:[String],default:``},fileSize:{type:[Number],default:10},fileType:{type:Array,default:[`mp4`,`mp3`]},showSize:{type:Number,default:360},signatureParam:{type:[Object],default:()=>({save_sign:`video`})}},data(){return{localValue:``,localList:``,previewShow:!1,previewTitle:``,previewUrl:``,upAccept:`video/*`}},computed:{localRef(){return`cvUploadVideo`+ +new Date+((Math.random()*1e3).toFixed(0)+``)},handlerAttr(){return{ref:this.localRef,action:`#`,accept:this.upAccept,limit:1,multiple:!1,drag:!0,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!this.localValue},showStyle(){return{width:this.showSize+`px`,height:this.showSize/5*3+`px`,lineHeight:this.showSize+`px`}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){this._init_parse_value(),this._init_parse_list()},methods:{_init_parse_value(){this.modelValue?this.localValue=rs(this.modelValue):this.localValue=``},_init_parse_list(){this.initValue?this.localList=fa(this.initValue):this.localList=``},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){let{file:t}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await ba(t,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(e=>{this.$nextTick(()=>{this.$emit(`update:modelValue`,e.full_path),this.$emit(`update:initValue`,e.cdn_full_path)}),ExtendMessage.success(`上传成功`),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},handleItemPreview(e,t){this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0},doRemove(e){this.localValue=``,this.localList=``,this.$emit(`update:modelValue`,``),this.$emit(`update:initValue`,``)},handleItemRemove(e,t){if(this.beforeRemove&&typeof this.beforeRemove==`function`){let e=this.multiple?this.localValue[t]:this.localValue,n=this.beforeRemove(e,this.localValue);n&&n.then?n.then(()=>{this.doRemove(t)},()=>{}):n!==!1&&this.doRemove(t)}else this.doRemove(t)}}},As={class:`cv-upload-video`},js={class:`cv-upload-list-box el-upload-list el-upload-list--picture-card`},Ms=[`tabindex`],Ns=[`src`],Ps={class:`el-upload-list__item-status-label`},Fs={class:`el-upload-list__item-actions`},Is=[`onClick`],Ls={class:`el-upload-list__item-delete`},Rs={class:`el-upload-list__item-delete`},zs={key:0,style:{width:`500px`,height:`300px`,margin:`0 auto`}},Bs=[`src`];function Vs(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-progress`),c=P(`el-upload`),l=P(`upload-tip`),u=P(`el-dialog`);return A(),S(`div`,As,[C(`div`,js,[i.localList?(A(!0),S(y,{key:0},M(i.localList,(t,n)=>(A(),S(`section`,{class:`el-upload-list__item is-success`,key:n,tabindex:n,style:k(a.showStyle)},[C(`video`,{class:`el-upload-list__item-thumbnail`,autoplay:!1,src:t.url,style:k(a.showStyle)},` 您的浏览器不支持视频播放 `,12,Ns),C(`label`,Ps,[T(o,{type:`actionCheck`,color:`#ffffff`,size:`12`})]),C(`span`,Fs,[C(`span`,{class:`el-upload-list__item-preview`,onClick:e=>a.handleItemPreview(t)},[T(o,{type:`ElIconVideoPlay`,size:`20`})],8,Is),C(`span`,Ls,[T(o,{type:`actionDelete`,size:`20`,onClick:e=>a.handleItemRemove(t,n)},null,8,[`onClick`])]),C(`span`,Rs,[T(o,{type:`ElIconEdit`,size:`20`,onClick:r=>e.handleItemEdit(t,n)},null,8,[`onClick`])])])],12,Ms))),128)):x(``,!0),a.showUpload?(A(),b(c,E({key:1,class:`cv-upload-handler`},a.handlerAttr,{"before-upload":a.initBeforeUpload,"http-request":a.initHttpRequest,style:a.showStyle}),{default:z(()=>[e.upIngPercent>0?(A(),b(s,{key:0,percentage:e.upIngPercent,style:{"margin-top":`20px`},type:`circle`},null,8,[`percentage`])):(A(),S(`div`,{key:1,class:`cv-upload-video__ing`,style:k(a.showStyle)},[T(o,{type:`arrowUploadFilled`,size:`24`}),t[1]||=C(`div`,{class:`el-upload__text`},[w(` 将视频拖到此处,或 `),C(`em`,null,`点击上传`)],-1)],4))]),_:1},16,[`before-upload`,`http-request`,`style`])):x(``,!0)]),T(l,E(e.tipAttr,{fileUnit:`个`,limit:1}),null,16),T(u,{modelValue:i.previewShow,"onUpdate:modelValue":t[0]||=e=>i.previewShow=e,title:i.previewTitle,"append-to-body":``},{default:z(()=>[i.previewShow?(A(),S(`div`,zs,[C(`video`,{autoplay:!0,src:i.previewUrl,controls:`controls`,style:{width:`500px`,height:`300px`}},` 您的浏览器不支持视频播放 `,8,Bs)])):x(``,!0)]),_:1},8,[`modelValue`,`title`])])}var Hs=H(ks,[[`render`,Vs]]),Us={name:`cvUploadOss`,mixins:[{emits:[`get-unlist`,`on-close`,`on-update`,`on-delete`],props:{modelValue:{type:Array,default:()=>[]},model:{type:String,default:``},accept:{type:String,default:``},multiple:{type:Boolean,default:!1}},data(){return{audioInfo:{},file:null,fileList:[],fileHash:``,tempCheckpoint:null,uploadId:``,uploadStatus:null,showAudio:!1,percentage:0,uploadName:``,client:null,year:new Date().getFullYear(),uploadDisabled:!0,resumeDisabled:!0,pauseDisabled:!0,dialogVisible:!1,isDoing:!1,unList:[],fileMap:{},map_max_key:0,partSize:1024*1024,parallel:4,checkpoints:{}}},watch:{dialogVisible:{handler(e){e||(this.fileList=[],this.$refs.upload.uploadFiles=[])}},fileList:{handler(e){if(e.length){this.dialogVisible=!0;let t=[],n=[];e.forEach(e=>{e.raw.name.indexOf(`.`)===-1&&(e.errMsg=`不支持此格式上传`),e.percentage===100?t.push(e):n.push(e)}),t.length===e.length?(this.pauseDisabled=!0,this.isDoing=!0):this.isDoing=!1,this.unList=n}},deep:!0}},mounted(){window.addEventListener(`online`,this.resumeUpload)},methods:{filterSize:ha,handleExceed(){this.$confirm(`上传文件数量不能超过100个,请重新选择!`,`操作提示`,{confirmButtonText:`确 定`,cancelButtonText:`取 消`,type:`warning`}).then(()=>{this.fileList=[],this.dialogVisible=!1}).catch(()=>{this.fileList=[]})},handleDeleteChangeFile(e){this.fileList.splice(e,1),this.fileList.length||(this.dialogVisible=!1)},fileTypeIcon(e){let{type:t}=e.raw,n=t.indexOf(`video`)!==-1,r=t.indexOf(`image`)!==-1,i=t.indexOf(`audio`)!==-1,a=t.indexOf(`zip`)!==-1,o=t.indexOf(`wordprocessingml`)!==-1,s=t.indexOf(`pdf`)!==-1,c=t.indexOf(`text`)!==-1,l=t.indexOf(`sheet`)!==-1;return n?`MP4`:r?`JPG1`:i?`mp3-1`:a?`yasuo`:o?`DOCX`:s?`wenjianleixing-biaozhuntu-PDFwendang`:c?`div-1`:l?`excel1`:`weizhiwenjian`},handleClose(){this.$emit(`on-close`),this.isDoing?this.dialogVisible=!1:this.$confirm(`正在上传文件,关闭后上传文件会丢失!是否继续?`,`操作提示`,{confirmButtonText:`确 定`,cancelButtonText:`取 消`,type:`warning`}).then(()=>{this.$emit(`get-unlist`),this.fileList.forEach(e=>{e.client&&e.percentage<100&&e.client.cancel()}),this.dialogVisible=!1}).catch(()=>{})},async handleBeforeUpload(e){},handleStopChangeFile(e,t){t.isPlay=!t.isPlay,this.fileList.splice(e,1,t),t.isPlay?this.resumeMultipartUpload(t):t.client.cancel()},async starUpload(){this.uploadDisabled=!0,this.pauseDisabled=!1,this.multipartUpload()},async multipartUpload(){if(!this.file){v.error(`请选择文件`);return}this.fileList.forEach(async e=>{e.isLoading=!0,await this.ossUploadHandle(e,this.fileList)})},async resumeUpload(){this.pauseDisabled=!1,this.uploadDisabled=!0,this.resumeDisabled=!0,await this.resumeMultipartUpload()},stopUpload(){this.resumeDisabled=!1,this.pauseDisabled=!0,this.fileList.forEach(e=>{e.client.cancel(),e.isPlay=!1})},async change(e,t){this.fileMap[e]=t,this.map_max_key=e},async handle_network_speed_change(e,t,n){e-this.map_max_key>=1e4&&(this.fileMap={});for(let r=e;r<=t;r++){let e=await this.fileMap[r];e?await this.change(r,e+n):await this.change(r,n)}},handle_network_speed(e,t,n){let r=e.rt/1e3,i=new Date(e.headers.date).getTime(),a=i-r,o=parseInt(t/r);return n===0&&(o=0),o===0||this.handle_network_speed_change(a,i,o),o?ha(o):0},async resetUpload(e,t){JSON.stringify(e).indexOf(`Error`)!==-1&&(t.client&&t.client.cancel(),t.client=await va(this.signatureType,this.apiFunc),await this.resumeMultipartUpload(t))},async resumeMultipartUpload(e){if(e){let{tempCheckpoint:t}=e;this.resumeUploadFile(e,t)}else Object.values(this.checkpoints).forEach(e=>{let{uploadId:t}=e,n=this.fileList.findIndex(e=>e.upload===t),r=this.fileList[n];this.resumeUploadFile(r,e)})},async resumeUploadFile(e,t){let{uploadId:n,file:r,name:i}=t;try{let{raw:a,percentage:o}=e;e.partSize=0,o<100&&a.name.indexOf(`.`)!==-1&&e.client.multipartUpload(n,r,{parallel:this.parallel,partSize:this.partSize,progress:async(t,n,r)=>{await this.onUploadProgress(e,t,n,r,i)},checkpoint:t}).then(()=>{delete this.checkpoints[t.uploadId],this.$emit(`update:modelValue`,this.fileList),this.resumeDisabled=!0,this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1),this.onCreatePanFile(e)}).catch(async t=>{await this.resetUpload(t,e)})}catch{}},async onUploadProgress(e,t,n,r,i){n&&(this.checkpoints[n.uploadId]=n,e.speed=this.handle_network_speed(r,this.partSize,t),e.tempCheckpoint=n,e.abortCheckpoint=n,e.upload=n.uploadId),e.isPlay=!0,e.isPlay&&(e.isLoading=!1),e.uploadName=i,e.percentage=Number((t*100).toFixed(2))},async ossUploadHandle(e){let t={pass:!0,filePath:``};try{let{raw:t,percentage:n}=e,r=t,i=await va(this.signatureType,this.apiFunc,{},{secure:!0});if(this.signatureType==`aliyun_oss_type1`){if(e.client=i,e.partSize=0,n<100&&t.name.indexOf(`.`)!==-1){let t=i.dir+r.name;await e.client.multipartUpload(t,r,{parallel:this.parallel,partSize:this.partSize,progress:async(n,r,i)=>{await this.onUploadProgress(e,n,r,i,t)}}).then(()=>{this.$emit(`upload:modelValue`,this.fileList),this.resumeDisabled=!0,this.onCreatePanFile(e),this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1)}).catch(async e=>{})}}else this.signatureType==`aliyun_oss_type2`&&ya(r,i)}catch(e){t={...e,pass:!1,filePath:``}}return t},getToday(){let e=new Date;return`${e.getFullYear()}${e.getMonth()+1}${e.getDate()}${e.getHours()}${e.getMinutes()}${e.getSeconds()}`},handleChange(e,t){t.forEach(e=>{e.client=null,e.isPlay=!1,e.isLoading=!1,e.abortCheckpoint=!1}),this.fileList=t,this.file=e.raw,this.uploadDisabled=!1,this.pauseDisabled=this.resumeDisabled=!0},handleDeleteFile(e){let t=e.indexOf(this.model);e.substring(t,e.length),this.$emit(`on-delete`),this.fileList=[],v.success(`删除成功`)},async onCreatePanFile(e){await this.getParams(e),this.$emit(`on-update`)},handleMediaRes(e){return{image:async function(e){return new Promise(t=>{var n=new FileReader;n.onload=function(e){var n=e.target.result,r=new Image;r.onload=function(){t({Width:this.width,Height:this.height})},r.src=n},n.readAsDataURL(e)})},audio:async function(e){return new Promise(t=>{var n=new FileReader;n.onload=function(e){var n=e.target.result,r=new Audio;r.onloadeddata=function(){let e=r.duration;t({Duration:e*1e3})},r.src=n},n.readAsDataURL(e)})},video:async function(e){return new Promise(t=>{var n=URL.createObjectURL(e);let r=document.createElement(`video`);r.src=n,r.onloadeddata=function(){t({CoverImg:``,Duration:this.duration*1e3,Width:this.videoWidth,Height:this.videoHeight})}})}}[e]},captureImage(e,t){return t||=`3000 `,e+`?x-oss-process=video/snapshot,t_`+t+`,f_jpg`},async getParams(e){let{type:t}=e.raw,n=t.indexOf(`video`)!==-1,r=t.indexOf(`image`)!==-1,i=t.indexOf(`audio`)!==-1,a=``;n?a=`video`:r?t.indexOf(`adobe`)===-1&&(a=`image`):i&&(a=`audio`);let o;return(n||r||i)&&a&&(o=await this.handleMediaRes(a)(e.raw)),{ResTitle:e.name,ResDescribe:``,OssKey:e.uploadName,ContentType:t||`application/octet-stream`,ContentLength:e.size,...o}}}}]},Ws={class:`oss-upload`},Gs={class:`cv-upload-task-hd-title`},Ks={class:`cv-upload-task-hd-num`},qs={class:`cv-upload-task-opts`},Js={class:`cv-upload-task-lists`},Ys={class:`cv-upload-task-item-name`},Xs={class:`name`},Zs={class:`file-name-item`},Qs={key:0,class:`speed`},$s={key:1,class:`speed`},ec={key:2,class:`success`},tc={class:`total`},nc={key:0,class:`name error`},rc={class:`cv-upload-task-item-tool`},ic=[`onClick`],ac=[`onClick`];function oc(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-upload`),c=P(`el-progress`),l=P(`cv-icons`),u=P(`el-dialog`);return A(),S(`div`,Ws,[T(s,{ref:`upload`,action:``,"show-file-list":!1,multiple:``,"on-change":e.handleChange,"before-upload":e.handleBeforeUpload,"auto-upload":!1,limit:100,"on-exceed":e.handleExceed,accept:e.accept},{default:z(()=>[T(o,{type:`primary`,icon:`ElIconUpload`,round:``},{default:z(()=>[...t[1]||=[w(`上 传`,-1)]]),_:1})]),_:1},8,[`on-change`,`before-upload`,`on-exceed`,`accept`]),T(u,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[0]||=t=>e.dialogVisible=t,width:`650px`,height:`500`,"destroy-on-close":``,"close-on-click-modal":!1,"before-close":e.handleClose,style:{height:`500px`}},{header:z(()=>[C(`div`,Gs,[t[2]||=C(`span`,null,`上传`,-1),C(`span`,Ks,F(e.fileList.length-e.unList.length)+`/`+F(e.fileList.length),1)])]),default:z(()=>[C(`div`,qs,[T(o,{type:`primary`,icon:`ElIconVideoPlay`,disabled:e.uploadDisabled,onClick:e.starUpload},{default:z(()=>[...t[3]||=[w(`开始上传`,-1)]]),_:1},8,[`disabled`,`onClick`]),T(o,{type:`success`,icon:`ElIconRefreshRight`,disabled:e.resumeDisabled,onClick:e.resumeUpload},{default:z(()=>[...t[4]||=[w(`继续`,-1)]]),_:1},8,[`disabled`,`onClick`]),T(o,{type:`danger`,icon:`ElIconVideoPause`,disabled:e.pauseDisabled,onClick:e.stopUpload},{default:z(()=>[...t[5]||=[w(`暂停`,-1)]]),_:1},8,[`disabled`,`onClick`])]),C(`div`,Js,[(A(!0),S(y,null,M(e.fileList,(t,n)=>(A(),S(`div`,{class:`cv-upload-task-item-box`,key:n},[C(`div`,Ys,[C(`div`,Xs,[C(`span`,Zs,F(n+1)+`.`+F(t.name),1),t.isLoading&&!t.isPlay?(A(),S(`span`,Qs,`准备就绪`)):x(``,!0),t.isPlay&&t.percentage!==100?(A(),S(`span`,$s,F(t.speed)+`/s`,1)):x(``,!0),t.percentage===100?(A(),S(`span`,ec,`完成`)):x(``,!0),C(`div`,tc,F(e.filterSize(t.size)),1)]),t.errMsg?(A(),S(`span`,nc,F(t.errMsg),1)):x(``,!0),t.percentage<100&&!t.errMsg?(A(),b(c,{key:1,percentage:t.percentage},null,8,[`percentage`])):(A(),b(c,{key:2,percentage:t.percentage,status:t.errMsg?`exception`:`success`},null,8,[`percentage`,`status`]))]),C(`div`,rc,[!t.percentage||0<t.percentage<100&&!t.isPlay?(A(),S(`span`,{key:0,class:`icon delete`,onClick:t=>e.handleDeleteChangeFile(n)},[T(l,{type:`ElIconClose`})],8,ic)):x(``,!0),t.percentage&&t.percentage!==100?(A(),S(`span`,{key:1,class:D([`icon`,t.isPlay?`delete`:`success`]),onClick:r=>e.handleStopChangeFile(n,t)},[t.isPlay?(A(),b(l,{key:0,type:`ElIconVideoPause`})):(A(),b(l,{key:1,type:`ElIconCaretRight`}))],10,ac)):x(``,!0)])]))),128))])]),_:1},8,[`modelValue`,`before-close`])])}var sc=H(Us,[[`render`,oc],[`__scopeId`,`data-v-9c3ea43c`]]);ns.install=function(e){e.component(ns.name,ns)},vs.install=function(e){e.component(vs.name,vs)},Os.install=function(e){e.component(Os.name,Os)},Hs.install=function(e){e.component(Hs.name,Hs)},sc.install=function(e){e.component(sc.name,sc)};var cc={name:`cvTabsJump`,props:{tabPosition:{type:String,default:`top`}},provide(){return{addChildComponents:e=>{this.childComponents.push(e)},clearChildClass:()=>{this.childComponents.map(e=>{e.className=null})}}},data(){return{childComponents:[]}},computed:{tabPositionClass(){return this.tabPosition==`left`?`left`:this.tabPosition==`right`?`right`:this.tabPosition==`bottom`?`bottom`:`top`}},created(){},mounted(){}},lc={class:`tabs-header`};function uc(e,t,n,r,i,a){return A(),S(`div`,{class:D([`cv-tabs-jump`,a.tabPositionClass])},[C(`div`,lc,[N(e.$slots,`default`)])],2)}var dc=H(cc,[[`render`,uc]]),fc={name:`cvTabPane`,emits:[`click`],inject:[`addChildComponents`,`clearChildClass`],data(){return{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`)}}},pc={key:1};function mc(e,t,n,r,i,a){return B((A(),S(`div`,{class:D([`cv-tab-pane`,i.className]),onClick:t[0]||=(...e)=>a.handleClick&&a.handleClick(...e)},[e.$slots.label?N(e.$slots,`label`,{key:0}):(A(),S(`span`,pc,F(n.label),1))],2)),[[L,i.isshow]])}var hc=H(fc,[[`render`,mc]]);dc.install=function(e){e.component(dc.name,dc)},hc.install=function(e){e.component(hc.name,hc)};var gc={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(){return{localCode:``}},watch:{modelValue(e){this.localCode=e,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(e,t){for(let e=0;e<t;e++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum(e,t){return Math.floor(Math.random()*(t-e)+e)},randomColor(e,t){let n=this.randomNum(e,t),r=this.randomNum(e,t),i=this.randomNum(e,t);return`rgb(`+n+`,`+r+`,`+i+`)`},drawPic(){let e=document.getElementById(`cv-draw-captcha`).getContext(`2d`);e.textBaseline=`bottom`,e.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),e.fillRect(0,0,this.contentWidth,this.contentHeight);for(let t=0;t<this.localCode.length;t++)this.drawText(e,this.localCode[t],t);this.drawLine(e),this.drawDot(e)},drawText(e,t,n){e.fillStyle=this.randomColor(this.colorMin,this.colorMax),e.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+`px SimHei`;let r=(n+1)*(this.contentWidth/(this.localCode.length+1)),i=this.randomNum(this.fontSizeMax,this.contentHeight-5);var a=this.randomNum(-45,45);e.translate(r,i),e.rotate(a*Math.PI/180),e.fillText(t,0,0),e.rotate(-a*Math.PI/180),e.translate(-r,-i)},drawLine(e){for(let t=0;t<5;t++)e.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.stroke()},drawDot(e){for(let t=0;t<80;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),e.fill()}}},_c={class:`cv-draw-captcha`},vc=[`width`,`height`];function yc(e,t,n,r,i,a){return A(),S(`div`,_c,[C(`canvas`,{id:`cv-draw-captcha`,width:n.contentWidth,height:n.contentHeight,onClick:t[0]||=(...e)=>a.refreshCode&&a.refreshCode(...e)},null,8,vc)])}var bc=H(gc,[[`render`,yc]]),xc={name:`cvDrawQrcode`,data(){return{}}};function Sc(e,t,n,r,i,a){return A(),S(`div`,null,`二维码`)}var Cc=H(xc,[[`render`,Sc]]);bc.install=function(e){e.component(bc.name,bc)},Cc.install=function(e){e.component(Cc.name,Cc)};var wc={name:`cvTagBase`,mixins:[],components:{},emits:[`update:modelValue`,`exceed-max-length`],props:{...pe.props,modelValue:{type:[Array,String],default:()=>[]},closable:{type:Boolean,default:!1},disableTransitions:{type:Boolean,default:!1},effect:{type:String,default:`light`},color:{type:String,default:``},hit:{type:Boolean,default:!1},type:{type:[String],default:`primary`},size:{type:[String],default:`large`},disabled:{type:Boolean,default:!1},maxlength:{type:Number,default:3,validator:e=>e>0}},watch:{modelValue(e){this._init_parse_value()},localVal(e){this._parse_last()}},data(){return{localVal:``}},mounted(){this._init_parse_value()},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue==`string`&&this.modelValue.includes(`,`)){let e=String(this.modelValue).split(`,`).map(e=>e.trim());this.localVal=rs(e)}else this.localVal=rs(this.modelValue)},_parse_last(){let e=this.localVal,t=e.join(`,`);this.$emit(`update:modelValue`,t),e.length>=this.maxlength&&this.$emit(`exceed-max-length`,e.length)},addTag(){this.disabled||this.localVal.length>=this.maxlength||(this.localVal.push(`新标签`),this.$nextTick(()=>{let e=this.localVal.length,t=this.$refs[`newTag${e-1}`][0],n=document.createRange();n.selectNodeContents(t),window.getSelection().removeAllRanges(),window.getSelection().addRange(n),this._parse_last()}))},checkTag(e){if(this.disabled)return;let t=this.$refs[`newTag${e}`][0].innerText.trim();t.length==0?this.localVal.pop():this.localVal[e]=t,this._parse_last()},removeTag(e){this.disabled||(this.localVal.splice(e,1),this._parse_last())}}},Tc={class:`cv-tag-base`},Ec=[`contenteditable`,`onKeyup`,`onBlur`],Dc={key:1,class:`cv-tag-maxlength-hint`};function Oc(e,t,n,r,i,a){let o=P(`el-tag`),s=P(`cv-icons`);return A(),S(`div`,Tc,[(A(!0),S(y,null,M(i.localVal,(e,t)=>(A(),b(o,E({class:`cv-tag-content`},{ref_for:!0},{closable:!n.disabled&&n.closable,disableTransitions:n.disableTransitions,effect:n.effect,type:n.type,color:n.color,hit:n.hit,size:n.size},{key:t,onClose:e=>a.removeTag(t),disabled:n.disabled}),{default:z(()=>[C(`div`,{class:`cv-tag-item`,contenteditable:!n.disabled&&`plaintext-only`,ref_for:!0,ref:`newTag${t}`,onKeyup:We(e=>!n.disabled&&a.checkTag(t),[`enter`]),onBlur:e=>!n.disabled&&a.checkTag(t)},F(e),41,Ec)]),_:2},1040,[`onClose`,`disabled`]))),128)),!n.disabled&&i.localVal.length<n.maxlength?(A(),b(s,{key:0,type:`circlePlus`,size:`20`,onClick:t[0]||=e=>a.addTag()})):x(``,!0),!n.disabled&&i.localVal.length>=n.maxlength?(A(),S(`span`,Dc,`已达到最大数量 (`+F(n.maxlength)+`)`,1)):x(``,!0)])}var kc=H(wc,[[`render`,Oc]]);kc.install=function(e){e.component(kc.name,kc)};var Ac={name:`cvTransferTable`,props:{modelValue:{type:[Array],default(){return[]}},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((e,t)=>{try{e({total:0,data:null})}catch{t()}})}},titleTexts:{type:Array,default(){return[`待选项`,`已选项`]}},buttonTexts:{type:Array,default(){return[]}},queryTexts:{type:Array,default(){return[`查询`,`筛选`]}},leftColumns:{type:Array,default(){return[]}},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:`300px`},maxHeight:{type:String,default:`500px`},tableRowKey:{type:Function,default(e){return e&&e&&e.id}}},data(){return{leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}},watch:{modelValue(e){this.rightTableData=e}},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(e=>!this.rightTableData.some(t=>this.checkObjectIsEqual(e,t)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){let e=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(t=>e.some(e=>{let n=t[e],r=this.rightConditionTemp[e].trim();return n?String(n).indexOf(r)>-1:!0}))}return this.rightTableData}},methods:{handleLeftSelectionChange(e){this.leftSelection=e},handleRightSelectionChange(e){this.rightSelection=e},handleLeftRowClick(e){this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))||this.$refs.leftTable.toggleRowSelection(e)},handleRightRowClick(e){this.$refs.rightTable.toggleRowSelection(e)},handleSizeChange(e){this.pageSize=e,this.handlePaginationCallBack()},handleCurrentChange(e){this.pageIndex=e,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){let e={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,e).then(e=>{e&&Array.isArray(e.data)&&(this.leftTableData=e.data,this.totalSize=e.total),this.$nextTick(()=>{this.leftTableData.forEach(e=>{let t=this.rightTableData.some(t=>this.checkObjectIsEqual(t,e));this.$refs.leftTable.toggleRowSelection(e,t)})})})}},handleRowStyle({row:e}){return this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))?{color:`blue`}:{}},handleSelectable(e){return!this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))},addToRight(){for(let e of this.leftSelection)this.rightTableData.some(t=>this.checkObjectIsEqual(t,e))||this.rightTableData.push(e);this.$emit(`update:modelValue`,this.rightTableData)},addToLeft(){this.rightSelection.forEach(e=>{let t=this.rightTableData.findIndex(t=>this.checkObjectIsEqual(t,e));if(t!==-1){this.rightTableData.splice(t,1);let n=this.leftTableData.find(t=>this.checkObjectIsEqual(t,e));n&&this.$refs.leftTable.toggleRowSelection(n,!1)}}),this.$emit(`update:modelValue`,this.rightTableData)},onLeftQuerySubmit(){this.handlePaginationCallBack()},onRightQuerySubmit(){this.rightConditionTemp=JSON.parse(JSON.stringify(this.rightQueryCondition))},checkObjectIsEqual(e,t){return this.tableRowKey(e)===this.tableRowKey(t)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(let e in this.leftQueryCondition)this.leftQueryCondition[e]=void 0;for(let e in this.rightQueryCondition)this.rightQueryCondition[e]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},jc={class:`cv-transfer-table`},Mc={class:`transfer-panel`},Nc={class:`transfer-panel-header`},Pc={key:0},Fc={style:{padding:`5px`}},Ic={class:`transfer-buttons`},Lc={key:0,class:`button-text`},Rc={key:0,class:`button-text`},zc={class:`transfer-panel`},Bc={class:`transfer-panel-header`},Vc={key:0},Hc={style:{padding:`5px`}};function Uc(e,t,n,r,i,a){let o=P(`el-button`),s=P(`el-form-item`),c=P(`el-form`),l=P(`el-table-column`),u=P(`el-table`),d=P(`el-pagination`),f=P(`cv-icons`);return A(),S(`div`,jc,[C(`div`,Mc,[C(`p`,Nc,[C(`span`,null,F(n.titleTexts&&n.titleTexts[0]),1),C(`span`,null,F(i.leftSelection.length)+`/`+F(i.leftTableData.length),1)]),n.showQuery?(A(),S(`div`,Pc,[T(c,{inline:!0,model:i.leftQueryCondition,class:`cv-transfer-form`},{default:z(()=>[N(e.$slots,`leftCondition`,{scope:i.leftQueryCondition}),T(s,null,{default:z(()=>[T(o,{type:`primary`,onClick:t[0]||=e=>a.onLeftQuerySubmit()},{default:z(()=>[w(F(n.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,[`model`])])):x(``,!0),T(u,{ref:`leftTable`,"max-height":n.maxHeight,height:n.minHeight,data:i.leftTableData,"row-key":n.tableRowKey,"row-style":a.handleRowStyle,onRowClick:a.handleLeftRowClick,onSelectionChange:a.handleLeftSelectionChange,border:``,stripe:``},{default:z(()=>[T(l,{width:`40px`,type:`selection`,selectable:a.handleSelectable},null,8,[`selectable`]),(A(!0),S(y,null,M(n.leftColumns,t=>(A(),b(l,{prop:t.id,key:t.id,label:t.label,width:t.width},{default:z(n=>[N(e.$slots,`default`,{scope:{row:n.row,col:t}},()=>[C(`span`,null,F(n.row[t.id]),1)])]),_:2},1032,[`prop`,`label`,`width`]))),128))]),_:3},8,[`max-height`,`height`,`data`,`row-key`,`row-style`,`onRowClick`,`onSelectionChange`]),C(`div`,Fc,[n.showPagination?(A(),b(d,{key:0,onSizeChange:a.handleSizeChange,onCurrentChange:a.handleCurrentChange,"current-page":i.pageIndex,"page-sizes":[10,20,50,100],"page-size":i.pageSize,"pager-count":5,total:i.totalSize,layout:`total, sizes, prev, pager, next`},null,8,[`onSizeChange`,`onCurrentChange`,`current-page`,`page-size`,`total`])):x(``,!0)])]),C(`div`,Ic,[T(o,{type:`primary`,class:D(a.buttonClasses),disabled:a.disabledLeftButton,onClick:a.addToRight},{default:z(()=>[n.buttonTexts[0]===void 0?x(``,!0):(A(),S(`span`,Lc,F(n.buttonTexts[0]),1)),T(f,{type:`ElIconArrowRight`})]),_:1},8,[`class`,`disabled`,`onClick`]),T(o,{type:`primary`,class:D(a.buttonClasses),disabled:i.rightSelection.length===0,onClick:a.addToLeft},{default:z(()=>[T(f,{type:`ElIconArrowLeft`}),n.buttonTexts[1]===void 0?x(``,!0):(A(),S(`span`,Rc,F(n.buttonTexts[1]),1))]),_:1},8,[`class`,`disabled`,`onClick`])]),C(`div`,zc,[C(`p`,Bc,[C(`span`,null,F(n.titleTexts&&n.titleTexts[1]),1),C(`span`,null,F(i.rightSelection.length)+`/`+F(i.rightTableData.length),1)]),n.showQuery?(A(),S(`div`,Vc,[T(c,{inline:!0,model:i.rightQueryCondition,class:`cv-transfer-form`},{default:z(()=>[N(e.$slots,`rightCondition`,{scope:i.rightQueryCondition}),T(s,null,{default:z(()=>[T(o,{type:`primary`,onClick:t[1]||=e=>a.onRightQuerySubmit()},{default:z(()=>[w(F(n.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,[`model`])])):x(``,!0),T(u,{ref:`rightTable`,"max-height":n.maxHeight,height:n.minHeight,data:a.calcRightTableData,"row-key":n.tableRowKey,onRowClick:a.handleRightRowClick,onSelectionChange:a.handleRightSelectionChange,border:``,stripe:``},{default:z(()=>[T(l,{width:`40px`,type:`selection`}),(A(!0),S(y,null,M(n.rightColumns||n.leftColumns,t=>(A(),b(l,{prop:t.id,key:t.id,label:t.label,width:t.width},{default:z(n=>[N(e.$slots,`default`,{scope:{row:n.row,col:t}},()=>[C(`span`,null,F(n.row[t.id]),1)])]),_:2},1032,[`prop`,`label`,`width`]))),128))]),_:3},8,[`max-height`,`height`,`data`,`row-key`,`onRowClick`,`onSelectionChange`]),C(`div`,Hc,[n.showPagination?(A(),b(d,{key:0,total:i.rightTableData.length,layout:`total`},null,8,[`total`])):x(``,!0)])])])}var Wc=H(Ac,[[`render`,Uc]]);Wc.install=function(e){e.component(Wc.name,Wc)};var Gc={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...de.props,modelValue:{type:[Array,Object],default(){return[]}},headerCellStyle:{type:[Function,Object],default:()=>({})}},data(){return{loadDataList:[]}},watch:{modelValue(e){this.loadDataList=e},loadDataList(e){this.$emit(`update:modelValue`,e)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(e){this.loadPageCurr=e,this.getData()},handleSizeChange(e){this.loadPageLimit=e,this.getData()}}},Kc={name:`cvTableBase`,mixins:[Ft,Gc],props:{align:{type:String,default:`left`},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default(){return{}}},tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}},watch:{tableRefresh(e,t){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit(`selection-change`,e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||this.paginationGroup[0],Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},qc={class:`cv-table-list`},Jc={key:0,class:`cv-tablie-list-page page`};function Yc(e,t,n,r,i,a){let o=P(`el-table`),s=P(`cv-icons`),c=P(`el-button`),l=P(`el-pagination`),u=Ne(`loading`);return A(),S(`div`,qc,[B((A(),b(o,E(e.$props,{data:e.loadDataList,style:{width:`100%`},onSelectionChange:a.handleSelectionChange}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`data`,`onSelectionChange`])),[[u,e.loadDataLoading]]),n.showPagebreak?B((A(),S(`div`,Jc,[T(c,{onClick:a.refresh,style:{float:`left`,margin:`0 10px 0 0`,padding:`5px 10px`}},{default:z(()=>[T(s,{type:`ElIconRefresh`,size:`14`})]),_:1},8,[`onClick`]),T(l,{background:``,onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"pager-count":i.paginationCount,"page-sizes":i.paginationGroup,"current-page":e.loadPageCurr,"page-size":e.loadPageLimit,layout:`total, sizes, prev, pager, next, jumper`,total:e.loadDataTotal},null,8,[`onSizeChange`,`onCurrentChange`,`pager-count`,`page-sizes`,`current-page`,`page-size`,`total`])],512)),[[L,e.loadDataLoading===!1]]):x(``,!0)])}var Xc=H(Kc,[[`render`,Yc]]),Zc={name:`cvTableTree`,mixins:[Ft,Gc],props:{tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{searchData:{},tableConfDef:{tablePrimary:``,childName:`children`},pager_count:7,page:1}},watch:{tableRefresh(e,t){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit(`selection-change`,e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},Qc={class:`cv-table-tree`};function $c(e,t,n,r,i,a){let o=P(`el-table`),s=Ne(`loading`);return A(),S(`div`,Qc,[B((A(),b(o,E(e.$props,{data:e.loadDataList,style:{width:`100%`},onSelectionChange:a.handleSelectionChange,"row-key":e.loadConfigSetting.tablePrimary,"tree-props":{children:e.loadConfigSetting.childName,hasChildren:`hasChildren`}}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`data`,`onSelectionChange`,`row-key`,`tree-props`])),[[s,e.loadDataLoading]])])}var el=H(Zc,[[`render`,$c]]),tl={name:`cvTableEditor`,mixins:[Ft,Gc],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default(){return{}}}},data(){return{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(e,t,n,r){switch(this.cell_click_index=e.index,this.cell_click_label=t.label,t.label){case`taskid`:this.cell_click_index=e.index,this.cell_click_label=t.label;break;case`taskname`:this.cell_click_index=e.index,this.cell_click_label=t.label;break;default:return}},handleChangeTData(e){}}},nl={class:`cv-table-editor`};function rl(e,t,n,r,i,a){let o=P(`el-table`),s=Ne(`loading`);return A(),S(`div`,nl,[B((A(),b(o,E(e.$props,{data:e.loadDataList,style:{width:`100%`},"row-class-name":`cv-tbed-tr`}),{default:z(()=>[N(e.$slots,`default`)]),_:3},16,[`data`])),[[s,e.loadDataLoading]])])}var il=H(tl,[[`render`,rl]]),al={name:`cvTbColumnIndex`,inject:{pageCurr:{default:1},pageLimit:{default:10}},props:{...fe.props,fixed:{type:[String],default:`left`},align:{type:String,default:`center`},width:{type:[String,Number],default:55},continuity:{type:[Boolean,String],default:!1}},data(){return{}},created(){},methods:{indexMethod(e){return this.continuity&&this.pageCurr&&this.pageLimit?e+1+(this.pageCurr-1)*this.pageLimit:e+1}}};function ol(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,E(e.$props,{type:`index`,index:a.indexMethod}),null,16,[`index`])}var sl=H(al,[[`render`,ol]]),cl={name:`cvTbColumnCheck`,props:{...fe.props,fixed:{type:[String],default:`left`},align:{type:[String],default:`center`},width:{type:[String,Number],default:55}},data(){return{}},created(){}};function ll(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,E(e.$props,{type:`selection`}),null,16)}var ul=H(cl,[[`render`,ll]]),dl={name:`cvTbColumnText`,props:{...fe.props},data(){return{}},created(){},methods:{getContentText(e){let t=e.row[this.prop];return this.formatter&&(t=this.formatter(e.row,e.column)),t}}},fl={style:{display:`contents`}};function pl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,O(Se(e.$props)),{default:z(t=>[C(`div`,fl,F(t.row[e.prop]),1)]),_:1},16)}var ml=H(dl,[[`render`,pl]]),hl={name:`cvTbColumnImg`,props:{...fe.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data(){return{localImgWidth:`50px`,localImgHeight:`50px`,localImgArr:[],localImgOne:``}},created(){this.imgWidth&&(this.localImgWidth=this.imgWidth.indexOf(`px`)===-1?this.imgWidth+`px`:this.imgWidth),this.imgHeight&&(this.localImgHeight=this.imgHeight.indexOf(`px`)===-1?this.imgHeight+`px`:this.imgHeight)},methods:{handleImgOne(e){let t=e[this.prop]||null;if(t){if(Object.prototype.toString.call(t)===`[object Array]`)return t[0];if(Object.prototype.toString.call(t)===`[object String]`)return t}},handleImgArr(e){let t=e[this.prop]||null;if(t){if(Object.prototype.toString.call(t)===`[object Array]`)return t;if(Object.prototype.toString.call(t)===`[object String]`)return[t]}},handleImgLeng(e){let t=e[this.prop]||null;if(t){if(Object.prototype.toString.call(t)===`[object Array]`)return t.length;if(Object.prototype.toString.call(t)===`[object String]`)return 1}else return 0}}},gl={key:0,class:`cv-table-column-img-mark`},_l={class:`cv-table-column-img-text`};function vl(e,t,n,r,i,a){let o=P(`el-image`),s=P(`el-table-column`);return A(),b(s,O(Se(e.$props)),{default:z(e=>[C(`div`,{class:`cv-table-column-img-box`,style:k({width:i.localImgWidth,height:i.localImgHeight})},[T(o,{style:k({width:i.localImgWidth,height:i.localImgHeight}),fit:`scale-down`,lazy:``,src:a.handleImgOne(e.row),"preview-src-list":a.handleImgArr(e.row),"preview-teleported":!0},{error:z(()=>[...t[0]||=[C(`span`,{class:`el-image__error cv-table-column-img-err`},[w(` 暂无 `),C(`br`),w(` 图片 `)],-1)]]),_:1},8,[`style`,`src`,`preview-src-list`]),a.handleImgLeng(e.row)>1?(A(),S(`p`,gl,[C(`span`,_l,F(a.handleImgLeng(e.row))+`张`,1)])):x(``,!0)],4)]),_:1},16)}var yl=H(hl,[[`render`,vl]]),bl={name:`cvTbColumnOpt`,props:{...fe.props,fixed:{type:[String],default:`right`},label:{type:[String],default:`操作`}},data(){return{}},created(){}};function xl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,O(Se(e.$props)),{default:z(t=>[N(e.$slots,`default`,O(Se({row:t.row,$index:t.$index,scope:t})))]),_:3},16)}var Sl=H(bl,[[`render`,xl]]),Cl={name:`cvTbColumnBase`,props:{...fe.props,width:{type:[String,Number],default:``}},data(){return{}},created(){}};function wl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,O(Se(e.$props)),{default:z(t=>[N(e.$slots,`default`,O(Se({row:t.row,$index:t.$index,scope:t})))]),_:3},16)}var Tl=H(Cl,[[`render`,wl]]),El={name:`cvTbColumnExpand`,props:{...fe.props},data(){return{}},created(){}};function Dl(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,E(e.$props,{type:`expand`}),{default:z(t=>[N(e.$slots,`default`,O(Se({row:t.row,$index:t.$index,props:t})))]),_:3},16)}var Ol=H(El,[[`render`,Dl]]),kl={name:`cvTbColumnEnum`,props:{...fe.props,dataLists:{type:[Object,Array],default:()=>({})}},data(){return{}},created(){},methods:{dealTypeEnum(e){let t=Object.keys(this.dataLists);return e[this.prop]?this.dataLists[e[this.prop]]||``:this.dataLists[t[0]]||``}}};function Al(e,t,n,r,i,a){let o=P(`el-table-column`);return A(),b(o,O(Se(e.$props)),{default:z(e=>[C(`span`,null,F(a.dealTypeEnum(e.row)),1)]),_:1},16)}var jl=H(kl,[[`render`,Al]]),Ml={name:`cvTbEditSearch`,props:{...fe.props,modelValue:{type:[String],default:``},align:{type:[String],default:`left`}},data(){return{isEditIndex:null,localVal:``,autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:``,searchCurrTbIndex:0,searchIsSelect:!1}},watch:{modelValue(e){},localVal(e){this.$emit(`update:modelValue`,e)}},directives:{edfocus:{mounted:e=>{}}},created(){},methods:{searchEdit(e,t){this.isEditIndex=t,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${t}`].focus()})},searchSave(e,t){this.isEditIndex=null},searchSelect(e,t,n){this.searchIsSelect=!0,this.localTableData[n]=Object.assign(this.localTableData[n],e),this.localTableData[n].row_num=1,e.row_attr?this.localTableData[n].row_name=e.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${e.row_attr} ]</span>`:this.localTableData[n].row_name=e.row_name},searchFocus(e,t){this.searchCurrClass=`cvtegac`+e,this.searchCurrTbIndex=e},searchBlur(e,t){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(e,t){this.searchIsSelect=!1,this.searchResList=[];let n=this.searchSett;if(n.searchMockData!=null&&n.searchMockData){if(typeof n.searchMockData==`object`){let e=this.sortOutData(n.searchMockData);this.tableData=e,this.$message({message:e.msg||``,type:`warning`,duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else n.searchFunc&&typeof n.searchFunc==`function`&&n.searchFunc({page:1,pagesize:20,keyword:e,...n.searchParam}).then(n=>{this.searchResList=[...n.data],this.searchParseData(e,t)})},searchParseData(e,t){var n=[],r=[];let i=this.searchSett;if(this.searchResList.length>0){for(let e in this.searchResList){let t=this.searchResList[e];t.row_price=t[i.searchField.row_price],t.row_stock=t[i.searchField.row_stock],t.row_attr=t[i.searchField.row_attr],t.row_name=t[i.searchField.row_name],t.row_unit=t[i.searchField.row_unit],t.row_id=t[i.searchField.row_id],t.value=t.row_name,r.push(t)}n=r}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t(n)},600)},inputSearchFilter(e){return t=>t.value.toLowerCase().indexOf(e.toLowerCase())===0},searchIconClick(){this.isEditIndex=null}}},Nl={class:`name`},Pl={class:`addr`},Fl={class:`addr`},Il={class:`droplist-item`},Ll={class:`name`},Rl={key:0,class:`attr`},zl={class:`price`},Bl={class:`rest`},Vl=[`onClick`];function Hl(e,t,n,r,i,a){let o=P(`ElIconCircleClose`),s=P(`el-icon`),c=P(`el-autocomplete`),l=P(`el-table-column`);return A(),b(l,E(e.$props,{"class-name":`cv-table-editor-search-column`}),{default:z(t=>[i.isEditIndex==t.$index?(A(),b(c,E({key:0,ref:`cv-tbce-autocomplete${t.$index}`},i.autocompleteAttr,{modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n,"popper-class":`cv-tbce-autocomplete cvtegac${t.$index}`,"fetch-suggestions":a.searchQuery,onSelect:e=>a.searchSelect(e,t.row,t.$index),onFocus:e=>a.searchFocus(t.$index,e),onBlur:e=>a.searchBlur(t.row,t.$index)}),{suffix:z(()=>[T(s,{onClick:e=>a.searchIconClick(t.row,t.$index)},{default:z(()=>[T(o)]),_:1},8,[`onClick`])]),default:z(({item:t})=>[N(e.$slots,`default`,{item:t},()=>[C(`div`,Nl,F(t.row_name),1),C(`span`,Pl,`价格:`+F(t.row_price),1),C(`span`,Fl,F(t.row_rest),1),C(`div`,Il,[C(`div`,Ll,[w(F(t.row_name)+` `,1),t.row_attr?(A(),S(`div`,Rl,`[ `+F(t.row_attr)+`]`,1)):x(``,!0)]),C(`div`,zl,`¥ `+F(t.row_price),1),C(`div`,Bl,F(t.attr_stock),1)])],!0)]),_:2},1040,[`modelValue`,`onUpdate:modelValue`,`popper-class`,`fetch-suggestions`,`onSelect`,`onFocus`,`onBlur`])):(A(),S(`span`,{key:1,class:`showtext`,onClick:e=>a.searchEdit(t.row,t.$index)},F(t.row[e.prop]),9,Vl))]),_:3},16)}var Ul=H(Ml,[[`render`,Hl],[`__scopeId`,`data-v-2f76009a`]]),Wl={name:`cvTbEditOpt`,props:{tableData:{type:[Array],default:()=>[]},...fe.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(){return{localTbData:[]}},watch:{tableData(e){this.localTbData=e}},created(){this.localTbData=this.tableData},methods:{optHdDelete(e,t){this.localTbData.splice(e,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}};function Gl(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`),c=P(`el-table-column`);return A(),b(c,O(Se(e.$props)),{default:z(e=>[n.btnAdd?(A(),b(s,{key:0,plain:``,style:{padding:`5px`,width:`26px`,height:`26px`},onClick:t[0]||=e=>a.optHdAdd()},{default:z(()=>[T(o,{type:`actionPlus`})]),_:1})):x(``,!0),n.btnDel?(A(),b(s,{key:1,plain:``,style:{padding:`5px`,width:`26px`,height:`26px`},onClick:t=>a.optHdDelete(e.$index,e.row)},{default:z(()=>[T(o,{type:`actionClose`})]),_:1},8,[`onClick`])):x(``,!0)]),_:1},16)}var Kl=H(Wl,[[`render`,Gl]]),ql={name:`cvTbEditText`,props:{...fe.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(){return{currValue:``,isEditIndex:null,isErrIndex:[]}},directives:{edfocus:{mounted:e=>{e.querySelector(`input`).focus()},inserted:function(e){e.querySelector(`input`).focus()}}},created(){},methods:{textIsError(e){return this.isErrIndex&&this.isErrIndex[e]&&this.isErrIndex[e][this.prop]},textHdEdit(e,t){this.isEditIndex=t},textHdClear(e,t){},textHdSave(e,t){this.isEditIndex=null;let n=e[this.prop];if(this.toFixed!=``){let t=parseInt(this.toFixed);isNaN(n)||(e[this.prop]=parseFloat(n).toFixed(t))}else e[this.prop]=n}},render22(e,t){let n=this;return e(`el-table-column`,{props:{...this.$props},scopedSlots:{default:t=>{this.currValue=t.row[this.prop];let r=t.$index;return this.isEditIndex==r?e(`el-input`,{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:e=>{e.keyCode===13&&(this.$emit(`update:param`,e.target.value),this.callback&&this.callback())}},on:{blur:e=>{this.$emit(`update:param`,e.target.value),this.callback&&this.callback()},input:function(e){n.currValue=e||e.target.value},blur:e=>{this.isEditIndex=null,n.currValue=e||e.target.value}}},this.currValue):e(`span`,{class:{showtext:!0},on:{click:()=>{this.isEditIndex=r}}},this.currValue)}}})}},Jl=[`onClick`];function Yl(e,t,n,r,i,a){let o=P(`el-input`),s=P(`el-table-column`),c=Ne(`edfocus`);return A(),b(s,E(e.$props,{"class-name":`cv-table-editor-text-column`}),{default:z(t=>[i.isEditIndex==t.$index&&!n.editAttr.disabled?B((A(),b(o,E({key:0},n.editAttr,{clearable:n.editClearable,style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n,onBlur:Ge(e=>a.textHdSave(t.row,t.$index),[`prevent`]),onClear:e=>a.textHdClear(t.row,t.$index)}),null,16,[`clearable`,`style`,`class`,`modelValue`,`onUpdate:modelValue`,`onBlur`,`onClear`])),[[c]]):(A(),S(`span`,{key:1,class:`showtext`,onClick:e=>a.textHdEdit(t.row,t.$index)},F(t.row[e.prop]),9,Jl))]),_:1},16)}var Xl=H(ql,[[`render`,Yl]]),Zl={name:`cvTbEditRadio`,props:{...fe.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(){return{}},created(){}};function Ql(e,t,n,r,i,a){let o=P(`el-radio`),s=P(`el-radio-group`),c=P(`el-table-column`);return A(),b(c,O(Se(e.$props)),{default:z(t=>[T(s,E({style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n},n.editAttr),{default:z(()=>[(A(!0),S(y,null,M(n.dataLists,(e,t)=>(A(),b(o,{key:t,label:e[n.dataField.label],value:e[n.dataField.value]},{default:z(()=>[w(F(e[n.dataField.label]),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},16,[`style`,`class`,`modelValue`,`onUpdate:modelValue`])]),_:1},16)}var $l=H(Zl,[[`render`,Ql]]),eu={name:`cvTbEditCheckbox`,props:{...fe.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(){return{localVal:[]}},created(){},methods:{handleParseValue(e){this.localVal=[]}}};function tu(e,t,n,r,i,a){let o=P(`el-checkbox`),s=P(`el-checkbox-group`),c=P(`el-table-column`);return A(),b(c,O(Se(e.$props)),{default:z(t=>[t.row[e.prop]?(A(),b(s,E({key:0,style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n},n.editAttr),{default:z(()=>[(A(!0),S(y,null,M(n.dataLists,(e,t)=>(A(),b(o,{key:t,label:e[n.dataField.label],value:e[n.dataField.value]},{default:z(()=>[w(F(e[n.dataField.label]),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},16,[`style`,`class`,`modelValue`,`onUpdate:modelValue`])):x(``,!0)]),_:1},16)}var nu=H(eu,[[`render`,tu]]),ru={name:`cvTbEditSelect`,props:{...fe.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(){return{}},created(){}};function iu(e,t,n,r,i,a){let o=P(`el-option`),s=P(`el-select`),c=P(`el-table-column`);return A(),b(c,O(Se(e.$props)),{default:z(t=>[T(s,E({style:n.editStyle,class:n.editClass,modelValue:t.row[e.prop],"onUpdate:modelValue":n=>t.row[e.prop]=n},n.editAttr),{default:z(()=>[(A(!0),S(y,null,M(n.dataLists,(e,t)=>(A(),b(o,{key:t,label:e[n.dataField.label],value:e[n.dataField.value]},{default:z(()=>[w(F(e[n.dataField.label]),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},16,[`style`,`class`,`modelValue`,`onUpdate:modelValue`])]),_:1},16)}var au=H(ru,[[`render`,iu]]);Xc.install=function(e){e.component(Xc.name,Xc)},el.install=function(e){e.component(el.name,el)},il.install=function(e){e.component(il.name,il)},sl.install=function(e){e.component(sl.name,sl)},ul.install=function(e){e.component(ul.name,ul)},ml.install=function(e){e.component(ml.name,ml)},yl.install=function(e){e.component(yl.name,yl)},Sl.install=function(e){e.component(Sl.name,Sl)},Tl.install=function(e){e.component(Tl.name,Tl)},Ol.install=function(e){e.component(Ol.name,Ol)},jl.install=function(e){e.component(jl.name,jl)},Ul.install=function(e){e.component(Ul.name,Ul)},Kl.install=function(e){e.component(Kl.name,Kl)},Xl.install=function(e){e.component(Xl.name,Xl)},$l.install=function(e){e.component($l.name,$l)},nu.install=function(e){e.component(nu.name,nu)},au.install=function(e){e.component(au.name,au)};var ou={},su={width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function cu(e,t){return A(),S(`svg`,su,[...t[0]||=[C(`rect`,{width:`12`,height:`12`,rx:`2`,fill:`#86909C`},null,-1),C(`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)]])}var lu=H(ou,[[`render`,cu]]),uu={},du={width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`icon`};function fu(e,t){return A(),S(`svg`,du,[...t[0]||=[C(`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)]])}var pu=H(uu,[[`render`,fu]]),mu={},hu={class:`comment-common-icon`};function gu(e,t){return A(),S(`i`,hu,[...t[0]||=[C(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:``},[C(`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)]])}var _u=H(mu,[[`render`,gu]]),vu={},yu={width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`icon`};function bu(e,t){return A(),S(`svg`,yu,[...t[0]||=[C(`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)]])}var xu=H(vu,[[`render`,bu]]),Su={},Cu={class:`comment-common-icon`};function wu(e,t){return A(),S(`i`,Cu,[...t[0]||=[C(`svg`,{viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},[C(`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)]])}var Tu=H(Su,[[`render`,wu]]),Eu={},Du={class:`comment-common-icon`,style:{color:`#1e80ff`}};function Ou(e,t){return A(),S(`i`,Du,[...t[0]||=[C(`svg`,{viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`1534`},[C(`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)]])}var ku=H(Eu,[[`render`,Ou]]),Au={},ju={class:`comment-common-icon`};function Mu(e,t){return A(),S(`i`,ju,[...t[0]||=[C(`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`},[C(`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)]])}var Nu=H(Au,[[`render`,Mu]]),Pu={},Fu={width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:``};function Iu(e,t){return A(),S(`svg`,Fu,[...t[0]||=[C(`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)]])}var Lu=H(Pu,[[`render`,Iu]]),Ru={},zu={class:`comment-common-icon`};function Bu(e,t){return A(),S(`i`,zu,[...t[0]||=[C(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:``},[C(`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)]])}var Vu=H(Ru,[[`render`,Bu]]),Hu={},Uu={class:`comment-common-icon`};function Wu(e,t){return A(),S(`i`,Uu,[...t[0]||=[C(`svg`,{viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`1320`,width:`200`,height:`200`},[C(`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)]])}var Gu=H(Hu,[[`render`,Wu]]),Ku={class:`cv-comment-emoji`},qu={class:`face-tooltip-head select-none`},Ju=[`onClick`],Yu=[`src`],Xu={class:`emoji-body select-none`},Zu={style:{padding:`0 5px`}},Qu=[`onClick`],$u={class:`emoji-btn select-none`},ed={key:0},td=H(Object.assign({name:`CompInputEmoji`},{__name:`input-emoji`,props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:`bottom`},emits:[`addEmoji`],setup(e,{emit:t}){let n=e,r=j(0),i=j(0),a=j([,,]),{emojiList:o,faceList:s}=n.emoji;function c(e){switch(r.value=e,e){case 0:i.value=0;break;case 1:i.value=-50,a.value[1]=o[1];break}}function l(){a.value[0]=o[0]}return(t,n)=>(A(),S(`div`,Ku,[T(I(se),{placement:e.placement,"popper-class":`emoji-popover`,width:250,trigger:`click`,onBeforeEnter:l},{reference:z(()=>[C(`div`,$u,[t.$slots.default?N(t.$slots,`default`,{key:1},void 0,!0):(A(),S(`div`,ed,[T(I(pu)),n[0]||=C(`span`,null,`表情`,-1)]))])]),default:z(()=>[C(`div`,qu,[(A(!0),S(y,null,M(I(s),(e,t)=>(A(),S(`label`,{key:t,class:D(r.value==t?`active`:``),onClick:e=>c(t)},[C(`img`,{src:e,alt:``},null,8,Yu)],10,Ju))),128))]),C(`div`,Xu,[C(`div`,{class:`emjio-container`,style:k({transform:`translateX(${i.value}%)`})},[(A(!0),S(y,null,M(a.value,(e,n)=>(A(),S(`div`,{key:n,class:`emoji-wrapper`},[T(I(ce),null,{default:z(()=>[C(`div`,Zu,[(A(!0),S(y,null,M(e,(e,n)=>(A(),S(`span`,{key:n,class:`emoji-item`,onClick:e=>t.$emit(`addEmoji`,n)},[T(I(g),{src:e,title:String(n),class:`emoji`,style:{width:`24px`,height:`24px`,margin:`5px`},lazy:``},null,8,[`src`,`title`])],8,Qu))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,[`placement`])]))}}),[[`__scopeId`,`data-v-2fb59975`]]),nd={class:`cv-comment-editor`},rd=[`placeholder`,`innerHTML`],id=[`src`],ad=[`onClick`],od={key:0,class:`cv-comment-editor__action`},sd=H({__name:`input-box`,props:{placeholder:``,contentBtn:``,parentId:``,reply:``},emits:[`hide`,`close`],setup(t,{expose:n,emit:r}){let a=t,o=j(``),s=j(),c=j(!1),l=j(!1),u=j(),d=j(!0),f=j(),p=j(),m=j([]),h=j([]),g=je({imgLength:0}),ee={minHeight:64},_=j(),te=j(!1),v=j(),re=_e(()=>ee.minHeight+`px`),ie=_e(()=>ee.minHeight==30?`4px 10px`:`8px 12px`),ae=r,{upload:oe,submit:se,focus:ce}=we(`InjectInputBox`),le=we(`InjectionEmojiApi`);R(()=>o.value,e=>{te.value||(s.value=e)});function ue(){se({content:a.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${a.reply.user.username}:</span> ${o.value}`:o.value,parentId:Gr(a.parentId,null),reply:a.reply,files:h.value,clear:()=>{xe(),ae(`close`)}})}function de(e){Wr(o.value)&&!g.imgLength&&(l.value=!1,ae(`hide`,e))}function fe(e){te.value=!0,c.value=!0,l.value=!0,Te(()=>{f.value=document.querySelector(`div[id^='el-popper-container']`)}),ce()}function pe(e){_.value=window.getSelection()?.getRangeAt(0),u.value?.innerHTML||(c.value=!1),te.value=!1}function me(e){let{innerHTML:t}=e?.target||e;o.value=t||``,Wr(o.value.replace(/ |<br>| /g,``))?d.value=!0:d.value=!1}function ge(e){let t=window.getSelection();t&&(t.removeAllRanges(),_.value||=(ve(),t.getRangeAt(0)),_.value.deleteContents(),_.value.insertNode(_.value.createContextualFragment(e)),_.value.collapse(!1),t.addRange(_.value),o.value=u?.value?.innerHTML||``,Wr(o.value.replace(/ |<br>| /g,``))?d.value=!0:d.value=!1)}function b(){u.value&&(u.value.innerHTML=``,o.value=u.value.innerHTML,c.value=!1)}function ve(){Te(()=>{u.value?.focus()})}function ye(e){e.ctrlKey&&e.key==`Enter`&&(Wr(o.value.replace(/ |<br>| /g,``))?ne({message:`内容不能为空`,type:`info`}):ue())}function be(e){m.value.length=0,h.value.length=0;let t=p.value?.files;if(g.imgLength=Gr(t?.length,0),t)for(let e=0;e<t.length;e++){let n=t[e].name,r=Yr(t[e]);h.value.push(t[e]),Kr(n)?m.value.push(r):ne({type:`warn`,message:`请选择图片类型文件!`,duration:2500})}}function xe(){b(),m.value.length=0,h.value=[],d.value=!0}function Se(e){m?.value?.splice(e,1)}return De(()=>{u.value?.addEventListener(`keyup`,e=>{let t=e.target;t.innerHTML==`<br>`&&(t.innerHTML=``)})}),n({focus:()=>ve()}),(t,n)=>B((A(),S(`div`,nd,[C(`div`,{class:D([`cv-comment-editor__box`,{active:c.value,"input-active":l.value}])},[C(`div`,{ref_key:`editorRef`,ref:u,class:`rich-input`,contenteditable:`true`,placeholder:a.placeholder,onFocus:fe,onInput:me,onBlur:pe,onKeydown:We(ye,[`enter`]),innerHTML:s.value,style:k({minHeight:re.value,padding:ie.value})},null,44,rd),C(`div`,{ref_key:`imageRef`,ref:v,class:`image-preview-box`},[(A(!0),S(y,null,M(m.value,(e,t)=>(A(),S(`div`,{key:t,class:`image-preview`},[C(`img`,{src:e,alt:``},null,8,id),C(`div`,{class:`clean-btn`,onClick:e=>Se(t)},[T(I(lu))],8,ad)]))),128))],512)],2),T(he,{name:`fade`},{default:z(()=>[l.value?(A(),S(`div`,od,[C(`div`,null,[T(td,{emoji:I(le),onAddEmoji:n[0]||=e=>ge(e)},null,8,[`emoji`]),C(`div`,{class:`picture`,onClick:n[1]||=(...e)=>p.value?.click&&p.value?.click(...e)},[T(I(xu)),n[2]||=C(`span`,null,`图片`,-1),C(`input`,{id:`comment-upload`,ref_key:`inputRef`,ref:p,type:`file`,multiple:``,onChange:be},null,544)])]),C(`div`,null,[n[3]||=C(`span`,{style:{"margin-right":`10px`}},[w(` 文明上网理性发言,请遵守 `),C(`a`,{href:`###`,target:`_blank`},`《新闻评论服务协议》`)],-1),T(I(i),{type:`primary`,disabled:d.value,onClick:ue},{default:z(()=>[w(F(a.contentBtn),1)]),_:1},8,[`disabled`])])])):x(``,!0)]),_:1})])),[[I(e),de,f.value]])}},[[`__scopeId`,`data-v-e3fd437e`]]),cd={class:`u-fold`},ld={class:`action-box select-none`},ud=H(Object.assign({name:`UFold`},{__name:`fold`,props:{line:{type:[Number,String],default:5}},setup(e){He(e=>({v15491e60:n.value}));let t=e,n=_e(()=>{let e=Math.trunc(Number(t.line));return e>0?e:1}),r=j(!0),i=j(!1),a=j(),o;return De(()=>{o=new ResizeObserver(e=>{r.value&&a.value&&(i.value=a.value.offsetHeight<a.value.scrollHeight)}),o.observe(a.value)}),ke(()=>{o.disconnect()}),(e,t)=>(A(),S(`div`,cd,[C(`div`,{class:D([`txt-box`,{"over-hidden":r.value}])},[C(`div`,{ref_key:`divBox`,ref:a},[N(e.$slots,`default`,{},void 0,!0)],512)],2),C(`div`,ld,[i.value&&e.unfold?(A(),S(`div`,{key:0,class:`expand-btn`,onClick:t[0]||=e=>r.value=!r.value},F(r.value?`展开`:`收起`),1)):x(``,!0)])]))}}),[[`__scopeId`,`data-v-94334818`]]),dd={__name:`user-card`,props:{uid:``},setup(e){let t=j({}),{showInfo:n}=we(`InjectContentBox`),r=we(`InjectSlots`),i=()=>Ce(`div`,r.card(t.value));return(a,o)=>I(r).card?(A(),b(I(se),{key:0,placement:`top`,width:300,"show-after":300,onBeforeEnter:o[0]||=()=>I(n)(e.uid,e=>t.value=e)},{reference:z(()=>[N(a.$slots,`default`)]),default:z(()=>[T(i)]),_:3})):N(a.$slots,`default`,{key:1})}};function fd(e,t){return xe()?(Oe(e,t),!0):!1}var pd=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var md=Object.prototype.toString,hd=e=>md.call(e)===`[object Object]`;function gd(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}function _d(e){return Array.isArray(e)?e:[e]}function vd(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=Ie(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},Ve(t))}return r&&(a.value=!0,pd&&l()),fd(c),{isPending:Fe(a),start:l,stop:c}}function yd(e,t,n){return R(e,t,{...n,immediate:!0})}var bd=pd?window:void 0;pd&&window.document;var xd=pd?window.navigator:void 0;pd&&window.location;function Sd(e){let t=Ve(e);return t?.$el??t}function Cd(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=_e(()=>{let t=_d(Ve(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return yd(()=>[n.value?.map(e=>Sd(e))??[bd].filter(e=>e!=null),_d(Ve(n.value?e[1]:e[0])),_d(I(n.value?e[2]:e[1])),Ve(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=hd(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function wd(){let e=Ie(!1),t=be();return t&&De(()=>{e.value=!0},t),e}function Td(e){let t=wd();return _e(()=>(t.value,!!e()))}function Ed(e,t={}){let{controls:n=!1,navigator:r=xd}=t,i=Td(()=>r&&`permissions`in r),a=Ie(),o=typeof e==`string`?{name:e}:e,s=Ie(),c=()=>{s.value=a.value?.state??`prompt`};Cd(a,`change`,c,{passive:!0});let l=gd(async()=>{if(i.value){if(!a.value)try{a.value=await r.permissions.query(o)}catch{a.value=void 0}finally{c()}if(n)return Re(a.value)}});return l(),n?{state:s,isSupported:i,query:l}:s}function Dd(e={}){let{navigator:t=xd,read:n=!1,source:r,copiedDuring:i=1500,legacy:a=!1}=e,o=Td(()=>t&&`clipboard`in t),s=Ed(`clipboard-read`),c=Ed(`clipboard-write`),l=_e(()=>o.value||a),u=Ie(``),d=Ie(!1),f=Ie(!1),p=vd(()=>d.value=!1,i,{immediate:!1}),m=0;async function h(){let e=!(o.value&&ne(s.value));if(!e)try{u.value=await t.clipboard.readText()}catch{e=!0}e&&(u.value=te())}l.value&&n&&Cd([`copy`,`cut`],h,{passive:!0});async function g(e){let n=e??Ve(r);if(l.value&&n!=null){f.value=!0;let e=!(o.value&&ne(c.value));if(!e)try{let e=ee(n);await t.clipboard.write([e])}catch{e=!0}if(e)if(typeof n==`string`)u.value=n,_(n);else{let e=++m,t=await n();t!=null&&e===m&&(u.value=t,_(t))}d.value=!0,p.start(),f.value=!1}}function ee(e){return typeof e==`string`?(u.value=e,new ClipboardItem({"text/plain":e})):new ClipboardItem({"text/plain":e().then((e=``)=>(u.value=e,new Blob([e],{type:`text/plain`})))})}function _(e){let t=document.createElement(`textarea`);t.value=e,t.style.position=`absolute`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function te(){var e,t;return((e=document)==null||(t=e.getSelection)==null||(t=t.call(e))==null?void 0:t.toString())??``}function ne(e){return e===`granted`||e===`prompt`}return{copyPending:Fe(f),isSupported:l,text:Fe(u),copied:Fe(d),copy:g}}var Od={class:`comment-list-actbox__right`},kd={class:`operation-warp`},Ad={class:`dialog-footer`},jd={__name:`comment-operate`,props:{data:{type:[Object],default:()=>({})}},setup(e){let{copy:t}=Dd(),n=j(!1),r=j({report_type:``,report_content:``}),i=e;function a(){let e=i.data||{};n.value=!1,ne({type:`info`,message:`举报成功: `+e.id})}function o(e){let r=i.data||{};switch(e){case`remove`:setTimeout(()=>{commentRef.value?.remove(r)},200);break;case`report`:n.value=!0;break;case`copy`:t(r.content),ne({type:`info`,message:`复制成功`})}}return(e,t)=>{let i=P(`el-dropdown-item`),s=P(`el-dropdown-menu`),c=P(`el-dropdown`),l=P(`el-radio`),u=P(`el-radio-group`),d=P(`el-form-item`),f=P(`el-input`),p=P(`el-form`),m=P(`el-button`),h=P(`el-dialog`);return A(),S(`div`,Od,[T(c,{trigger:`click`,onCommand:t[0]||=e=>o(e)},{dropdown:z(()=>[T(s,null,{default:z(()=>[T(i,{command:`report`},{default:z(()=>[...t[5]||=[w(`举报`,-1)]]),_:1}),T(i,{command:`remove`},{default:z(()=>[...t[6]||=[w(`删除`,-1)]]),_:1}),T(i,{divided:``,command:`copy`},{default:z(()=>[...t[7]||=[w(`复制`,-1)]]),_:1})]),_:1})]),default:z(()=>[C(`div`,kd,[T(I(Tu))])]),_:1}),T(h,{title:`举报`,modelValue:n.value,"onUpdate:modelValue":t[4]||=e=>n.value=e,width:`400px`,style:{width:`90%`,"max-width":`400px`}},{footer:z(()=>[C(`span`,Ad,[T(m,{onClick:t[3]||=e=>n.value=!1},{default:z(()=>[...t[13]||=[w(`取消`,-1)]]),_:1}),T(m,{type:`primary`,onClick:a},{default:z(()=>[...t[14]||=[w(`提交`,-1)]]),_:1})])]),default:z(()=>[T(p,{"label-position":`top`},{default:z(()=>[T(d,{label:`您为什么要举报此信息?`},{default:z(()=>[T(u,{modelValue:r.value.report_type,"onUpdate:modelValue":t[1]||=e=>r.value.report_type=e},{default:z(()=>[T(l,{value:`色情淫秽`},{default:z(()=>[...t[8]||=[w(`色情淫秽`,-1)]]),_:1}),T(l,{value:`骚扰谩骂`},{default:z(()=>[...t[9]||=[w(`骚扰谩骂`,-1)]]),_:1}),T(l,{value:`广告欺诈`},{default:z(()=>[...t[10]||=[w(`广告欺诈`,-1)]]),_:1}),T(l,{value:`反动`},{default:z(()=>[...t[11]||=[w(`反动`,-1)]]),_:1}),T(l,{value:`其他`},{default:z(()=>[...t[12]||=[w(`其他`,-1)]]),_:1})]),_:1},8,[`modelValue`])]),_:1}),T(d,{label:`举报说明(可选):`},{default:z(()=>[T(f,{type:`textarea`,modelValue:r.value.report_content,"onUpdate:modelValue":t[2]||=e=>r.value.report_content=e,maxlength:`200`,placeholder:`描述恶意行为`,rows:`3`},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`modelValue`])])}}},Md={class:`comment-sub`},Nd=[`href`],Pd={class:`comment-primary`},Fd={class:`comment-main`},Id={key:1,class:`user-info`},Ld=[`href`],Rd={class:`username`},zd={class:`name`,style:{"max-width":`10em`}},Bd={blank:`true`,class:`rank`},Vd=[`innerHTML`],Hd={class:`address`,style:{color:`#939393`,"font-size":`12px`}},Ud={class:`time`},Wd={class:`content`},Gd=[`innerHTML`],Kd={class:`imgbox`,style:{display:`flex`}},qd={class:`comment-list-actbox select-none`},Jd={class:`comment-list-actbox__left`},Yd={key:2},Xd={class:`comment-list-actbox__right`},Zd={key:2},Qd=H({__name:`content-box`,props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:``}},setup(e){let t=e,r=je({active:!1}),i=j(),a=j(),o=_e(()=>{let e=t.data.contentImg;return Wr(e)?[]:e?.split(`||`)}),{allEmoji:s}=we(`InjectionEmojiApi`),{like:c,user:l,relativeTime:u}=we(`InjectContentBox`);function d(){r.active=!r.active,r.active&&Te(()=>{i.value?.focus()})}function f(e){let t=e.target;a.value?.contains(t)||(r.active=!1)}let p=we(`InjectSlots`),m=()=>Ce(`div`,p.info(t.data)),h=(e,t)=>(t=t.replace(/\[.+?\]/g,t=>{let n=e[t];return n?[`<img src="`,n,`" width="20" height="20" alt="`,t,`" title="`,t,`" style="margin: 0 1px; vertical-align: text-bottom"`,`/>`].join(``):t}),t),ee=_e(()=>h(s,t.data.content)),_=e=>{switch(e){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(s,h)=>(A(),S(`div`,{class:D([`comment`,{reply:t.reply}])},[C(`div`,Md,[T(dd,{uid:I(Jr)(e.data.uid)},{default:z(()=>[C(`a`,{href:e.data.user.homeLink,target:`_blank`,class:`no-underline`,style:{display:`block`}},[T(I(n),{style:{"margin-top":`5px`},size:40,fit:`cover`,src:e.data.user.avatar},{default:z(()=>[...h[2]||=[C(`img`,{src:`https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png`},null,-1)]]),_:1},8,[`src`])],8,Nd)]),_:1},8,[`uid`])]),C(`div`,Pd,[C(`div`,Fd,[I(p).info?(A(),b(m,{key:0})):(A(),S(`div`,Id,[T(dd,{uid:I(Jr)(e.data.uid)},{default:z(()=>[C(`a`,{href:e.data.user.homeLink,target:`_blank`,class:`no-underline`,style:{display:`block`}},[C(`div`,Rd,[C(`span`,zd,F(e.data.user.username),1),C(`span`,Bd,[C(`i`,{class:`comment-common-icon`,style:{"font-size":`24px`},innerHTML:_(e.data.user.level)},null,8,Vd)])])],8,Ld)]),_:1},8,[`uid`]),C(`span`,Hd,`\xA0\xA0`+F(e.data.address),1),C(`time`,Ud,F(I(u)?I(zr)(e.data.createTime):e.data.createTime),1)])),C(`div`,Wd,[T(ud,{unfold:``},{default:z(()=>[C(`div`,{innerHTML:ee.value},null,8,Gd),C(`div`,Kd,[(A(!0),S(y,null,M(o.value,(e,t)=>(A(),b(I(g),{key:t,src:e,style:{height:`72px`,padding:`8px 4px`},lazy:``,"preview-src-list":o.value,"initial-index":t},null,8,[`src`,`preview-src-list`,`initial-index`]))),128))])]),_:1})]),C(`div`,qd,[C(`div`,Jd,[C(`div`,{"data-tip":`点赞`,class:`item`,onClick:h[0]||=t=>I(c)(I(Jr)(e.data.id))},[I(l).likeIds.map(String).indexOf(I(Jr)(e.data.id))==-1?(A(),b(I(Nu),{key:0})):(A(),b(I(ku),{key:1})),e.data.likes==0?x(``,!0):(A(),S(`span`,Yd,F(e.data.likes),1))]),C(`div`,{"data-tip":`回复`,ref_key:`btnRef`,ref:a,class:D([`item`,{active:r.active}]),onClick:d},[T(I(Gu)),C(`span`,null,F(r.active?`取消回复`:`回复`),1)],2)]),C(`div`,Xd,[N(s.$slots,`operate`,{},()=>[T(jd,{data:t.data},null,8,[`data`])],!0)])]),r.active?(A(),S(`div`,Zd,[T(sd,{ref_key:`commentRef`,ref:i,"parent-id":I(Jr)(e.id),placeholder:`回复 @${e.data.user.username}...`,reply:e.data,"content-btn":`发布`,style:{"margin-top":`12px`},onHide:f,onClose:h[1]||=e=>r.active=!1},null,8,[`parent-id`,`placeholder`,`reply`])])):x(``,!0)]),N(s.$slots,`default`,{},void 0,!0)])],2))}},[[`__scopeId`,`data-v-cfe79df7`]]),$d={key:0,class:`reply-box`},ef={class:`reply-list`},tf={key:0,class:`fetch-more`},nf={key:0},rf={key:1},af={key:0},of={key:1,class:`fetch-more`},sf=H({__name:`reply-box`,props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:``}},setup(e){let t=e,n=je({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:r,replyShowSize:i,comments:a,page:o}=we(`InjectReplyBox`),s=_e(()=>{let e={total:0,length:0,list:[]};if(t.data){let n=t.data.list.length;e={total:t.data.total,length:n,list:t.data.list}}if(!n.over){let t=e.list.slice(0,i);e.list=t}return o&&(e.list=e.list.slice(0,5)),e}),c=()=>{n.over=!0},l=e=>{a.value.forEach(n=>{n.id==t.id&&(n.reply&&=e)})},u=e=>{n.pageNum=e,r(t.id,e,n.pageSize,e=>l(e))},d=e=>{n.pageSize=e,r(t.id,n.pageNum,e,e=>l(e))};return(t,r)=>s.value.length>0?(A(),S(`div`,$d,[C(`div`,ef,[(A(!0),S(y,null,M(s.value.list,(t,n)=>(A(),b(Qd,{id:e.id,key:n,data:t,reply:``},null,8,[`id`,`data`]))),128)),s.value.length>I(i)?(A(),S(`div`,tf,[n.loading?(A(),S(`span`,nf,`加载中...`)):(A(),S(`div`,rf,[n.over?x(``,!0):(A(),S(`div`,af,[w(` 共`+F(s.value.total)+`条回复, `,1),C(`span`,{class:`fetch-more-comment select-none`,onClick:c},[r[0]||=w(` 点击查看 `,-1),T(I(Lu))])]))]))])):x(``,!0),n.over&&I(o)?(A(),S(`div`,of,[T(I(oe),{small:``,"hide-on-single-page":``,layout:`total, prev, pager, next`,total:s.value.total,"page-size":n.pageSize,onCurrentChange:u,onSizeChange:d},null,8,[`total`,`page-size`])])):x(``,!0)])])):x(``,!0)}},[[`__scopeId`,`data-v-16e0a50b`]]),cf={key:0,class:`comment-list`},lf={__name:`comment-list`,props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup(e){return(t,n)=>e.data?(A(),S(`div`,cf,[(A(!0),S(y,null,M(e.data,(e,t)=>(A(),b(Qd,{id:I(Jr)(e.id),key:t,data:e},{default:z(()=>[T(sf,{id:I(Jr)(e.id),data:e.reply},null,8,[`id`,`data`])]),_:2},1032,[`id`,`data`]))),128))])):x(``,!0)}},uf={class:`cv-comment-base`},df={class:`cv-comment-form`},ff={class:`cv-comment-form__content`},pf={class:`cv-comment-form__avatar`},mf={class:`cv-comment-list-wrapper`},hf=Object.assign({name:`cvCommentBase`},{__name:`comment`,props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:[`submit`,`like`,`replyPage`,`showInfo`,`focus`],setup(e,{expose:t,emit:n}){let r=e,{user:i,comments:a,showSize:o,replyShowSize:s,total:c}=Be(r.config),l=n;Ae(`InjectInputBox`,{upload:r.upload,submit:({content:e,parentId:t,reply:n,files:r,clear:i})=>{l(`submit`,{content:e,parentId:t,reply:n,files:r,finish:e=>{if(i(),t){let n=a.value.find(e=>e.id==t);if(n){let t=n.reply;t?(t.list.unshift(e),t.total++):n.reply={total:1,list:[e]}}}else a.value.unshift(e)}})},focus:()=>l(`focus`)});let u=(e,t)=>{let n=null;a.value.forEach(r=>{n=r.id==e?r:r.reply?.list.find(t=>t.id==e),n&&(n.likes+=t)})};return Ae(`InjectContentBox`,{user:i,like:e=>{let t=r.config.user.likeIds;l(`like`,e,()=>{if(t.findIndex(t=>t==e)==-1)t.push(e),u(e,1);else{let n=t.findIndex(t=>t==e);n!=-1&&(t.splice(n,1),u(e,-1))}})},relativeTime:Gr(r.relativeTime,!1),showInfo:(e,t)=>l(`showInfo`,e,t)}),Ae(`InjectReplyBox`,{page:r.page,replyPage:(e,t,n,r)=>{l(`replyPage`,{parentId:e,pageNum:t,pageSize:n,finish:r})},replyShowSize:Gr(s,3),comments:a}),Ae(`InjectionEmojiApi`,r.config.emoji),Ae(`InjectSlots`,Ue()),t({remove:e=>{let{parentId:t,id:n}=e;if(t){let e=a.value.find(e=>e.id==t)?.reply;if(e){let t=e.list.findIndex(e=>e.id==n);t!=-1&&(e.list.splice(t,1),e.total--)}}else{let e=a.value.findIndex(e=>e.id==n);e!=-1&&a.value.splice(e,1)}}}),(t,n)=>{let r=P(`el-avatar`);return A(),S(`div`,uf,[C(`div`,df,[n[1]||=C(`div`,{class:`cv-comment-form__header`},[C(`span`,{class:`cv-comment-form__hdtitle`},`评论`)],-1),C(`div`,ff,[C(`div`,pf,[T(r,{size:40,src:e.config.user.avatar},{default:z(()=>[...n[0]||=[C(`img`,{src:`https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png`},null,-1)]]),_:1},8,[`src`])]),T(sd,{placeholder:`输入评论(Enter换行,Ctrl + Enter发送)`,"content-btn":`发表评论`})])]),N(t.$slots,`default`,{},()=>[n[2]||=C(`div`,{class:`title`},`全部评论`,-1)]),C(`div`,mf,[T(lf,{data:I(a),total:I(c),"show-size":I(Gr)(I(o),5)},null,8,[`data`,`total`,`show-size`])])])}}}),gf={class:`comment-scroll`},_f=[`infinite-scroll-disabled`],vf={class:`scroll-btn`},yf={key:1},bf={key:2},xf=Object.assign({name:`cvCommentScroll`},{__name:`comment-scroll`,props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:[`more`],setup(e,{emit:t}){let n=e,r=j(!1),i=j(!1),a=t,o=_e(()=>i.value&&n.disable),s=_e(()=>!i.value||r.value||o.value),c=Pr(()=>{a(`more`),r.value=!1},500),l=()=>{r.value=!0,c()};return(e,t)=>{let n=P(`el-link`),a=Ne(`infinite-scroll`);return A(),S(`div`,gf,[B((A(),S(`div`,{"infinite-scroll-disabled":s.value,"infinite-scroll-distance":`2`},[N(e.$slots,`default`),C(`div`,vf,[i.value?x(``,!0):(A(),b(n,{key:0,type:`primary`,underline:`never`,onClick:t[0]||=e=>i.value=!i.value},{default:z(()=>[...t[1]||=[w(`加载更多`,-1)]]),_:1})),r.value?(A(),S(`p`,yf,`加载中...`)):x(``,!0),o.value?(A(),S(`p`,bf,`没有更多了`)):x(``,!0)])],8,_f)),[[a,l]])])}}}),Sf={class:`cv-comment-nav-wrap`},Cf={class:`cv-comment-nav__sort`},wf=Object.assign({name:`cvCommentNav`},{__name:`comment-nav`,props:{modelValue:!1},emits:[`update:modelValue`,`sorted`],setup(e,{emit:t}){let n=e,r=t,i=_e({get(){return n.modelValue},set(e){r(`update:modelValue`,e),r(`sorted`,e)}});return(e,t)=>(A(),S(`div`,Sf,[t[4]||=C(`span`,{class:`cv-comment-nav__title`},`全部评论`,-1),C(`div`,Cf,[C(`div`,{class:D([`item select-none`,{active:i.value}]),onClick:t[0]||=e=>i.value=!0},[T(I(Vu)),t[2]||=w(` 最新 `,-1)],2),C(`div`,{class:D([`item select-none`,{active:!i.value}]),onClick:t[1]||=e=>i.value=!1},[T(I(_u)),t[3]||=w(` 最热 `,-1)],2)])]))}});hf.install=function(e){e.component(hf.name,hf)},xf.install=function(e){e.component(xf.name,xf)},wf.install=function(e){e.component(wf.name,wf)};var Tf={name:`cvIcons`,props:{type:{type:String,default:``},color:{type:String,default:`currentColor`},size:{type:[Number,String],default:14},rotate:{type:Boolean,default(){return!1}}},computed:{mergeIconStyle(){let e=``;return e=typeof this.size==`string`&&(this.size.includes(`px`)||this.size.includes(`rpx`))?this.size:`${parseFloat(this.size)}px`,{color:this.color,"font-size":e}}},data(){return{}},created(){},methods:{}};function Ef(e,t,n,r,i,a){return A(),S(`i`,{style:k(a.mergeIconStyle),class:D([`cv-icon`,n.rotate?`cv-icons-turn`:`cv-icon-`+n.type])},null,6)}var Df=H(Tf,[[`render`,Ef]]),Of={name:`cvIconSvg`,props:{...h.prop,type:{type:[String],default:``},size:{type:[String,Number],default:12},name:{type:[String],default:``}},data(){return{}},computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+`px`:this.size,color:props.color}}},created(){},methods:{}},kf={key:0,"aria-hidden":`true`},Af=[`xlink:href`];function jf(e,t,n,r,i,a){let o=P(`el-icon`);return A(),b(o,O(Se(e.$props)),{default:z(()=>[N(e.$slots,`default`,{},()=>[(A(),b(Pe(n.type)))]),n.name?(A(),S(`svg`,kf,[C(`use`,{"xlink:href":n.name},null,8,Af)])):x(``,!0)]),_:3},16)}var Mf=H(Of,[[`render`,jf]]);function Nf(e){let t=e.trim();return/^https?:\/\//.test(t)}var Pf={emits:[`click`],props:{name:{type:String,required:!0,validator:e=>e.trim().length>0},size:{type:[Number,String],default:24},color:{type:String,default:`#333333`},hoverColor:{type:String,default:`currentColor`},hoverEffect:{type:Boolean,default:!1}},data(){return{iconType:`svg`}},computed:{maskIconUrl(){if(Nf(this.name))return this.name;let e=`https://10ui.cn/icons`,t=this.name||``,n=``;t=t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),t=t.replace(/^-|-$/g,``),t=t.toLowerCase().trim();let r=/-(filled|bold)$/;if(r.test(t)){let e=t.match(r)[1],i=t.slice(0,t.lastIndexOf(`-${e}`));n=i?`${i.split(`-`).filter(e=>e.trim().length>0).join(`/`)}-${e}`:t}else n=t.includes(`-`)?t.split(`-`).filter(e=>e.trim().length>0).join(`/`):t;switch(this.iconType?.toLowerCase()||`png`){case`svg`:return`${e}/${n}.svg`;case`png`:return`${e}/png/${n}.png`;default:return`${e}/png/${n}.png`}},iconSize(){return typeof this.size==`string`&&(this.size.includes(`px`)||this.size.includes(`rpx`))?this.size:`${parseFloat(this.size)}px`},iconStyle(){let e={width:this.iconSize,height:this.iconSize,backgroundColor:this.color,WebkitMaskImage:`url(${this.maskIconUrl})`,maskImage:`url(${this.maskIconUrl})`,WebkitMaskSize:`contain`,maskSize:`contain`,WebkitMaskRepeat:`no-repeat`,maskRepeat:`no-repeat`,WebkitMaskPosition:`center`,maskPosition:`center`};return this.hoverEffect&&(e.transition=`background-color 0.2s ease`),e}}},Ff={name:`cvMaskSvg`,mixins:[Pf]},If=()=>{He(e=>({v4d7c194c:e.hoverColor}))},Lf=Ff.setup;Ff.setup=Lf?(e,t)=>(If(),Lf(e,t)):If;function Rf(e,t,n,r,i,a){return A(),S(`div`,{class:`cv-mask-icon`,style:k(e.iconStyle),onClick:t[0]||=t=>e.$emit(`click`,t)},null,4)}var zf=H(Ff,[[`render`,Rf],[`__scopeId`,`data-v-bff5bc9b`]]),Bf={name:`cvMaskPng`,mixins:[Pf],data(){return{iconType:`png`}}},Vf=()=>{He(e=>({v6bb780e0:e.hoverColor}))},Hf=Bf.setup;Bf.setup=Hf?(e,t)=>(Vf(),Hf(e,t)):Vf;function Uf(e,t,n,r,i,a){return A(),S(`div`,{class:`cv-mask-icon`,style:k(e.iconStyle),onTap:t[0]||=t=>e.$emit(`click`,t)},null,36)}var Wf=H(Bf,[[`render`,Uf],[`__scopeId`,`data-v-4f8ce869`]]);Df.install=function(e){e.component(Df.name,Df)},Mf.install=function(e){e.component(Mf.name,Mf)},zf.install=function(e){e.component(zf.name,zf)},Wf.install=function(e){e.component(Wf.name,Wf)};var Gf={class:`u-emoji`},Kf={class:`face-tooltip-head select-none`},qf=[`onClick`],Jf=[`src`],Yf={class:`emoji-body select-none`},Xf={style:{padding:`0 5px`}},Zf=[`onClick`],Qf={class:`emoji-btn select-none`},$f={key:0},ep=H(Object.assign({name:`cvEmoji`},{__name:`emoji`,props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:`bottom`},emits:[`addEmoji`],setup(e,{emit:t}){let n=e,r=j(0),i=j(0),a=j([,,]),{emojiList:o,faceList:s}=n.emoji;function c(e){switch(r.value=e,e){case 0:i.value=0;break;case 1:i.value=-50,a.value[1]=o[1];break}}function l(){a.value[0]=o[0]}return(t,n)=>(A(),S(`div`,Gf,[T(I(se),{placement:e.placement,"popper-class":`emoji-popover`,width:250,trigger:`click`,onBeforeEnter:l},{reference:z(()=>[C(`div`,Qf,[t.$slots.default?N(t.$slots,`default`,{key:1},void 0,!0):(A(),S(`div`,$f,[...n[0]||=[C(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`icon`},[C(`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),C(`span`,null,`表情`,-1)]]))])]),default:z(()=>[C(`div`,Kf,[(A(!0),S(y,null,M(I(s),(e,t)=>(A(),S(`label`,{key:t,class:D(r.value==t?`active`:``),onClick:e=>c(t)},[C(`img`,{src:e,alt:``},null,8,Jf)],10,qf))),128))]),C(`div`,Yf,[C(`div`,{class:`emjio-container`,style:k({transform:`translateX(${i.value}%)`})},[(A(!0),S(y,null,M(a.value,(e,n)=>(A(),S(`div`,{key:n,class:`emoji-wrapper`},[T(I(ce),null,{default:z(()=>[C(`div`,Xf,[(A(!0),S(y,null,M(e,(e,n)=>(A(),S(`span`,{key:n,class:`emoji-item`,onClick:e=>t.$emit(`addEmoji`,n)},[T(I(g),{src:e,title:String(n),class:`emoji`,style:{width:`24px`,height:`24px`,margin:`5px`},lazy:``},null,8,[`src`,`title`])],8,Zf))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,[`placement`])]))}}),[[`__scopeId`,`data-v-da53b6ed`]]),tp={class:`cv-chat-message`},np={class:`chat-list`},rp={class:`content`},ip={key:0,class:`username`},ap=[`innerHTML`],op={__name:`message`,props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(e,{expose:t}){let{allEmoji:r}=we(`InjectionEmojiApi`),i=j();t({scroll:()=>{Te(()=>{let e=document.querySelector(`.chat-item:last-child`);i.value.setScrollTop(e.offsetTop)})}});let a=(e,t)=>(t=t.replace(/\[.+?\]/g,t=>{let n=e[t];return n?[`<img src="`,n,`" width="20" height="20" alt="`,t,`" title="`,t,`" style="margin: 0 1px; vertical-align: text-bottom"`,`/>`].join(``):t}),t);return(t,o)=>(A(),S(`div`,tp,[T(I(ce),{ref_key:`scrollbarRef`,ref:i},{default:z(()=>[C(`div`,np,[(A(!0),S(y,null,M(e.data,(t,i)=>(A(),S(`div`,{key:i,class:D([{self:e.userId==t.id},`chat-item`])},[C(`div`,null,[T(I(n),null,{default:z(()=>[...o[0]||=[C(`img`,{src:`https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png`},null,-1)]]),_:1})]),C(`div`,rp,[e.userId==t.id?x(``,!0):(A(),S(`div`,ip,F(t.username),1)),C(`div`,{class:`card-box`,innerHTML:a(I(r),t.content)},null,8,ap)]),o[1]||=C(`div`,{class:`date`},null,-1)],2))),128))])]),_:1},512)]))}},sp={class:`cv-chat-wrap`},cp={class:`header`},lp={id:`chat-footer`,class:`footer`},up=H(Object.assign({name:`cvChat`},{__name:`chat`,props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:[`submit`],setup(e,{emit:t}){let n=e,r=j(!1),a=j(``),o=j(),{data:s}=n,c=t,l=e=>{let{ctrlKey:t,key:n}=e;t&&n==`Enter`&&d()},u=()=>{a.value=``,o.value.scroll()},d=()=>{let e=a.value;e.trim()?(e=e.replace(/\n/g,`<br/>`),c(`submit`,{clear:u,content:e})):ne({type:`error`,message:`内容不能为空`})},f=e=>{let t=document.getElementById(`emojiInput`),n=t.selectionStart,r=t.selectionEnd,i=t.value;if(n===null||r===null)return;let o=i.substring(0,n)+e+i.substring(r);t.value=o,t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,a.value=o};return Ae(`InjectionEmojiApi`,n.emoji),(t,n)=>{let c=P(`cvIcons`);return A(),S(`div`,sp,[C(`div`,{class:D([{active:r.value},`chat-container translate`])},[C(`div`,cp,[T(c,{size:`32`},{default:z(()=>[...n[2]||=[C(`svg`,{viewBox:`0 0 1318 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},[C(`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`}),C(`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`}),C(`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`}),C(`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`}),C(`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}),n[3]||=C(`div`,{style:{"margin-left":`12px`}},[C(`div`,null,`聊天室`),C(`div`,{style:{"font-size":`12px`}},`当前2人在线`)],-1)]),T(op,{ref_key:`messageRef`,ref:o,data:I(s),"user-id":e.userId},null,8,[`data`,`user-id`]),C(`div`,lp,[T(I(ee),{id:`emojiInput`,modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`textarea`,autosize:{minRows:1,maxRows:4},placeholder:`请输入内容`,onKeydown:We(l,[`enter`])},null,8,[`modelValue`]),T(ep,{style:{margin:`0 8px 0`},emoji:e.emoji,placement:`top-end`,onAddEmoji:f},{default:z(()=>[...n[4]||=[C(`svg`,{width:`22`,height:`22`,viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`7186`},[C(`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`]),T(c,{size:`18`,class:D([{".cv-chat-wrap submit-btn":a.value.trim()!=``},`select-none cursor-pointer`]),style:{"padding-bottom":`5px`},onClick:d},{default:z(()=>[...n[5]||=[C(`svg`,{viewBox:`0 0 1025 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"p-id":`15072`},[C(`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),T(I(i),{class:`chat-btn`,onClick:n[1]||=e=>r.value=!r.value},{default:z(()=>[...n[6]||=[w(`chat`,-1)]]),_:1})])}}}),[[`__scopeId`,`data-v-c77a9347`]]);up.install=function(e){e.component(up.name,up)};var dp={key:0},fp=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(e){let t=e,{data:n,vertical:r,suffixIcon:i,prefixIcon:a,size:o,height:s,delay:c,spped:l,color:u,background:d}=t,f=je({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),p=j({}),m=j({style:{cssText:``}}),h=_e(()=>t.delay>2e3?t.delay:2e3),g=()=>{Te(()=>{f.boxWidth=p.value.offsetWidth,f.textWidth=m.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${f.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${f.boxWidth}px;} 100% {left: -${f.textWidth}px;}}`),ee(),setTimeout(()=>{_()},t.delay)})},ee=()=>{f.oneTime=f.textWidth/t.spped,f.twoTime=(f.textWidth+f.boxWidth)/t.spped},_=()=>{f.order===1?(m.value?.style&&(m.value.style.cssText=`animation: oneAnimation ${f.oneTime}s linear; opactity: 1;}`),f.order=2):m.value?.style&&(m.value.style.cssText=`animation: twoAnimation ${f.twoTime}s linear infinite; opacity: 1;`)},te=()=>{m.value.addEventListener(`animationend`,()=>{_()},!1)};return De(()=>{t.vertical||(g(),te())}),(e,t)=>{let c=P(`el-carousel-item`),l=P(`el-carousel`),f=P(`cvIcons`);return A(),S(`div`,{class:`cv-notice-bar`,style:k({background:I(d),height:`${I(s)}px`})},[I(r)?(A(),S(`div`,dp,[T(l,{height:`40px`,direction:`vertical`,autoplay:!0,"indicator-position":`none`,interval:h.value},{default:z(()=>[(A(!0),S(y,null,M(I(n),e=>(A(),b(c,{key:e},{default:z(()=>[w(F(e),1)]),_:2},1024))),128))]),_:1},8,[`interval`])])):(A(),S(`div`,{key:1,style:k({color:I(u),fontSize:`${I(o)}px`}),class:`cv-notice-bar-wrap`},[I(a)?(A(),b(f,{key:0,type:I(a)},null,8,[`type`])):x(``,!0),C(`div`,{ref_key:`boxRef`,ref:p,class:`text-box`},[C(`div`,{ref_key:`textRef`,ref:m,class:`text`},F(I(n)),513)],512),I(i)?(A(),b(f,{key:1,type:I(i)},null,8,[`type`])):x(``,!0)],4))],4)}}});fp.install=function(e){e.component(fp.name,fp)};var pp=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:``,autoDestroy:!0,extensions:[Ke]}),mp={Change:`change`,Update:`update`,Focus:`focus`,Blur:`blur`,Ready:`ready`,ModelUpdate:`update:modelValue`},hp=({onUpdate:e,onChange:t,onFocus:n,onBlur:r,...i})=>Ye.create({doc:i.doc,selection:i.selection,extensions:[...Array.isArray(i.extensions)?i.extensions:[i.extensions],Ze.updateListener.of(i=>{e(i),i.docChanged&&t(i.state.doc.toString(),i),i.focusChanged&&(i.view.hasFocus?n(i):r(i))})]}),gp=e=>{let t=new qe;return{compartment:t,run:n=>{t.get(e.state)?e.dispatch({effects:t.reconfigure(n)}):e.dispatch({effects:Xe.appendConfig.of(t.of(n))})}}},_p=(e,t)=>{let{compartment:n,run:r}=gp(e);return i=>{let a=n.get(e.state);r(i??a!==t?t:[])}},vp=e=>{let t=()=>e.state.doc.toString(),n=n=>{n!==t()&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:n}})},r=()=>e.focus(),{run:i}=gp(e),a=_p(e,[Ze.editable.of(!1),Ye.readOnly.of(!0)]),o=_p(e,Qe.of([et])),{run:s}=gp(e),c=e=>{s([Ye.tabSize.of(e),nt.of(` `.repeat(e))])},{run:l}=gp(e),u=e=>{l([Ye.phrases.of(e)])},{run:d}=gp(e),f=e=>{d($e(e))},{run:p}=gp(e);return{focus:r,getDoc:t,setDoc:n,reExtensions:i,toggleDisabled:a,toggleIndentWithTab:o,setTabSize:c,setPhrases:u,setPlaceholder:f,setStyle:(e={})=>{p(Ze.theme({"&":{...e}}))}}},yp=ye({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:{[mp.Change]:(e,t)=>!0,[mp.Update]:e=>!0,[mp.Focus]:e=>!0,[mp.Blur]:e=>!0,[mp.Ready]:e=>!0,[mp.ModelUpdate]:(e,t)=>!0},setup(e,t){let n=Ie(),r=Ie(),i=Ie(),a={...pp},o=_e(()=>{let t={};return Object.keys(Re(e)).forEach(n=>{n!==`modelValue`&&(t[n]=e[n]??a[n])}),t});return De(()=>{r.value=hp({doc:e.modelValue,selection:o.value.selection,extensions:a.extensions??[],onFocus:e=>t.emit(mp.Focus,e),onBlur:e=>t.emit(mp.Blur,e),onUpdate:e=>t.emit(mp.Update,e),onChange:(n,r)=>{n!==e.modelValue&&(t.emit(mp.Change,n,r),t.emit(mp.ModelUpdate,n,r))}}),i.value=new Ze({state:r.value,parent:n.value,root:o.value.root}),i.value.contentDOM.addEventListener(`scroll`,e=>{});let s=vp(i.value);R(()=>e.modelValue,e=>{e!==s.getDoc()&&s.setDoc(e)}),R(()=>e.extensions,e=>s.reExtensions(e||[]),{immediate:!0}),R(()=>o.value.disabled,e=>s.toggleDisabled(e),{immediate:!0}),R(()=>o.value.indentWithTab,e=>s.toggleIndentWithTab(e),{immediate:!0}),R(()=>o.value.tabSize,e=>s.setTabSize(e),{immediate:!0}),R(()=>o.value.phrases,e=>s.setPhrases(e||{}),{immediate:!0}),R(()=>o.value.placeholder,e=>s.setPlaceholder(e),{immediate:!0}),R(()=>o.value.style,e=>s.setStyle(e),{immediate:!0}),o.value.autofocus&&s.focus(),t.emit(mp.Ready,{state:r.value,view:i.value,container:n.value,editorTools:s})}),Ee(()=>{o.value.autoDestroy&&i.value&&i.value.destroy()}),()=>Ce(`div`,{class:`cv-editor-codemirror`,ref:n})}}),bp=`#e5c07b`,xp=`#e06c75`,Sp=`#56b6c2`,Cp=`#ffffff`,wp=`#abb2bf`,Tp=`#7d8799`,Ep=`#61afef`,Dp=`#98c379`,Op=`#d19a66`,kp=`#c678dd`,Ap=`#21252b`,jp=`#2c313a`,Mp=`#282c34`,Np=`#353a42`,Pp=`#3E4451`,Fp=`#528bff`,Ip=[Ze.theme({"&":{color:wp,backgroundColor:Mp},".cm-content":{caretColor:Fp},".cm-cursor, .cm-dropCursor":{borderLeftColor:Fp},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Pp},".cm-panels":{backgroundColor:Ap,color:wp},".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:Mp,color:Tp,border:`none`},".cm-activeLineGutter":{backgroundColor:jp},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:Np},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Np,borderBottomColor:Np},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:jp,color:wp}}},{dark:!0}),rt(tt.define([{tag:V.keyword,color:kp},{tag:[V.name,V.deleted,V.character,V.propertyName,V.macroName],color:xp},{tag:[V.function(V.variableName),V.labelName],color:Ep},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Op},{tag:[V.definition(V.name),V.separator],color:wp},{tag:[V.typeName,V.className,V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:bp},{tag:[V.operator,V.operatorKeyword,V.url,V.escape,V.regexp,V.link,V.special(V.string)],color:Sp},{tag:[V.meta,V.comment],color:Tp},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.strikethrough,textDecoration:`line-through`},{tag:V.link,color:Tp,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:xp},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Op},{tag:[V.processingInstruction,V.string,V.inserted],color:Dp},{tag:V.invalid,color:Cp}]))],U={name:`materialLight`,dark:!1,background:`#FAFAFA`,foreground:`#90A4AE`,selection:`#80CBC440`,cursor:`#272727`,dropdownBackground:`#FAFAFA`,dropdownBorder:`#00000010`,activeLine:`#c2c2c222`,lineNumber:`#CFD8DC`,lineNumberActive:`#7E939E`,matchingBracket:`#FAFAFA`,keyword:`#7C4DFF`,storage:`#7C4DFF`,variable:`#90A4AE`,parameter:`#90A4AE`,function:`#6182B8`,string:`#91B859`,constant:`#F76D47`,type:`#8796B0`,class:`#FFB62C`,number:`#F76D47`,comment:`#90A4AE`,heading:`#91B859`,invalid:`#E53935`,regexp:`#39ADB5`},Lp=[Ze.theme({"&":{color:U.foreground,backgroundColor:U.background},".cm-content":{caretColor:U.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:U.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:U.selection},".cm-panels":{backgroundColor:U.dropdownBackground,color:U.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:U.dropdownBackground,outline:`1px solid ${U.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:U.selection},".cm-activeLine":{backgroundColor:U.activeLine},".cm-selectionMatch":{backgroundColor:U.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:U.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:U.background,color:U.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:U.background},".cm-lineNumbers .cm-gutterElement":{color:U.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:U.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:U.foreground},".cm-tooltip":{border:`1px solid ${U.dropdownBorder}`,backgroundColor:U.dropdownBackground,color:U.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:U.foreground,borderBottomColor:U.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:U.selection,color:U.foreground}}},{dark:U.dark}),rt(tt.define([{tag:V.keyword,color:U.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:U.variable},{tag:[V.propertyName],color:U.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:U.string},{tag:[V.function(V.variableName),V.labelName],color:U.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:U.constant},{tag:[V.definition(V.name),V.separator],color:U.variable},{tag:[V.className],color:U.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:U.number},{tag:[V.typeName],color:U.type,fontStyle:U.type},{tag:[V.operator,V.operatorKeyword],color:U.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:U.regexp},{tag:[V.meta,V.comment],color:U.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:U.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:U.variable},{tag:V.invalid,color:U.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],W={name:`materialDark`,dark:!0,background:`#263238`,foreground:`#EEFFFF`,selection:`#80CBC420`,cursor:`#FFCC00`,dropdownBackground:`#263238`,dropdownBorder:`#FFFFFF10`,activeLine:`#4c616c22`,lineNumber:`#37474F`,lineNumberActive:`#607a86`,matchingBracket:`#263238`,keyword:`#C792EA`,storage:`#C792EA`,variable:`#EEFFFF`,parameter:`#EEFFFF`,function:`#82AAFF`,string:`#C3E88D`,constant:`#F78C6C`,type:`#B2CCD6`,class:`#FFCB6B`,number:`#F78C6C`,comment:`#546E7A`,heading:`#C3E88D`,invalid:`#FF5370`,regexp:`#89DDFF`},Rp=[Ze.theme({"&":{color:W.foreground,backgroundColor:W.background},".cm-content":{caretColor:W.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:W.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:W.selection},".cm-panels":{backgroundColor:W.dropdownBackground,color:W.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:W.dropdownBackground,outline:`1px solid ${W.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:W.selection},".cm-activeLine":{backgroundColor:W.activeLine},".cm-selectionMatch":{backgroundColor:W.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:W.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:W.background,color:W.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:W.background},".cm-lineNumbers .cm-gutterElement":{color:W.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:W.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:W.foreground},".cm-tooltip":{border:`1px solid ${W.dropdownBorder}`,backgroundColor:W.dropdownBackground,color:W.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:W.foreground,borderBottomColor:W.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:W.selection,color:W.foreground}}},{dark:W.dark}),rt(tt.define([{tag:V.keyword,color:W.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:W.variable},{tag:[V.propertyName],color:W.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:W.string},{tag:[V.function(V.variableName),V.labelName],color:W.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:W.constant},{tag:[V.definition(V.name),V.separator],color:W.variable},{tag:[V.className],color:W.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:W.number},{tag:[V.typeName],color:W.type,fontStyle:W.type},{tag:[V.operator,V.operatorKeyword],color:W.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:W.regexp},{tag:[V.meta,V.comment],color:W.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:W.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:W.variable},{tag:V.invalid,color:W.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],G={name:`solarizedLight`,dark:!1,background:`#FDF6E3`,foreground:`#586E75`,selection:`#EEE8D5`,cursor:`#657B83`,dropdownBackground:`#FDF6E3`,dropdownBorder:`#D3AF86`,activeLine:`#d5bd5c22`,lineNumber:`#586E75`,lineNumberActive:`#567983`,matchingBracket:`#EEE8D5`,keyword:`#859900`,storage:`#586E75`,variable:`#268BD2`,parameter:`#268BD2`,function:`#268BD2`,string:`#2AA198`,constant:`#CB4B16`,type:`#CB4B16`,class:`#CB4B16`,number:`#D33682`,comment:`#93A1A1`,heading:`#268BD2`,invalid:`#DC322F`,regexp:`#DC322F`},zp=[Ze.theme({"&":{color:G.foreground,backgroundColor:G.background},".cm-content":{caretColor:G.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:G.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:G.selection},".cm-panels":{backgroundColor:G.dropdownBackground,color:G.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:G.dropdownBackground,outline:`1px solid ${G.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:G.selection},".cm-activeLine":{backgroundColor:G.activeLine},".cm-selectionMatch":{backgroundColor:G.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:G.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:G.background,color:G.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:G.background},".cm-lineNumbers .cm-gutterElement":{color:G.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:G.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:G.foreground},".cm-tooltip":{border:`1px solid ${G.dropdownBorder}`,backgroundColor:G.dropdownBackground,color:G.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:G.foreground,borderBottomColor:G.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:G.selection,color:G.foreground}}},{dark:G.dark}),rt(tt.define([{tag:V.keyword,color:G.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:G.variable},{tag:[V.propertyName],color:G.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:G.string},{tag:[V.function(V.variableName),V.labelName],color:G.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:G.constant},{tag:[V.definition(V.name),V.separator],color:G.variable},{tag:[V.className],color:G.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:G.number},{tag:[V.typeName],color:G.type,fontStyle:G.type},{tag:[V.operator,V.operatorKeyword],color:G.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:G.regexp},{tag:[V.meta,V.comment],color:G.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:G.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:G.variable},{tag:V.invalid,color:G.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],K={name:`solarizedDark`,dark:!0,background:`#002B36`,foreground:`#93A1A1`,selection:`#274642`,cursor:`#D30102`,dropdownBackground:`#002B36`,dropdownBorder:`#2AA19899`,activeLine:`#005b7022`,lineNumber:`#93A1A1`,lineNumberActive:`#949494`,matchingBracket:`#073642`,keyword:`#859900`,storage:`#93A1A1`,variable:`#268BD2`,parameter:`#268BD2`,function:`#268BD2`,string:`#2AA198`,constant:`#CB4B16`,type:`#CB4B16`,class:`#CB4B16`,number:`#D33682`,comment:`#586E75`,heading:`#268BD2`,invalid:`#DC322F`,regexp:`#DC322F`},Bp=[Ze.theme({"&":{color:K.foreground,backgroundColor:K.background},".cm-content":{caretColor:K.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:K.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:K.selection},".cm-panels":{backgroundColor:K.dropdownBackground,color:K.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:K.dropdownBackground,outline:`1px solid ${K.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:K.selection},".cm-activeLine":{backgroundColor:K.activeLine},".cm-selectionMatch":{backgroundColor:K.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:K.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:K.background,color:K.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:K.background},".cm-lineNumbers .cm-gutterElement":{color:K.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:K.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:K.foreground},".cm-tooltip":{border:`1px solid ${K.dropdownBorder}`,backgroundColor:K.dropdownBackground,color:K.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:K.foreground,borderBottomColor:K.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:K.selection,color:K.foreground}}},{dark:K.dark}),rt(tt.define([{tag:V.keyword,color:K.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:K.variable},{tag:[V.propertyName],color:K.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:K.string},{tag:[V.function(V.variableName),V.labelName],color:K.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:K.constant},{tag:[V.definition(V.name),V.separator],color:K.variable},{tag:[V.className],color:K.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:K.number},{tag:[V.typeName],color:K.type,fontStyle:K.type},{tag:[V.operator,V.operatorKeyword],color:K.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:K.regexp},{tag:[V.meta,V.comment],color:K.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:K.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:K.variable},{tag:V.invalid,color:K.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],q={name:`dracula`,dark:!0,background:`#282A36`,foreground:`#F8F8F2`,selection:`#44475A`,cursor:`#F8F8F2`,dropdownBackground:`#282A36`,dropdownBorder:`#191A21`,activeLine:`#53576c22`,lineNumber:`#6272A4`,lineNumberActive:`#F8F8F2`,matchingBracket:`#44475A`,keyword:`#FF79C6`,storage:`#FF79C6`,variable:`#F8F8F2`,parameter:`#F8F8F2`,function:`#50FA7B`,string:`#F1FA8C`,constant:`#BD93F9`,type:`#8BE9FD`,class:`#8BE9FD`,number:`#BD93F9`,comment:`#6272A4`,heading:`#BD93F9`,invalid:`#FF5555`,regexp:`#F1FA8C`},Vp=[Ze.theme({"&":{color:q.foreground,backgroundColor:q.background},".cm-content":{caretColor:q.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:q.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:q.selection},".cm-panels":{backgroundColor:q.dropdownBackground,color:q.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:q.dropdownBackground,outline:`1px solid ${q.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:q.selection},".cm-activeLine":{backgroundColor:q.activeLine},".cm-selectionMatch":{backgroundColor:q.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:q.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:q.background,color:q.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:q.background},".cm-lineNumbers .cm-gutterElement":{color:q.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:q.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:q.foreground},".cm-tooltip":{border:`1px solid ${q.dropdownBorder}`,backgroundColor:q.dropdownBackground,color:q.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:q.foreground,borderBottomColor:q.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:q.selection,color:q.foreground}}},{dark:q.dark}),rt(tt.define([{tag:V.keyword,color:q.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:q.variable},{tag:[V.propertyName],color:q.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:q.string},{tag:[V.function(V.variableName),V.labelName],color:q.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:q.constant},{tag:[V.definition(V.name),V.separator],color:q.variable},{tag:[V.className],color:q.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:q.number},{tag:[V.typeName],color:q.type,fontStyle:q.type},{tag:[V.operator,V.operatorKeyword],color:q.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:q.regexp},{tag:[V.meta,V.comment],color:q.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:q.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:q.variable},{tag:V.invalid,color:q.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],J={name:`githubLight`,dark:!1,background:`#fff`,foreground:`#444d56`,selection:`#0366d625`,cursor:`#044289`,dropdownBackground:`#fff`,dropdownBorder:`#e1e4e8`,activeLine:`#c6c6c622`,lineNumber:`#1b1f234d`,lineNumberActive:`#24292e`,matchingBracket:`#34d05840`,keyword:`#d73a49`,storage:`#d73a49`,variable:`#e36209`,parameter:`#24292e`,function:`#005cc5`,string:`#032f62`,constant:`#005cc5`,type:`#005cc5`,class:`#6f42c1`,number:`#005cc5`,comment:`#6a737d`,heading:`#005cc5`,invalid:`#cb2431`,regexp:`#032f62`},Hp=[Ze.theme({"&":{color:J.foreground,backgroundColor:J.background},".cm-content":{caretColor:J.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:J.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:J.selection},".cm-panels":{backgroundColor:J.dropdownBackground,color:J.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:J.dropdownBackground,outline:`1px solid ${J.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:J.selection},".cm-activeLine":{backgroundColor:J.activeLine},".cm-selectionMatch":{backgroundColor:J.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:J.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:J.background,color:J.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:J.background},".cm-lineNumbers .cm-gutterElement":{color:J.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:J.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:J.foreground},".cm-tooltip":{border:`1px solid ${J.dropdownBorder}`,backgroundColor:J.dropdownBackground,color:J.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:J.foreground,borderBottomColor:J.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:J.selection,color:J.foreground}}},{dark:J.dark}),rt(tt.define([{tag:V.keyword,color:J.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:J.variable},{tag:[V.propertyName],color:J.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:J.string},{tag:[V.function(V.variableName),V.labelName],color:J.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:J.constant},{tag:[V.definition(V.name),V.separator],color:J.variable},{tag:[V.className],color:J.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:J.number},{tag:[V.typeName],color:J.type,fontStyle:J.type},{tag:[V.operator,V.operatorKeyword],color:J.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:J.regexp},{tag:[V.meta,V.comment],color:J.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:J.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:J.variable},{tag:V.invalid,color:J.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Y={name:`githubDark`,dark:!0,background:`#24292e`,foreground:`#d1d5da`,selection:`#3392FF44`,cursor:`#c8e1ff`,dropdownBackground:`#24292e`,dropdownBorder:`#1b1f23`,activeLine:`#4d566022`,lineNumber:`#444d56`,lineNumberActive:`#e1e4e8`,matchingBracket:`#17E5E650`,keyword:`#f97583`,storage:`#f97583`,variable:`#ffab70`,parameter:`#e1e4e8`,function:`#79b8ff`,string:`#9ecbff`,constant:`#79b8ff`,type:`#79b8ff`,class:`#b392f0`,number:`#79b8ff`,comment:`#6a737d`,heading:`#79b8ff`,invalid:`#f97583`,regexp:`#9ecbff`},Up=[Ze.theme({"&":{color:Y.foreground,backgroundColor:Y.background},".cm-content":{caretColor:Y.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:Y.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Y.selection},".cm-panels":{backgroundColor:Y.dropdownBackground,color:Y.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:Y.dropdownBackground,outline:`1px solid ${Y.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Y.selection},".cm-activeLine":{backgroundColor:Y.activeLine},".cm-selectionMatch":{backgroundColor:Y.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Y.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:Y.background,color:Y.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:Y.background},".cm-lineNumbers .cm-gutterElement":{color:Y.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:Y.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:Y.foreground},".cm-tooltip":{border:`1px solid ${Y.dropdownBorder}`,backgroundColor:Y.dropdownBackground,color:Y.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Y.foreground,borderBottomColor:Y.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:Y.selection,color:Y.foreground}}},{dark:Y.dark}),rt(tt.define([{tag:V.keyword,color:Y.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:Y.variable},{tag:[V.propertyName],color:Y.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:Y.string},{tag:[V.function(V.variableName),V.labelName],color:Y.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Y.constant},{tag:[V.definition(V.name),V.separator],color:Y.variable},{tag:[V.className],color:Y.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:Y.number},{tag:[V.typeName],color:Y.type,fontStyle:Y.type},{tag:[V.operator,V.operatorKeyword],color:Y.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:Y.regexp},{tag:[V.meta,V.comment],color:Y.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:Y.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Y.variable},{tag:V.invalid,color:Y.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],X={name:`aura`,dark:!0,background:`#21202e`,foreground:`#edecee`,selection:`#3d375e7f`,cursor:`#a277ff`,dropdownBackground:`#21202e`,dropdownBorder:`#3b334b`,activeLine:`#4d4b6622`,lineNumber:`#a394f033`,lineNumberActive:`#cdccce`,matchingBracket:`#a394f033`,keyword:`#a277ff`,storage:`#a277ff`,variable:`#edecee`,parameter:`#edecee`,function:`#ffca85`,string:`#61ffca`,constant:`#61ffca`,type:`#82e2ff`,class:`#82e2ff`,number:`#61ffca`,comment:`#6d6d6d`,heading:`#a277ff`,invalid:`#ff6767`,regexp:`#61ffca`},Wp=[Ze.theme({"&":{color:X.foreground,backgroundColor:X.background},".cm-content":{caretColor:X.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:X.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:X.selection},".cm-panels":{backgroundColor:X.dropdownBackground,color:X.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:X.dropdownBackground,outline:`1px solid ${X.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:X.selection},".cm-activeLine":{backgroundColor:X.activeLine},".cm-selectionMatch":{backgroundColor:X.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:X.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:X.background,color:X.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:X.background},".cm-lineNumbers .cm-gutterElement":{color:X.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:X.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:X.foreground},".cm-tooltip":{border:`1px solid ${X.dropdownBorder}`,backgroundColor:X.dropdownBackground,color:X.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:X.foreground,borderBottomColor:X.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:X.selection,color:X.foreground}}},{dark:X.dark}),rt(tt.define([{tag:V.keyword,color:X.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:X.variable},{tag:[V.propertyName],color:X.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:X.string},{tag:[V.function(V.variableName),V.labelName],color:X.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:X.constant},{tag:[V.definition(V.name),V.separator],color:X.variable},{tag:[V.className],color:X.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:X.number},{tag:[V.typeName],color:X.type,fontStyle:X.type},{tag:[V.operator,V.operatorKeyword],color:X.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:X.regexp},{tag:[V.meta,V.comment],color:X.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:X.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:X.variable},{tag:V.invalid,color:X.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Z={name:`tokyoNight`,dark:!0,background:`#1a1b26`,foreground:`#787c99`,selection:`#515c7e40`,cursor:`#c0caf5`,dropdownBackground:`#1a1b26`,dropdownBorder:`#787c99`,activeLine:`#43455c22`,lineNumber:`#363b54`,lineNumberActive:`#737aa2`,matchingBracket:`#16161e`,keyword:`#bb9af7`,storage:`#bb9af7`,variable:`#c0caf5`,parameter:`#c0caf5`,function:`#7aa2f7`,string:`#9ece6a`,constant:`#bb9af7`,type:`#0db9d7`,class:`#c0caf5`,number:`#ff9e64`,comment:`#444b6a`,heading:`#89ddff`,invalid:`#ff5370`,regexp:`#b4f9f8`},Gp=[Ze.theme({"&":{color:Z.foreground,backgroundColor:Z.background},".cm-content":{caretColor:Z.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:Z.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Z.selection},".cm-panels":{backgroundColor:Z.dropdownBackground,color:Z.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:Z.dropdownBackground,outline:`1px solid ${Z.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Z.selection},".cm-activeLine":{backgroundColor:Z.activeLine},".cm-selectionMatch":{backgroundColor:Z.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Z.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:Z.background,color:Z.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:Z.background},".cm-lineNumbers .cm-gutterElement":{color:Z.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:Z.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:Z.foreground},".cm-tooltip":{border:`1px solid ${Z.dropdownBorder}`,backgroundColor:Z.dropdownBackground,color:Z.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Z.foreground,borderBottomColor:Z.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:Z.selection,color:Z.foreground}}},{dark:Z.dark}),rt(tt.define([{tag:V.keyword,color:Z.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:Z.variable},{tag:[V.propertyName],color:Z.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:Z.string},{tag:[V.function(V.variableName),V.labelName],color:Z.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Z.constant},{tag:[V.definition(V.name),V.separator],color:Z.variable},{tag:[V.className],color:Z.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:Z.number},{tag:[V.typeName],color:Z.type,fontStyle:Z.type},{tag:[V.operator,V.operatorKeyword],color:Z.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:Z.regexp},{tag:[V.meta,V.comment],color:Z.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:Z.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Z.variable},{tag:V.invalid,color:Z.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Q={name:`tokyoNightStorm`,dark:!0,background:`#24283b`,foreground:`#7982a9`,selection:`#6f7bb630`,cursor:`#c0caf5`,dropdownBackground:`#24283b`,dropdownBorder:`#7982a9`,activeLine:`#4d547722`,lineNumber:`#3b4261`,lineNumberActive:`#737aa2`,matchingBracket:`#1f2335`,keyword:`#bb9af7`,storage:`#bb9af7`,variable:`#c0caf5`,parameter:`#c0caf5`,function:`#7aa2f7`,string:`#9ece6a`,constant:`#bb9af7`,type:`#2ac3de`,class:`#c0caf5`,number:`#ff9e64`,comment:`#565f89`,heading:`#89ddff`,invalid:`#ff5370`,regexp:`#b4f9f8`},Kp=[Ze.theme({"&":{color:Q.foreground,backgroundColor:Q.background},".cm-content":{caretColor:Q.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:Q.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Q.selection},".cm-panels":{backgroundColor:Q.dropdownBackground,color:Q.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:Q.dropdownBackground,outline:`1px solid ${Q.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Q.selection},".cm-activeLine":{backgroundColor:Q.activeLine},".cm-selectionMatch":{backgroundColor:Q.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Q.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:Q.background,color:Q.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:Q.background},".cm-lineNumbers .cm-gutterElement":{color:Q.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:Q.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:Q.foreground},".cm-tooltip":{border:`1px solid ${Q.dropdownBorder}`,backgroundColor:Q.dropdownBackground,color:Q.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Q.foreground,borderBottomColor:Q.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:Q.selection,color:Q.foreground}}},{dark:Q.dark}),rt(tt.define([{tag:V.keyword,color:Q.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:Q.variable},{tag:[V.propertyName],color:Q.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:Q.string},{tag:[V.function(V.variableName),V.labelName],color:Q.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:Q.constant},{tag:[V.definition(V.name),V.separator],color:Q.variable},{tag:[V.className],color:Q.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:Q.number},{tag:[V.typeName],color:Q.type,fontStyle:Q.type},{tag:[V.operator,V.operatorKeyword],color:Q.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:Q.regexp},{tag:[V.meta,V.comment],color:Q.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:Q.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:Q.variable},{tag:V.invalid,color:Q.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],$={name:`tokyoNightDay`,dark:!1,background:`#e1e2e7`,foreground:`#6a6f8e`,selection:`#8591b840`,cursor:`#3760bf`,dropdownBackground:`#e1e2e7`,dropdownBorder:`#6a6f8e`,activeLine:`#a7aaba22`,lineNumber:`#b3b6cd`,lineNumberActive:`#68709a`,matchingBracket:`#e9e9ec`,keyword:`#9854f1`,storage:`#9854f1`,variable:`#3760bf`,parameter:`#3760bf`,function:`#2e7de9`,string:`#587539`,constant:`#9854f1`,type:`#07879d`,class:`#3760bf`,number:`#b15c00`,comment:`#9da3c2`,heading:`#006a83`,invalid:`#ff3e64`,regexp:`#2e5857`},qp=[Ze.theme({"&":{color:$.foreground,backgroundColor:$.background},".cm-content":{caretColor:$.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:$.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:$.selection},".cm-panels":{backgroundColor:$.dropdownBackground,color:$.foreground},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:$.dropdownBackground,outline:`1px solid ${$.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:$.selection},".cm-activeLine":{backgroundColor:$.activeLine},".cm-selectionMatch":{backgroundColor:$.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:$.matchingBracket,outline:`none`},".cm-gutters":{backgroundColor:$.background,color:$.foreground,border:`none`},".cm-activeLineGutter":{backgroundColor:$.background},".cm-lineNumbers .cm-gutterElement":{color:$.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:$.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:$.foreground},".cm-tooltip":{border:`1px solid ${$.dropdownBorder}`,backgroundColor:$.dropdownBackground,color:$.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$.foreground,borderBottomColor:$.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:$.selection,color:$.foreground}}},{dark:$.dark}),rt(tt.define([{tag:V.keyword,color:$.keyword},{tag:[V.name,V.deleted,V.character,V.macroName],color:$.variable},{tag:[V.propertyName],color:$.function},{tag:[V.processingInstruction,V.string,V.inserted,V.special(V.string)],color:$.string},{tag:[V.function(V.variableName),V.labelName],color:$.function},{tag:[V.color,V.constant(V.name),V.standard(V.name)],color:$.constant},{tag:[V.definition(V.name),V.separator],color:$.variable},{tag:[V.className],color:$.class},{tag:[V.number,V.changed,V.annotation,V.modifier,V.self,V.namespace],color:$.number},{tag:[V.typeName],color:$.type,fontStyle:$.type},{tag:[V.operator,V.operatorKeyword],color:$.keyword},{tag:[V.url,V.escape,V.regexp,V.link],color:$.regexp},{tag:[V.meta,V.comment],color:$.comment},{tag:V.strong,fontWeight:`bold`},{tag:V.emphasis,fontStyle:`italic`},{tag:V.link,textDecoration:`underline`},{tag:V.heading,fontWeight:`bold`,color:$.heading},{tag:[V.atom,V.bool,V.special(V.variableName)],color:$.variable},{tag:V.invalid,color:$.invalid},{tag:V.strikethrough,textDecoration:`line-through`}]))],Jp={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:`input...`,backgroundColor:`white`,language:`markdown`,theme:`oneDark`,phrases:`en-us`},Yp={emits:[`update:config`],components:{CodemirrorEditor:yp},data(){return{codemrrConfig:{...Jp},codemrrThemes:{oneDark:Ip,materialLight:Lp,materialDark:Rp,solarizedLight:zp,solarizedDark:Bp,dracula:Vp,githubLight:Hp,githubDark:Up,aura:Wp,tokyoNight:Gp,tokyoNightStorm:Kp,tokyoNightDay:qp},codemrrLanguages:{javascript:it(),js:it(),html:at(),markdown:st(),json:ot(),vue:ct(),java:ut(),php:lt(),python:ft(),go:mt(),mysql:dt(),sql:dt(),xml:pt(),css:ht()},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 e=Object.keys(this.codemrrThemes);return[`default`].concat(e)},optionPhrases(){return[`en-us`,`de-de`]},optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){let e=[];return e.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&e.push(this.codemrrThemes[this.codemrrConfig.theme]),e},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(e){this.$emit(`update:config`,e)}}},Xp={props:{editorID:{type:[String],required:!1,default(){return``}}},data(){return{editorRefEL:null}},computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((Math.random()*1e3).toFixed(0)+``)}}};function Zp(e,t){var n=document.createElement(`a`);if(n.setAttribute(`href`,`data:text/plain;charset=UTF-8,`+encodeURIComponent(e)),n.setAttribute(`download`,t),n.style.display=`none`,document.createEvent){let e=document.createEvent(`MouseEvents`);e.initEvent(`click`,!0,!0),n.dispatchEvent(e)}else n.click()}function Qp(e){return e<10?`0`+e:e}var $p={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},em={name:`SvgImgMap`},tm={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`};function nm(e,t,n,r,i,a){return A(),S(`svg`,tm,[...t[0]||=[C(`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),C(`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)]])}var rm=H(em,[[`render`,nm]]),im={name:`SvgUploadFile`},am={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`};function om(e,t,n,r,i,a){return A(),S(`svg`,am,[...t[0]||=[C(`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),C(`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)]])}var sm=H(im,[[`render`,om]]),cm={name:`SvgToc`},lm={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`};function um(e,t,n,r,i,a){return A(),S(`svg`,lm,[...t[0]||=[C(`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),C(`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)]])}var dm=H(cm,[[`render`,um]]),fm={name:`SvgCopy`},pm={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`};function mm(e,t,n,r,i,a){return A(),S(`svg`,pm,[...t[0]||=[C(`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),C(`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),C(`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),C(`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)]])}var hm=H(fm,[[`render`,mm]]),gm={name:`SvgLanguage`},_m={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`};function vm(e,t,n,r,i,a){return A(),S(`svg`,_m,[...t[0]||=[C(`path`,{d:`M200.313605 806.764028h487.993851v78.708685h-487.993851z`,fill:`#6C7280`,"p-id":`13072`},null,-1),C(`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),C(`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),C(`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)]])}var ym={components:{SvgImgMap:rm,SvgUploadFile:sm,SvgToc:dm,SvgCopy:hm,SvgLanguage:H(gm,[[`render`,vm]])},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(){return{}}},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data(){return{actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:``}},computed:{lastExpFileName(){let e=new Date,t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),i=e.getHours(),a=e.getMinutes(),o=t+`-`+Qp(n)+`-`+Qp(r)+`_`+Qp(i)+`-`+Qp(a);return this.exportFileName||o},toolConfig(){let{toolbars:e={}}=this;return{...$p,...e}}},created(){this.actionPreview=this.isPreview||!1},methods:{toggleSlideDown(){this.slideDown=!this.slideDown},actionPhrasesSet(e){this.codemrrConfig.phrases=e,this.actionPhrasesDropdown=!1},actionLanguageSet(e){this.codemrrConfig.language=e,this.actionLanguageDropdown=!1},actionBgColorSet(e){this.codemrrConfig.backgroundColor=e,this.actionBgColorDropdown=!1},actionThemesSet(e){this.codemrrConfig.theme=e,this.actionThemeDropdown=!1,this.$emit(`on-act-theme`,e)},actionFullscreenSet(e){this.actionFullscreen=e;let t=this.$refs[this.editorWrapRefID];e?t.classList.add(`fullscreen`):t.classList.remove(`fullscreen`),this.actionCurrent(`fullscreen`,e)},actionChooseImage(){let e=document.createElement(`input`);e.type=`file`,e.accept=`image/*`,e.onchange=()=>{let t=e.files;t[0]&&(this.$emit(`on-act-choose-image`,t[0]),e.value=``)},e.click()},actionInsBg(){let e=this.getLastPoint(),t=e.content||!1;t?this.insertContent(`==`+t+`==`,!1):(this.insertContent(`====`,!1),this.setCursor(e.line,e.ch+1))},actionUndo(){if(this.editorViewInst){let e=this.editorViewInst.state.behavior(Ye.effect(Ye.undo));this.editorViewInst.update([{changes:{from:0,to:e.doc.length,insert:e.doc},selection:Je.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:Ye.redo()})},actionInsStrong(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`**`+t+`**`)):this.insertContent(e.start,`****`)},actionInsItalic(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`*`+t+`*`)):this.insertContent(e.start,`**`)},actionInsOverline(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`~~`+t+`~~`)):this.insertContent(e.start,`~~~~`)},actionInsUnderline(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,`<u>`+t+`</u>`)):this.insertContent(e.start,`<u></u>`)},actionInsTitle(e){let t={1:`# `,2:`## `,3:`### `,4:`#### `,5:`##### `,6:`###### `}[e],n=this.getLastPoint(),r=n.content||!1,i=`
|
|
2
2
|
`+t+`标题
|
|
3
3
|
|
|
4
4
|
`;r?r.startsWith(`#`)?this.insertContent(n.end+1,i):(i=`
|
|
@@ -24,8 +24,8 @@ import{ClickOutside as e,ElAutocomplete as t,ElAvatar as n,ElBadge as r,ElButton
|
|
|
24
24
|
|
|
25
25
|
`)},actionInsImage(){let e=this.getLastPoint();this.insertContent(e.end,`
|
|
26
26
|
|
|
27
|
-
`)},actionImportFile(e){let t=e.target.files[0];if(!t)return;let{type:n}=t;if(![`text/markdown`,`text/src`].includes(n))return;let r=new FileReader;r.readAsText(t,{encoding:`utf-8`}),r.onload=()=>{this.localVal=r.result},r.onerror=e=>{}},actionExportFile(){let e=`.text`,t={java:`.java`,php:`.php`,css:`.css`,vue:`.vue`,go:`.go`,python:`.py`,json:`.json`,javascript:`.js`,js:`.js`,html:`.html`,markdown:`.md`};this.language&&t[this.language]&&(e=t[this.language]),
|
|
28
|
-
`+gt(this.actionHtmlText)),this.actionHtmlText=``,this.actionHtmlDiaVisible=!1},actionCurrent(e,t){this.$emit(`on-action`,e,t)},actionCustom(e){this.$emit(`on-act-custom`,e)}}},mm={name:`cvEditorCode`,mixins:[Up,Wp,pm],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(){return{}}},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(){return{localVal:``,heightMainPx:``,editorWrapRefEL:null}},watch:{localVal(e){this.$emit(`update:modelValue`,e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+`wrap`},heightTotalPx(){let e=``+this.height;return e.includes(`%`)||e.includes(`px`)?e:e+`px`},widthTotalPx(){let e=``+this.width;return e.includes(`px`)?e:e+`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];let e=this.editorWrapRefEL.querySelector(`.cv-editor-code-toolbar`).offsetHeight;return e?this.heightTotalPx.includes(`%`)?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace(`px`,``)-e-2+`px`:this.heightTotalPx},consoleLog(e,t){},initEditorReady(e){let{container:t,state:n,view:r}=e;this.editorStateInst=n,this.editorViewInst=r,this.listerenEvent(),this.$emit(`on-ready`)},listerenEvent(){}}},hm={key:0,class:`cv-editor-code-toolbar`,"data-title":`头部工具栏`},gm={class:`cv-editor-toolbars`},_m={name:`导入文件`,class:`import-file`},vm={name:`保存到本地`},ym={key:1,class:`shift-theme`,name:`主题`},bm=[`onClick`],xm={class:`shift-theme`,name:`语言`},Sm=[`onClick`],Cm={class:`icon-svg`},wm={key:5,class:`segmentation`},Tm=[`name`],Em={title:`编辑器`,class:`cv-editor-code-main`};function Dm(e,t,n,r,i,a){let o=P(`SvgLanguage`),s=P(`SvgCopy`),c=P(`CodemirrorEditor`);return A(),x(`div`,{ref:a.editorWrapRefID,class:D([`cv-editor-code-wrap cv-editor-vars`,`${n.bordered?`border`:``}`]),style:k({width:a.widthTotalPx,height:a.heightTotalPx})},[e.actionPreview?b(``,!0):(A(),x(`div`,hm,[S(`ul`,gm,[e.$slots.title?(A(),x(v,{key:0},[S(`li`,null,[N(e.$slots,`title`)]),t[16]||=S(`li`,{class:`segmentation`},[S(`div`)],-1)],64)):b(``,!0),B(S(`li`,_m,[S(`span`,{class:`iconfont icon-daoru`,onClick:t[0]||=(...t)=>e.actionImportFile&&e.actionImportFile(...t)}),S(`input`,{type:`file`,onChange:t[1]||=t=>e.actionImportFile(t),accept:`text/markdown`},null,32)],512),[[L,e.toolConfig.importmd]]),B(S(`li`,vm,[S(`span`,{class:`iconfont icon-download`,onClick:t[2]||=(...t)=>e.actionExportFile&&e.actionExportFile(...t)})],512),[[L,e.toolConfig.exportmd]]),t[20]||=S(`li`,{class:`segmentation`},[S(`div`)],-1),e.toolConfig.theme?(A(),x(`li`,ym,[S(`span`,{class:`iconfont icon-theme`,onClick:t[3]||=t=>e.actionThemeDropdown=!e.actionThemeDropdown}),S(`ul`,{class:D({active:e.actionThemeDropdown}),onMouseleave:t[4]||=t=>e.actionThemeDropdown=!1},[(A(!0),x(v,null,M(e.optionTheme,t=>(A(),x(`li`,{onClick:n=>e.actionThemesSet(t)},F(t),9,bm))),256))],34)])):b(``,!0),S(`li`,xm,[S(`span`,{class:`icon-svg`,onClick:t[5]||=t=>e.actionLanguageDropdown=!e.actionLanguageDropdown},[w(o)]),S(`ul`,{class:D({active:e.actionLanguageDropdown}),onMouseleave:t[6]||=t=>e.actionLanguageDropdown=!1},[(A(!0),x(v,null,M(e.optionLanguage,t=>(A(),x(`li`,{class:D(t==n.language?`active`:``),onClick:n=>e.actionLanguageSet(t)},F(t),11,Sm))),256))],34)]),t[21]||=S(`li`,{class:`empty`},null,-1),e.toolConfig.copy?(A(),x(`li`,{key:2,name:`复制`,onClick:t[7]||=(...t)=>e.actionCopySet&&e.actionCopySet(...t)},[S(`span`,Cm,[w(s)])])):b(``,!0),e.toolConfig.clear?(A(),x(`li`,{key:3,name:`清空`,onClick:t[8]||=e=>i.localVal=``},[...t[17]||=[S(`span`,{class:`iconfont icon-clear`},null,-1)]])):b(``,!0),e.toolConfig.save?(A(),x(`li`,{key:4,name:`保存`,onClick:t[9]||=(...t)=>e.actionSaveSet&&e.actionSaveSet(...t)},[...t[18]||=[S(`span`,{class:`iconfont icon-save`},null,-1)]])):b(``,!0),e.toolConfig.fullscreen?(A(),x(`li`,wm,[...t[19]||=[S(`div`,null,null,-1)]])):b(``,!0),e.toolConfig.fullscreen?(A(),x(`li`,{key:6,name:e.actionFullscreen?`退出全屏`:`全屏`},[B(S(`span`,{onClick:t[10]||=t=>e.actionFullscreenSet(!1),class:`iconfont icon-quite`},null,512),[[L,e.actionFullscreen]]),B(S(`span`,{onClick:t[11]||=t=>e.actionFullscreenSet(!0),class:`iconfont icon-fullscreen`},null,512),[[L,!e.actionFullscreen]])],8,Tm)):b(``,!0)])])),S(`div`,Em,[w(c,E(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:i.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:i.localVal,"onUpdate:modelValue":t[12]||=e=>i.localVal=e,onReady:a.initEditorReady,onChange:t[13]||=e=>a.consoleLog(`change`,e),onFocus:t[14]||=e=>a.consoleLog(`focus`,e),onBlur:t[15]||=e=>a.consoleLog(`blur`,e)}),null,16,[`id`,`style`,`extensions`,`modelValue`,`onReady`])])],6)}var Om=H(mm,[[`render`,Dm]]),km={name:`cvEditorJson`,components:{},mixins:[Wp],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(){return{editorInstance:null,style:{},max:!1,internalChange:!1,localVal:``}},watch:{modelValue:{handler(e){this.localVal!=e&&(this.localVal=e,this.updateVal(e))},deep:!0},max(e){this.$nextTick(()=>{this.initNewCreate()})},options:{handler(e){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(){let{JSONEditor:e}=await import(`https://10ui.cn/jsoneditor/vanilla-jsoneditor@0.22.0/standalone.js`);this.editorInstance||(this.editorInstance=new e({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 e=null,t={};try{t=this.editorInstance.get()}catch(t){e=t}e?this.$emit(`error`,e):this.editorInstance&&(this.internalChange=!0,this.localVal=t,this.$emit(`update:modelValue`,this.localVal),this.$nextTick(()=>{this.internalChange=!1}))},updateVal(e){this.editorInstance&&e!==void 0&&!this.internalChange&&this.editorInstance.update({json:e})},isJSON(e){try{return JSON.parse(e),!0}catch{return!1}},destroyView(){this.editor&&=(this.editorInstance.destroy(),null)},handleChange(e){this.emitData||=Pr(400,e=>{this.$emit(`update:modelValue`,e)}),this.emitData(e)}}};function Am(e,t,n,r,i,a){return A(),x(`div`,{class:D([`cv-editor-json`,{"max-box":i.max,"min-box":!i.max}]),style:k(a.getHeight)},[S(`div`,{ref:e.editorRefID,class:`jsoneditor-box`},null,512),S(`a`,{onClick:t[0]||=e=>i.max=!i.max,class:`max-btn`})],6)}var jm=H(km,[[`render`,Am]]),Mm={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(){return{dialogVisible:!1,listObj:{},fileList:[],diyUpList:new FormData}},methods:{checkAllSuccess(){return Object.keys(this.listObj).every(e=>this.listObj[e].hasSuccess)},handleSubmit(){let e=Object.keys(this.listObj).map(e=>this.listObj[e]);if(!this.checkAllSuccess()){this.$message(`请等待所有图片上传成功。如果出现网络问题,请刷新页面并重新上传!`);return}this.$emit(`successCBK`,e),this.listObj={},this.fileList=[],this.dialogVisible=!1},handleSuccess(e,t){let n=t.uid,r=Object.keys(this.listObj);for(let t=0,i=r.length;t<i;t++)if(this.listObj[r[t]].uid===n){this.upResponseFn&&typeof this.upResponseFn==`function`?this.listObj[r[t]].url=this.upResponseFn(e):this.listObj[r[t]].url=e.files.file||``,this.listObj[r[t]].hasSuccess=!0;return}},handleRemove(e){let t=e.uid,n=Object.keys(this.listObj);for(let e=0,r=n.length;e<r;e++)if(this.listObj[n[e]].uid===t){delete this.listObj[n[e]];return}},beforeUpload(e){let t=this,n=window.URL||window.webkitURL,r=e.uid;return this.listObj[r]={},new Promise((i,a)=>{let o=new Image;o.src=n.createObjectURL(e),o.onload=function(){t.listObj[r]={hasSuccess:!1,uid:e.uid,width:this.width,height:this.height}},i(!0)})}}},Nm={class:`cv-editor-upload-container`};function Pm(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`),c=P(`el-upload`),l=P(`el-dialog`);return A(),x(`div`,Nm,[w(s,{style:k({background:n.color,borderColor:n.color,fontSize:`16px`}),type:`primary`,onClick:t[0]||=e=>i.dialogVisible=!0},{default:z(()=>[w(o,{type:`arrowUploadFilled`,size:`16`,style:{"margin-right":`5px`}}),t[2]||=C(` 上传 `,-1)]),_:1},8,[`style`]),w(l,{visible:i.dialogVisible},{default:z(()=>[w(c,E({class:`editor-slide-upload`},{action:n.upAction,headers:n.upHeaders,data:n.upData,name:n.upName,multiple:!0,showFileList:!0,listType:`picture-card`,autoUpload:!0},{"file-list":i.fileList,"on-remove":a.handleRemove,"on-success":a.handleSuccess,"before-upload":a.beforeUpload}),{default:z(()=>[w(s,{type:`primary`},{default:z(()=>[...t[3]||=[C(`点击上传`,-1)]]),_:1})]),_:1},16,[`file-list`,`on-remove`,`on-success`,`before-upload`]),w(s,{onClick:t[1]||=e=>i.dialogVisible=!1},{default:z(()=>[...t[4]||=[C(`取消`,-1)]]),_:1}),w(s,{type:`primary`,onClick:a.handleSubmit},{default:z(()=>[...t[5]||=[C(`确定`,-1)]]),_:1},8,[`onClick`])]),_:1},8,[`visible`])])}var Fm=H(Mm,[[`render`,Pm],[`__scopeId`,`data-v-5188ef22`]]),Im=[`advlist`,`anchor`,`autolink`,`autosave`,`code`,`codesample`,`directionality`,`emoticons`,`fullscreen`,`image`,`insertdatetime`,`link`,`lists`,`media`,`nonbreaking`,`pagebreak`,`preview`,`save`,`searchreplace`,`table`,`visualblocks`,`visualchars`,`wordcount`],Lm=[`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`],Rm=[];function zm(){return window.tinymce}var Bm=(e,t)=>{let n=document.getElementById(e),r=t||function(){};if(!n){let t=document.createElement(`script`);t.src=e,t.id=e,document.body.appendChild(t),Rm.push(r),(`onload`in t?i:a)(t)}n&&r&&(zm()?r(null,n):Rm.push(r));function i(t){t.onload=function(){this.onerror=this.onload=null;for(let e of Rm)e(null,t);Rm=null},t.onerror=function(){this.onerror=this.onload=null,r(Error(`Failed to load `+e),t)}}function a(e){e.onreadystatechange=function(){if(!(this.readyState!==`complete`&&this.readyState!==`loaded`)){this.onreadystatechange=null;for(let t of Rm)t(null,e);Rm=null}}}},Vm=`https://10ui.cn/tinymce/@7.0.0/tinymce.min.js`,Hm={inheritAttrs:!1,name:`cvEditorTinymce`,components:{EditorSlideUpload:Fm},emits:[`update:modelValue`],mixins:[Wp],props:{modelValue:{type:String,default:``},toolbar:{type:Array,required:!1,default(){return[]}},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(){return{localVal:``,fullscreen:!1,languageTypeList:{en:`en`,zh:`zh_CN`,es:`es_MX`,ja:`ja`}}},computed:{containerWidth(){let e=this.width;return/^[\d]+(\.[\d]+)?$/.test(e)?`${e}px`:e}},watch:{modelValue(e){this.localVal!=e&&(this.localVal=e,window.tinymce.get(this.editorRefID).setContent(e||``))}},created(){this.localVal=this.modelValue},mounted(){this.initLoad()},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{initLoad(){Bm(Vm,e=>{if(e){this.$message.error(e.message);return}this.initTinymce()})},initTinymce(){let e=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:Lm,menubar:this.menubar,plugins:Im,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:t=>{e.localVal&&t.setContent(e.localVal)},setup(t){t.on(`FullscreenStateChanged`,t=>{e.fullscreen=t.state}),t.on(`input`,n=>{e.localVal=t.getContent(),e.$emit(`update:modelValue`,e.localVal)})},convert_urls:!1,images_upload_handler(e,t,n,r){r(0),new FormData}})},destroyTinymce(){let e=window.tinymce.get(this.editorRefID);this.fullscreen&&e.execCommand(`mceFullScreen`),e&&e.destroy()},setContent(e){window.tinymce.get(this.editorRefID).setContent(e)},getContent(){window.tinymce.get(this.editorRefID).getContent()},imageSuccessCBK(e){e.forEach(e=>window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${e.url}" >`))}}},Um=[`id`],Wm={class:`editor-custom-btn-container`};function Gm(e,t,n,r,i,a){let o=P(`EditorSlideUpload`);return A(),x(`div`,{class:D([`cv-editor-tinymce tinymce-container`,{fullscreen:i.fullscreen}]),style:k({width:a.containerWidth})},[S(`textarea`,{id:e.editorRefID,class:`tinymce-textarea`},null,8,Um),S(`div`,Wm,[w(o,E({color:`#1890ff`,class:`editor-upload-btn`,onSuccessCBK:a.imageSuccessCBK},n.uploadAttr),null,16,[`onSuccessCBK`])])],6)}var Km=H(Hm,[[`render`,Gm],[`__scopeId`,`data-v-8cbc5d06`]]),qm={name:`cvEditorMarkdown`,mixins:[Up,Wp,pm],emits:[`update:modelValue`,`on-ready`,`on-upload-image`],props:{modelValue:{type:[String,Number],default:``},options:{type:[Object],default:()=>({})},toolbars:{type:[Object],default(){return{}}},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},editorType:{type:[String],default:`v6`}},data(){return{lastPos:``,lastInsert:``,lastHtml:``,scrollSide:``,localVal:``,heightMainPx:``,editorWrapRefEL:null}},watch:{localVal(e){this.$emit(`update:modelValue`,e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+`wrap`},previewRefID(){return this.editorRefID+`preview`},heightTotalPx(){let e=``+this.height;return e.includes(`%`)||e.includes(`px`)?e:e+`px`},widthTotalPx(){let e=``+this.width;return e.includes(`px`)?e:e+`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];let e=this.editorWrapRefEL.querySelector(`.cv-editor-markdown-toolbar`).offsetHeight;return e?this.heightTotalPx.includes(`%`)?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace(`px`,``)-e-2+`px`:this.heightTotalPx},consoleLog(e,t){},initEditorReady(e){let{container:t,state:n,view:r}=e;this.editorStateInst=n,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(e,t){let{clipboardData:n={}}=t,{types:r=[],items:i}=n,a=null;for(let e=0;e<r.length;e++)if(r[e]===`Files`){a=i[e];break}if(a){let e=a.getAsFile();/image/gi.test(e.type)&&(this.$emit(`on-upload-image`,e),t.preventDefault())}},setCursor(e,t){this.editorViewInst.dispatch({selection:{anchor:e,head:t}}),this.editorViewInst.focus()},GetContent(){let e=this.editorViewState.selection.main.head,t=this.editorViewState.doc.lineAt(e).number,n=this.editorViewState.doc.line(t).text.trim();return n===``?!1:n},deleteContent(e,t){this.editorViewInst.dispatch({changes:{from:e,to:t}})},getLastPoint(){if(this.editorType==`simple`){let e=this.$refs.textarea,t=0;if(document.selection){e.focus();let n=document.selection.createRange();n.moveStart(`character`,-this.localVal.length),t=n.text.length}else (e.selectionStart||parseInt(e.selectionStart,0)===0)&&(t=e.selectionStart);return t}else if(this.editorType!=`v5`&&this.editorType==`v6`){let e=this.editorViewInst.state.selection.main.head,t=this.editorViewInst.state.doc.lineAt(e).number,n=this.editorViewInst.state.doc.line(t).from,r=this.editorViewInst.state.doc.line(t).to,i=this.editorViewInst.state.doc.line(t).text;return this.lastPos||{line:t,start:n,end:r,content:i}}},insertContent(e,t,n=!0){this.editorType==`v5`?(this.editorViewInst.replaceSelection(t),this.lastInsert=t.replace(/\n/g,``)):this.editorType==`v6`&&(this.getLastPoint(),this.editorViewInst.dispatch({changes:{from:e,insert:t}}),n==1&&this.setCursor(e+t.length,e+t.length))},listerenKeyupEnter(e){let{lastInsert:t}=this;t&&([`-`,`- [ ]`,`- [x]`].includes(t.trim())?(e.preventDefault(),this.insertContent(`
|
|
27
|
+
`)},actionImportFile(e){let t=e.target.files[0];if(!t)return;let{type:n}=t;if(![`text/markdown`,`text/src`].includes(n))return;let r=new FileReader;r.readAsText(t,{encoding:`utf-8`}),r.onload=()=>{this.localVal=r.result},r.onerror=e=>{}},actionExportFile(){let e=`.text`,t={java:`.java`,php:`.php`,css:`.css`,vue:`.vue`,go:`.go`,python:`.py`,json:`.json`,javascript:`.js`,js:`.js`,html:`.html`,markdown:`.md`};this.language&&t[this.language]&&(e=t[this.language]),Zp(this.localVal,this.lastExpFileName+e)},insertCode(){let e=this.getLastPoint(),t=e.content||!1;t?(this.deleteContent(e.start,e.end),this.insertContent(e.start,"\n```text\n"+t+"\n```\n")):this.insertContent(e.start,"\n```text\n\n```\n")},actionSaveSet(){let{localVal:e,codemrrConfig:t,lastHtml:n}=this;this.$emit(`on-act-save`,{theme:t.theme||``,value:e||``,html:n||``})},actionCopySet(){this.$cvCopy(this.localVal),this.$emit(`on-act-copy`,this.localVal)},actionHtmlVisible(e){this.actionHtmlText=``,e?this.actionHtmlDiaVisible=!0:this.actionHtmlDiaVisible=!1},actionHtmlToMD(){let e=this.getLastPoint();this.insertContent(e.end,`
|
|
28
|
+
`+gt(this.actionHtmlText)),this.actionHtmlText=``,this.actionHtmlDiaVisible=!1},actionCurrent(e,t){this.$emit(`on-action`,e,t)},actionCustom(e){this.$emit(`on-act-custom`,e)}}},bm={name:`cvEditorCode`,mixins:[Yp,Xp,ym],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(){return{}}},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(){return{localVal:``,heightMainPx:``,editorWrapRefEL:null}},watch:{localVal(e){this.$emit(`update:modelValue`,e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+`wrap`},heightTotalPx(){let e=``+this.height;return e.includes(`%`)||e.includes(`px`)?e:e+`px`},widthTotalPx(){let e=``+this.width;return e.includes(`px`)?e:e+`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];let e=this.editorWrapRefEL.querySelector(`.cv-editor-code-toolbar`).offsetHeight;return e?this.heightTotalPx.includes(`%`)?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace(`px`,``)-e-2+`px`:this.heightTotalPx},consoleLog(e,t){},initEditorReady(e){let{container:t,state:n,view:r}=e;this.editorStateInst=n,this.editorViewInst=r,this.listerenEvent(),this.$emit(`on-ready`)},listerenEvent(){}}},xm={key:0,class:`cv-editor-code-toolbar`,"data-title":`头部工具栏`},Sm={class:`cv-editor-toolbars`},Cm={name:`导入文件`,class:`import-file`},wm={name:`保存到本地`},Tm={key:1,class:`shift-theme`,name:`主题`},Em=[`onClick`],Dm={class:`shift-theme`,name:`语言`},Om=[`onClick`],km={class:`icon-svg`},Am={key:5,class:`segmentation`},jm=[`name`],Mm={title:`编辑器`,class:`cv-editor-code-main`};function Nm(e,t,n,r,i,a){let o=P(`SvgLanguage`),s=P(`SvgCopy`),c=P(`CodemirrorEditor`);return A(),S(`div`,{ref:a.editorWrapRefID,class:D([`cv-editor-code-wrap cv-editor-vars`,`${n.bordered?`border`:``}`]),style:k({width:a.widthTotalPx,height:a.heightTotalPx})},[e.actionPreview?x(``,!0):(A(),S(`div`,xm,[C(`ul`,Sm,[e.$slots.title?(A(),S(y,{key:0},[C(`li`,null,[N(e.$slots,`title`)]),t[16]||=C(`li`,{class:`segmentation`},[C(`div`)],-1)],64)):x(``,!0),B(C(`li`,Cm,[C(`span`,{class:`iconfont icon-daoru`,onClick:t[0]||=(...t)=>e.actionImportFile&&e.actionImportFile(...t)}),C(`input`,{type:`file`,onChange:t[1]||=t=>e.actionImportFile(t),accept:`text/markdown`},null,32)],512),[[L,e.toolConfig.importmd]]),B(C(`li`,wm,[C(`span`,{class:`iconfont icon-download`,onClick:t[2]||=(...t)=>e.actionExportFile&&e.actionExportFile(...t)})],512),[[L,e.toolConfig.exportmd]]),t[20]||=C(`li`,{class:`segmentation`},[C(`div`)],-1),e.toolConfig.theme?(A(),S(`li`,Tm,[C(`span`,{class:`iconfont icon-theme`,onClick:t[3]||=t=>e.actionThemeDropdown=!e.actionThemeDropdown}),C(`ul`,{class:D({active:e.actionThemeDropdown}),onMouseleave:t[4]||=t=>e.actionThemeDropdown=!1},[(A(!0),S(y,null,M(e.optionTheme,t=>(A(),S(`li`,{onClick:n=>e.actionThemesSet(t)},F(t),9,Em))),256))],34)])):x(``,!0),C(`li`,Dm,[C(`span`,{class:`icon-svg`,onClick:t[5]||=t=>e.actionLanguageDropdown=!e.actionLanguageDropdown},[T(o)]),C(`ul`,{class:D({active:e.actionLanguageDropdown}),onMouseleave:t[6]||=t=>e.actionLanguageDropdown=!1},[(A(!0),S(y,null,M(e.optionLanguage,t=>(A(),S(`li`,{class:D(t==n.language?`active`:``),onClick:n=>e.actionLanguageSet(t)},F(t),11,Om))),256))],34)]),t[21]||=C(`li`,{class:`empty`},null,-1),e.toolConfig.copy?(A(),S(`li`,{key:2,name:`复制`,onClick:t[7]||=(...t)=>e.actionCopySet&&e.actionCopySet(...t)},[C(`span`,km,[T(s)])])):x(``,!0),e.toolConfig.clear?(A(),S(`li`,{key:3,name:`清空`,onClick:t[8]||=e=>i.localVal=``},[...t[17]||=[C(`span`,{class:`iconfont icon-clear`},null,-1)]])):x(``,!0),e.toolConfig.save?(A(),S(`li`,{key:4,name:`保存`,onClick:t[9]||=(...t)=>e.actionSaveSet&&e.actionSaveSet(...t)},[...t[18]||=[C(`span`,{class:`iconfont icon-save`},null,-1)]])):x(``,!0),e.toolConfig.fullscreen?(A(),S(`li`,Am,[...t[19]||=[C(`div`,null,null,-1)]])):x(``,!0),e.toolConfig.fullscreen?(A(),S(`li`,{key:6,name:e.actionFullscreen?`退出全屏`:`全屏`},[B(C(`span`,{onClick:t[10]||=t=>e.actionFullscreenSet(!1),class:`iconfont icon-quite`},null,512),[[L,e.actionFullscreen]]),B(C(`span`,{onClick:t[11]||=t=>e.actionFullscreenSet(!0),class:`iconfont icon-fullscreen`},null,512),[[L,!e.actionFullscreen]])],8,jm)):x(``,!0)])])),C(`div`,Mm,[T(c,E(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:i.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:i.localVal,"onUpdate:modelValue":t[12]||=e=>i.localVal=e,onReady:a.initEditorReady,onChange:t[13]||=e=>a.consoleLog(`change`,e),onFocus:t[14]||=e=>a.consoleLog(`focus`,e),onBlur:t[15]||=e=>a.consoleLog(`blur`,e)}),null,16,[`id`,`style`,`extensions`,`modelValue`,`onReady`])])],6)}var Pm=H(bm,[[`render`,Nm]]),Fm={name:`cvEditorJson`,components:{},mixins:[Xp],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(){return{editorInstance:null,style:{},max:!1,internalChange:!1,localVal:``}},watch:{modelValue:{handler(e){this.localVal!=e&&(this.localVal=e,this.updateVal(e))},deep:!0},max(e){this.$nextTick(()=>{this.initNewCreate()})},options:{handler(e){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(){let{JSONEditor:e}=await import(`https://10ui.cn/jsoneditor/vanilla-jsoneditor@0.22.0/standalone.js`);this.editorInstance||(this.editorInstance=new e({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 e=null,t={};try{t=this.editorInstance.get()}catch(t){e=t}e?this.$emit(`error`,e):this.editorInstance&&(this.internalChange=!0,this.localVal=t,this.$emit(`update:modelValue`,this.localVal),this.$nextTick(()=>{this.internalChange=!1}))},updateVal(e){this.editorInstance&&e!==void 0&&!this.internalChange&&this.editorInstance.update({json:e})},isJSON(e){try{return JSON.parse(e),!0}catch{return!1}},destroyView(){this.editor&&=(this.editorInstance.destroy(),null)},handleChange(e){this.emitData||=Pr(400,e=>{this.$emit(`update:modelValue`,e)}),this.emitData(e)}}};function Im(e,t,n,r,i,a){return A(),S(`div`,{class:D([`cv-editor-json`,{"max-box":i.max,"min-box":!i.max}]),style:k(a.getHeight)},[C(`div`,{ref:e.editorRefID,class:`jsoneditor-box`},null,512),C(`a`,{onClick:t[0]||=e=>i.max=!i.max,class:`max-btn`})],6)}var Lm=H(Fm,[[`render`,Im]]),Rm={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(){return{dialogVisible:!1,listObj:{},fileList:[],diyUpList:new FormData}},methods:{checkAllSuccess(){return Object.keys(this.listObj).every(e=>this.listObj[e].hasSuccess)},handleSubmit(){let e=Object.keys(this.listObj).map(e=>this.listObj[e]);if(!this.checkAllSuccess()){this.$message(`请等待所有图片上传成功。如果出现网络问题,请刷新页面并重新上传!`);return}this.$emit(`successCBK`,e),this.listObj={},this.fileList=[],this.dialogVisible=!1},handleSuccess(e,t){let n=t.uid,r=Object.keys(this.listObj);for(let t=0,i=r.length;t<i;t++)if(this.listObj[r[t]].uid===n){this.upResponseFn&&typeof this.upResponseFn==`function`?this.listObj[r[t]].url=this.upResponseFn(e):this.listObj[r[t]].url=e.files.file||``,this.listObj[r[t]].hasSuccess=!0;return}},handleRemove(e){let t=e.uid,n=Object.keys(this.listObj);for(let e=0,r=n.length;e<r;e++)if(this.listObj[n[e]].uid===t){delete this.listObj[n[e]];return}},beforeUpload(e){let t=this,n=window.URL||window.webkitURL,r=e.uid;return this.listObj[r]={},new Promise((i,a)=>{let o=new Image;o.src=n.createObjectURL(e),o.onload=function(){t.listObj[r]={hasSuccess:!1,uid:e.uid,width:this.width,height:this.height}},i(!0)})}}},zm={class:`cv-editor-upload-container`};function Bm(e,t,n,r,i,a){let o=P(`cv-icons`),s=P(`el-button`),c=P(`el-upload`),l=P(`el-dialog`);return A(),S(`div`,zm,[T(s,{style:k({background:n.color,borderColor:n.color,fontSize:`16px`}),type:`primary`,onClick:t[0]||=e=>i.dialogVisible=!0},{default:z(()=>[T(o,{type:`arrowUploadFilled`,size:`16`,style:{"margin-right":`5px`}}),t[2]||=w(` 上传 `,-1)]),_:1},8,[`style`]),T(l,{visible:i.dialogVisible},{default:z(()=>[T(c,E({class:`editor-slide-upload`},{action:n.upAction,headers:n.upHeaders,data:n.upData,name:n.upName,multiple:!0,showFileList:!0,listType:`picture-card`,autoUpload:!0},{"file-list":i.fileList,"on-remove":a.handleRemove,"on-success":a.handleSuccess,"before-upload":a.beforeUpload}),{default:z(()=>[T(s,{type:`primary`},{default:z(()=>[...t[3]||=[w(`点击上传`,-1)]]),_:1})]),_:1},16,[`file-list`,`on-remove`,`on-success`,`before-upload`]),T(s,{onClick:t[1]||=e=>i.dialogVisible=!1},{default:z(()=>[...t[4]||=[w(`取消`,-1)]]),_:1}),T(s,{type:`primary`,onClick:a.handleSubmit},{default:z(()=>[...t[5]||=[w(`确定`,-1)]]),_:1},8,[`onClick`])]),_:1},8,[`visible`])])}var Vm=H(Rm,[[`render`,Bm],[`__scopeId`,`data-v-5188ef22`]]),Hm=[`advlist`,`anchor`,`autolink`,`autosave`,`code`,`codesample`,`directionality`,`emoticons`,`fullscreen`,`image`,`insertdatetime`,`link`,`lists`,`media`,`nonbreaking`,`pagebreak`,`preview`,`save`,`searchreplace`,`table`,`visualblocks`,`visualchars`,`wordcount`],Um=[`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`],Wm=[];function Gm(){return window.tinymce}var Km=(e,t)=>{let n=document.getElementById(e),r=t||function(){};if(!n){let t=document.createElement(`script`);t.src=e,t.id=e,document.body.appendChild(t),Wm.push(r),(`onload`in t?i:a)(t)}n&&r&&(Gm()?r(null,n):Wm.push(r));function i(t){t.onload=function(){this.onerror=this.onload=null;for(let e of Wm)e(null,t);Wm=null},t.onerror=function(){this.onerror=this.onload=null,r(Error(`Failed to load `+e),t)}}function a(e){e.onreadystatechange=function(){if(!(this.readyState!==`complete`&&this.readyState!==`loaded`)){this.onreadystatechange=null;for(let t of Wm)t(null,e);Wm=null}}}},qm=`https://10ui.cn/tinymce/@7.0.0/tinymce.min.js`,Jm={inheritAttrs:!1,name:`cvEditorTinymce`,components:{EditorSlideUpload:Vm},emits:[`update:modelValue`],mixins:[Xp],props:{modelValue:{type:String,default:``},toolbar:{type:Array,required:!1,default(){return[]}},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(){return{localVal:``,fullscreen:!1,languageTypeList:{en:`en`,zh:`zh_CN`,es:`es_MX`,ja:`ja`}}},computed:{containerWidth(){let e=this.width;return/^[\d]+(\.[\d]+)?$/.test(e)?`${e}px`:e}},watch:{modelValue(e){this.localVal!=e&&(this.localVal=e,window.tinymce.get(this.editorRefID).setContent(e||``))}},created(){this.localVal=this.modelValue},mounted(){this.initLoad()},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{initLoad(){Km(qm,e=>{if(e){this.$message.error(e.message);return}this.initTinymce()})},initTinymce(){let e=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:Um,menubar:this.menubar,plugins:Hm,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:t=>{e.localVal&&t.setContent(e.localVal)},setup(t){t.on(`FullscreenStateChanged`,t=>{e.fullscreen=t.state}),t.on(`input`,n=>{e.localVal=t.getContent(),e.$emit(`update:modelValue`,e.localVal)})},convert_urls:!1,images_upload_handler(e,t,n,r){r(0),new FormData}})},destroyTinymce(){let e=window.tinymce.get(this.editorRefID);this.fullscreen&&e.execCommand(`mceFullScreen`),e&&e.destroy()},setContent(e){window.tinymce.get(this.editorRefID).setContent(e)},getContent(){window.tinymce.get(this.editorRefID).getContent()},imageSuccessCBK(e){e.forEach(e=>window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${e.url}" >`))}}},Ym=[`id`],Xm={class:`editor-custom-btn-container`};function Zm(e,t,n,r,i,a){let o=P(`EditorSlideUpload`);return A(),S(`div`,{class:D([`cv-editor-tinymce tinymce-container`,{fullscreen:i.fullscreen}]),style:k({width:a.containerWidth})},[C(`textarea`,{id:e.editorRefID,class:`tinymce-textarea`},null,8,Ym),C(`div`,Xm,[T(o,E({color:`#1890ff`,class:`editor-upload-btn`,onSuccessCBK:a.imageSuccessCBK},n.uploadAttr),null,16,[`onSuccessCBK`])])],6)}var Qm=H(Jm,[[`render`,Zm],[`__scopeId`,`data-v-8cbc5d06`]]),$m={name:`cvEditorMarkdown`,mixins:[Yp,Xp,ym],emits:[`update:modelValue`,`on-ready`,`on-upload-image`],props:{modelValue:{type:[String,Number],default:``},options:{type:[Object],default:()=>({})},toolbars:{type:[Object],default(){return{}}},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},editorType:{type:[String],default:`v6`}},data(){return{lastPos:``,lastInsert:``,lastHtml:``,scrollSide:``,localVal:``,heightMainPx:``,editorWrapRefEL:null}},watch:{localVal(e){this.$emit(`update:modelValue`,e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+`wrap`},previewRefID(){return this.editorRefID+`preview`},heightTotalPx(){let e=``+this.height;return e.includes(`%`)||e.includes(`px`)?e:e+`px`},widthTotalPx(){let e=``+this.width;return e.includes(`px`)?e:e+`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];let e=this.editorWrapRefEL.querySelector(`.cv-editor-markdown-toolbar`).offsetHeight;return e?this.heightTotalPx.includes(`%`)?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace(`px`,``)-e-2+`px`:this.heightTotalPx},consoleLog(e,t){},initEditorReady(e){let{container:t,state:n,view:r}=e;this.editorStateInst=n,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(e,t){let{clipboardData:n={}}=t,{types:r=[],items:i}=n,a=null;for(let e=0;e<r.length;e++)if(r[e]===`Files`){a=i[e];break}if(a){let e=a.getAsFile();/image/gi.test(e.type)&&(this.$emit(`on-upload-image`,e),t.preventDefault())}},setCursor(e,t){this.editorViewInst.dispatch({selection:{anchor:e,head:t}}),this.editorViewInst.focus()},GetContent(){let e=this.editorViewState.selection.main.head,t=this.editorViewState.doc.lineAt(e).number,n=this.editorViewState.doc.line(t).text.trim();return n===``?!1:n},deleteContent(e,t){this.editorViewInst.dispatch({changes:{from:e,to:t}})},getLastPoint(){if(this.editorType==`simple`){let e=this.$refs.textarea,t=0;if(document.selection){e.focus();let n=document.selection.createRange();n.moveStart(`character`,-this.localVal.length),t=n.text.length}else (e.selectionStart||parseInt(e.selectionStart,0)===0)&&(t=e.selectionStart);return t}else if(this.editorType!=`v5`&&this.editorType==`v6`){let e=this.editorViewInst.state.selection.main.head,t=this.editorViewInst.state.doc.lineAt(e).number,n=this.editorViewInst.state.doc.line(t).from,r=this.editorViewInst.state.doc.line(t).to,i=this.editorViewInst.state.doc.line(t).text;return this.lastPos||{line:t,start:n,end:r,content:i}}},insertContent(e,t,n=!0){this.editorType==`v5`?(this.editorViewInst.replaceSelection(t),this.lastInsert=t.replace(/\n/g,``)):this.editorType==`v6`&&(this.getLastPoint(),this.editorViewInst.dispatch({changes:{from:e,insert:t}}),n==1&&this.setCursor(e+t.length,e+t.length))},listerenKeyupEnter(e){let{lastInsert:t}=this;t&&([`-`,`- [ ]`,`- [x]`].includes(t.trim())?(e.preventDefault(),this.insertContent(`
|
|
29
29
|
`+t)):/^\d+\.$/.test(t.trim())&&(e.preventDefault(),this.insertContent(`
|
|
30
30
|
`+(parseInt(t,0)+1)+`. `)))},listerenDelete(){setTimeout(()=>{let{editorViewInst:e}=this;e.isClean()||e.getValue().split(`
|
|
31
|
-
`).pop()===``&&(this.lastInsert=``)},20)},mousescrollSide(e){this.scrollSide=e},getScrollData(){let e=this.editorWrapRefEL.querySelector(`.cv-editor-markdown-main .cm-scroller`),t=e.scrollHeight,n=e.scrollTop,r=this.editorWrapRefEL.querySelector(`.cv-markdown-preview .markdown-preview`);return{markdownRef:e,markdownScrollHeight:t,markdownScrollTop:n,previewRef:r,contentHeight:r.offsetHeight,previewScrollHeight:r.scrollHeight,previewScrollTop:r.scrollTop||0}},markdownScroll(){if(this.actionScrollSync&&this.scrollSide===`left`){let{markdownRef:e,markdownScrollHeight:t,markdownScrollTop:n,previewRef:r,contentHeight:i,previewScrollHeight:a,previewScrollTop:o}=this.getScrollData();r.scrollTop=parseInt(n/(t-i)*(a-i),0)}},previewScroll(){if(this.actionScrollSync&&this.scrollSide===`right`){let{markdownRef:e,markdownScrollHeight:t,markdownScrollTop:n,previewRef:r,contentHeight:i,previewScrollHeight:a,previewScrollTop:o}=this.getScrollData();e.scrollTop=parseInt(o/(a-i)*(t-i),0)}}}},Jm={key:0,title:`头部工具栏`,class:`cv-editor-markdown-toolbar`},Ym={class:`cv-editor-toolbars`},Xm={key:1,name:`插入图片`},Zm={key:2,name:`本地图片`},Qm={class:`icon-svg`},$m={key:4,name:`上传图片`},eh={key:5,name:`上传文件`},th={name:`导入文件`,class:`import-file`},nh={name:`保存到本地`},rh={key:6,name:`代码块`},ih={key:7,class:`shift-theme`,name:`主题`},ah=[`onClick`],oh={key:8,class:`shift-theme`,name:`背景颜色`},sh=[`onClick`],ch={key:9,class:`shift-theme`,name:`phrases`},lh=[`onClick`],uh=[`name`],dh=[`name`],fh=[`name`],ph=[`name`],mh={key:15,name:`全屏编辑`},hh={key:16,name:`分屏显示`},gh={key:17,name:`预览`},_h={key:18,class:`segmentation`},vh={class:`icon-svg`},yh={key:22,class:`segmentation`},bh={key:23,name:`目录`},xh={key:24,class:`segmentation`},Sh=[`name`],Ch={class:`cv-editor-toolbars`},wh={key:0,name:`撤销`},Th={key:2,name:`粗体`},Eh={key:3,name:`斜体`},Dh={key:4,name:`删除线`},Oh={key:5,name:`下划线`},kh={key:6,name:`标题1`},Ah={key:7,name:`标题2`},jh={key:8,name:`标题3`},Mh={key:9,name:`标题4`},Nh={key:10,name:`标题5`},Ph={key:11,name:`标题6`},Fh={key:12,name:`分割线`},Ih={key:13,name:`引用`},Lh={key:14,name:`无序列表`},Rh={key:15,name:`有序列表`},zh={key:16,name:`未完成列表`},Bh={key:17,name:`已完成列表`},Vh={key:18,name:`链接`},Hh={key:19,name:`表格`};function Uh(e,t,n,r,i,a){let o=P(`SvgImgMap`),s=P(`SvgUploadFile`),c=P(`SvgCopy`),l=P(`SvgToc`),u=P(`CodemirrorEditor`),d=P(`cv-markdown-show`),f=P(`el-input`),p=P(`el-button`),m=P(`el-dialog`);return A(),x(`div`,{ref:a.editorWrapRefID,class:D([`cv-editor-markdown-wrap`,`${n.bordered?`border`:``}`]),style:k({width:a.widthTotalPx,height:a.heightTotalPx})},[e.actionPreview?b(``,!0):(A(),x(`div`,Jm,[S(`ul`,Ym,[e.$slots.title?(A(),x(v,{key:0},[S(`li`,null,[N(e.$slots,`title`,{},void 0,!0)]),t[65]||=S(`li`,{class:`segmentation`},[S(`div`)],-1)],64)):b(``,!0),e.toolConfig.image?(A(),x(`li`,Xm,[S(`span`,{onClick:t[0]||=(...t)=>e.actionInsImage&&e.actionInsImage(...t),class:`iconfont icon-img`})])):b(``,!0),e.toolConfig.uploadImage?(A(),x(`li`,Zm,[S(`span`,{onClick:t[1]||=(...t)=>e.actionChooseImage&&e.actionChooseImage(...t),class:`iconfont icon-upload-img`})])):b(``,!0),e.toolConfig.custom_image?(A(),x(`li`,{key:3,name:`图片空间`,onClick:t[2]||=t=>e.actionCustom(`image-browse`)},[S(`span`,Qm,[w(o)])])):b(``,!0),e.toolConfig.custom_uploadImage?(A(),x(`li`,$m,[S(`span`,{onClick:t[3]||=t=>e.actionCustom(`image-upload`),class:`iconfont icon-upload-img`})])):b(``,!0),e.toolConfig.custom_uploadFile?(A(),x(`li`,eh,[S(`span`,{onClick:t[4]||=t=>e.actionCustom(`file-upload`),class:`icon-svg`},[w(s)])])):b(``,!0),B(S(`li`,th,[S(`span`,{class:`iconfont icon-daoru`,onClick:t[5]||=(...t)=>e.actionImportFile&&e.actionImportFile(...t)}),S(`input`,{type:`file`,onChange:t[6]||=t=>e.actionImportFile(t),accept:`text/markdown`},null,32)],512),[[L,e.toolConfig.importmd]]),B(S(`li`,nh,[S(`span`,{class:`iconfont icon-download`,onClick:t[7]||=(...t)=>e.actionExportFile&&e.actionExportFile(...t)})],512),[[L,e.toolConfig.exportmd]]),t[72]||=S(`li`,{class:`segmentation`},[S(`div`)],-1),e.toolConfig.code?(A(),x(`li`,rh,[S(`span`,{onClick:t[8]||=(...t)=>e.insertCode&&e.insertCode(...t),class:`iconfont icon-code`})])):b(``,!0),e.toolConfig.theme?(A(),x(`li`,ih,[S(`span`,{class:`iconfont icon-theme`,onClick:t[9]||=t=>e.actionThemeDropdown=!e.actionThemeDropdown}),S(`ul`,{class:D({active:e.actionThemeDropdown}),onMouseleave:t[10]||=t=>e.actionThemeDropdown=!1},[(A(!0),x(v,null,M(e.optionTheme,t=>(A(),x(`li`,{onClick:n=>e.actionThemesSet(t)},F(t),9,ah))),256))],34)])):b(``,!0),e.toolConfig.backgroundColor?(A(),x(`li`,oh,[S(`span`,{class:`iconfont icon-theme`,onClick:t[11]||=t=>e.actionBgColorDropdown=!e.actionBgColorDropdown}),S(`ul`,{class:D({active:e.actionBgColorDropdown}),onMouseleave:t[12]||=t=>e.actionBgColorDropdown=!1},[(A(),x(v,null,M([`red`,`black`,`yellow`,`lawngreen`,`blue`,`white`],t=>S(`li`,{onClick:n=>e.actionBgColorSet(t)},F(t),9,sh)),64))],34)])):b(``,!0),e.toolConfig.phrases?(A(),x(`li`,ch,[S(`span`,{class:`iconfont icon-theme`,onClick:t[13]||=t=>e.actionPhrasesDropdown=!e.actionPhrasesDropdown}),S(`ul`,{class:D({active:e.actionPhrasesDropdown}),onMouseleave:t[14]||=t=>e.actionPhrasesDropdown=!1},[(A(!0),x(v,null,M(e.optionPhrases,t=>(A(),x(`li`,{onClick:n=>e.actionPhrasesSet(t)},F(t),9,lh))),256))],34)])):b(``,!0),e.toolConfig.html_to_markdown?(A(),x(`li`,{key:10,name:`html转markdown`,onClick:t[15]||=t=>e.actionHtmlVisible(!0)},[...t[66]||=[S(`span`,{style:{width:`auto`,"font-size":`12px !important`,padding:`0px 6px`,margin:`0 10px`,border:`1px #e2e2e2 solid`}},` HTML2MD `,-1)]])):b(``,!0),e.toolConfig.disabled?(A(),x(`li`,{key:11,name:e.codemrrConfig.disabled?`toggle disabled:开`:`toggle disabled:关`},[B(S(`span`,{onClick:t[16]||=t=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled,class:`iconfont icon-on`},null,512),[[L,e.codemrrConfig.disabled]]),B(S(`span`,{onClick:t[17]||=t=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled,class:`iconfont icon-off`},null,512),[[L,!e.codemrrConfig.disabled]])],8,uh)):b(``,!0),e.toolConfig.autofocus?(A(),x(`li`,{key:12,name:e.codemrrConfig.autofocus?`toggle autofocus:开`:`toggle autofocus:关`},[B(S(`span`,{onClick:t[18]||=t=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus,class:`iconfont icon-on`},null,512),[[L,e.codemrrConfig.autofocus]]),B(S(`span`,{onClick:t[19]||=t=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus,class:`iconfont icon-off`},null,512),[[L,!e.codemrrConfig.autofocus]])],8,dh)):b(``,!0),e.toolConfig.indentWithTab?(A(),x(`li`,{key:13,name:e.codemrrConfig.indentWithTab?`toggle indentWithTab:开`:`toggle indentWithTab:关`},[B(S(`span`,{onClick:t[20]||=t=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab,class:`iconfont icon-on`},null,512),[[L,e.codemrrConfig.indentWithTab]]),B(S(`span`,{onClick:t[21]||=t=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab,class:`iconfont icon-off`},null,512),[[L,!e.codemrrConfig.indentWithTab]])],8,fh)):b(``,!0),t[73]||=S(`li`,{class:`empty`},null,-1),e.toolConfig.scrollSync?(A(),x(`li`,{key:14,name:e.actionScrollSync?`同步滚动:开`:`同步滚动:关`},[B(S(`span`,{onClick:t[22]||=t=>e.actionScrollSync=!e.actionScrollSync,class:`iconfont icon-on active`},null,512),[[L,e.actionScrollSync]]),B(S(`span`,{onClick:t[23]||=t=>e.actionScrollSync=!e.actionScrollSync,class:`iconfont icon-off`},null,512),[[L,!e.actionScrollSync]])],8,ph)):b(``,!0),e.toolConfig.split&&e.actionSplit?(A(),x(`li`,mh,[S(`span`,{onClick:t[24]||=t=>e.actionSplit=!1,class:`iconfont icon-md`})])):b(``,!0),e.toolConfig.split&&!e.actionSplit?(A(),x(`li`,hh,[S(`span`,{onClick:t[25]||=t=>e.actionSplit=!0,class:`iconfont icon-group`})])):b(``,!0),e.toolConfig.preview?(A(),x(`li`,gh,[S(`span`,{onClick:t[26]||=t=>e.actionPreview=!0,class:`iconfont icon-preview`})])):b(``,!0),e.toolConfig.copy||e.toolConfig.clear||e.toolConfig.save?(A(),x(`li`,_h,[...t[67]||=[S(`div`,null,null,-1)]])):b(``,!0),e.toolConfig.copy?(A(),x(`li`,{key:19,name:`复制`,onClick:t[27]||=(...t)=>e.actionCopySet&&e.actionCopySet(...t)},[S(`span`,vh,[w(c)])])):b(``,!0),e.toolConfig.clear?(A(),x(`li`,{key:20,name:`清空`,onClick:t[28]||=e=>i.localVal=``},[...t[68]||=[S(`span`,{class:`iconfont icon-clear`},null,-1)]])):b(``,!0),e.toolConfig.save?(A(),x(`li`,{key:21,name:`保存`,onClick:t[29]||=(...t)=>e.actionSaveSet&&e.actionSaveSet(...t)},[...t[69]||=[S(`span`,{class:`iconfont icon-save`},null,-1)]])):b(``,!0),e.toolConfig.toc?(A(),x(`li`,yh,[...t[70]||=[S(`div`,null,null,-1)]])):b(``,!0),e.toolConfig.toc?(A(),x(`li`,bh,[B(S(`span`,{onClick:t[30]||=t=>e.actionToc=!e.actionToc,class:`icon-svg active`},[w(l)],512),[[L,e.actionToc]]),B(S(`span`,{onClick:t[31]||=t=>e.actionToc=!e.actionToc,class:`icon-svg`},[w(l)],512),[[L,!e.actionToc]])])):b(``,!0),e.toolConfig.fullscreen?(A(),x(`li`,xh,[...t[71]||=[S(`div`,null,null,-1)]])):b(``,!0),e.toolConfig.fullscreen?(A(),x(`li`,{key:25,name:e.actionFullscreen?`退出全屏`:`全屏`},[B(S(`span`,{onClick:t[32]||=t=>e.actionFullscreenSet(!1),class:`iconfont icon-quite`},null,512),[[L,e.actionFullscreen]]),B(S(`span`,{onClick:t[33]||=t=>e.actionFullscreenSet(!0),class:`iconfont icon-fullscreen`},null,512),[[L,!e.actionFullscreen]])],8,Sh)):b(``,!0)]),S(`ul`,Ch,[e.toolConfig.undo?(A(),x(`li`,wh,[S(`span`,{class:`iconfont icon-undo`,onClick:t[34]||=(...t)=>e.actionUndo&&e.actionUndo(...t)})])):b(``,!0),e.toolConfig.redo?(A(),x(`li`,{key:1,name:`重做`,onClick:t[35]||=(...t)=>e.actionRedo&&e.actionRedo(...t)},[...t[74]||=[S(`span`,{class:`iconfont icon-redo`},null,-1)]])):b(``,!0),e.toolConfig.strong?(A(),x(`li`,Th,[S(`span`,{onClick:t[36]||=(...t)=>e.actionInsStrong&&e.actionInsStrong(...t),class:`iconfont icon-bold`})])):b(``,!0),e.toolConfig.italic?(A(),x(`li`,Eh,[S(`span`,{onClick:t[37]||=(...t)=>e.actionInsItalic&&e.actionInsItalic(...t),class:`iconfont icon-italic`})])):b(``,!0),e.toolConfig.overline?(A(),x(`li`,Dh,[S(`span`,{onClick:t[38]||=(...t)=>e.actionInsOverline&&e.actionInsOverline(...t),class:`iconfont icon-overline`})])):b(``,!0),e.toolConfig.overline?(A(),x(`li`,Oh,[S(`span`,{onClick:t[39]||=(...t)=>e.actionInsUnderline&&e.actionInsUnderline(...t),class:`iconfont icon-under-line`})])):b(``,!0),e.toolConfig.h1?(A(),x(`li`,kh,[S(`span`,{style:{"font-size":`16px`},onClick:t[40]||=t=>e.actionInsTitle(1)},`h1`)])):b(``,!0),e.toolConfig.h2?(A(),x(`li`,Ah,[S(`span`,{style:{"font-size":`16px`},onClick:t[41]||=t=>e.actionInsTitle(2)},`h2`)])):b(``,!0),e.toolConfig.h3?(A(),x(`li`,jh,[S(`span`,{style:{"font-size":`16px`},onClick:t[42]||=t=>e.actionInsTitle(3)},`h3`)])):b(``,!0),e.toolConfig.h4?(A(),x(`li`,Mh,[S(`span`,{style:{"font-size":`16px`},onClick:t[43]||=t=>e.actionInsTitle(4)},`h4`)])):b(``,!0),e.toolConfig.h5?(A(),x(`li`,Nh,[S(`span`,{style:{"font-size":`16px`},onClick:t[44]||=t=>e.actionInsTitle(5)},`h5`)])):b(``,!0),e.toolConfig.h6?(A(),x(`li`,Ph,[S(`span`,{style:{"font-size":`16px`},onClick:t[45]||=t=>e.actionInsTitle(6)},`h6`)])):b(``,!0),e.toolConfig.hr?(A(),x(`li`,Fh,[S(`span`,{onClick:t[46]||=(...t)=>e.actionInsLine&&e.actionInsLine(...t),class:`iconfont icon-horizontal`})])):b(``,!0),e.toolConfig.quote?(A(),x(`li`,Ih,[S(`span`,{style:{"font-size":`16px`},onClick:t[47]||=(...t)=>e.actionInsQuote&&e.actionInsQuote(...t),class:`iconfont icon-quote`})])):b(``,!0),e.toolConfig.ul?(A(),x(`li`,Lh,[S(`span`,{onClick:t[48]||=(...t)=>e.actionInsUl&&e.actionInsUl(...t),class:`iconfont icon-ul`})])):b(``,!0),e.toolConfig.ol?(A(),x(`li`,Rh,[S(`span`,{onClick:t[49]||=(...t)=>e.actionInsOl&&e.actionInsOl(...t),class:`iconfont icon-ol`})])):b(``,!0),e.toolConfig.notChecked?(A(),x(`li`,zh,[S(`span`,{onClick:t[50]||=(...t)=>e.insertNotFinished&&e.insertNotFinished(...t),class:`iconfont icon-checked-false`})])):b(``,!0),e.toolConfig.checked?(A(),x(`li`,Bh,[S(`span`,{onClick:t[51]||=(...t)=>e.insertFinished&&e.insertFinished(...t),class:`iconfont icon-checked`})])):b(``,!0),e.toolConfig.link?(A(),x(`li`,Vh,[S(`span`,{onClick:t[52]||=(...t)=>e.actionInsLink&&e.actionInsLink(...t),class:`iconfont icon-link`})])):b(``,!0),e.toolConfig.table?(A(),x(`li`,Hh,[S(`span`,{onClick:t[53]||=(...t)=>e.actionInsTable&&e.actionInsTable(...t),class:`iconfont icon-table`})])):b(``,!0)])])),S(`div`,{title:`编辑器`,class:`cv-editor-markdown-main`,style:k({background:e.actionPreview?`#fff`:``})},[B(w(u,E(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:i.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:i.localVal,"onUpdate:modelValue":t[54]||=e=>i.localVal=e,onReady:a.initEditorReady,onChange:t[55]||=e=>a.consoleLog(`change`,e),onFocus:t[56]||=e=>a.consoleLog(`focus`,e),onBlur:t[57]||=e=>a.consoleLog(`blur`,e),onMouseenter:t[58]||=e=>a.mousescrollSide(`left`)}),null,16,[`id`,`style`,`extensions`,`modelValue`,`onReady`]),[[L,!e.actionPreview]]),B(w(d,{html:i.lastHtml,"onUpdate:html":t[59]||=e=>i.lastHtml=e,ref:a.previewRefID,editorID:a.previewRefID,modelValue:i.localVal,theme:e.codemrrConfig.theme||n.theme,language:n.language,tocShow:e.actionToc,style:k([{flex:`1`,height:`100%`,"border-left":`1px solid #dedede`,"overflow-y":`auto`},{height:e.actionPreview?``:i.heightMainPx}]),onMouseenter:t[60]||=e=>a.mousescrollSide(`right`)},null,8,[`html`,`editorID`,`modelValue`,`theme`,`language`,`tocShow`,`style`]),[[L,e.actionPreview?e.actionPreview:e.actionSplit]])],4),B(S(`div`,{title:`关闭预览按钮`,class:`close-preview`,onClick:t[61]||=t=>e.actionPreview=!1},[...t[75]||=[S(`span`,{class:`iconfont icon-close`},null,-1)]],512),[[L,e.actionPreview]]),w(m,{modelValue:e.actionHtmlDiaVisible,"onUpdate:modelValue":t[64]||=t=>e.actionHtmlDiaVisible=t,title:`html转markdown`,width:`680`,"show-close":!1,"append-to-body":``},{footer:z(()=>[w(p,{onClick:t[63]||=t=>e.actionHtmlVisible(!1)},{default:z(()=>[...t[76]||=[C(`取消`,-1)]]),_:1}),w(p,{type:`primary`,onClick:e.actionHtmlToMD},{default:z(()=>[...t[77]||=[C(`转换成markdown`,-1)]]),_:1},8,[`onClick`])]),default:z(()=>[w(f,{type:`textarea`,modelValue:e.actionHtmlText,"onUpdate:modelValue":t[62]||=t=>e.actionHtmlText=t,rows:14,placeholder:`请输入html代码...`},null,8,[`modelValue`])]),_:1},8,[`modelValue`])],6)}var Wh=H(qm,[[`render`,Uh],[`__scopeId`,`data-v-8f65faf9`]]),Gh={add(e,t){let n=`toc${t}${++this.index}`,r={anchor:n,level:t,text:e},i=this.tocItems;return r.level<=5&&i.push(r),n},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0};function Kh(e){if(typeof e==`function`&&(e={highlight:e}),!e||typeof e.highlight!=`function`)throw Error(`Must provide highlight function`);return typeof e.langPrefix!=`string`&&(e.langPrefix=`language-`),{async:!!e.async,walkTokens(t){if(t.type!==`code`)return;let n=qh(t);if(e.async)return Promise.resolve(e.highlight(t.text,n)).then(Jh(t));let r=e.highlight(t.text,n);if(r instanceof Promise)throw 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.`);Jh(t)(r)},renderer:{code(t,n,r){let i=(n||``).match(/\S*/)[0],a=i?` class="${e.langPrefix}${tg(i)}"`:``;return t=t.replace(/\n$/,``),`<pre><code${a}>${r?t:tg(t,!0)}\n</code></pre>`}}}}function qh(e){return(e.lang||``).match(/\S*/)[0]}function Jh(e){return t=>{typeof t==`string`&&t!==e.text&&(e.escaped=!0,e.text=t)}}var Yh=/[&<>"']/,Xh=new RegExp(Yh.source,`g`),Zh=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Qh=new RegExp(Zh.source,`g`),$h={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},eg=e=>$h[e];function tg(e,t){if(t){if(Yh.test(e))return e.replace(Xh,eg)}else if(Zh.test(e))return e.replace(Qh,eg);return e}var ng={name:`cvMarkdownShow`,mixins:[Wp],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(e){this.localVal=e||``,this.initNewCreate()},localHtml(e){this.$emit(`update:html`,e)}},data(){return{localVal:``,localHtml:``,previewImgModal:!1,previewImgSrc:``,previewImgMode:``,timeoutId:null,imgs:[],tocTrigger:!1,tocAction:``,tocLists:[]}},created(){this.localVal=this.modelValue||``},async mounted(){Gh.reset(),await Fr(this.CDN_URL_UI+`/highlight.js/@11.8.0/styles/default.min.css`),await Ir(this.CDN_URL_UI+`/highlight.js/@11.8.0/highlight.min.js`).then(()=>{setTimeout(()=>{hljs.highlightAll(),this.initNewCreate()},30)})},methods:{async initNewCreate(){let{Marked:e,Renderer:t}=await import(`https://10ui.cn/marked/@12.0.1/marked.esm.js`);t.prototype.heading=function(e,t,n,r){let i=Gh.add(e,t);return`<h${t} id="${n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,`-`)}" toc-id="${i}">${e}</h${t}>`};let n=new e(Kh({langPrefix:`hljs language-`,highlight(e,t){let n=hljs.getLanguage(t)?t:`plaintext`;return hljs.highlight(e,{language:n}).value}}));n.use({gfm:!0,tables:!0,breaks:!1,pedantic:!1,smartLists:!0});let r=n.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=Gh.tocItems,this.tocTrigger,Gh.reset(),this.addCopyListener(),this.addImageClickListener()},addCopyListener(){setTimeout(()=>{let e=document.querySelectorAll(`.code-block .copy-code`);this.btns=e;for(let t=0,n=e.length;t<n;t++)e[t].onclick=()=>{let n=e[t].parentNode.querySelectorAll(`pre`)[0].innerText;this.$cvCopy(n),this.$emit(`on-copy`,n)}},30)},addImageClickListener(){if(this.imgs.length>0)for(let e=0,t=this.imgs.length;e<t;e++)this.imgs[e].onclick=null;setTimeout(()=>{if(this.$refs[this.editorRefID]){this.imgs=this.$refs[this.editorRefID].querySelectorAll(`img`);for(let e=0,t=this.imgs.length;e<t;e++)this.imgs[e].onclick=()=>{let t=this.imgs[e].getAttribute(`src`);this.previewImage(t)}}},600)},previewImage(e){let t=new Image;t.src=e,t.onload=()=>{let n=t.naturalWidth;t.naturalHeight/n>1.4?this.previewImgMode=`horizontal`:this.previewImgMode=`vertical`,this.previewImgSrc=e,this.previewImgModal=!0}},handleScroll(){let e=this.$refs[this.editorRefID],t=e.querySelector(`.markdown-preview`),n=t.querySelectorAll(`h1,h2,h3,h4,h5`),r=null;if([...n].forEach(e=>{e.offsetTop-t.offsetTop<=t.scrollTop&&(r=e)}),r){this.tocAction=r.getAttribute(`toc-id`);let t=e.querySelector(`ul.toc-anchor`);if(t){let e=t.querySelector(`li[anchor="${this.tocAction}"]`);e&&(t.scrollTop=e.offsetTop-t.offsetTop-20)}}},tocClick(e){this.tocAction=e.anchor;let t=this.$refs[this.editorRefID].querySelector(`.markdown-preview`),n=t.querySelector(`h`+e.level+`[toc-id="`+this.tocAction+`"]`);n&&t.scrollTo({top:n.offsetTop-t.offsetTop,behavior:`smooth`})},tocLevel(e,t){let n=9999;return t===void 0&&(t=this.tocLists),t.forEach(({level:e})=>{n=Math.min(n,e)}),n===9999?e:e-(n-1)}}},rg=[`id`],ig=[`innerHTML`],ag={class:`toc-anchor`},og=[`anchor`,`onClick`],sg=[`anchor`,`title`],cg=[`src`];function lg(e,t,n,r,i,a){let o=P(`cv-icons`);return A(),x(`div`,{class:`cv-markdown-preview`,id:e.editorRefID,ref:e.editorRefID,style:k([n.tocShow?`display:flex;`:``])},[e.$slots.default?N(e.$slots,`default`,{key:0},()=>[C(F(i.localHtml),1)]):b(``,!0),S(`div`,{class:D(`markdown-preview markdown-theme-base ${`markdown-theme-`+n.theme}`),onScroll:t[0]||=(...e)=>a.handleScroll&&a.handleScroll(...e),innerHTML:i.localHtml},null,42,ig),B(S(`ul`,ag,[(A(!0),x(v,null,M(i.tocLists,e=>(A(),x(`li`,{class:`toc-anchor-item`,anchor:e.anchor,key:e.anchor,onClick:t=>a.tocClick(e)},[S(`span`,{class:D(`toc-link-${a.tocLevel(e.level)}${i.tocAction==e.anchor?` toc-link-action`:``}`),anchor:e.anchor,title:e.text},F(e.text),11,sg)],8,og))),128))],512),[[L,n.tocShow]]),S(`div`,{class:D([`preview-img`,i.previewImgModal?`active`:``])},[w(o,{type:`actionClose`,onClick:t[1]||=e=>i.previewImgModal=!1}),S(`img`,{src:i.previewImgSrc,class:D([i.previewImgMode]),alt:``},null,10,cg)],2)],12,rg)}var ug=H(ng,[[`render`,lg]]),dg={name:`cvMarkdownNostyle`,props:{modelValue:{type:String,default:``},initValue:{type:String,default:``}},data(){return{localHtml:``,localVal:``}},watch:{initValue(){this.initNewCreate()}},created(){this.localVal=this.initValue||``},async mounted(){this.initNewCreate()},methods:{async initNewCreate(){let{Marked:e,Renderer:t}=await import(`https://10ui.cn/marked/@12.0.1/marked.esm.js`),n=new e().parser(this.localVal,{sanitize:!1});n=n.replace(/href="/gi,`target="_blank" href="`),this.localHtml=n}}},fg=[`innerHTML`];function pg(e,t,n,r,i,a){return A(),x(`div`,{class:`markdown-preview-nostyle`,innerHTML:i.localHtml},null,8,fg)}var mg=H(dg,[[`render`,pg]]);Wh.install=function(e){e.component(Wh.name,Wh)},ug.install=function(e){e.component(ug.name,ug)},mg.install=function(e){e.component(mg.name,mg)},Om.install=function(e){e.component(Om.name,Om)},jm.install=function(e){e.component(jm.name,jm)},Km.install=function(e){e.component(Km.name,Km)};function hg(e){return{text:`按钮`,clickFn:null,type:`default`,isHide:!1,order:2,...e}}var gg=class{constructor(e,t){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=j(!1),this.boxProps=j({}),this.boxOptions=Br({closeIsConfirm:!1,closeIsDestroy:!0,width:`40%`,title:`默认标题`},t.diyOpts),this.boxProps.value=Vr(this.boxOptions,[`closeIsConfirm`,`closeIsDestroy`]),this.bodyComponent=t.component||``,this.bodyOptions=Br({},t.props),this.bodyFunc=Br({},t.onFunc);for(let e in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(e)&&!e.startsWith(`on`)){let t=`on`+e.charAt(0).toUpperCase()+e.slice(1);this.bodyFunc[t]=this.bodyFunc[e],delete this.bodyFunc[e]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;let t={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){},render(){let t=w(e.bodyComponent,{...e.bodyOptions,ref:`inner`,onSetTitle(t){e.boxProps.value.title=t},onClose:()=>e.close(),...e.bodyFunc},{default:()=>``}),n={ok:hg({text:`确定`,type:`primary`,order:0}),cancel:hg({text:`取消`,order:1})};Object.entries(n).forEach(([t,r])=>{if([`ok`,`cancel`].includes(t)){let n=t===`ok`?e.defaultFunc.onOK:e.defaultFunc.onCancel;r.clickFn=r.clickFn||n}else n[t]=hg(r)}),w(`div`,{},Object.values(n).filter(e=>!e.isHide).map(e=>w(i,{type:e.type,onClick:e.clickFn},e.text)));let r=function(t){e.close()},a=typeof e.boxOptions.beforeClose==`function`?e.boxOptions.beforeClose:r;return w(d,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:t=>{e.boxOptions.closeIsConfirm?ie.confirm(`确认关闭?`,`提示`).then(e=>{a(r)}).catch(e=>{r()}):a(r)},onClosed2(t){e.close()},onClosed:e.close},{default:()=>t})}};this.vmComponent=t;let n=document.createElement(`div`);document.body.appendChild(n),this.vmTargetElement=n;let r=w(t);r.appContext=this.WinVue._context,Me(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow&&(this.boxShow.value=!1),this.vmTargetElement&&(Me(null,this.vmTargetElement),document.body.removeChild(this.vmTargetElement),this.vmApp=null)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function _g(e){return{text:`按钮`,clickFn:null,type:`default`,isHide:!1,order:2,...e}}var vg=class{constructor(e,t){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=j(!1),this.boxProps=j({}),this.boxOptions=Br({closeIsConfirm:!0,closeIsDestroy:!0,width:`40%`,title:`默认标题`},t.diyOpts),this.boxProps.value=Vr(this.boxOptions,[`closeIsConfirm`,`closeIsDestroy`]),this.bodyComponent=t.component||``,this.bodyOptions=Br({},t.props),this.bodyFunc=Br({},t.onFunc);for(let e in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(e)&&!e.startsWith(`on`)){let t=`on`+e.charAt(0).toUpperCase()+e.slice(1);this.bodyFunc[t]=this.bodyFunc[e],delete this.bodyFunc[e]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;let t={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){document.body.removeChild(e.vmTargetElement)},render(){let t=w(e.bodyComponent,{...e.bodyOptions,ref:`inner`,onSetTitle(t){e.boxProps.value.title=t},onClose:this.clearVm,...e.bodyFunc},{default:()=>``}),n={ok:_g({text:`确定`,type:`primary`,order:0}),cancel:_g({text:`取消`,order:1})};Object.entries(n).forEach(([t,r])=>{if([`ok`,`cancel`].includes(t)){let n=t===`ok`?e.defaultFunc.onOK:e.defaultFunc.onCancel;r.clickFn=r.clickFn||n}else n[t]=_g(r)}),w(`div`,{},Object.values(n).filter(e=>!e.isHide).map(e=>w(i,{type:e.type,onClick:e.clickFn},e.text)));let r=function(t){e.close()},a=typeof e.boxOptions.beforeClose==`function`?e.boxOptions.beforeClose:r;return w(f,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:t=>{e.boxOptions.closeIsConfirm?ie.confirm(`确认关闭?`,`提示`).then(e=>{a(r)}).catch(e=>{r()}):a(r)},onClosed2(e){this.clearVm()},onClosed:this.clearVm},{default:()=>t})}};this.vmComponent=t;let n=document.createElement(`div`);document.body.appendChild(n),this.vmTargetElement=n;let r=w(t);r.appContext=this.WinVue._context,Me(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow.value=!1,Me(null,this.vmTargetElement)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function yg(e,t=null,n={},r={},i={}){let a=new gg(e,{component:t,diyOpts:n,props:r,onFunc:i,onOK(){a.getInner(),a.close()},onCancel(){a.close()}});return a}function bg(e,t=``,n={},r={},i=null){let a=new vg(e,{component:t,diyOpts:{...n},props:r,onFunc:i,onOK(){a.getInner(),a.close()},onCancel(){a.close()}});return a}var xg=[yt,St,Tt,Ot,jt,Pt,Rt,Vt,Wt,Jt,Qt,tn,an,cn,dn,mn,_n,jn,Ln,bn,En,Hn,Kn,Yn,yr,pr,gr,Mr,Sr,Tr,kr,_i,bi,Ci,Di,ji,Pi,Li,Vi,Wi,qi,Xi,$i,na,Xo,fs,Ss,Is,tc,Cc,Rc,aa,mc,_c,Jc,Wc,Qc,Ll,Bl,Wl,ql,Xl,$l,tl,il,cl,pl,gl,yl,Sl,Tl,ac,lc,ai,gi,lf,hf,vf,xf,Ef,Nf,Rf,ip,op,Om,jm,Km,Wh,ug,mg],Sg=function(e,t={}){xg.forEach(t=>{e.component(t.name,t)}),e.config.globalProperties.$cvUiParams={...t},e.config.globalProperties.$cvDialogRender=function(){return yg(e,...arguments)},e.config.globalProperties.$cvCopy=Lr,e.config.globalProperties.$cvDrawerRender=function(){return bg(e,...arguments)},e.config.globalProperties.CDN_URL_UI=`https://10ui.cn/`};typeof window<`u`&&window._vueApp_&&Sg(window._vueApp_);var Cg={version:`0.3.x`,install:Sg};export{xg as components,yg as cvDialogRender,bg as cvDrawerRender,Cg as default,Sg as install};
|
|
31
|
+
`).pop()===``&&(this.lastInsert=``)},20)},mousescrollSide(e){this.scrollSide=e},getScrollData(){let e=this.editorWrapRefEL.querySelector(`.cv-editor-markdown-main .cm-scroller`),t=e.scrollHeight,n=e.scrollTop,r=this.editorWrapRefEL.querySelector(`.cv-markdown-preview .markdown-preview`);return{markdownRef:e,markdownScrollHeight:t,markdownScrollTop:n,previewRef:r,contentHeight:r.offsetHeight,previewScrollHeight:r.scrollHeight,previewScrollTop:r.scrollTop||0}},markdownScroll(){if(this.actionScrollSync&&this.scrollSide===`left`){let{markdownRef:e,markdownScrollHeight:t,markdownScrollTop:n,previewRef:r,contentHeight:i,previewScrollHeight:a,previewScrollTop:o}=this.getScrollData();r.scrollTop=parseInt(n/(t-i)*(a-i),0)}},previewScroll(){if(this.actionScrollSync&&this.scrollSide===`right`){let{markdownRef:e,markdownScrollHeight:t,markdownScrollTop:n,previewRef:r,contentHeight:i,previewScrollHeight:a,previewScrollTop:o}=this.getScrollData();e.scrollTop=parseInt(o/(a-i)*(t-i),0)}}}},eh={key:0,title:`头部工具栏`,class:`cv-editor-markdown-toolbar`},th={class:`cv-editor-toolbars`},nh={key:1,name:`插入图片`},rh={key:2,name:`本地图片`},ih={class:`icon-svg`},ah={key:4,name:`上传图片`},oh={key:5,name:`上传文件`},sh={name:`导入文件`,class:`import-file`},ch={name:`保存到本地`},lh={key:6,name:`代码块`},uh={key:7,class:`shift-theme`,name:`主题`},dh=[`onClick`],fh={key:8,class:`shift-theme`,name:`背景颜色`},ph=[`onClick`],mh={key:9,class:`shift-theme`,name:`phrases`},hh=[`onClick`],gh=[`name`],_h=[`name`],vh=[`name`],yh=[`name`],bh={key:15,name:`全屏编辑`},xh={key:16,name:`分屏显示`},Sh={key:17,name:`预览`},Ch={key:18,class:`segmentation`},wh={class:`icon-svg`},Th={key:22,class:`segmentation`},Eh={key:23,name:`目录`},Dh={key:24,class:`segmentation`},Oh=[`name`],kh={class:`cv-editor-toolbars`},Ah={key:0,name:`撤销`},jh={key:2,name:`粗体`},Mh={key:3,name:`斜体`},Nh={key:4,name:`删除线`},Ph={key:5,name:`下划线`},Fh={key:6,name:`标题1`},Ih={key:7,name:`标题2`},Lh={key:8,name:`标题3`},Rh={key:9,name:`标题4`},zh={key:10,name:`标题5`},Bh={key:11,name:`标题6`},Vh={key:12,name:`分割线`},Hh={key:13,name:`引用`},Uh={key:14,name:`无序列表`},Wh={key:15,name:`有序列表`},Gh={key:16,name:`未完成列表`},Kh={key:17,name:`已完成列表`},qh={key:18,name:`链接`},Jh={key:19,name:`表格`};function Yh(e,t,n,r,i,a){let o=P(`SvgImgMap`),s=P(`SvgUploadFile`),c=P(`SvgCopy`),l=P(`SvgToc`),u=P(`CodemirrorEditor`),d=P(`cv-markdown-show`),f=P(`el-input`),p=P(`el-button`),m=P(`el-dialog`);return A(),S(`div`,{ref:a.editorWrapRefID,class:D([`cv-editor-markdown-wrap`,`${n.bordered?`border`:``}`]),style:k({width:a.widthTotalPx,height:a.heightTotalPx})},[e.actionPreview?x(``,!0):(A(),S(`div`,eh,[C(`ul`,th,[e.$slots.title?(A(),S(y,{key:0},[C(`li`,null,[N(e.$slots,`title`,{},void 0,!0)]),t[65]||=C(`li`,{class:`segmentation`},[C(`div`)],-1)],64)):x(``,!0),e.toolConfig.image?(A(),S(`li`,nh,[C(`span`,{onClick:t[0]||=(...t)=>e.actionInsImage&&e.actionInsImage(...t),class:`iconfont icon-img`})])):x(``,!0),e.toolConfig.uploadImage?(A(),S(`li`,rh,[C(`span`,{onClick:t[1]||=(...t)=>e.actionChooseImage&&e.actionChooseImage(...t),class:`iconfont icon-upload-img`})])):x(``,!0),e.toolConfig.custom_image?(A(),S(`li`,{key:3,name:`图片空间`,onClick:t[2]||=t=>e.actionCustom(`image-browse`)},[C(`span`,ih,[T(o)])])):x(``,!0),e.toolConfig.custom_uploadImage?(A(),S(`li`,ah,[C(`span`,{onClick:t[3]||=t=>e.actionCustom(`image-upload`),class:`iconfont icon-upload-img`})])):x(``,!0),e.toolConfig.custom_uploadFile?(A(),S(`li`,oh,[C(`span`,{onClick:t[4]||=t=>e.actionCustom(`file-upload`),class:`icon-svg`},[T(s)])])):x(``,!0),B(C(`li`,sh,[C(`span`,{class:`iconfont icon-daoru`,onClick:t[5]||=(...t)=>e.actionImportFile&&e.actionImportFile(...t)}),C(`input`,{type:`file`,onChange:t[6]||=t=>e.actionImportFile(t),accept:`text/markdown`},null,32)],512),[[L,e.toolConfig.importmd]]),B(C(`li`,ch,[C(`span`,{class:`iconfont icon-download`,onClick:t[7]||=(...t)=>e.actionExportFile&&e.actionExportFile(...t)})],512),[[L,e.toolConfig.exportmd]]),t[72]||=C(`li`,{class:`segmentation`},[C(`div`)],-1),e.toolConfig.code?(A(),S(`li`,lh,[C(`span`,{onClick:t[8]||=(...t)=>e.insertCode&&e.insertCode(...t),class:`iconfont icon-code`})])):x(``,!0),e.toolConfig.theme?(A(),S(`li`,uh,[C(`span`,{class:`iconfont icon-theme`,onClick:t[9]||=t=>e.actionThemeDropdown=!e.actionThemeDropdown}),C(`ul`,{class:D({active:e.actionThemeDropdown}),onMouseleave:t[10]||=t=>e.actionThemeDropdown=!1},[(A(!0),S(y,null,M(e.optionTheme,t=>(A(),S(`li`,{onClick:n=>e.actionThemesSet(t)},F(t),9,dh))),256))],34)])):x(``,!0),e.toolConfig.backgroundColor?(A(),S(`li`,fh,[C(`span`,{class:`iconfont icon-theme`,onClick:t[11]||=t=>e.actionBgColorDropdown=!e.actionBgColorDropdown}),C(`ul`,{class:D({active:e.actionBgColorDropdown}),onMouseleave:t[12]||=t=>e.actionBgColorDropdown=!1},[(A(),S(y,null,M([`red`,`black`,`yellow`,`lawngreen`,`blue`,`white`],t=>C(`li`,{onClick:n=>e.actionBgColorSet(t)},F(t),9,ph)),64))],34)])):x(``,!0),e.toolConfig.phrases?(A(),S(`li`,mh,[C(`span`,{class:`iconfont icon-theme`,onClick:t[13]||=t=>e.actionPhrasesDropdown=!e.actionPhrasesDropdown}),C(`ul`,{class:D({active:e.actionPhrasesDropdown}),onMouseleave:t[14]||=t=>e.actionPhrasesDropdown=!1},[(A(!0),S(y,null,M(e.optionPhrases,t=>(A(),S(`li`,{onClick:n=>e.actionPhrasesSet(t)},F(t),9,hh))),256))],34)])):x(``,!0),e.toolConfig.html_to_markdown?(A(),S(`li`,{key:10,name:`html转markdown`,onClick:t[15]||=t=>e.actionHtmlVisible(!0)},[...t[66]||=[C(`span`,{style:{width:`auto`,"font-size":`12px !important`,padding:`0px 6px`,margin:`0 10px`,border:`1px #e2e2e2 solid`}},` HTML2MD `,-1)]])):x(``,!0),e.toolConfig.disabled?(A(),S(`li`,{key:11,name:e.codemrrConfig.disabled?`toggle disabled:开`:`toggle disabled:关`},[B(C(`span`,{onClick:t[16]||=t=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled,class:`iconfont icon-on`},null,512),[[L,e.codemrrConfig.disabled]]),B(C(`span`,{onClick:t[17]||=t=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled,class:`iconfont icon-off`},null,512),[[L,!e.codemrrConfig.disabled]])],8,gh)):x(``,!0),e.toolConfig.autofocus?(A(),S(`li`,{key:12,name:e.codemrrConfig.autofocus?`toggle autofocus:开`:`toggle autofocus:关`},[B(C(`span`,{onClick:t[18]||=t=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus,class:`iconfont icon-on`},null,512),[[L,e.codemrrConfig.autofocus]]),B(C(`span`,{onClick:t[19]||=t=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus,class:`iconfont icon-off`},null,512),[[L,!e.codemrrConfig.autofocus]])],8,_h)):x(``,!0),e.toolConfig.indentWithTab?(A(),S(`li`,{key:13,name:e.codemrrConfig.indentWithTab?`toggle indentWithTab:开`:`toggle indentWithTab:关`},[B(C(`span`,{onClick:t[20]||=t=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab,class:`iconfont icon-on`},null,512),[[L,e.codemrrConfig.indentWithTab]]),B(C(`span`,{onClick:t[21]||=t=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab,class:`iconfont icon-off`},null,512),[[L,!e.codemrrConfig.indentWithTab]])],8,vh)):x(``,!0),t[73]||=C(`li`,{class:`empty`},null,-1),e.toolConfig.scrollSync?(A(),S(`li`,{key:14,name:e.actionScrollSync?`同步滚动:开`:`同步滚动:关`},[B(C(`span`,{onClick:t[22]||=t=>e.actionScrollSync=!e.actionScrollSync,class:`iconfont icon-on active`},null,512),[[L,e.actionScrollSync]]),B(C(`span`,{onClick:t[23]||=t=>e.actionScrollSync=!e.actionScrollSync,class:`iconfont icon-off`},null,512),[[L,!e.actionScrollSync]])],8,yh)):x(``,!0),e.toolConfig.split&&e.actionSplit?(A(),S(`li`,bh,[C(`span`,{onClick:t[24]||=t=>e.actionSplit=!1,class:`iconfont icon-md`})])):x(``,!0),e.toolConfig.split&&!e.actionSplit?(A(),S(`li`,xh,[C(`span`,{onClick:t[25]||=t=>e.actionSplit=!0,class:`iconfont icon-group`})])):x(``,!0),e.toolConfig.preview?(A(),S(`li`,Sh,[C(`span`,{onClick:t[26]||=t=>e.actionPreview=!0,class:`iconfont icon-preview`})])):x(``,!0),e.toolConfig.copy||e.toolConfig.clear||e.toolConfig.save?(A(),S(`li`,Ch,[...t[67]||=[C(`div`,null,null,-1)]])):x(``,!0),e.toolConfig.copy?(A(),S(`li`,{key:19,name:`复制`,onClick:t[27]||=(...t)=>e.actionCopySet&&e.actionCopySet(...t)},[C(`span`,wh,[T(c)])])):x(``,!0),e.toolConfig.clear?(A(),S(`li`,{key:20,name:`清空`,onClick:t[28]||=e=>i.localVal=``},[...t[68]||=[C(`span`,{class:`iconfont icon-clear`},null,-1)]])):x(``,!0),e.toolConfig.save?(A(),S(`li`,{key:21,name:`保存`,onClick:t[29]||=(...t)=>e.actionSaveSet&&e.actionSaveSet(...t)},[...t[69]||=[C(`span`,{class:`iconfont icon-save`},null,-1)]])):x(``,!0),e.toolConfig.toc?(A(),S(`li`,Th,[...t[70]||=[C(`div`,null,null,-1)]])):x(``,!0),e.toolConfig.toc?(A(),S(`li`,Eh,[B(C(`span`,{onClick:t[30]||=t=>e.actionToc=!e.actionToc,class:`icon-svg active`},[T(l)],512),[[L,e.actionToc]]),B(C(`span`,{onClick:t[31]||=t=>e.actionToc=!e.actionToc,class:`icon-svg`},[T(l)],512),[[L,!e.actionToc]])])):x(``,!0),e.toolConfig.fullscreen?(A(),S(`li`,Dh,[...t[71]||=[C(`div`,null,null,-1)]])):x(``,!0),e.toolConfig.fullscreen?(A(),S(`li`,{key:25,name:e.actionFullscreen?`退出全屏`:`全屏`},[B(C(`span`,{onClick:t[32]||=t=>e.actionFullscreenSet(!1),class:`iconfont icon-quite`},null,512),[[L,e.actionFullscreen]]),B(C(`span`,{onClick:t[33]||=t=>e.actionFullscreenSet(!0),class:`iconfont icon-fullscreen`},null,512),[[L,!e.actionFullscreen]])],8,Oh)):x(``,!0)]),C(`ul`,kh,[e.toolConfig.undo?(A(),S(`li`,Ah,[C(`span`,{class:`iconfont icon-undo`,onClick:t[34]||=(...t)=>e.actionUndo&&e.actionUndo(...t)})])):x(``,!0),e.toolConfig.redo?(A(),S(`li`,{key:1,name:`重做`,onClick:t[35]||=(...t)=>e.actionRedo&&e.actionRedo(...t)},[...t[74]||=[C(`span`,{class:`iconfont icon-redo`},null,-1)]])):x(``,!0),e.toolConfig.strong?(A(),S(`li`,jh,[C(`span`,{onClick:t[36]||=(...t)=>e.actionInsStrong&&e.actionInsStrong(...t),class:`iconfont icon-bold`})])):x(``,!0),e.toolConfig.italic?(A(),S(`li`,Mh,[C(`span`,{onClick:t[37]||=(...t)=>e.actionInsItalic&&e.actionInsItalic(...t),class:`iconfont icon-italic`})])):x(``,!0),e.toolConfig.overline?(A(),S(`li`,Nh,[C(`span`,{onClick:t[38]||=(...t)=>e.actionInsOverline&&e.actionInsOverline(...t),class:`iconfont icon-overline`})])):x(``,!0),e.toolConfig.overline?(A(),S(`li`,Ph,[C(`span`,{onClick:t[39]||=(...t)=>e.actionInsUnderline&&e.actionInsUnderline(...t),class:`iconfont icon-under-line`})])):x(``,!0),e.toolConfig.h1?(A(),S(`li`,Fh,[C(`span`,{style:{"font-size":`16px`},onClick:t[40]||=t=>e.actionInsTitle(1)},`h1`)])):x(``,!0),e.toolConfig.h2?(A(),S(`li`,Ih,[C(`span`,{style:{"font-size":`16px`},onClick:t[41]||=t=>e.actionInsTitle(2)},`h2`)])):x(``,!0),e.toolConfig.h3?(A(),S(`li`,Lh,[C(`span`,{style:{"font-size":`16px`},onClick:t[42]||=t=>e.actionInsTitle(3)},`h3`)])):x(``,!0),e.toolConfig.h4?(A(),S(`li`,Rh,[C(`span`,{style:{"font-size":`16px`},onClick:t[43]||=t=>e.actionInsTitle(4)},`h4`)])):x(``,!0),e.toolConfig.h5?(A(),S(`li`,zh,[C(`span`,{style:{"font-size":`16px`},onClick:t[44]||=t=>e.actionInsTitle(5)},`h5`)])):x(``,!0),e.toolConfig.h6?(A(),S(`li`,Bh,[C(`span`,{style:{"font-size":`16px`},onClick:t[45]||=t=>e.actionInsTitle(6)},`h6`)])):x(``,!0),e.toolConfig.hr?(A(),S(`li`,Vh,[C(`span`,{onClick:t[46]||=(...t)=>e.actionInsLine&&e.actionInsLine(...t),class:`iconfont icon-horizontal`})])):x(``,!0),e.toolConfig.quote?(A(),S(`li`,Hh,[C(`span`,{style:{"font-size":`16px`},onClick:t[47]||=(...t)=>e.actionInsQuote&&e.actionInsQuote(...t),class:`iconfont icon-quote`})])):x(``,!0),e.toolConfig.ul?(A(),S(`li`,Uh,[C(`span`,{onClick:t[48]||=(...t)=>e.actionInsUl&&e.actionInsUl(...t),class:`iconfont icon-ul`})])):x(``,!0),e.toolConfig.ol?(A(),S(`li`,Wh,[C(`span`,{onClick:t[49]||=(...t)=>e.actionInsOl&&e.actionInsOl(...t),class:`iconfont icon-ol`})])):x(``,!0),e.toolConfig.notChecked?(A(),S(`li`,Gh,[C(`span`,{onClick:t[50]||=(...t)=>e.insertNotFinished&&e.insertNotFinished(...t),class:`iconfont icon-checked-false`})])):x(``,!0),e.toolConfig.checked?(A(),S(`li`,Kh,[C(`span`,{onClick:t[51]||=(...t)=>e.insertFinished&&e.insertFinished(...t),class:`iconfont icon-checked`})])):x(``,!0),e.toolConfig.link?(A(),S(`li`,qh,[C(`span`,{onClick:t[52]||=(...t)=>e.actionInsLink&&e.actionInsLink(...t),class:`iconfont icon-link`})])):x(``,!0),e.toolConfig.table?(A(),S(`li`,Jh,[C(`span`,{onClick:t[53]||=(...t)=>e.actionInsTable&&e.actionInsTable(...t),class:`iconfont icon-table`})])):x(``,!0)])])),C(`div`,{title:`编辑器`,class:`cv-editor-markdown-main`,style:k({background:e.actionPreview?`#fff`:``})},[B(T(u,E(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:i.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:i.localVal,"onUpdate:modelValue":t[54]||=e=>i.localVal=e,onReady:a.initEditorReady,onChange:t[55]||=e=>a.consoleLog(`change`,e),onFocus:t[56]||=e=>a.consoleLog(`focus`,e),onBlur:t[57]||=e=>a.consoleLog(`blur`,e),onMouseenter:t[58]||=e=>a.mousescrollSide(`left`)}),null,16,[`id`,`style`,`extensions`,`modelValue`,`onReady`]),[[L,!e.actionPreview]]),B(T(d,{html:i.lastHtml,"onUpdate:html":t[59]||=e=>i.lastHtml=e,ref:a.previewRefID,editorID:a.previewRefID,modelValue:i.localVal,theme:e.codemrrConfig.theme||n.theme,language:n.language,tocShow:e.actionToc,style:k([{flex:`1`,height:`100%`,"border-left":`1px solid #dedede`,"overflow-y":`auto`},{height:e.actionPreview?``:i.heightMainPx}]),onMouseenter:t[60]||=e=>a.mousescrollSide(`right`)},null,8,[`html`,`editorID`,`modelValue`,`theme`,`language`,`tocShow`,`style`]),[[L,e.actionPreview?e.actionPreview:e.actionSplit]])],4),B(C(`div`,{title:`关闭预览按钮`,class:`close-preview`,onClick:t[61]||=t=>e.actionPreview=!1},[...t[75]||=[C(`span`,{class:`iconfont icon-close`},null,-1)]],512),[[L,e.actionPreview]]),T(m,{modelValue:e.actionHtmlDiaVisible,"onUpdate:modelValue":t[64]||=t=>e.actionHtmlDiaVisible=t,title:`html转markdown`,width:`680`,"show-close":!1,"append-to-body":``},{footer:z(()=>[T(p,{onClick:t[63]||=t=>e.actionHtmlVisible(!1)},{default:z(()=>[...t[76]||=[w(`取消`,-1)]]),_:1}),T(p,{type:`primary`,onClick:e.actionHtmlToMD},{default:z(()=>[...t[77]||=[w(`转换成markdown`,-1)]]),_:1},8,[`onClick`])]),default:z(()=>[T(f,{type:`textarea`,modelValue:e.actionHtmlText,"onUpdate:modelValue":t[62]||=t=>e.actionHtmlText=t,rows:14,placeholder:`请输入html代码...`},null,8,[`modelValue`])]),_:1},8,[`modelValue`])],6)}var Xh=H($m,[[`render`,Yh],[`__scopeId`,`data-v-8f65faf9`]]),Zh={add(e,t){let n=`toc${t}${++this.index}`,r={anchor:n,level:t,text:e},i=this.tocItems;return r.level<=5&&i.push(r),n},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0};function Qh(e){if(typeof e==`function`&&(e={highlight:e}),!e||typeof e.highlight!=`function`)throw Error(`Must provide highlight function`);return typeof e.langPrefix!=`string`&&(e.langPrefix=`language-`),{async:!!e.async,walkTokens(t){if(t.type!==`code`)return;let n=$h(t);if(e.async)return Promise.resolve(e.highlight(t.text,n)).then(eg(t));let r=e.highlight(t.text,n);if(r instanceof Promise)throw 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.`);eg(t)(r)},renderer:{code(t,n,r){let i=(n||``).match(/\S*/)[0],a=i?` class="${e.langPrefix}${sg(i)}"`:``;return t=t.replace(/\n$/,``),`<pre><code${a}>${r?t:sg(t,!0)}\n</code></pre>`}}}}function $h(e){return(e.lang||``).match(/\S*/)[0]}function eg(e){return t=>{typeof t==`string`&&t!==e.text&&(e.escaped=!0,e.text=t)}}var tg=/[&<>"']/,ng=new RegExp(tg.source,`g`),rg=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ig=new RegExp(rg.source,`g`),ag={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},og=e=>ag[e];function sg(e,t){if(t){if(tg.test(e))return e.replace(ng,og)}else if(rg.test(e))return e.replace(ig,og);return e}var cg={name:`cvMarkdownShow`,mixins:[Xp],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(e){this.localVal=e||``,this.initNewCreate()},localHtml(e){this.$emit(`update:html`,e)}},data(){return{localVal:``,localHtml:``,previewImgModal:!1,previewImgSrc:``,previewImgMode:``,timeoutId:null,imgs:[],tocTrigger:!1,tocAction:``,tocLists:[]}},created(){this.localVal=this.modelValue||``},async mounted(){Zh.reset(),await Fr(this.CDN_URL_UI+`/highlight.js/@11.8.0/styles/default.min.css`),await Ir(this.CDN_URL_UI+`/highlight.js/@11.8.0/highlight.min.js`).then(()=>{setTimeout(()=>{hljs.highlightAll(),this.initNewCreate()},30)})},methods:{async initNewCreate(){let{Marked:e,Renderer:t}=await import(`https://10ui.cn/marked/@12.0.1/marked.esm.js`);t.prototype.heading=function(e,t,n,r){let i=Zh.add(e,t);return`<h${t} id="${n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,`-`)}" toc-id="${i}">${e}</h${t}>`};let n=new e(Qh({langPrefix:`hljs language-`,highlight(e,t){let n=hljs.getLanguage(t)?t:`plaintext`;return hljs.highlight(e,{language:n}).value}}));n.use({gfm:!0,tables:!0,breaks:!1,pedantic:!1,smartLists:!0});let r=n.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=Zh.tocItems,this.tocTrigger,Zh.reset(),this.addCopyListener(),this.addImageClickListener()},addCopyListener(){setTimeout(()=>{let e=document.querySelectorAll(`.code-block .copy-code`);this.btns=e;for(let t=0,n=e.length;t<n;t++)e[t].onclick=()=>{let n=e[t].parentNode.querySelectorAll(`pre`)[0].innerText;this.$cvCopy(n),this.$emit(`on-copy`,n)}},30)},addImageClickListener(){if(this.imgs.length>0)for(let e=0,t=this.imgs.length;e<t;e++)this.imgs[e].onclick=null;setTimeout(()=>{if(this.$refs[this.editorRefID]){this.imgs=this.$refs[this.editorRefID].querySelectorAll(`img`);for(let e=0,t=this.imgs.length;e<t;e++)this.imgs[e].onclick=()=>{let t=this.imgs[e].getAttribute(`src`);this.previewImage(t)}}},600)},previewImage(e){let t=new Image;t.src=e,t.onload=()=>{let n=t.naturalWidth;t.naturalHeight/n>1.4?this.previewImgMode=`horizontal`:this.previewImgMode=`vertical`,this.previewImgSrc=e,this.previewImgModal=!0}},handleScroll(){let e=this.$refs[this.editorRefID],t=e.querySelector(`.markdown-preview`),n=t.querySelectorAll(`h1,h2,h3,h4,h5`),r=null;if([...n].forEach(e=>{e.offsetTop-t.offsetTop<=t.scrollTop&&(r=e)}),r){this.tocAction=r.getAttribute(`toc-id`);let t=e.querySelector(`ul.toc-anchor`);if(t){let e=t.querySelector(`li[anchor="${this.tocAction}"]`);e&&(t.scrollTop=e.offsetTop-t.offsetTop-20)}}},tocClick(e){this.tocAction=e.anchor;let t=this.$refs[this.editorRefID].querySelector(`.markdown-preview`),n=t.querySelector(`h`+e.level+`[toc-id="`+this.tocAction+`"]`);n&&t.scrollTo({top:n.offsetTop-t.offsetTop,behavior:`smooth`})},tocLevel(e,t){let n=9999;return t===void 0&&(t=this.tocLists),t.forEach(({level:e})=>{n=Math.min(n,e)}),n===9999?e:e-(n-1)}}},lg=[`id`],ug=[`innerHTML`],dg={class:`toc-anchor`},fg=[`anchor`,`onClick`],pg=[`anchor`,`title`],mg=[`src`];function hg(e,t,n,r,i,a){let o=P(`cv-icons`);return A(),S(`div`,{class:`cv-markdown-preview`,id:e.editorRefID,ref:e.editorRefID,style:k([n.tocShow?`display:flex;`:``])},[e.$slots.default?N(e.$slots,`default`,{key:0},()=>[w(F(i.localHtml),1)]):x(``,!0),C(`div`,{class:D(`markdown-preview markdown-theme-base ${`markdown-theme-`+n.theme}`),onScroll:t[0]||=(...e)=>a.handleScroll&&a.handleScroll(...e),innerHTML:i.localHtml},null,42,ug),B(C(`ul`,dg,[(A(!0),S(y,null,M(i.tocLists,e=>(A(),S(`li`,{class:`toc-anchor-item`,anchor:e.anchor,key:e.anchor,onClick:t=>a.tocClick(e)},[C(`span`,{class:D(`toc-link-${a.tocLevel(e.level)}${i.tocAction==e.anchor?` toc-link-action`:``}`),anchor:e.anchor,title:e.text},F(e.text),11,pg)],8,fg))),128))],512),[[L,n.tocShow]]),C(`div`,{class:D([`preview-img`,i.previewImgModal?`active`:``])},[T(o,{type:`actionClose`,onClick:t[1]||=e=>i.previewImgModal=!1}),C(`img`,{src:i.previewImgSrc,class:D([i.previewImgMode]),alt:``},null,10,mg)],2)],12,lg)}var gg=H(cg,[[`render`,hg]]),_g={name:`cvMarkdownNostyle`,props:{modelValue:{type:String,default:``},initValue:{type:String,default:``}},data(){return{localHtml:``,localVal:``}},watch:{initValue(){this.initNewCreate()}},created(){this.localVal=this.initValue||``},async mounted(){this.initNewCreate()},methods:{async initNewCreate(){let{Marked:e,Renderer:t}=await import(`https://10ui.cn/marked/@12.0.1/marked.esm.js`),n=new e().parser(this.localVal,{sanitize:!1});n=n.replace(/href="/gi,`target="_blank" href="`),this.localHtml=n}}},vg=[`innerHTML`];function yg(e,t,n,r,i,a){return A(),S(`div`,{class:`markdown-preview-nostyle`,innerHTML:i.localHtml},null,8,vg)}var bg=H(_g,[[`render`,yg]]);Xh.install=function(e){e.component(Xh.name,Xh)},gg.install=function(e){e.component(gg.name,gg)},bg.install=function(e){e.component(bg.name,bg)},Pm.install=function(e){e.component(Pm.name,Pm)},Lm.install=function(e){e.component(Lm.name,Lm)},Qm.install=function(e){e.component(Qm.name,Qm)};function xg(e){return{text:`按钮`,clickFn:null,type:`default`,isHide:!1,order:2,...e}}var Sg=class{constructor(e,t){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=j(!1),this.boxProps=j({}),this.boxOptions=Br({closeIsConfirm:!1,closeIsDestroy:!0,width:`40%`,title:`默认标题`},t.diyOpts),this.boxProps.value=Vr(this.boxOptions,[`closeIsConfirm`,`closeIsDestroy`]),this.bodyComponent=t.component||``,this.bodyOptions=Br({},t.props),this.bodyFunc=Br({},t.onFunc);for(let e in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(e)&&!e.startsWith(`on`)){let t=`on`+e.charAt(0).toUpperCase()+e.slice(1);this.bodyFunc[t]=this.bodyFunc[e],delete this.bodyFunc[e]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;let t={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){},render(){let t=T(e.bodyComponent,{...e.bodyOptions,ref:`inner`,onSetTitle(t){e.boxProps.value.title=t},onClose:()=>e.close(),...e.bodyFunc},{default:()=>``}),n={ok:xg({text:`确定`,type:`primary`,order:0}),cancel:xg({text:`取消`,order:1})};Object.entries(n).forEach(([t,r])=>{if([`ok`,`cancel`].includes(t)){let n=t===`ok`?e.defaultFunc.onOK:e.defaultFunc.onCancel;r.clickFn=r.clickFn||n}else n[t]=xg(r)}),T(`div`,{},Object.values(n).filter(e=>!e.isHide).map(e=>T(i,{type:e.type,onClick:e.clickFn},e.text)));let r=function(t){e.close()},a=typeof e.boxOptions.beforeClose==`function`?e.boxOptions.beforeClose:r;return T(d,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:t=>{e.boxOptions.closeIsConfirm?re.confirm(`确认关闭?`,`提示`).then(e=>{a(r)}).catch(e=>{r()}):a(r)},onClosed2(t){e.close()},onClosed:e.close},{default:()=>t})}};this.vmComponent=t;let n=document.createElement(`div`);document.body.appendChild(n),this.vmTargetElement=n;let r=T(t);r.appContext=this.WinVue._context,Me(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow&&(this.boxShow.value=!1),this.vmTargetElement&&(Me(null,this.vmTargetElement),document.body.removeChild(this.vmTargetElement),this.vmApp=null)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function Cg(e){return{text:`按钮`,clickFn:null,type:`default`,isHide:!1,order:2,...e}}var wg=class{constructor(e,t){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=j(!1),this.boxProps=j({}),this.boxOptions=Br({closeIsConfirm:!0,closeIsDestroy:!0,width:`40%`,title:`默认标题`},t.diyOpts),this.boxProps.value=Vr(this.boxOptions,[`closeIsConfirm`,`closeIsDestroy`]),this.bodyComponent=t.component||``,this.bodyOptions=Br({},t.props),this.bodyFunc=Br({},t.onFunc);for(let e in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(e)&&!e.startsWith(`on`)){let t=`on`+e.charAt(0).toUpperCase()+e.slice(1);this.bodyFunc[t]=this.bodyFunc[e],delete this.bodyFunc[e]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;let t={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){document.body.removeChild(e.vmTargetElement)},render(){let t=T(e.bodyComponent,{...e.bodyOptions,ref:`inner`,onSetTitle(t){e.boxProps.value.title=t},onClose:this.clearVm,...e.bodyFunc},{default:()=>``}),n={ok:Cg({text:`确定`,type:`primary`,order:0}),cancel:Cg({text:`取消`,order:1})};Object.entries(n).forEach(([t,r])=>{if([`ok`,`cancel`].includes(t)){let n=t===`ok`?e.defaultFunc.onOK:e.defaultFunc.onCancel;r.clickFn=r.clickFn||n}else n[t]=Cg(r)}),T(`div`,{},Object.values(n).filter(e=>!e.isHide).map(e=>T(i,{type:e.type,onClick:e.clickFn},e.text)));let r=function(t){e.close()},a=typeof e.boxOptions.beforeClose==`function`?e.boxOptions.beforeClose:r;return T(f,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:t=>{e.boxOptions.closeIsConfirm?re.confirm(`确认关闭?`,`提示`).then(e=>{a(r)}).catch(e=>{r()}):a(r)},onClosed2(e){this.clearVm()},onClosed:this.clearVm},{default:()=>t})}};this.vmComponent=t;let n=document.createElement(`div`);document.body.appendChild(n),this.vmTargetElement=n;let r=T(t);r.appContext=this.WinVue._context,Me(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow.value=!1,Me(null,this.vmTargetElement)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function Tg(e,t=null,n={},r={},i={}){let a=new Sg(e,{component:t,diyOpts:n,props:r,onFunc:i,onOK(){a.getInner(),a.close()},onCancel(){a.close()}});return a}function Eg(e,t=``,n={},r={},i=null){let a=new wg(e,{component:t,diyOpts:{...n},props:r,onFunc:i,onOK(){a.getInner(),a.close()},onCancel(){a.close()}});return a}var Dg=[yt,St,Tt,Ot,jt,Pt,Rt,Vt,Wt,Jt,Qt,tn,an,cn,dn,mn,_n,jn,Ln,bn,En,Hn,Kn,Yn,yr,pr,gr,Mr,Sr,Tr,kr,_i,bi,Ci,Di,ji,Pi,Li,Vi,Wi,qi,Xi,$i,na,ns,vs,Os,Hs,sc,kc,Wc,aa,bc,Cc,el,Xc,il,Ul,Kl,Xl,$l,nu,au,sl,ul,ml,yl,Sl,Tl,Ol,jl,dc,hc,ai,gi,hf,xf,wf,Df,Mf,zf,Wf,up,fp,Pm,Lm,Qm,Xh,gg,bg],Og=function(e,t={}){Dg.forEach(t=>{e.component(t.name,t)}),e.config.globalProperties.$cvUiParams={...t},e.config.globalProperties.$cvDialogRender=function(){return Tg(e,...arguments)},e.config.globalProperties.$cvCopy=Lr,e.config.globalProperties.$cvDrawerRender=function(){return Eg(e,...arguments)},e.config.globalProperties.CDN_URL_UI=`https://10ui.cn/`};typeof window<`u`&&window._vueApp_&&Og(window._vueApp_);var kg={version:`0.3.x`,install:Og};export{Dg as components,Tg as cvDialogRender,Eg as cvDrawerRender,kg as default,Og as install};
|