auto-vue-basic 0.0.91 → 0.0.92
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(D,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual"),require("@element-plus/icons-vue")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual","@element-plus/icons-vue"],e):(D=typeof globalThis<"u"?globalThis:D||self,e(D.AutoVueBasic={},D.Vue,D.AutoVueManual,D.ElementPlusIconsVue))})(this,(function(D,e,l,J){"use strict";const _e={tops:"tops",rules:"rules"},L=l.ApiUtils.routineApi("menu","id",_e,{},["TOP_MENU_LIST","MENU_LIST"]),X=l.ApiUtils.routineApi("rule","key"),Z=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(L),{value:c,options:p,change:s,refresh:d,filterOptions:r}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"TOP_MENU_LIST",api:L,url:L.urls.tops,isArray:!0});return(T,a)=>{const i=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(c),"onUpdate:modelValue":a[1]||(a[1]=m=>e.isRef(c)?c.value=m:null),options:e.unref(p),multiple:x.multiple,disabled:e.unref(_)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=m=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:m})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${m.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(m.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),be=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},c={sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("placeholder.input menu.component"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,L);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),V=e.resolveComponent("el-input-number"),C=e.resolveComponent("el-row"),y=e.resolveComponent("el-input"),h=e.resolveComponent("el-switch"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[17]||(t[17]=g=>e.isRef(p)?p.value=g:null),title:e.unref(s)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(C,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=g=>e.unref(r).menu_id=g),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{"label-width":"60px",label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(V,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=g=>e.unref(r).sort=g),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).module,"onUpdate:modelValue":t[2]||(t[2]=g=>e.unref(r).module=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=g=>e.unref(r).name=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[4]||(t[4]=g=>e.unref(r).en_name=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).component,"onUpdate:modelValue":t[5]||(t[5]=g=>e.unref(r).component=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).url,"onUpdate:modelValue":t[6]||(t[6]=g=>e.unref(r).url=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=g=>e.unref(r).remark=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).icon,"onUpdate:modelValue":t[8]||(t[8]=g=>e.unref(r).icon=g),placeholder:e.unref(l.Translate)("placeholder.input"),onInput:t[9]||(t[9]=g=>{e.unref(r).meta.icon=g})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(r).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).meta.title,"onUpdate:modelValue":t[10]||(t[10]=g=>e.unref(r).meta.title=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).meta.active,"onUpdate:modelValue":t[11]||(t[11]=g=>e.unref(r).meta.active=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.link,"onUpdate:modelValue":t[12]||(t[12]=g=>e.unref(r).meta.link=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=g=>e.unref(r).meta.keep_alive=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.hide,"onUpdate:modelValue":t[14]||(t[14]=g=>e.unref(r).meta.hide=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.full,"onUpdate:modelValue":t[15]||(t[15]=g=>e.unref(r).meta.full=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.affix,"onUpdate:modelValue":t[16]||(t[16]=g=>e.unref(r).meta.affix=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),u=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(L),{value:c,options:p,change:s,refresh:d,filterOptions:r}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"MENU_LIST",api:L,isArray:!0});return(T,a)=>{const i=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(c),"onUpdate:modelValue":a[1]||(a[1]=m=>e.isRef(c)?c.value=m:null),options:e.unref(p),multiple:x.multiple,disabled:e.unref(_)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=m=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:m})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${m.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(m.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),he=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},c={menu_id:[{required:!0,type:"number",message:l.Translate("placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("placeholder.input menu.rules"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,X);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-input"),C=e.resolveComponent("el-col"),y=e.resolveComponent("el-row"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[6]||(t[6]=B=>e.isRef(p)?p.value=B:null),title:e.unref(s)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(h,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(C,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=B=>e.unref(r).menu_id=B),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=B=>e.unref(r).sort=B),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=B=>e.unref(r).name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=B=>e.unref(r).en_name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[4]||(t[4]=B=>e.unref(r).remark=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(C,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).urls,"onUpdate:modelValue":t[5]||(t[5]=B=>e.unref(r).urls=B),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function M(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const v=e.defineComponent({__name:"index",setup(x){const N={keyword:"",status:0},w=e.ref(""),b=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:t})=>e.createVNode("span",{class:"iconfont "+t.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:t})=>e.createVNode(e.Fragment,null,[t.menu?.translate])},{label:l.Translate("base.name"),prop:"translate",width:160},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:t})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[t.rules?.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:w.value===n.key,title:l.Translate("message.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R({key:n.key}),onClose:()=>w.value=n.key},{default:()=>[n.translate]}),default:()=>{let o,V;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.space base.delete base.space menu.rules")}: ${t.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>w.value=""},M(o=l.Translate("base.cancel"))?o:{default:()=>[o]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>k(n.key)},M(V=l.Translate("base.confirm"))?V:{default:()=>[V]})])])}}))]})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:t})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>i({id:t.id})},null)}],{requesting:_}=l.useLoading(L),{tableRef:c,formModalRef:p,keyword:s,search:d,refresh:r,reset:T,openFormModal:a,editFormModal:i}=l.useCrudPage(N),{formModalRef:f,openFormModal:m,editFormModal:R}=l.useCrudPage(),k=t=>{X[l.DEFAULT_REMOVE_KEY]({key:t}).then(()=>{w.value="",r()})};return(t,n)=>{const o=e.resolveComponent("el-button"),V=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header"),g=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(g,{class:"basic-card flex-full","body-class":"flex-1",onClick:n[5]||(n[5]=()=>w.value="")},{header:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(T)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(o,{circle:"",icon:e.unref(J.Key),onClick:e.unref(m)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(h,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(V,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":n[0]||(n[0]=U=>e.unref(s).keyword=U),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(U=>e.unref(d)(),["enter"])),onClear:n[2]||(n[2]=U=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(y,{modelValue:e.unref(s).status,"onUpdate:modelValue":n[3]||(n[3]=U=>e.unref(s).status=U),onChange:n[4]||(n[4]=U=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],U=>e.createVNode(C,{key:U,label:e.unref(l.Translate)(`status.${U}`),value:U},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:c,columns:b,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),"auto-search":""},null,8,["url","search-param"]),e.createVNode(be,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(r)},null,8,["onRefresh"]),e.createVNode(he,{ref_key:"ruleFormModalRef",ref:f,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),ge=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"})),Y=l.ApiUtils.routineApi("role","key"),Ce={class:"rule-check"},we={style:{width:"80px","line-height":"36px"}},Te=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:N,emit:w}){const{requesting:b}=l.useLoading(L),_=x,c=w,p=e.ref(!1),s=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:r}=l.useSelect(e.toRef(_,"modelValue"),c,{key:"RULE_CHECK",api:L,url:L.urls.rules,isArray:!0},{autoRefresh:!1});function T(){d.value.forEach(k=>{k.rules?.length&&(s.MenuAll[k.id]=!1,s.MenuIndeterminate[k.id]=!1,s.MenuList[k.id]=[])})}function a(k){d.value.forEach(t=>{t.rules?.length&&(s.MenuList[t.id]=k?t.rules.map(n=>n.key):[])}),f()}function i(k,t){const n=d.value.find(o=>o.id===t);s.MenuList[t]=k&&n?n.rules.map(o=>o.key):[],f()}function f(){d.value.forEach(k=>{const t=k.rules?.length||0,n=s.MenuList[k.id]?.length||0;s.MenuAll[k.id]=n===t&&t>0,s.MenuIndeterminate[k.id]=n>0&&n<t}),s.checkAll=Object.values(s.MenuAll).every(Boolean),s.indeterminate=!s.checkAll&&Object.values(s.MenuList).some(k=>k.length>0),c("update:modelValue",Object.values(s.MenuList).flat())}function m(){s.checkAll=!1,s.indeterminate=!1,s.MenuAll={},s.MenuList={},s.MenuIndeterminate={},T(),c("update:modelValue",[]),p.value=!1}function R(k){if(Array.isArray(d.value)&&d.value.length>0){for(let t of d.value)if(Array.isArray(t.rules)&&t.rules.length>0)for(let n of t.rules)k.some(o=>o===n.key)&&(s.MenuList[t.id]=(s.MenuList?.[t.id]||[]).concat([n.key]));f(),p.value=!0}}return e.onMounted(async()=>{d.value?.length||await r(),!p.value&&_.modelValue&&R(_.modelValue)}),e.watch(()=>_.modelValue,k=>{e.nextTick(()=>{p.value||!d.value?.length||k&&k.length>0&&R(k)})},{deep:!0,immediate:!0}),N({generateOption:R,cleanChecked:m}),(k,t)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),V=e.resolveComponent("el-text"),C=e.resolveComponent("el-divider"),y=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":s.checkAll,indeterminate:s.indeterminate,id:"all",disabled:x.disabled,onChange:a},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createElementVNode("span",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),text:"",size:"small",onRefresh:t[0]||(t[0]=h=>e.unref(r)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),h=>(e.openBlock(),e.createElementBlock("div",{key:h.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":s.MenuAll[h.id],disabled:x.disabled||!h.rules||h.rules.length<=0,indeterminate:s.MenuIndeterminate[h.id],onChange:B=>i(B,h.id)},{default:e.withCtx(()=>[e.createVNode(V,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(C,{direction:"vertical"}),h.rules?(e.openBlock(),e.createBlock(y,{key:0,modelValue:s.MenuList[h.id],"onUpdate:modelValue":B=>s.MenuList[h.id]=B,disabled:x.disabled,style:{margin:"auto"},onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.rules,B=>(e.openBlock(),e.createBlock(n,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=(x,N)=>{const w=x.__vccOpts||x;for(const[b,_]of N)w[b]=_;return w},xe=ee(Te,[["__scopeId","data-v-7adb5f76"]]),ke=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_=e.ref(),c={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},p={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:s,title:d,form:r,formData:T,requesting:a,executing:i,open:f,modify:m,submit:R,closed:k}=l.useForm(b,c,Y),t=()=>{_.value?.cleanChecked(),k()};return N({open:f,modify:m}),(n,o)=>{const V=e.resolveComponent("el-input"),C=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-col"),h=e.resolveComponent("el-input-number"),B=e.resolveComponent("el-row"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":o[6]||(o[6]=U=>e.isRef(s)?s.value=U:null),title:e.unref(d)(),width:"1000px",executing:e.unref(i),onClosed:t,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:r,model:e.unref(T),"label-width":"auto",rules:p,disabled:e.unref(a)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(B,{gutter:20},{default:e.withCtx(()=>[e.createVNode(y,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).module,"onUpdate:modelValue":o[0]||(o[0]=U=>e.unref(T).module=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(y,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(h,{class:"w-full",modelValue:e.unref(T).sort,"onUpdate:modelValue":o[1]||(o[1]=U=>e.unref(T).sort=U),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(C,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).name,"onUpdate:modelValue":o[2]||(o[2]=U=>e.unref(T).name=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).en_name,"onUpdate:modelValue":o[3]||(o[3]=U=>e.unref(T).en_name=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).remark,"onUpdate:modelValue":o[4]||(o[4]=U=>e.unref(T).remark=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(xe,{ref_key:"rulesCheck",ref:_,modelValue:e.unref(T).rules,"onUpdate:modelValue":o[5]||(o[5]=U=>e.unref(T).rules=U),disabled:e.unref(a)||e.unref(i)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),le=e.defineComponent({__name:"index",setup(x){const N={keyword:""},w=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:65,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>a({key:i.key})},null)}],{requesting:b}=l.useLoading(Y),{tableRef:_,formModalRef:c,keyword:p,search:s,reset:d,refresh:r,openFormModal:T,editFormModal:a}=l.useCrudPage(N);return(i,f)=>{const m=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),k=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(k,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(m,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(p).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(s)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:f[3]||(f[3]=n=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,columns:w,url:e.unref(Y).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ke,{ref_key:"formModalRef",ref:c,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Ne=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),E=l.ApiUtils.routineApi("I18N","uuid",{modules:"modules",languages:"languages"},{gen:"gen"},["I18N_MODULES"]),F=l.ApiUtils.routineApi("I18N_template","uuid",{apps:"apps"}),re=e.defineComponent({__name:"ModuleSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(E),{value:c,options:p,change:s,refresh:d,filterOptions:r}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"I18N_MODULES",url:E.urls.modules,api:E,isArray:!0});return(T,a)=>{const i=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(c),"onUpdate:modelValue":a[1]||(a[1]=m=>e.isRef(c)?c.value=m:null),options:e.unref(p),multiple:x.multiple,disabled:e.unref(_)||x.disabled,clearable:x.clearable,filterable:"","allow-create":x.allowCreate,"default-first-option":"",placeholder:e.unref(l.Translate)("placeholder.select"),filterOptions:e.unref(r),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=m=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:m})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(m.value),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","clearable","allow-create","placeholder","filterOptions","onChange"])}}}),ye=e.defineComponent({__name:"I18N",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},c={module:[{required:!0,message:l.Translate("i18n.verify.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("i18n.verify.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("i18n.verify.language"),trigger:"change"}]},p=e.ref([]),s=l.useCacheStore();function d(){const o={isArray:!0,key:"I18N_LANGUAGES",url:E.urls.languages,params:{}};s.GET_CACHE({...o,force:!0}).then(V=>{p.value=V})}d();const{modal:r,title:T,form:a,formData:i,requesting:f,executing:m,open:R,modify:k,submit:t,closed:n}=l.useForm(b,_,E);return N({open:R,modify:k}),(o,V)=>{const C=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-input"),h=e.resolveComponent("el-space"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(r),"onUpdate:modelValue":V[3]||(V[3]=g=>e.isRef(r)?r.value=g:null),title:e.unref(T)(),width:"600px",executing:e.unref(m),onClosed:e.unref(n),onSubmit:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:a,model:e.unref(i),"label-width":"auto",rules:c,disabled:e.unref(f)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:e.unref(i).module,"onUpdate:modelValue":V[0]||(V[0]=g=>e.unref(i).module=g),disabled:e.unref(m),"allow-create":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(i).key,"onUpdate:modelValue":V[1]||(V[1]=g=>e.unref(i).key=g),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(h,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g},[e.createVNode(y,{modelValue:e.unref(i).language[g],"onUpdate:modelValue":U=>e.unref(i).language[g]=U,placeholder:e.unref(l.Translate)("i18n.placeholder.language")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(i).remark,"onUpdate:modelValue":V[2]||(V[2]=g=>e.unref(i).remark=g),placeholder:e.unref(l.Translate)("placeholder.remark")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),te=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(x,{expose:N,emit:w}){const b=w,{visible:_,open:c,close:p}=l.useDialog(void 0,()=>b("closed")),s={keyword:"",module:void 0,status:0},d=[{label:l.Translate("i18n.module"),prop:"module",width:120},{label:l.Translate("i18n.key"),prop:"key",width:200},{label:l.Translate("i18n.i18n"),align:"left",prop:"language"},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:E.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:120,align:"center"}],{requesting:r}=l.useLoading(E),{tableRef:T,formModalRef:a,keyword:i,search:f,reset:m,refresh:R,openFormModal:k}=l.useCrudPage(s);function t(n){b("choosed",n)}return N({open:c}),(n,o)=>{const V=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{class:"basic-drawer",modelValue:e.unref(_),"onUpdate:modelValue":o[7]||(o[7]=g=>e.isRef(_)?_.value=g:null),width:"880px","show-close":!1,onClosed:e.unref(p)},{title:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(r),onRefresh:e.unref(m)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k),disabled:e.unref(r)},null,8,["onOpen","disabled"])]),content:e.withCtx(()=>[e.createVNode(h,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(V,{style:{width:"160px"},modelValue:e.unref(i).keyword,"onUpdate:modelValue":o[0]||(o[0]=g=>e.unref(i).keyword=g),disabled:e.unref(r),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(g=>e.unref(f)(),["enter"])),onClear:o[2]||(o[2]=g=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(re,{modelValue:e.unref(i).module,"onUpdate:modelValue":o[3]||(o[3]=g=>e.unref(i).module=g),clearable:!0,disabled:e.unref(r),style:{width:"160px"}},null,8,["modelValue","disabled"]),e.createVNode(y,{modelValue:e.unref(i).status,"onUpdate:modelValue":o[4]||(o[4]=g=>e.unref(i).status=g),onChange:o[5]||(o[5]=g=>e.unref(f)()),disabled:e.unref(r)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],g=>e.createVNode(C,{key:g,label:e.unref(l.Translate)(`status.${g}`),value:g},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(r),onSearch:o[6]||(o[6]=g=>e.unref(f)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:T,columns:d,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),onRowDblclick:t,"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:a,onRefresh:e.unref(R)},null,8,["onRefresh"])]),_:1},8,["modelValue","onClosed"])}}}),Re={key:0},Ve={key:1},Ue=e.defineComponent({__name:"template",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=e.shallowRef(),_=()=>b.value?.open(),c=w,p=e.ref("600px"),s=e.ref({"zh-CN":"primary","en-US":"success"}),d=e.ref({}),r={uuid:"",app:1,keys:"",values:[],remark:""},T={app:[{required:!0,message:l.Translate("i18n.verify.app"),trigger:"blur"}],keys:[{required:!0,message:l.Translate("i18n.verify.keys"),trigger:"blur"}],values:[{required:!0,message:l.Translate("i18n.verify.values"),trigger:"change"}]},{modal:a,title:i,form:f,formData:m,requesting:R,executing:k,open:t,modify:n,submit:o,closed:V}=l.useForm(c,r,F);function C(){p.value="1080px",_()}function y(){p.value="600px"}function h(U){let S=U?.module?.toLowerCase()+"."+U.key.toLowerCase();m.keys=S,m.values.push(S);for(const q in U.language)d.value[q]||(d.value[q]=[]),d.value[q].push(U.language[q])}function B(){p.value="600px",g()}function g(){m.keys="",m.values=[],d.value={"zh-CN":[],"en-US":[]}}return e.watch(()=>a.value,U=>{U?B():V()}),N({open:t,modify:n}),(U,S)=>{const q=e.resolveComponent("el-page-header"),$=e.resolveComponent("el-form-item"),Q=e.resolveComponent("el-button"),A=e.resolveComponent("el-input"),el=e.resolveComponent("el-tag"),ll=e.resolveComponent("el-space"),rl=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(a),"onUpdate:modelValue":S[3]||(S[3]=O=>e.isRef(a)?a.value=O:null),width:p.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(q,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("i18n.template")),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"default",icon:"icon-clear",loading:e.unref(k),onClick:g},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(k),onClick:e.unref(o)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(rl,{ref_key:"form",ref:f,model:e.unref(m),"label-width":"auto",rules:T,disabled:e.unref(R)||e.unref(k)},{default:e.withCtx(()=>[e.createVNode($,{label:e.unref(l.Translate)("base.app"),prop:"app",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(m).app,"onUpdate:modelValue":S[0]||(S[0]=O=>e.unref(m).app=O),"cache-key":"I18NAPPS",hidden:[0],url:e.unref(F).urls.apps},null,8,["modelValue","url"])]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("i18n.keys"),prop:"keys",required:""},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(m).keys,"onUpdate:modelValue":S[1]||(S[1]=O=>e.unref(m).keys=O),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(Q,{icon:e.unref(J.Search),onClick:C},null,8,["icon"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("i18n.values"),prop:"values",required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).values.join(":")),1)]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("i18n.values")},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(O,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:"w-full"},[e.createVNode(ll,null,{default:e.withCtx(()=>[e.createVNode(el,{type:s.value[G],style:{"min-width":"80px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(G),1)]),_:2},1032,["type"]),G=="zh-CN"?(e.openBlock(),e.createElementBlock("span",Re,e.toDisplayString(O.join("")),1)):(e.openBlock(),e.createElementBlock("span",Ve,e.toDisplayString(O.join(" ")),1))]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(m).remark,"onUpdate:modelValue":S[2]||(S[2]=O=>e.unref(m).remark=O),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"]),e.createVNode(te,{ref_key:"I18nTableDrawerRef",ref:b,onChoosed:h,onClosed:y},null,512)]),_:1},8,["modelValue","width"])}}}),Be=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function Se(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const ne=e.defineComponent({__name:"index",setup(x){const N=te,w=Ue,b={keyword:"",app:0,status:0},_=({row:y})=>{let h;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+y.app),style:"min-width: 80px"},Se(h=l.Translate("i18n.app."+y.app))?h:{default:()=>[h]})},c=({row:y})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:d.value,onModify:()=>t({uuid:y.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:d.value,onClick:()=>o(y.uuid)},null)]}),p=[{label:l.Translate("base.app"),prop:"app",width:120,render:_},{label:l.Translate("i18n.keys"),prop:"keys",width:200},{label:l.Translate("i18n.values"),prop:"values",width:200},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:F.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:c}],{requesting:s,executing:d}=l.useLoading(F),{tableRef:r,formModalRef:T,dialogRef:a,keyword:i,search:f,reset:m,refresh:R,openFormModal:k,editFormModal:t,openDialog:n}=l.useCrudPage(b);function o(y){return F.remove({uuid:y}).finally(()=>{R()})}function V(){return E.gen().finally(()=>{R()})}function C(){Be.gen().finally(()=>{R()})}return(y,h)=>{const B=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-space"),q=e.resolveComponent("el-divider"),$=e.resolveComponent("el-page-header"),Q=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(Q,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode($,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(s),onRefresh:e.unref(m)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(S,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":h[0]||(h[0]=A=>e.unref(i).keyword=A),disabled:e.unref(s)||e.unref(d),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:h[1]||(h[1]=e.withKeys(A=>e.unref(f)(),["enter"])),onClear:h[2]||(h[2]=A=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(i).app,"onUpdate:modelValue":h[3]||(h[3]=A=>e.unref(i).app=A),"cache-key":"I18NAPPS",disabled:e.unref(s)||e.unref(d),url:e.unref(F).urls.apps,onChange:h[4]||(h[4]=A=>e.unref(f)())},null,8,["modelValue","disabled","url"]),e.createVNode(U,{modelValue:e.unref(i).status,"onUpdate:modelValue":h[5]||(h[5]=A=>e.unref(i).status=A),disabled:e.unref(s)||e.unref(d),onChange:h[6]||(h[6]=A=>e.unref(f)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(g,{key:A,label:e.unref(l.Translate)(`status.${A}`),value:A},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(s)||e.unref(d),onSearch:h[7]||(h[7]=A=>e.unref(f)())},null,8,["disabled"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"warning",icon:"icon-cloud-upload",plain:!1,loading:e.unref(d),onClick:V},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(d),onClick:C},null,8,["loading"]),e.createVNode(q,{direction:"vertical"}),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n),icon:"icon-en-US"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:r,columns:p,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(e.unref(N),{ref_key:"I18nTableDrawerRef",ref:a},null,512),e.createVNode(e.unref(w),{ref_key:"formModalRef",ref:T,onRefresh:e.unref(R)},null,8,["onRefresh"])]),_:1})}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"})),W=l.ApiUtils.routineApi("admin","key"),Ae=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:c,title:p,form:s,formData:d,requesting:r,executing:T,open:a,modify:i,submit:f,closed:m}=l.useForm(b,_,W),R={username:[{required:!0,message:l.Translate("placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("placeholder.select menu.Role"),trigger:"change"}]},k=e.ref([]),t=async()=>{const n=await Y.list();k.value=Array.isArray(n?.data)?n.data:[]};return e.onBeforeMount(async()=>{await t()}),N({open:a,modify:i}),(n,o)=>{const V=e.resolveComponent("el-input"),C=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-radio-button"),h=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-checkbox"),g=e.resolveComponent("el-checkbox-group"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(c),"onUpdate:modelValue":o[7]||(o[7]=S=>e.isRef(c)?c.value=S:null),title:e.unref(p)(),width:"600px",executing:e.unref(T),onClosed:e.unref(m),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:s,model:e.unref(d),"label-width":"auto",rules:R,disabled:e.unref(r)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).username,"onUpdate:modelValue":o[0]||(o[0]=S=>e.unref(d).username=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).phone,"onUpdate:modelValue":o[1]||(o[1]=S=>e.unref(d).phone=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).password,"onUpdate:modelValue":o[2]||(o[2]=S=>e.unref(d).password=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(C,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).email,"onUpdate:modelValue":o[3]||(o[3]=S=>e.unref(d).email=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(d).language,"onUpdate:modelValue":o[4]||(o[4]=S=>e.unref(d).language=S)},{default:e.withCtx(()=>[e.createVNode(y,{value:"zh-CN"},{default:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(y,{value:"en-US"},{default:e.withCtx(()=>[...o[9]||(o[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).roles,"onUpdate:modelValue":o[5]||(o[5]=S=>e.unref(d).roles=S)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,S=>(e.openBlock(),e.createBlock(B,{key:S.key,value:S.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).remark,"onUpdate:modelValue":o[6]||(o[6]=S=>e.unref(d).remark=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),oe=e.defineComponent({__name:"index",setup(x){const N={keyword:""},w=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:i})=>e.createVNode(l.BasicAvatar,{src:i.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:i})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[i.username]),e.createVNode("div",null,[i.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.login_at"),prop:"login_at",width:160},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:i.key})},null)}],{requesting:b}=l.useLoading(W),{tableRef:_,formModalRef:c,keyword:p,search:s,reset:d,refresh:r,openFormModal:T,editFormModal:a}=l.useCrudPage(N);return(i,f)=>{const m=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),k=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(k,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(m,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(p).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(s)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:f[3]||(f[3]=n=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(W).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Ae,{ref_key:"formModalRef",ref:c,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Le=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),Ee={check:"check"},P=l.ApiUtils.routineApi("site","id",Ee),j=l.ApiUtils.routineApi("domain"),H=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:N,emit:w}){const b=w,_=x,{requesting:c}=l.useLoading(j),{key:p,options:s,refresh:d,change:r}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_LIST",api:j,isArray:!0});return N({refresh:d}),(T,a)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(p)?p.value=f:null),options:e.unref(s),disabled:x.disabled||e.unref(c),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(c),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Oe=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},c={domain_id:[{required:!0,message:l.Translate("placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,P);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[7]||(t[7]=C=>e.isRef(p)?p.value=C:null),title:e.unref(s)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=C=>e.unref(r).domain_id=C),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).prefix,"onUpdate:modelValue":t[1]||(t[1]=C=>e.unref(r).prefix=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=C=>e.unref(r).name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=C=>e.unref(r).en_name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).dns,"onUpdate:modelValue":t[4]||(t[4]=C=>e.unref(r).dns=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).git,"onUpdate:modelValue":t[5]||(t[5]=C=>e.unref(r).git=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[6]||(t[6]=C=>e.unref(r).remark=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),K=l.ApiUtils.routineApi("domain_provider"),ae=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:N,emit:w}){const b=w,_=x,{requesting:c}=l.useLoading(K),{key:p,options:s,refresh:d,change:r}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_PROVIDER_LIST",api:K,isArray:!0});return N({refresh:d}),(T,a)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(p)?p.value=f:null),options:e.unref(s),disabled:x.disabled||e.unref(c),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(c),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),qe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},c={provider_id:[{required:!0,message:l.Translate("placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,j);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),V=e.resolveComponent("el-date-picker"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[4]||(t[4]=y=>e.isRef(p)?p.value=y:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(C,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(ae,{modelValue:e.unref(r).provider_id,"onUpdate:modelValue":t[0]||(t[0]=y=>e.unref(r).provider_id=y),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[1]||(t[1]=y=>e.unref(r).name=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"expired_at",required:"",label:e.unref(l.Translate)("time.expired_at")},{default:e.withCtx(()=>[e.createVNode(V,{type:"date",style:{width:"100%"},modelValue:e.unref(r).expired_at,"onUpdate:modelValue":t[2]||(t[2]=y=>e.unref(r).expired_at=y),disabled:e.unref(a),"value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,placeholder:e.unref(l.Translate)("placeholder.select")},null,8,["modelValue","disabled","value-format","format","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[3]||(t[3]=y=>e.unref(r).remark=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Fe={gen:"gen"},z=l.ApiUtils.routineApi("SSL","id",Fe),de=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:N,emit:w}){const b=w,_=x,{requesting:c}=l.useLoading(P),{key:p,options:s,refresh:d,change:r}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"SITE_LIST",api:P,isArray:!0},{formatOptions:T=>T.map(a=>({...a,label:a.prefix+"."+a.domain?.name,value:a.id}))});return N({refresh:d}),(T,a)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(p)?p.value=f:null),options:e.unref(s),disabled:x.disabled||e.unref(c),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(c),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),se=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},c={domain_id:[{required:!0,message:l.Translate("placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("placeholder.input config.encryption"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,z);return N({open:i,modify:f,formData:r}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),C=e.resolveComponent("el-input"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[8]||(t[8]=h=>e.isRef(p)?p.value=h:null),title:e.unref(s)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=h=>e.unref(r).domain_id=h),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).client,"onUpdate:modelValue":t[1]||(t[1]=h=>e.unref(r).client=h)},{default:e.withCtx(()=>[e.createVNode(o,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(de,{modelValue:e.unref(r).site_id,"onUpdate:modelValue":t[2]||(t[2]=h=>e.unref(r).site_id=h),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=h=>e.unref(r).name=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).path,"onUpdate:modelValue":t[4]||(t[4]=h=>e.unref(r).path=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).email,"onUpdate:modelValue":t[5]||(t[5]=h=>e.unref(r).email=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).encryption,"onUpdate:modelValue":t[6]||(t[6]=h=>e.unref(r).encryption=h)},{default:e.withCtx(()=>[e.createVNode(o,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=h=>e.unref(r).remark=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$e=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},c={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("placeholder.input config.endpoint"),trigger:"blur"}},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,K);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-input"),o=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[6]||(t[6]=C=>e.isRef(p)?p.value=C:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[0]||(t[0]=C=>e.unref(r).name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[1]||(t[1]=C=>e.unref(r).en_name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).key,"onUpdate:modelValue":t[2]||(t[2]=C=>e.unref(r).key=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).secret,"onUpdate:modelValue":t[3]||(t[3]=C=>e.unref(r).secret=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).end_point,"onUpdate:modelValue":t[4]||(t[4]=C=>e.unref(r).end_point=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[5]||(t[5]=C=>e.unref(r).remark=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Pe=e.defineComponent({__name:"DomainProviderTableDrawer",setup(x,{expose:N}){const{requesting:w}=l.useLoading(K),b=e.ref(!1),{tableRef:_,formModalRef:c,refresh:p,openFormModal:s,editFormModal:d}=l.useCrudPage({}),r=[{prop:"name",label:l.Translate("base.name"),width:0,minWidth:140},{prop:"en_name",label:l.Translate("base.en_name"),width:120},{prop:"actions",label:l.Translate("base.action"),width:60,align:"center",render:({rowData:a})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>d({id:a.id})},null)]})}];return N({open:()=>{b.value=!0}}),(a,i)=>{const f=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:b.value,"onUpdate:modelValue":i[0]||(i[0]=m=>b.value=m),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(f,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain config.provider")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(w)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(K).urls.list,columns:r,loading:e.unref(w)},null,8,["url","loading"]),e.createVNode($e,{ref_key:"formModalRef",ref:c,onRefresh:e.unref(p)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ze=e.defineComponent({__name:"DomainTableDrawer",setup(x,{expose:N}){const{requesting:w}=l.useLoading(j),{visible:b,open:_}=l.useDialog(),{tableRef:c,formModalRef:p,refresh:s,openFormModal:d,editFormModal:r}=l.useCrudPage(),{formRef:T,open:a,edit:i}=l.useSingleFormModal(),{dialogRef:f,open:m}=l.useSingleDialog(),R=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:k})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[k.provider?.name]})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("time.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:k})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>r({id:k.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{k.ssl&&k.ssl.id?i({id:k.ssl?.id}):(T.value.formData.domain_id=k.id,T.value.formData.site_id=0,a())}},null)]})}];return N({open:_}),(k,t)=>{const n=e.resolveComponent("el-space"),o=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(b),"onUpdate:modelValue":t[0]||(t[0]=V=>e.isRef(b)?b.value=V:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(o,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(w)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(n,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:c,size:"small","row-key":"id",url:e.unref(j).urls.list,columns:R,loading:e.unref(w)},null,8,["url","loading"]),e.createVNode(qe,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(se,{ref_key:"sslFormModalRef",ref:T,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(Pe,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),Ie=e.defineComponent({__name:"SSLTableDrawer",setup(x,{expose:N}){const{requesting:w,executing:b}=l.useLoading(z),_=e.ref(0),{visible:c,open:p}=l.useDialog(),{tableRef:s,formModalRef:d,refresh:r,openFormModal:T,editFormModal:a}=l.useCrudPage(),i=[{prop:"client",label:l.Translate("ssl.client"),width:100},{prop:"encryption",label:l.Translate("ssl.encryption"),width:100},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"path",label:l.Translate("base.path"),width:120},{prop:"renewal_days",label:l.Translate("ssl.renewal_days"),width:100},{prop:"checked_at",label:l.Translate("ssl.checked_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:160,align:"center",render:({rowData:R})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:b.value,onModify:()=>a({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:b.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>f(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:b.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>m(R)},null)]})}],f=R=>{z.gen({id:R}).then(k=>{console.warn("Res:",k)})};function m(R){const k=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(k).then(t=>t.blob()).then(t=>{let n=URL.createObjectURL(t),o=document.createElement("a");o.style.display="none",o.href=n,o.download=R.name+".zip",o.click(),URL.revokeObjectURL(t)})}return N({open:p}),(R,k)=>{const t=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(c),"onUpdate:modelValue":k[0]||(k[0]=n=>e.isRef(c)?c.value=n:null),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(t,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("ssl.ssl")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(r),size:"default",loading:e.unref(w)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:s,size:"default","row-key":"id",url:e.unref(z).urls.list,columns:i,loading:e.unref(w)},null,8,["url","loading"]),e.createVNode(se,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ie=l.ApiUtils.routineApi("SSLLog","id"),je=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(x,{expose:N}){const w=x,{requesting:b,executing:_}=l.useLoading([ie,z]),{visible:c,open:p}=l.useDialog(),{tableRef:s,refresh:d}=l.useSingleTable(),r=[{prop:"status.label",label:l.Translate("base.status"),width:100},{prop:"at",label:l.Translate("base.time"),width:180},{prop:"type_text",label:l.Translate("base.type"),width:80},{prop:"result",label:l.Translate("base.result"),width:0}];function T(){z.gen({id:w.ssl.id}).then(i=>{console.warn("Res:",i)})}function a(){const i=l.AssetsUtils.getDownloadUrl(w.ssl.path+".zip");fetch(i).then(f=>f.blob()).then(f=>{let m=URL.createObjectURL(f),R=document.createElement("a");R.style.display="none",R.href=m,R.download=w.ssl.name+".zip",R.click(),URL.revokeObjectURL(f)})}return N({open:p}),(i,f)=>{const m=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(c),"onUpdate:modelValue":f[0]||(f[0]=R=>e.isRef(c)?c.value=R:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(m,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.ssl base.log")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d),size:"default",loading:e.unref(b)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(_),loading:e.unref(_),onClick:T},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(_),loading:e.unref(_),onClick:a},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:s,size:"small","row-key":"id",url:e.unref(ie).urls.search,columns:r,loading:e.unref(b)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),pe=ee(e.defineComponent({__name:"index",setup(x){const N=ze,w=Ie,b=je,_=e.ref(),{requesting:c,executing:p}=l.useLoading(P),{tableRef:s,formModalRef:d,reset:r,refresh:T,openFormModal:a,editFormModal:i}=l.useCrudPage(),{dialogRef:f,open:m}=l.useSingleDialog(),{dialogRef:R,open:k}=l.useSingleDialog(),{dialogRef:t,open:n}=l.useSingleDialog(),o=[{prop:"domain.name",label:l.Translate("config.domain"),width:129,type:"copy"},{prop:"name",label:l.Translate("base.name"),width:100},{prop:"dns",label:l.Translate("config.dns"),width:160,type:"copy"},{prop:"git",label:l.Translate("config.git"),width:300,type:"copy"},{prop:"expired_at",label:l.Translate("time.expired_at"),align:"center",width:140,cellRenderer:({rowData:y})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[y.ssl?.renewal_days,e.createTextVNode(" 天")]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:h=>{h.stopPropagation(),y.ssl&&y.ssl.id&&(_.value=y.ssl,n())}},{default:()=>[e.createVNode("span",{class:"icon iconfont icon-reloadtime"},null)]})]})},{prop:"remark",label:l.Translate("base.remark"),width:0,minWidth:160},{prop:"operation",label:l.Translate("base.action"),width:100,align:"center",cellRenderer:({rowData:y})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>i({id:y.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:p.value,loading:V.value==y.id&&p.value,onClick:()=>C(y)},null)]})}],V=e.ref(0),C=y=>{V.value=y.id,P.check({id:y.id}).then(h=>{h.data&&(l.notification(h),T())}).finally(()=>{V.value=0})};return(y,h)=>{const B=e.resolveComponent("el-space"),g=e.resolveComponent("el-page-header"),U=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(U,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(g,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(B,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(c),onRefresh:e.unref(r)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:s,size:"small","row-key":"id",url:e.unref(P).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:o},null,8,["url"]),e.createVNode(Oe,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(T)},null,8,["onRefresh"]),e.createVNode(e.unref(N),{ref_key:"domainTableDrawerRef",ref:f},null,512),e.createVNode(e.unref(w),{ref_key:"sslTableDrawerRef",ref:R},null,512),e.createVNode(e.unref(b),{ref_key:"sslLogTableDrawerRef",ref:t},null,512)]),_:1})}}}),[["__scopeId","data-v-34e18506"]]),Ke=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),Ye={request:"request",error:"error",sql:"SQL"},I=l.ApiUtils.routineApi("log","id",Ye),fe=e.defineComponent({__name:"index",setup(x){const N={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},w=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(I),{tableRef:_,keyword:c,search:p,reset:s}=l.useCrudPage(N);return(d,r)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),i=e.resolveComponent("el-page-header"),f=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(f,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(c).dates,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(c).dates=m),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:r[1]||(r[1]=m=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:r[2]||(r[2]=m=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(I).urls.request,"search-param":e.unref(c),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Ge=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),ce=e.defineComponent({__name:"index",setup(x){const N={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},w=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(I),{tableRef:_,keyword:c,search:p,reset:s}=l.useCrudPage(N);return(d,r)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),i=e.resolveComponent("el-page-header"),f=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(f,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(c).dates,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(c).dates=m),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:r[1]||(r[1]=m=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:r[2]||(r[2]=m=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(I).urls.error,"search-param":e.unref(c),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),We=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"})),me=e.defineComponent({__name:"index",setup(x){const N={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},w=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(I),{tableRef:_,keyword:c,search:p,reset:s}=l.useCrudPage(N);return(d,r)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),i=e.resolveComponent("el-page-header"),f=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(f,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(c).dates,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(c).dates=m),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:r[1]||(r[1]=m=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:r[2]||(r[2]=m=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(I).urls.sql,"search-param":e.unref(c),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),He=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"})),Qe=e.defineComponent({__name:"LanguageSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(E),{value:c,options:p,change:s}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"LANGUAGE_SELECT",url:E.urls.languages,api:E,isArray:!0},{formatOptions:d=>d.map(r=>({value:r,label:r}))});return(d,r)=>{const T=e.resolveComponent("el-radio-button"),a=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(a,{modelValue:e.unref(c),"onUpdate:modelValue":r[0]||(r[0]=i=>e.isRef(c)?c.value=i:null),disabled:e.unref(_),onChange:e.unref(s)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),i=>(e.openBlock(),e.createBlock(T,{key:i.value,value:i.value},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(i.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])}}}),Je=()=>Promise.resolve().then(()=>Ge),Xe=()=>Promise.resolve().then(()=>We),Ze=()=>Promise.resolve().then(()=>He),ue=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:Je,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Xe,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:Ze,meta:{title:l.Translate("menu.SqlLog")}}],Me={install:x=>{Reflect.ownKeys(x._context.provides).some(N=>String(N)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},ve=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>Le),"./views/language/index.vue":()=>Promise.resolve().then(()=>De),"./views/menu/index.vue":()=>Promise.resolve().then(()=>ge),"./views/role/index.vue":()=>Promise.resolve().then(()=>Ne),"./views/site/index.vue":()=>Promise.resolve().then(()=>Ke)});D.AdminsPage=oe,D.DomainProviderSelect=ae,D.DomainSelect=H,D.ErrorLogsPage=ce,D.LanguageSelect=Qe,D.LanguagesPage=ne,D.LogRoutes=ue,D.MenuSelect=u,D.MenusPage=v,D.RequestLogsPage=fe,D.RolesPage=le,D.SQLLogsPage=me,D.SitePage=pe,D.SiteSelect=de,D.TopMenuSelect=Z,D.basicModules=ve,D.default=Me,Object.defineProperties(D,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(D,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual"),require("@element-plus/icons-vue")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual","@element-plus/icons-vue"],e):(D=typeof globalThis<"u"?globalThis:D||self,e(D.AutoVueBasic={},D.Vue,D.AutoVueManual,D.ElementPlusIconsVue))})(this,(function(D,e,l,J){"use strict";const _e={tops:"tops",rules:"rules"},L=l.ApiUtils.routineApi("menu","id",_e,{},["TOP_MENU_LIST","MENU_LIST"]),X=l.ApiUtils.routineApi("rule","key"),Z=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array,void 0],required:!0,default:void 0},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(L),{value:c,options:p,change:s,refresh:d,filterOptions:r}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"TOP_MENU_LIST",api:L,url:L.urls.tops,isArray:!0});return(T,a)=>{const i=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(c),"onUpdate:modelValue":a[1]||(a[1]=m=>e.isRef(c)?c.value=m:null),options:e.unref(p),multiple:x.multiple,disabled:e.unref(_)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),"empty-values":[void 0],onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=m=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:m})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${m.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(m.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),be=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},c={sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("placeholder.input menu.component"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,L);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),V=e.resolveComponent("el-input-number"),C=e.resolveComponent("el-row"),y=e.resolveComponent("el-input"),h=e.resolveComponent("el-switch"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[17]||(t[17]=g=>e.isRef(p)?p.value=g:null),title:e.unref(s)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(C,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=g=>e.unref(r).menu_id=g),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{"label-width":"60px",label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(V,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=g=>e.unref(r).sort=g),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).module,"onUpdate:modelValue":t[2]||(t[2]=g=>e.unref(r).module=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=g=>e.unref(r).name=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[4]||(t[4]=g=>e.unref(r).en_name=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).component,"onUpdate:modelValue":t[5]||(t[5]=g=>e.unref(r).component=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).url,"onUpdate:modelValue":t[6]||(t[6]=g=>e.unref(r).url=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=g=>e.unref(r).remark=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).icon,"onUpdate:modelValue":t[8]||(t[8]=g=>e.unref(r).icon=g),placeholder:e.unref(l.Translate)("placeholder.input"),onInput:t[9]||(t[9]=g=>{e.unref(r).meta.icon=g})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(r).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).meta.title,"onUpdate:modelValue":t[10]||(t[10]=g=>e.unref(r).meta.title=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).meta.active,"onUpdate:modelValue":t[11]||(t[11]=g=>e.unref(r).meta.active=g),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.link,"onUpdate:modelValue":t[12]||(t[12]=g=>e.unref(r).meta.link=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=g=>e.unref(r).meta.keep_alive=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.hide,"onUpdate:modelValue":t[14]||(t[14]=g=>e.unref(r).meta.hide=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.full,"onUpdate:modelValue":t[15]||(t[15]=g=>e.unref(r).meta.full=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(r).meta.affix,"onUpdate:modelValue":t[16]||(t[16]=g=>e.unref(r).meta.affix=g)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),u=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(L),{value:c,options:p,change:s,refresh:d,filterOptions:r}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"MENU_LIST",api:L,isArray:!0});return(T,a)=>{const i=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(c),"onUpdate:modelValue":a[1]||(a[1]=m=>e.isRef(c)?c.value=m:null),options:e.unref(p),multiple:x.multiple,disabled:e.unref(_)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),"empty-values":[void 0],onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=m=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:m})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${m.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(m.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),he=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},c={menu_id:[{required:!0,type:"number",message:l.Translate("placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("placeholder.input menu.rules"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,X);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-input"),C=e.resolveComponent("el-col"),y=e.resolveComponent("el-row"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[6]||(t[6]=B=>e.isRef(p)?p.value=B:null),title:e.unref(s)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(h,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(C,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=B=>e.unref(r).menu_id=B),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=B=>e.unref(r).sort=B),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=B=>e.unref(r).name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=B=>e.unref(r).en_name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[4]||(t[4]=B=>e.unref(r).remark=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(C,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).urls,"onUpdate:modelValue":t[5]||(t[5]=B=>e.unref(r).urls=B),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function M(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const v=e.defineComponent({__name:"index",setup(x){const N={keyword:"",status:0},w=e.ref(""),b=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:t})=>e.createVNode("span",{class:"iconfont "+t.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:t})=>e.createVNode(e.Fragment,null,[t.menu?.translate])},{label:l.Translate("base.name"),prop:"translate",width:160},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:t})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[t.rules?.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:w.value===n.key,title:l.Translate("message.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R({key:n.key}),onClose:()=>w.value=n.key},{default:()=>[n.translate]}),default:()=>{let o,V;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.space base.delete base.space menu.rules")}: ${t.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>w.value=""},M(o=l.Translate("base.cancel"))?o:{default:()=>[o]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>k(n.key)},M(V=l.Translate("base.confirm"))?V:{default:()=>[V]})])])}}))]})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:t})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>i({id:t.id})},null)}],{requesting:_}=l.useLoading(L),{tableRef:c,formModalRef:p,keyword:s,search:d,refresh:r,reset:T,openFormModal:a,editFormModal:i}=l.useCrudPage(N),{formRef:f,open:m,edit:R}=l.useSingleFormModal(),k=t=>{X[l.DEFAULT_REMOVE_KEY]({key:t}).then(()=>{w.value="",r()})};return(t,n)=>{const o=e.resolveComponent("el-button"),V=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header"),g=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(g,{class:"basic-card flex-full","body-class":"flex-1",onClick:n[5]||(n[5]=()=>w.value="")},{header:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(T)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(o,{circle:"",icon:e.unref(J.Key),onClick:e.unref(m)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(h,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(V,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":n[0]||(n[0]=U=>e.unref(s).keyword=U),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(U=>e.unref(d)(),["enter"])),onClear:n[2]||(n[2]=U=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(y,{modelValue:e.unref(s).status,"onUpdate:modelValue":n[3]||(n[3]=U=>e.unref(s).status=U),onChange:n[4]||(n[4]=U=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],U=>e.createVNode(C,{key:U,label:e.unref(l.Translate)(`status.${U}`),value:U},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:c,columns:b,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),"auto-search":""},null,8,["url","search-param"]),e.createVNode(be,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(r)},null,8,["onRefresh"]),e.createVNode(he,{ref_key:"ruleFormModalRef",ref:f,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),ge=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"})),Y=l.ApiUtils.routineApi("role","key"),Ce={class:"rule-check"},we={style:{width:"80px","line-height":"36px"}},Te=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:N,emit:w}){const{requesting:b}=l.useLoading(L),_=x,c=w,p=e.ref(!1),s=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:r}=l.useSelect(e.toRef(_,"modelValue"),c,{key:"RULE_CHECK",api:L,url:L.urls.rules,isArray:!0},{autoRefresh:!1});function T(){d.value.forEach(k=>{k.rules?.length&&(s.MenuAll[k.id]=!1,s.MenuIndeterminate[k.id]=!1,s.MenuList[k.id]=[])})}function a(k){d.value.forEach(t=>{t.rules?.length&&(s.MenuList[t.id]=k?t.rules.map(n=>n.key):[])}),f()}function i(k,t){const n=d.value.find(o=>o.id===t);s.MenuList[t]=k&&n?n.rules.map(o=>o.key):[],f()}function f(){d.value.forEach(k=>{const t=k.rules?.length||0,n=s.MenuList[k.id]?.length||0;s.MenuAll[k.id]=n===t&&t>0,s.MenuIndeterminate[k.id]=n>0&&n<t}),s.checkAll=Object.values(s.MenuAll).every(Boolean),s.indeterminate=!s.checkAll&&Object.values(s.MenuList).some(k=>k.length>0),c("update:modelValue",Object.values(s.MenuList).flat())}function m(){s.checkAll=!1,s.indeterminate=!1,s.MenuAll={},s.MenuList={},s.MenuIndeterminate={},T(),c("update:modelValue",[]),p.value=!1}function R(k){if(Array.isArray(d.value)&&d.value.length>0){for(let t of d.value)if(Array.isArray(t.rules)&&t.rules.length>0)for(let n of t.rules)k.some(o=>o===n.key)&&(s.MenuList[t.id]=(s.MenuList?.[t.id]||[]).concat([n.key]));f(),p.value=!0}}return e.onMounted(async()=>{d.value?.length||await r(),!p.value&&_.modelValue&&R(_.modelValue)}),e.watch(()=>_.modelValue,k=>{e.nextTick(()=>{p.value||!d.value?.length||k&&k.length>0&&R(k)})},{deep:!0,immediate:!0}),N({generateOption:R,cleanChecked:m}),(k,t)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),V=e.resolveComponent("el-text"),C=e.resolveComponent("el-divider"),y=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":s.checkAll,indeterminate:s.indeterminate,id:"all",disabled:x.disabled,onChange:a},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createElementVNode("span",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),text:"",size:"small",onRefresh:t[0]||(t[0]=h=>e.unref(r)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),h=>(e.openBlock(),e.createElementBlock("div",{key:h.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":s.MenuAll[h.id],disabled:x.disabled||!h.rules||h.rules.length<=0,indeterminate:s.MenuIndeterminate[h.id],onChange:B=>i(B,h.id)},{default:e.withCtx(()=>[e.createVNode(V,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(C,{direction:"vertical"}),h.rules?(e.openBlock(),e.createBlock(y,{key:0,modelValue:s.MenuList[h.id],"onUpdate:modelValue":B=>s.MenuList[h.id]=B,disabled:x.disabled,style:{margin:"auto"},onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.rules,B=>(e.openBlock(),e.createBlock(n,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=(x,N)=>{const w=x.__vccOpts||x;for(const[b,_]of N)w[b]=_;return w},xe=ee(Te,[["__scopeId","data-v-7adb5f76"]]),ke=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_=e.ref(),c={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},p={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:s,title:d,form:r,formData:T,requesting:a,executing:i,open:f,modify:m,submit:R,closed:k}=l.useForm(b,c,Y),t=()=>{_.value?.cleanChecked(),k()};return N({open:f,modify:m}),(n,o)=>{const V=e.resolveComponent("el-input"),C=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-col"),h=e.resolveComponent("el-input-number"),B=e.resolveComponent("el-row"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":o[6]||(o[6]=U=>e.isRef(s)?s.value=U:null),title:e.unref(d)(),width:"1000px",executing:e.unref(i),onClosed:t,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:r,model:e.unref(T),"label-width":"auto",rules:p,disabled:e.unref(a)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(B,{gutter:20},{default:e.withCtx(()=>[e.createVNode(y,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).module,"onUpdate:modelValue":o[0]||(o[0]=U=>e.unref(T).module=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(y,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(h,{class:"w-full",modelValue:e.unref(T).sort,"onUpdate:modelValue":o[1]||(o[1]=U=>e.unref(T).sort=U),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(C,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).name,"onUpdate:modelValue":o[2]||(o[2]=U=>e.unref(T).name=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).en_name,"onUpdate:modelValue":o[3]||(o[3]=U=>e.unref(T).en_name=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(T).remark,"onUpdate:modelValue":o[4]||(o[4]=U=>e.unref(T).remark=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(xe,{ref_key:"rulesCheck",ref:_,modelValue:e.unref(T).rules,"onUpdate:modelValue":o[5]||(o[5]=U=>e.unref(T).rules=U),disabled:e.unref(a)||e.unref(i)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),le=e.defineComponent({__name:"index",setup(x){const N={keyword:""},w=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:65,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>a({key:i.key})},null)}],{requesting:b}=l.useLoading(Y),{tableRef:_,formModalRef:c,keyword:p,search:s,reset:d,refresh:r,openFormModal:T,editFormModal:a}=l.useCrudPage(N);return(i,f)=>{const m=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),k=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(k,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(m,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(p).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(s)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:f[3]||(f[3]=n=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,columns:w,url:e.unref(Y).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ke,{ref_key:"formModalRef",ref:c,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Ne=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),E=l.ApiUtils.routineApi("I18N","uuid",{modules:"modules",languages:"languages"},{gen:"gen"},["I18N_MODULES"]),F=l.ApiUtils.routineApi("I18N_template","uuid",{apps:"apps"}),re=e.defineComponent({__name:"ModuleSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(E),{value:c,options:p,change:s,refresh:d,filterOptions:r}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"I18N_MODULES",url:E.urls.modules,api:E,isArray:!0});return(T,a)=>{const i=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(c),"onUpdate:modelValue":a[1]||(a[1]=m=>e.isRef(c)?c.value=m:null),options:e.unref(p),multiple:x.multiple,disabled:e.unref(_)||x.disabled,clearable:x.clearable,filterable:"","allow-create":x.allowCreate,"default-first-option":"",placeholder:e.unref(l.Translate)("placeholder.select"),filterOptions:e.unref(r),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=m=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:m})=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(m.value),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","clearable","allow-create","placeholder","filterOptions","onChange"])}}}),ye=e.defineComponent({__name:"I18N",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},c={module:[{required:!0,message:l.Translate("i18n.verify.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("i18n.verify.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("i18n.verify.language"),trigger:"change"}]},p=e.ref([]),s=l.useCacheStore();function d(){const o={isArray:!0,key:"I18N_LANGUAGES",url:E.urls.languages,params:{}};s.GET_CACHE({...o,force:!0}).then(V=>{p.value=V})}d();const{modal:r,title:T,form:a,formData:i,requesting:f,executing:m,open:R,modify:k,submit:t,closed:n}=l.useForm(b,_,E);return N({open:R,modify:k}),(o,V)=>{const C=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-input"),h=e.resolveComponent("el-space"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(r),"onUpdate:modelValue":V[3]||(V[3]=g=>e.isRef(r)?r.value=g:null),title:e.unref(T)(),width:"600px",executing:e.unref(m),onClosed:e.unref(n),onSubmit:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:a,model:e.unref(i),"label-width":"auto",rules:c,disabled:e.unref(f)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:e.unref(i).module,"onUpdate:modelValue":V[0]||(V[0]=g=>e.unref(i).module=g),disabled:e.unref(m),"allow-create":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(i).key,"onUpdate:modelValue":V[1]||(V[1]=g=>e.unref(i).key=g),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(h,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g},[e.createVNode(y,{modelValue:e.unref(i).language[g],"onUpdate:modelValue":U=>e.unref(i).language[g]=U,placeholder:e.unref(l.Translate)("i18n.placeholder.language")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(i).remark,"onUpdate:modelValue":V[2]||(V[2]=g=>e.unref(i).remark=g),placeholder:e.unref(l.Translate)("placeholder.remark")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),te=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(x,{expose:N,emit:w}){const b=w,{visible:_,open:c,close:p}=l.useDialog(void 0,()=>b("closed")),s={keyword:"",module:void 0,status:0},d=[{label:l.Translate("i18n.module"),prop:"module",width:120},{label:l.Translate("i18n.key"),prop:"key",width:200},{label:l.Translate("i18n.i18n"),align:"left",prop:"language"},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:E.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:120,align:"center"}],{requesting:r}=l.useLoading(E),{tableRef:T,formModalRef:a,keyword:i,search:f,reset:m,refresh:R,openFormModal:k}=l.useCrudPage(s);function t(n){b("choosed",n)}return N({open:c}),(n,o)=>{const V=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),h=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{class:"basic-drawer",modelValue:e.unref(_),"onUpdate:modelValue":o[7]||(o[7]=g=>e.isRef(_)?_.value=g:null),width:"880px","show-close":!1,onClosed:e.unref(p)},{title:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(r),onRefresh:e.unref(m)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k),disabled:e.unref(r)},null,8,["onOpen","disabled"])]),content:e.withCtx(()=>[e.createVNode(h,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(V,{style:{width:"160px"},modelValue:e.unref(i).keyword,"onUpdate:modelValue":o[0]||(o[0]=g=>e.unref(i).keyword=g),disabled:e.unref(r),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(g=>e.unref(f)(),["enter"])),onClear:o[2]||(o[2]=g=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(re,{modelValue:e.unref(i).module,"onUpdate:modelValue":o[3]||(o[3]=g=>e.unref(i).module=g),clearable:!0,disabled:e.unref(r),style:{width:"160px"}},null,8,["modelValue","disabled"]),e.createVNode(y,{modelValue:e.unref(i).status,"onUpdate:modelValue":o[4]||(o[4]=g=>e.unref(i).status=g),onChange:o[5]||(o[5]=g=>e.unref(f)()),disabled:e.unref(r)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],g=>e.createVNode(C,{key:g,label:e.unref(l.Translate)(`status.${g}`),value:g},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(r),onSearch:o[6]||(o[6]=g=>e.unref(f)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:T,columns:d,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),onRowDblclick:t,"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:a,onRefresh:e.unref(R)},null,8,["onRefresh"])]),_:1},8,["modelValue","onClosed"])}}}),Re={key:0},Ve={key:1},Ue=e.defineComponent({__name:"template",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=e.shallowRef(),_=()=>b.value?.open(),c=w,p=e.ref("600px"),s=e.ref({"zh-CN":"primary","en-US":"success"}),d=e.ref({}),r={uuid:"",app:1,keys:"",values:[],remark:""},T={app:[{required:!0,message:l.Translate("i18n.verify.app"),trigger:"blur"}],keys:[{required:!0,message:l.Translate("i18n.verify.keys"),trigger:"blur"}],values:[{required:!0,message:l.Translate("i18n.verify.values"),trigger:"change"}]},{modal:a,title:i,form:f,formData:m,requesting:R,executing:k,open:t,modify:n,submit:o,closed:V}=l.useForm(c,r,F);function C(){p.value="1080px",_()}function y(){p.value="600px"}function h(U){let S=U?.module?.toLowerCase()+"."+U.key.toLowerCase();m.keys=S,m.values.push(S);for(const q in U.language)d.value[q]||(d.value[q]=[]),d.value[q].push(U.language[q])}function B(){p.value="600px",g()}function g(){m.keys="",m.values=[],d.value={"zh-CN":[],"en-US":[]}}return e.watch(()=>a.value,U=>{U?B():V()}),N({open:t,modify:n}),(U,S)=>{const q=e.resolveComponent("el-page-header"),$=e.resolveComponent("el-form-item"),Q=e.resolveComponent("el-button"),A=e.resolveComponent("el-input"),el=e.resolveComponent("el-tag"),ll=e.resolveComponent("el-space"),rl=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(a),"onUpdate:modelValue":S[3]||(S[3]=O=>e.isRef(a)?a.value=O:null),width:p.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(q,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("i18n.template")),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"default",icon:"icon-clear",loading:e.unref(k),onClick:g},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(k),onClick:e.unref(o)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(rl,{ref_key:"form",ref:f,model:e.unref(m),"label-width":"auto",rules:T,disabled:e.unref(R)||e.unref(k)},{default:e.withCtx(()=>[e.createVNode($,{label:e.unref(l.Translate)("base.app"),prop:"app",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(m).app,"onUpdate:modelValue":S[0]||(S[0]=O=>e.unref(m).app=O),"cache-key":"I18NAPPS",hidden:[0],url:e.unref(F).urls.apps},null,8,["modelValue","url"])]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("i18n.keys"),prop:"keys",required:""},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(m).keys,"onUpdate:modelValue":S[1]||(S[1]=O=>e.unref(m).keys=O),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(Q,{icon:e.unref(J.Search),onClick:C},null,8,["icon"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("i18n.values"),prop:"values",required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).values.join(":")),1)]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("i18n.values")},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(O,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:"w-full"},[e.createVNode(ll,null,{default:e.withCtx(()=>[e.createVNode(el,{type:s.value[G],style:{"min-width":"80px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(G),1)]),_:2},1032,["type"]),G=="zh-CN"?(e.openBlock(),e.createElementBlock("span",Re,e.toDisplayString(O.join("")),1)):(e.openBlock(),e.createElementBlock("span",Ve,e.toDisplayString(O.join(" ")),1))]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(m).remark,"onUpdate:modelValue":S[2]||(S[2]=O=>e.unref(m).remark=O),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"]),e.createVNode(te,{ref_key:"I18nTableDrawerRef",ref:b,onChoosed:h,onClosed:y},null,512)]),_:1},8,["modelValue","width"])}}}),Be=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function Se(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const ne=e.defineComponent({__name:"index",setup(x){const N=te,w=Ue,b={keyword:"",app:0,status:0},_=({row:y})=>{let h;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+y.app),style:"min-width: 80px"},Se(h=l.Translate("i18n.app."+y.app))?h:{default:()=>[h]})},c=({row:y})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:d.value,onModify:()=>t({uuid:y.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:d.value,onClick:()=>o(y.uuid)},null)]}),p=[{label:l.Translate("base.app"),prop:"app",width:120,render:_},{label:l.Translate("i18n.keys"),prop:"keys",width:200},{label:l.Translate("i18n.values"),prop:"values",width:200},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:F.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:c}],{requesting:s,executing:d}=l.useLoading(F),{tableRef:r,formModalRef:T,dialogRef:a,keyword:i,search:f,reset:m,refresh:R,openFormModal:k,editFormModal:t,openDialog:n}=l.useCrudPage(b);function o(y){return F.remove({uuid:y}).finally(()=>{R()})}function V(){return E.gen().finally(()=>{R()})}function C(){Be.gen().finally(()=>{R()})}return(y,h)=>{const B=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-space"),q=e.resolveComponent("el-divider"),$=e.resolveComponent("el-page-header"),Q=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(Q,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode($,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(s),onRefresh:e.unref(m)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(S,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":h[0]||(h[0]=A=>e.unref(i).keyword=A),disabled:e.unref(s)||e.unref(d),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:h[1]||(h[1]=e.withKeys(A=>e.unref(f)(),["enter"])),onClear:h[2]||(h[2]=A=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(i).app,"onUpdate:modelValue":h[3]||(h[3]=A=>e.unref(i).app=A),"cache-key":"I18NAPPS",disabled:e.unref(s)||e.unref(d),url:e.unref(F).urls.apps,onChange:h[4]||(h[4]=A=>e.unref(f)())},null,8,["modelValue","disabled","url"]),e.createVNode(U,{modelValue:e.unref(i).status,"onUpdate:modelValue":h[5]||(h[5]=A=>e.unref(i).status=A),disabled:e.unref(s)||e.unref(d),onChange:h[6]||(h[6]=A=>e.unref(f)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(g,{key:A,label:e.unref(l.Translate)(`status.${A}`),value:A},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(s)||e.unref(d),onSearch:h[7]||(h[7]=A=>e.unref(f)())},null,8,["disabled"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"warning",icon:"icon-cloud-upload",plain:!1,loading:e.unref(d),onClick:V},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(d),onClick:C},null,8,["loading"]),e.createVNode(q,{direction:"vertical"}),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(n),icon:"icon-en-US"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:r,columns:p,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(e.unref(N),{ref_key:"I18nTableDrawerRef",ref:a},null,512),e.createVNode(e.unref(w),{ref_key:"formModalRef",ref:T,onRefresh:e.unref(R)},null,8,["onRefresh"])]),_:1})}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"})),W=l.ApiUtils.routineApi("admin","key"),Ae=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:c,title:p,form:s,formData:d,requesting:r,executing:T,open:a,modify:i,submit:f,closed:m}=l.useForm(b,_,W),R={username:[{required:!0,message:l.Translate("placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("placeholder.select menu.Role"),trigger:"change"}]},k=e.ref([]),t=async()=>{const n=await Y.list();k.value=Array.isArray(n?.data)?n.data:[]};return e.onBeforeMount(async()=>{await t()}),N({open:a,modify:i}),(n,o)=>{const V=e.resolveComponent("el-input"),C=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-radio-button"),h=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-checkbox"),g=e.resolveComponent("el-checkbox-group"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(c),"onUpdate:modelValue":o[7]||(o[7]=S=>e.isRef(c)?c.value=S:null),title:e.unref(p)(),width:"600px",executing:e.unref(T),onClosed:e.unref(m),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:s,model:e.unref(d),"label-width":"auto",rules:R,disabled:e.unref(r)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(C,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).username,"onUpdate:modelValue":o[0]||(o[0]=S=>e.unref(d).username=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).phone,"onUpdate:modelValue":o[1]||(o[1]=S=>e.unref(d).phone=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).password,"onUpdate:modelValue":o[2]||(o[2]=S=>e.unref(d).password=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(C,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).email,"onUpdate:modelValue":o[3]||(o[3]=S=>e.unref(d).email=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(d).language,"onUpdate:modelValue":o[4]||(o[4]=S=>e.unref(d).language=S)},{default:e.withCtx(()=>[e.createVNode(y,{value:"zh-CN"},{default:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(y,{value:"en-US"},{default:e.withCtx(()=>[...o[9]||(o[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).roles,"onUpdate:modelValue":o[5]||(o[5]=S=>e.unref(d).roles=S)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,S=>(e.openBlock(),e.createBlock(B,{key:S.key,value:S.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(d).remark,"onUpdate:modelValue":o[6]||(o[6]=S=>e.unref(d).remark=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),oe=e.defineComponent({__name:"index",setup(x){const N={keyword:""},w=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:i})=>e.createVNode(l.BasicAvatar,{src:i.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:i})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[i.username]),e.createVNode("div",null,[i.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.login_at"),prop:"login_at",width:160},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:i.key})},null)}],{requesting:b}=l.useLoading(W),{tableRef:_,formModalRef:c,keyword:p,search:s,reset:d,refresh:r,openFormModal:T,editFormModal:a}=l.useCrudPage(N);return(i,f)=>{const m=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),k=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(k,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(m,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(p).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(s)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:f[3]||(f[3]=n=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(W).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Ae,{ref_key:"formModalRef",ref:c,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Le=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),Ee={check:"check"},P=l.ApiUtils.routineApi("site","id",Ee),j=l.ApiUtils.routineApi("domain"),H=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:N,emit:w}){const b=w,_=x,{requesting:c}=l.useLoading(j),{key:p,options:s,refresh:d,change:r}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_LIST",api:j,isArray:!0});return N({refresh:d}),(T,a)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(p)?p.value=f:null),options:e.unref(s),disabled:x.disabled||e.unref(c),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(c),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Oe=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},c={domain_id:[{required:!0,message:l.Translate("placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,P);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[7]||(t[7]=C=>e.isRef(p)?p.value=C:null),title:e.unref(s)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=C=>e.unref(r).domain_id=C),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).prefix,"onUpdate:modelValue":t[1]||(t[1]=C=>e.unref(r).prefix=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=C=>e.unref(r).name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=C=>e.unref(r).en_name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).dns,"onUpdate:modelValue":t[4]||(t[4]=C=>e.unref(r).dns=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).git,"onUpdate:modelValue":t[5]||(t[5]=C=>e.unref(r).git=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[6]||(t[6]=C=>e.unref(r).remark=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),K=l.ApiUtils.routineApi("domain_provider"),ae=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:N,emit:w}){const b=w,_=x,{requesting:c}=l.useLoading(K),{key:p,options:s,refresh:d,change:r}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_PROVIDER_LIST",api:K,isArray:!0});return N({refresh:d}),(T,a)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(p)?p.value=f:null),options:e.unref(s),disabled:x.disabled||e.unref(c),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(c),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),qe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},c={provider_id:[{required:!0,message:l.Translate("placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,j);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),V=e.resolveComponent("el-date-picker"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[4]||(t[4]=y=>e.isRef(p)?p.value=y:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(C,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(ae,{modelValue:e.unref(r).provider_id,"onUpdate:modelValue":t[0]||(t[0]=y=>e.unref(r).provider_id=y),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[1]||(t[1]=y=>e.unref(r).name=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"expired_at",required:"",label:e.unref(l.Translate)("time.expired_at")},{default:e.withCtx(()=>[e.createVNode(V,{type:"date",style:{width:"100%"},modelValue:e.unref(r).expired_at,"onUpdate:modelValue":t[2]||(t[2]=y=>e.unref(r).expired_at=y),disabled:e.unref(a),"value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,placeholder:e.unref(l.Translate)("placeholder.select")},null,8,["modelValue","disabled","value-format","format","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[3]||(t[3]=y=>e.unref(r).remark=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Fe={gen:"gen"},z=l.ApiUtils.routineApi("SSL","id",Fe),de=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:N,emit:w}){const b=w,_=x,{requesting:c}=l.useLoading(P),{key:p,options:s,refresh:d,change:r}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"SITE_LIST",api:P,isArray:!0},{formatOptions:T=>T.map(a=>({...a,label:a.prefix+"."+a.domain?.name,value:a.id}))});return N({refresh:d}),(T,a)=>{const i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(p)?p.value=f:null),options:e.unref(s),disabled:x.disabled||e.unref(c),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(c),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),se=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},c={domain_id:[{required:!0,message:l.Translate("placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("placeholder.input config.encryption"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,z);return N({open:i,modify:f,formData:r}),(k,t)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),C=e.resolveComponent("el-input"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[8]||(t[8]=h=>e.isRef(p)?p.value=h:null),title:e.unref(s)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=h=>e.unref(r).domain_id=h),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).client,"onUpdate:modelValue":t[1]||(t[1]=h=>e.unref(r).client=h)},{default:e.withCtx(()=>[e.createVNode(o,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(de,{modelValue:e.unref(r).site_id,"onUpdate:modelValue":t[2]||(t[2]=h=>e.unref(r).site_id=h),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=h=>e.unref(r).name=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).path,"onUpdate:modelValue":t[4]||(t[4]=h=>e.unref(r).path=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).email,"onUpdate:modelValue":t[5]||(t[5]=h=>e.unref(r).email=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).encryption,"onUpdate:modelValue":t[6]||(t[6]=h=>e.unref(r).encryption=h)},{default:e.withCtx(()=>[e.createVNode(o,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=h=>e.unref(r).remark=h),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$e=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(x,{expose:N,emit:w}){const b=w,_={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},c={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("placeholder.input config.endpoint"),trigger:"blur"}},{modal:p,title:s,form:d,formData:r,requesting:T,executing:a,open:i,modify:f,submit:m,closed:R}=l.useForm(b,_,K);return N({open:i,modify:f}),(k,t)=>{const n=e.resolveComponent("el-input"),o=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[6]||(t[6]=C=>e.isRef(p)?p.value=C:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:d,model:e.unref(r),"label-width":"auto",rules:c,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[0]||(t[0]=C=>e.unref(r).name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[1]||(t[1]=C=>e.unref(r).en_name=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).key,"onUpdate:modelValue":t[2]||(t[2]=C=>e.unref(r).key=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).secret,"onUpdate:modelValue":t[3]||(t[3]=C=>e.unref(r).secret=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).end_point,"onUpdate:modelValue":t[4]||(t[4]=C=>e.unref(r).end_point=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[5]||(t[5]=C=>e.unref(r).remark=C),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Pe=e.defineComponent({__name:"DomainProviderTableDrawer",setup(x,{expose:N}){const{requesting:w}=l.useLoading(K),b=e.ref(!1),{tableRef:_,formModalRef:c,refresh:p,openFormModal:s,editFormModal:d}=l.useCrudPage({}),r=[{prop:"name",label:l.Translate("base.name"),width:0,minWidth:140},{prop:"en_name",label:l.Translate("base.en_name"),width:120},{prop:"actions",label:l.Translate("base.action"),width:60,align:"center",render:({rowData:a})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>d({id:a.id})},null)]})}];return N({open:()=>{b.value=!0}}),(a,i)=>{const f=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:b.value,"onUpdate:modelValue":i[0]||(i[0]=m=>b.value=m),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(f,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain config.provider")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(w)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(K).urls.list,columns:r,loading:e.unref(w)},null,8,["url","loading"]),e.createVNode($e,{ref_key:"formModalRef",ref:c,onRefresh:e.unref(p)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ze=e.defineComponent({__name:"DomainTableDrawer",setup(x,{expose:N}){const{requesting:w}=l.useLoading(j),{visible:b,open:_}=l.useDialog(),{tableRef:c,formModalRef:p,refresh:s,openFormModal:d,editFormModal:r}=l.useCrudPage(),{formRef:T,open:a,edit:i}=l.useSingleFormModal(),{dialogRef:f,open:m}=l.useSingleDialog(),R=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:k})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[k.provider?.name]})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("time.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:k})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>r({id:k.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{k.ssl&&k.ssl.id?i({id:k.ssl?.id}):(T.value.formData.domain_id=k.id,T.value.formData.site_id=0,a())}},null)]})}];return N({open:_}),(k,t)=>{const n=e.resolveComponent("el-space"),o=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(b),"onUpdate:modelValue":t[0]||(t[0]=V=>e.isRef(b)?b.value=V:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(o,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(w)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(n,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:c,size:"small","row-key":"id",url:e.unref(j).urls.list,columns:R,loading:e.unref(w)},null,8,["url","loading"]),e.createVNode(qe,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(se,{ref_key:"sslFormModalRef",ref:T,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(Pe,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),Ie=e.defineComponent({__name:"SSLTableDrawer",setup(x,{expose:N}){const{requesting:w,executing:b}=l.useLoading(z),_=e.ref(0),{visible:c,open:p}=l.useDialog(),{tableRef:s,formModalRef:d,refresh:r,openFormModal:T,editFormModal:a}=l.useCrudPage(),i=[{prop:"client",label:l.Translate("ssl.client"),width:100},{prop:"encryption",label:l.Translate("ssl.encryption"),width:100},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"path",label:l.Translate("base.path"),width:120},{prop:"renewal_days",label:l.Translate("ssl.renewal_days"),width:100},{prop:"checked_at",label:l.Translate("ssl.checked_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:160,align:"center",render:({rowData:R})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:b.value,onModify:()=>a({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:b.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>f(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:b.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>m(R)},null)]})}],f=R=>{z.gen({id:R}).then(k=>{console.warn("Res:",k)})};function m(R){const k=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(k).then(t=>t.blob()).then(t=>{let n=URL.createObjectURL(t),o=document.createElement("a");o.style.display="none",o.href=n,o.download=R.name+".zip",o.click(),URL.revokeObjectURL(t)})}return N({open:p}),(R,k)=>{const t=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(c),"onUpdate:modelValue":k[0]||(k[0]=n=>e.isRef(c)?c.value=n:null),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(t,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("ssl.ssl")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(r),size:"default",loading:e.unref(w)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:s,size:"default","row-key":"id",url:e.unref(z).urls.list,columns:i,loading:e.unref(w)},null,8,["url","loading"]),e.createVNode(se,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ie=l.ApiUtils.routineApi("SSLLog","id"),je=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(x,{expose:N}){const w=x,{requesting:b,executing:_}=l.useLoading([ie,z]),{visible:c,open:p}=l.useDialog(),{tableRef:s,refresh:d}=l.useSingleTable(),r=[{prop:"status.label",label:l.Translate("base.status"),width:100},{prop:"at",label:l.Translate("base.time"),width:180},{prop:"type_text",label:l.Translate("base.type"),width:80},{prop:"result",label:l.Translate("base.result"),width:0}];function T(){z.gen({id:w.ssl.id}).then(i=>{console.warn("Res:",i)})}function a(){const i=l.AssetsUtils.getDownloadUrl(w.ssl.path+".zip");fetch(i).then(f=>f.blob()).then(f=>{let m=URL.createObjectURL(f),R=document.createElement("a");R.style.display="none",R.href=m,R.download=w.ssl.name+".zip",R.click(),URL.revokeObjectURL(f)})}return N({open:p}),(i,f)=>{const m=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(c),"onUpdate:modelValue":f[0]||(f[0]=R=>e.isRef(c)?c.value=R:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(m,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.ssl base.log")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d),size:"default",loading:e.unref(b)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(_),loading:e.unref(_),onClick:T},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(_),loading:e.unref(_),onClick:a},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:s,size:"small","row-key":"id",url:e.unref(ie).urls.search,columns:r,loading:e.unref(b)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),pe=ee(e.defineComponent({__name:"index",setup(x){const N=ze,w=Ie,b=je,_=e.ref(),{requesting:c,executing:p}=l.useLoading(P),{tableRef:s,formModalRef:d,reset:r,refresh:T,openFormModal:a,editFormModal:i}=l.useCrudPage(),{dialogRef:f,open:m}=l.useSingleDialog(),{dialogRef:R,open:k}=l.useSingleDialog(),{dialogRef:t,open:n}=l.useSingleDialog(),o=[{prop:"domain.name",label:l.Translate("config.domain"),width:129,type:"copy"},{prop:"name",label:l.Translate("base.name"),width:100},{prop:"dns",label:l.Translate("config.dns"),width:160,type:"copy"},{prop:"git",label:l.Translate("config.git"),width:300,type:"copy"},{prop:"expired_at",label:l.Translate("time.expired_at"),align:"center",width:140,cellRenderer:({rowData:y})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[y.ssl?.renewal_days,e.createTextVNode(" 天")]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:h=>{h.stopPropagation(),y.ssl&&y.ssl.id&&(_.value=y.ssl,n())}},{default:()=>[e.createVNode("span",{class:"icon iconfont icon-reloadtime"},null)]})]})},{prop:"remark",label:l.Translate("base.remark"),width:0,minWidth:160},{prop:"operation",label:l.Translate("base.action"),width:100,align:"center",cellRenderer:({rowData:y})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>i({id:y.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:p.value,loading:V.value==y.id&&p.value,onClick:()=>C(y)},null)]})}],V=e.ref(0),C=y=>{V.value=y.id,P.check({id:y.id}).then(h=>{h.data&&(l.notification(h),T())}).finally(()=>{V.value=0})};return(y,h)=>{const B=e.resolveComponent("el-space"),g=e.resolveComponent("el-page-header"),U=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(U,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(g,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(B,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(c),onRefresh:e.unref(r)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(m),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:s,size:"small","row-key":"id",url:e.unref(P).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:o},null,8,["url"]),e.createVNode(Oe,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(T)},null,8,["onRefresh"]),e.createVNode(e.unref(N),{ref_key:"domainTableDrawerRef",ref:f},null,512),e.createVNode(e.unref(w),{ref_key:"sslTableDrawerRef",ref:R},null,512),e.createVNode(e.unref(b),{ref_key:"sslLogTableDrawerRef",ref:t},null,512)]),_:1})}}}),[["__scopeId","data-v-34e18506"]]),Ke=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),Ye={request:"request",error:"error",sql:"SQL"},I=l.ApiUtils.routineApi("log","id",Ye),fe=e.defineComponent({__name:"index",setup(x){const N={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},w=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(I),{tableRef:_,keyword:c,search:p,reset:s}=l.useCrudPage(N);return(d,r)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),i=e.resolveComponent("el-page-header"),f=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(f,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(c).dates,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(c).dates=m),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:r[1]||(r[1]=m=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:r[2]||(r[2]=m=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(I).urls.request,"search-param":e.unref(c),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Ge=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),ce=e.defineComponent({__name:"index",setup(x){const N={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},w=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(I),{tableRef:_,keyword:c,search:p,reset:s}=l.useCrudPage(N);return(d,r)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),i=e.resolveComponent("el-page-header"),f=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(f,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(c).dates,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(c).dates=m),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:r[1]||(r[1]=m=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:r[2]||(r[2]=m=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(I).urls.error,"search-param":e.unref(c),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),We=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"})),me=e.defineComponent({__name:"index",setup(x){const N={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},w=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(I),{tableRef:_,keyword:c,search:p,reset:s}=l.useCrudPage(N);return(d,r)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),i=e.resolveComponent("el-page-header"),f=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(f,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(c).dates,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(c).dates=m),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:r[1]||(r[1]=m=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:r[2]||(r[2]=m=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:w,url:e.unref(I).urls.sql,"search-param":e.unref(c),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),He=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"})),Qe=e.defineComponent({__name:"LanguageSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:N}){const w=N,b=x,{requesting:_}=l.useLoading(E),{value:c,options:p,change:s}=l.useSelect(e.toRef(b,"modelValue"),w,{key:"LANGUAGE_SELECT",url:E.urls.languages,api:E,isArray:!0},{formatOptions:d=>d.map(r=>({value:r,label:r}))});return(d,r)=>{const T=e.resolveComponent("el-radio-button"),a=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(a,{modelValue:e.unref(c),"onUpdate:modelValue":r[0]||(r[0]=i=>e.isRef(c)?c.value=i:null),disabled:e.unref(_),onChange:e.unref(s)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),i=>(e.openBlock(),e.createBlock(T,{key:i.value,value:i.value},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(i.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])}}}),Je=()=>Promise.resolve().then(()=>Ge),Xe=()=>Promise.resolve().then(()=>We),Ze=()=>Promise.resolve().then(()=>He),ue=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:Je,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Xe,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:Ze,meta:{title:l.Translate("menu.SqlLog")}}],Me={install:x=>{Reflect.ownKeys(x._context.provides).some(N=>String(N)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},ve=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>Le),"./views/language/index.vue":()=>Promise.resolve().then(()=>De),"./views/menu/index.vue":()=>Promise.resolve().then(()=>ge),"./views/role/index.vue":()=>Promise.resolve().then(()=>Ne),"./views/site/index.vue":()=>Promise.resolve().then(()=>Ke)});D.AdminsPage=oe,D.DomainProviderSelect=ae,D.DomainSelect=H,D.ErrorLogsPage=ce,D.LanguageSelect=Qe,D.LanguagesPage=ne,D.LogRoutes=ue,D.MenuSelect=u,D.MenusPage=v,D.RequestLogsPage=fe,D.RolesPage=le,D.SQLLogsPage=me,D.SitePage=pe,D.SiteSelect=de,D.TopMenuSelect=Z,D.basicModules=ve,D.default=Me,Object.defineProperties(D,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
3
|
modelValue: {
|
|
4
|
-
type: PropType<number | number[]>;
|
|
4
|
+
type: PropType<number | number[] | undefined>;
|
|
5
5
|
required: true;
|
|
6
|
+
default: undefined;
|
|
6
7
|
};
|
|
7
8
|
multiple: {
|
|
8
9
|
type: BooleanConstructor;
|
|
@@ -17,8 +18,9 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
17
18
|
change: (...args: any[]) => void;
|
|
18
19
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
19
20
|
modelValue: {
|
|
20
|
-
type: PropType<number | number[]>;
|
|
21
|
+
type: PropType<number | number[] | undefined>;
|
|
21
22
|
required: true;
|
|
23
|
+
default: undefined;
|
|
22
24
|
};
|
|
23
25
|
multiple: {
|
|
24
26
|
type: BooleanConstructor;
|
|
@@ -32,6 +34,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
32
34
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
35
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
34
36
|
}>, {
|
|
37
|
+
modelValue: number | number[] | undefined;
|
|
35
38
|
multiple: boolean;
|
|
36
39
|
disabled: boolean;
|
|
37
40
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __VERSION__ = "0.0.
|
|
1
|
+
export const __VERSION__ = "0.0.91'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-vue-basic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/auto-vue-basic.umd.js",
|
|
6
6
|
"module": "./dist/auto-vue-basic.es.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dev:5173": "vite --port 5173",
|
|
14
14
|
"audit:pro": "npm audit --omit=dev",
|
|
15
15
|
"build:pub": "npm run build && npm run publish:latest",
|
|
16
|
-
"build": "npm run lint:fix && npx vue-tsc
|
|
16
|
+
"build": "npm run lint:fix && npx vue-tsc -b && rm -rf dist && vite build --config vite.config.ts && echo 'export const __VERSION__ = \"'$(npm pkg get version | tr -d '\"')\"'\" > dist/version.js",
|
|
17
17
|
"publish:latest": "npm version patch --no-git-tag-version && npm publish",
|
|
18
18
|
"update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual -D --save-dev && npm list auto-vue-manual && npm run update:pkg",
|
|
19
19
|
"update:pkg": "npm view auto-vue-manual version | xargs -I {} npm pkg set peerDependencies.auto-vue-manual='>='{}",
|