auto-vue-basic 0.0.96 → 0.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-vue-basic.es.js +1 -1
- package/dist/auto-vue-basic.umd.js +1 -1
- package/dist/types/views/admin/index.vue.d.ts +307 -247
- package/dist/types/views/language/form/template.vue.d.ts +307 -247
- package/dist/types/views/language/index.vue.d.ts +307 -247
- package/dist/types/views/language/table/I18N.vue.d.ts +307 -247
- package/dist/types/views/log/error/index.vue.d.ts +250 -200
- package/dist/types/views/log/request/index.vue.d.ts +246 -198
- package/dist/types/views/log/sql/index.vue.d.ts +246 -198
- package/dist/types/views/menu/index.vue.d.ts +307 -247
- package/dist/types/views/role/index.vue.d.ts +307 -247
- package/dist/types/views/site/components/DomainProviderTableDrawer.vue.d.ts +248 -198
- package/dist/types/views/site/components/DomainTableDrawer.vue.d.ts +490 -394
- package/dist/types/views/site/components/SSLLogTableDrawer.vue.d.ts +307 -247
- package/dist/types/views/site/components/SSLTableDrawer.vue.d.ts +246 -198
- package/dist/types/views/site/index.vue.d.ts +246 -198
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -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"},O=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:k}){const T=k,C=x,{requesting:h}=l.useLoading(O),{value:m,options:i,change:d,refresh:a,filterOptions:r}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"TOP_MENU_LIST",api:O,url:O.urls.tops,isArray:!0});return(w,o)=>{const p=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":o[1]||(o[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(h)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),"empty-values":[void 0],onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:o[0]||(o[0]=c=>e.unref(a)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),be=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={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}},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,O);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-col"),V=e.resolveComponent("el-input-number"),_=e.resolveComponent("el-row"),g=e.resolveComponent("el-input"),b=e.resolveComponent("el-switch"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[17]||(t[17]=y=>e.isRef(i)?i.value=y:null),title:e.unref(d)(),width:"1000px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{default:e.withCtx(()=>[e.createVNode(_,{gutter:20},{default:e.withCtx(()=>[e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(_,{gutter:10},{default:e.withCtx(()=>[e.createVNode(s,{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]=y=>e.unref(r).menu_id=y),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{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]=y=>e.unref(r).sort=y),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(g,{modelValue:e.unref(r).module,"onUpdate:modelValue":t[2]||(t[2]=y=>e.unref(r).module=y),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(g,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=y=>e.unref(r).name=y),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(g,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[4]||(t[4]=y=>e.unref(r).en_name=y),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(g,{modelValue:e.unref(r).component,"onUpdate:modelValue":t[5]||(t[5]=y=>e.unref(r).component=y),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(g,{modelValue:e.unref(r).url,"onUpdate:modelValue":t[6]||(t[6]=y=>e.unref(r).url=y),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(g,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=y=>e.unref(r).remark=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).icon,"onUpdate:modelValue":t[8]||(t[8]=y=>e.unref(r).icon=y),placeholder:e.unref(l.Translate)("placeholder.input"),onInput:t[9]||(t[9]=y=>{e.unref(r).meta.icon=y})},{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(g,{modelValue:e.unref(r).meta.title,"onUpdate:modelValue":t[10]||(t[10]=y=>e.unref(r).meta.title=y),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(g,{modelValue:e.unref(r).meta.active,"onUpdate:modelValue":t[11]||(t[11]=y=>e.unref(r).meta.active=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.link,"onUpdate:modelValue":t[12]||(t[12]=y=>e.unref(r).meta.link=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{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(b,{modelValue:e.unref(r).meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=y=>e.unref(r).meta.keep_alive=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.hide,"onUpdate:modelValue":t[14]||(t[14]=y=>e.unref(r).meta.hide=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.full,"onUpdate:modelValue":t[15]||(t[15]=y=>e.unref(r).meta.full=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.affix,"onUpdate:modelValue":t[16]||(t[16]=y=>e.unref(r).meta.affix=y)},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:k}){const T=k,C=x,{requesting:h}=l.useLoading(O),{value:m,options:i,change:d,refresh:a,filterOptions:r}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"MENU_LIST",api:O,isArray:!0});return(w,o)=>{const p=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":o[1]||(o[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(h)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:o[0]||(o[0]=c=>e.unref(a)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),he=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,X);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-input"),_=e.resolveComponent("el-col"),g=e.resolveComponent("el-row"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=U=>e.isRef(i)?i.value=U:null),title:e.unref(d)("menu.rules"),width:"1000px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{default:e.withCtx(()=>[e.createVNode(g,{gutter:20},{default:e.withCtx(()=>[e.createVNode(_,{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]=U=>e.unref(r).menu_id=U),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(s,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=U=>e.unref(r).sort=U),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]=U=>e.unref(r).name=U),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]=U=>e.unref(r).en_name=U),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]=U=>e.unref(r).remark=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(_,{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]=U=>e.unref(r).urls=U),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 k={keyword:"",status:0},T=e.ref(""),C=[{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:T.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:()=>T.value=n.key},{default:()=>[n.translate]}),default:()=>{let s,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:()=>T.value=""},M(s=l.Translate("base.cancel"))?s:{default:()=>[s]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>N(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:O.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:()=>p({id:t.id})},null)}],{requesting:h}=l.useLoading(O),{tableRef:m,formModalRef:i,keyword:d,search:a,refresh:r,reset:w,openFormModal:o,editFormModal:p}=l.useCrudPage(k),{formRef:f,open:c,edit:R}=l.useSingleFormModal(),N=t=>{X[l.DEFAULT_REMOVE_KEY]({key:t}).then(()=>{T.value="",r()})};return(t,n)=>{const s=e.resolveComponent("el-button"),V=e.resolveComponent("el-input"),_=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),b=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),y=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(y,{class:"basic-card flex-full","body-class":"flex-1",onClick:n[5]||(n[5]=()=>T.value="")},{header:e.withCtx(()=>[e.createVNode(U,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(w)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(o)},null,8,["onOpen"]),e.createVNode(s,{circle:"",icon:e.unref(J.Key),onClick:e.unref(c)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(b,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(V,{class:"basic-search-input",modelValue:e.unref(d).keyword,"onUpdate:modelValue":n[0]||(n[0]=B=>e.unref(d).keyword=B),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(B=>e.unref(a)(),["enter"])),onClear:n[2]||(n[2]=B=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(g,{modelValue:e.unref(d).status,"onUpdate:modelValue":n[3]||(n[3]=B=>e.unref(d).status=B),onChange:n[4]||(n[4]=B=>e.unref(a)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],B=>e.createVNode(_,{key:B,label:e.unref(l.Translate)(`status.${B}`),value:B},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(d),"auto-search":""},null,8,["url","search-param"]),e.createVNode(be,{ref_key:"formModalRef",ref:i,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:k,emit:T}){const{requesting:C}=l.useLoading(O),h=x,m=T,i=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:a,refresh:r}=l.useSelect(e.toRef(h,"modelValue"),m,{key:"RULE_CHECK",api:O,url:O.urls.rules,isArray:!0},{autoRefresh:!1});function w(){a.value.forEach(N=>{N.rules?.length&&(d.MenuAll[N.id]=!1,d.MenuIndeterminate[N.id]=!1,d.MenuList[N.id]=[])})}function o(N){a.value.forEach(t=>{t.rules?.length&&(d.MenuList[t.id]=N?t.rules.map(n=>n.key):[])}),f()}function p(N,t){const n=a.value.find(s=>s.id===t);d.MenuList[t]=N&&n?n.rules.map(s=>s.key):[],f()}function f(){a.value.forEach(N=>{const t=N.rules?.length||0,n=d.MenuList[N.id]?.length||0;d.MenuAll[N.id]=n===t&&t>0,d.MenuIndeterminate[N.id]=n>0&&n<t}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(N=>N.length>0),m("update:modelValue",Object.values(d.MenuList).flat())}function c(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},w(),m("update:modelValue",[]),i.value=!1}function R(N){if(Array.isArray(a.value)&&a.value.length>0){for(let t of a.value)if(Array.isArray(t.rules)&&t.rules.length>0)for(let n of t.rules)N.some(s=>s===n.key)&&(d.MenuList[t.id]=(d.MenuList?.[t.id]||[]).concat([n.key]));f(),i.value=!0}}return e.onMounted(async()=>{a.value?.length||await r(),!i.value&&h.modelValue&&R(h.modelValue)}),e.watch(()=>h.modelValue,N=>{e.nextTick(()=>{i.value||!a.value?.length||N&&N.length>0&&R(N)})},{deep:!0,immediate:!0}),k({generateOption:R,cleanChecked:c}),(N,t)=>{const n=e.resolveComponent("el-checkbox"),s=e.resolveComponent("el-space"),V=e.resolveComponent("el-text"),_=e.resolveComponent("el-divider"),g=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(s,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:x.disabled,onChange:o},{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(C),text:"",size:"small",onRefresh:t[0]||(t[0]=b=>e.unref(r)(!0))},null,8,["loading"])]),_:1}),e.createVNode(s,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),b=>(e.openBlock(),e.createElementBlock("div",{key:b.id},[e.createVNode(s,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":d.MenuAll[b.id],disabled:x.disabled||!b.rules||b.rules.length<=0,indeterminate:d.MenuIndeterminate[b.id],onChange:U=>p(U,b.id)},{default:e.withCtx(()=>[e.createVNode(V,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(_,{direction:"vertical"}),b.rules?(e.openBlock(),e.createBlock(g,{key:0,modelValue:d.MenuList[b.id],"onUpdate:modelValue":U=>d.MenuList[b.id]=U,disabled:x.disabled,style:{margin:"auto"},onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.rules,U=>(e.openBlock(),e.createBlock(n,{key:U.key,value:U.key},{default:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(U.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=(x,k)=>{const T=x.__vccOpts||x;for(const[C,h]of k)T[C]=h;return T},xe=ee(Te,[["__scopeId","data-v-7adb5f76"]]),Ne=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},i={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:d,title:a,form:r,formData:w,requesting:o,executing:p,open:f,modify:c,submit:R,closed:N}=l.useForm(C,m,Y),t=()=>{h.value?.cleanChecked(),N()};return k({open:f,modify:c}),(n,s)=>{const V=e.resolveComponent("el-input"),_=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-col"),b=e.resolveComponent("el-input-number"),U=e.resolveComponent("el-row"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":s[6]||(s[6]=B=>e.isRef(d)?d.value=B:null),title:e.unref(a)(),width:"1000px",executing:e.unref(p),onClosed:t,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:r,model:e.unref(w),"label-width":"auto",rules:i,disabled:e.unref(o)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(g,{span:12},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).module,"onUpdate:modelValue":s[0]||(s[0]=B=>e.unref(w).module=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(g,{span:12},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(b,{class:"w-full",modelValue:e.unref(w).sort,"onUpdate:modelValue":s[1]||(s[1]=B=>e.unref(w).sort=B),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(_,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).name,"onUpdate:modelValue":s[2]||(s[2]=B=>e.unref(w).name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).en_name,"onUpdate:modelValue":s[3]||(s[3]=B=>e.unref(w).en_name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).remark,"onUpdate:modelValue":s[4]||(s[4]=B=>e.unref(w).remark=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(xe,{ref_key:"rulesCheck",ref:h,modelValue:e.unref(w).rules,"onUpdate:modelValue":s[5]||(s[5]=B=>e.unref(w).rules=B),disabled:e.unref(o)||e.unref(p)},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 k={keyword:""},T=[{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:p})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>o({key:p.key})},null)}],{requesting:C}=l.useLoading(Y),{tableRef:h,formModalRef:m,keyword:i,search:d,reset:a,refresh:r,openFormModal:w,editFormModal:o}=l.useCrudPage(k);return(p,f)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),N=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(N,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(i).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:f[3]||(f[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,columns:T,url:e.unref(Y).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Ne,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),ke=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:k}){const T=k,C=x,{requesting:h}=l.useLoading(E),{value:m,options:i,change:d,refresh:a,filterOptions:r}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"I18N_MODULES",url:E.urls.modules,api:E,isArray:!0});return(w,o)=>{const p=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":o[1]||(o[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(h)||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(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:o[0]||(o[0]=c=>e.unref(a)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.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:k,emit:T}){const C=T,h={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},m={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"}]},i=e.ref([]),d=l.useCacheStore();function a(){const s={isArray:!0,key:"I18N_LANGUAGES",url:E.urls.languages,params:{}};d.GET_CACHE({...s,force:!0}).then(V=>{i.value=V})}a();const{modal:r,title:w,form:o,formData:p,requesting:f,executing:c,open:R,modify:N,submit:t,closed:n}=l.useForm(C,h,E);return k({open:R,modify:N}),(s,V)=>{const _=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-input"),b=e.resolveComponent("el-space"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(r),"onUpdate:modelValue":V[3]||(V[3]=y=>e.isRef(r)?r.value=y:null),title:e.unref(w)(),width:"600px",executing:e.unref(c),onClosed:e.unref(n),onSubmit:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:o,model:e.unref(p),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(c)},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:e.unref(p).module,"onUpdate:modelValue":V[0]||(V[0]=y=>e.unref(p).module=y),disabled:e.unref(c),"allow-create":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).key,"onUpdate:modelValue":V[1]||(V[1]=y=>e.unref(p).key=y),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(b,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y},[e.createVNode(g,{modelValue:e.unref(p).language[y],"onUpdate:modelValue":B=>e.unref(p).language[y]=B,placeholder:e.unref(l.Translate)("i18n.placeholder.language")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).remark,"onUpdate:modelValue":V[2]||(V[2]=y=>e.unref(p).remark=y),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"])}}});function Re(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const te=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(x,{expose:k,emit:T}){const C=T,{visible:h,open:m,close:i}=l.useDialog(void 0,()=>C("closed")),d={keyword:"",module:void 0,status:0},a=[{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",render:({row:_})=>{const b=Object.keys(_.language).filter(U=>!!_.language[U]).map(U=>`${U}: ${_.language[U]}`).join("; ");return e.createVNode(e.resolveComponent("el-space"),null,Re(b)?b:{default:()=>[b]})}},{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",render:({rowData:_})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",onModify:()=>n({uuid:_.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:w.value,onClick:()=>s(_.uuid)},null)]})}],{requesting:r,executing:w}=l.useLoading(E),{tableRef:o,formModalRef:p,keyword:f,search:c,reset:R,refresh:N,openFormModal:t,editFormModal:n}=l.useCrudPage(d);async function s(_){return E.remove({uuid:_}).finally(()=>{N()})}function V(_){C("choosed",_)}return k({open:m}),(_,g)=>{const b=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-space"),S=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{class:"basic-drawer",modelValue:e.unref(h),"onUpdate:modelValue":g[7]||(g[7]=A=>e.isRef(h)?h.value=A:null),width:"880px","show-close":!1,onClosed:e.unref(i)},{title:e.withCtx(()=>[e.createVNode(S,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(r),disabled:e.unref(w),onRefresh:e.unref(R)},null,8,["loading","disabled","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t),disabled:e.unref(r)||e.unref(w)},null,8,["onOpen","disabled"])]),content:e.withCtx(()=>[e.createVNode(B,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(b,{style:{width:"160px"},modelValue:e.unref(f).keyword,"onUpdate:modelValue":g[0]||(g[0]=A=>e.unref(f).keyword=A),disabled:e.unref(r),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:g[1]||(g[1]=e.withKeys(A=>e.unref(c)(),["enter"])),onClear:g[2]||(g[2]=A=>e.unref(c)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(re,{modelValue:e.unref(f).module,"onUpdate:modelValue":g[3]||(g[3]=A=>e.unref(f).module=A),clearable:!0,disabled:e.unref(r),style:{width:"160px"}},null,8,["modelValue","disabled"]),e.createVNode(y,{modelValue:e.unref(f).status,"onUpdate:modelValue":g[4]||(g[4]=A=>e.unref(f).status=A),onChange:g[5]||(g[5]=A=>e.unref(c)()),disabled:e.unref(r)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(U,{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(r),onSearch:g[6]||(g[6]=A=>e.unref(c)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:o,columns:a,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),onRowDblclick:V,"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1},8,["modelValue","onClosed"])}}}),Ve={key:0},Ue={key:1},Be=e.defineComponent({__name:"template",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=e.shallowRef(),h=()=>C.value?.open(),m=T,i=e.ref("600px"),d=e.ref({"zh-CN":"primary","en-US":"success"}),a=e.ref({}),r={uuid:"",app:1,keys:"",values:[],remark:""},w={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:o,title:p,form:f,formData:c,requesting:R,executing:N,open:t,modify:n,submit:s,closed:V}=l.useForm(m,r,F);function _(){i.value="1080px",h()}function g(){i.value="600px"}function b(B){let S=B?.module?.toLowerCase()+"."+B.key.toLowerCase();c.keys=S,c.values.push(S);for(const A in B.language)a.value[A]||(a.value[A]=[]),a.value[A].push(B.language[A])}function U(){i.value="600px",y()}function y(){c.keys="",c.values=[],a.value={"zh-CN":[],"en-US":[]}}return e.watch(()=>o.value,B=>{B?U():V()}),k({open:t,modify:n}),(B,S)=>{const A=e.resolveComponent("el-page-header"),$=e.resolveComponent("el-form-item"),Q=e.resolveComponent("el-button"),L=e.resolveComponent("el-input"),ll=e.resolveComponent("el-tag"),rl=e.resolveComponent("el-space"),tl=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(o),"onUpdate:modelValue":S[3]||(S[3]=q=>e.isRef(o)?o.value=q:null),width:i.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("i18n.template")),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"default",icon:"icon-clear",loading:e.unref(N),onClick:y},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(N),onClick:e.unref(s)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(tl,{ref_key:"form",ref:f,model:e.unref(c),"label-width":"auto",rules:w,disabled:e.unref(R)||e.unref(N)},{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(c).app,"onUpdate:modelValue":S[0]||(S[0]=q=>e.unref(c).app=q),"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(L,{modelValue:e.unref(c).keys,"onUpdate:modelValue":S[1]||(S[1]=q=>e.unref(c).keys=q),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(Q,{icon:e.unref(J.Search),onClick:_},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(c).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(a.value,(q,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:"w-full"},[e.createVNode(rl,null,{default:e.withCtx(()=>[e.createVNode(ll,{type:d.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",Ve,e.toDisplayString(q.join("")),1)):(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(q.join(" ")),1))]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(L,{modelValue:e.unref(c).remark,"onUpdate:modelValue":S[2]||(S[2]=q=>e.unref(c).remark=q),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:C,onChoosed:b,onClosed:g},null,512)]),_:1},8,["modelValue","width"])}}}),Se=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function De(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const ne=e.defineComponent({__name:"index",setup(x){const k=te,T=Be,C={keyword:"",app:0,status:0},h=({row:g})=>{let b;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+g.app),style:"min-width: 80px"},De(b=l.Translate("i18n.app."+g.app))?b:{default:()=>[b]})},m=({row:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:a.value,onModify:()=>t({uuid:g.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:a.value,onClick:()=>s(g.uuid)},null)]}),i=[{label:l.Translate("base.app"),prop:"app",width:120,render:h},{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:m}],{requesting:d,executing:a}=l.useLoading(F),{tableRef:r,formModalRef:w,dialogRef:o,keyword:p,search:f,reset:c,refresh:R,openFormModal:N,editFormModal:t,openDialog:n}=l.useCrudPage(C);function s(g){return F.remove({uuid:g}).finally(()=>{R()})}function V(){return E.gen().finally(()=>{R()})}function _(){Se.gen().finally(()=>{R()})}return(g,b)=>{const U=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),B=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-space"),A=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(d),onRefresh:e.unref(c)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(N)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(S,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=L=>e.unref(p).keyword=L),disabled:e.unref(d)||e.unref(a),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:b[1]||(b[1]=e.withKeys(L=>e.unref(f)(),["enter"])),onClear:b[2]||(b[2]=L=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(p).app,"onUpdate:modelValue":b[3]||(b[3]=L=>e.unref(p).app=L),"cache-key":"I18NAPPS",disabled:e.unref(d)||e.unref(a),url:e.unref(F).urls.apps,onChange:b[4]||(b[4]=L=>e.unref(f)())},null,8,["modelValue","disabled","url"]),e.createVNode(B,{modelValue:e.unref(p).status,"onUpdate:modelValue":b[5]||(b[5]=L=>e.unref(p).status=L),disabled:e.unref(d)||e.unref(a),onChange:b[6]||(b[6]=L=>e.unref(f)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],L=>e.createVNode(y,{key:L,label:e.unref(l.Translate)(`status.${L}`),value:L},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(d)||e.unref(a),onSearch:b[7]||(b[7]=L=>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(a),onClick:V},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(a),onClick:_},null,8,["loading"]),e.createVNode(A,{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:i,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(e.unref(k),{ref_key:"I18nTableDrawerRef",ref:o},null,512),e.createVNode(e.unref(T),{ref_key:"formModalRef",ref:w,onRefresh:e.unref(R)},null,8,["onRefresh"])]),_:1})}}}),Ae=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"})),W=l.ApiUtils.routineApi("admin","key"),Le=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:i,form:d,formData:a,requesting:r,executing:w,open:o,modify:p,submit:f,closed:c}=l.useForm(C,h,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"}]},N=e.ref([]),t=async()=>{const n=await Y.list();N.value=Array.isArray(n?.data)?n.data:[]};return e.onBeforeMount(async()=>{await t()}),k({open:o,modify:p}),(n,s)=>{const V=e.resolveComponent("el-input"),_=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-radio-button"),b=e.resolveComponent("el-radio-group"),U=e.resolveComponent("el-checkbox"),y=e.resolveComponent("el-checkbox-group"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":s[7]||(s[7]=S=>e.isRef(m)?m.value=S:null),title:e.unref(i)(),width:"600px",executing:e.unref(w),onClosed:e.unref(c),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(a),"label-width":"auto",rules:R,disabled:e.unref(r)||e.unref(w)},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).username,"onUpdate:modelValue":s[0]||(s[0]=S=>e.unref(a).username=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).phone,"onUpdate:modelValue":s[1]||(s[1]=S=>e.unref(a).phone=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(a).key},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).password,"onUpdate:modelValue":s[2]||(s[2]=S=>e.unref(a).password=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(_,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).email,"onUpdate:modelValue":s[3]||(s[3]=S=>e.unref(a).email=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(a).language,"onUpdate:modelValue":s[4]||(s[4]=S=>e.unref(a).language=S)},{default:e.withCtx(()=>[e.createVNode(g,{value:"zh-CN"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(g,{value:"en-US"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(a).roles,"onUpdate:modelValue":s[5]||(s[5]=S=>e.unref(a).roles=S)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,S=>(e.openBlock(),e.createBlock(U,{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(_,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).remark,"onUpdate:modelValue":s[6]||(s[6]=S=>e.unref(a).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 k={keyword:""},T=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:p})=>e.createVNode(l.BasicAvatar,{src:p.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:p})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[p.username]),e.createVNode("div",null,[p.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:p})=>e.createVNode(l.ModifyButton,{onModify:()=>o({key:p.key})},null)}],{requesting:C}=l.useLoading(W),{tableRef:h,formModalRef:m,keyword:i,search:d,reset:a,refresh:r,openFormModal:w,editFormModal:o}=l.useCrudPage(k);return(p,f)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),N=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(N,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(i).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:f[3]||(f[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(W).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Le,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),Oe={check:"check"},P=l.ApiUtils.routineApi("site","id",Oe),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:k,emit:T}){const C=T,h=x,{requesting:m}=l.useLoading(j),{id:i,options:d,refresh:a,change:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"DOMAIN_LIST",api:j,isArray:!0});return k({refresh:a}),(w,o)=>{const p=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(p,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=f=>e.isRef(i)?i.value=f:null),options:e.unref(d),disabled:x.disabled||e.unref(m),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(m),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),qe=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,P);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-input"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[7]||(t[7]=_=>e.isRef(i)?i.value=_:null),title:e.unref(d)("config.site"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{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]=_=>e.unref(r).domain_id=_),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(r).prefix,"onUpdate:modelValue":t[1]||(t[1]=_=>e.unref(r).prefix=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=_=>e.unref(r).name=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=_=>e.unref(r).en_name=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).dns,"onUpdate:modelValue":t[4]||(t[4]=_=>e.unref(r).dns=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).git,"onUpdate:modelValue":t[5]||(t[5]=_=>e.unref(r).git=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[6]||(t[6]=_=>e.unref(r).remark=_),disabled:e.unref(o),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:k,emit:T}){const C=T,h=x,{requesting:m}=l.useLoading(K),{id:i,options:d,refresh:a,change:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"DOMAIN_PROVIDER_LIST",api:K,isArray:!0});return k({refresh:a}),(w,o)=>{const p=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(p,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=f=>e.isRef(i)?i.value=f:null),options:e.unref(d),disabled:x.disabled||e.unref(m),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(m),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Fe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,j);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-input"),V=e.resolveComponent("el-date-picker"),_=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[4]||(t[4]=g=>e.isRef(i)?i.value=g:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(_,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{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]=g=>e.unref(r).provider_id=g),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[1]||(t[1]=g=>e.unref(r).name=g),disabled:e.unref(o),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]=g=>e.unref(r).expired_at=g),disabled:e.unref(o),"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(s,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[3]||(t[3]=g=>e.unref(r).remark=g),disabled:e.unref(o),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:k,emit:T}){const C=T,h={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,K);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=_=>e.isRef(i)?i.value=_:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{default:e.withCtx(()=>[e.createVNode(s,{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]=_=>e.unref(r).name=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).en_name=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).key=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).secret=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).end_point=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).remark=_),disabled:e.unref(o),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:k}){const{requesting:T}=l.useLoading(K),C=e.ref(!1),{tableRef:h,formModalRef:m,refresh:i,openFormModal:d,editFormModal:a}=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:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>a({id:o.id})},null)]})}];return k({open:()=>{C.value=!0}}),(o,p)=>{const f=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:C.value,"onUpdate:modelValue":p[0]||(p[0]=c=>C.value=c),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(i),size:"default",loading:e.unref(T)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(K).urls.list,columns:r,loading:e.unref(T)},null,8,["url","loading"]),e.createVNode($e,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(i)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ze={gen:"gen"},z=l.ApiUtils.routineApi("SSL","id",ze),de=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:T}){const C=T,h=x,{requesting:m}=l.useLoading(P),{key:i,options:d,refresh:a,change:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"SITE_LIST",api:P,isArray:!0},{formatOptions:w=>w.map(o=>({...o,label:o.prefix+"."+o.domain?.name,value:o.id}))});return k({refresh:a}),(w,o)=>{const p=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(p,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=f=>e.isRef(i)?i.value=f:null),options:e.unref(d),disabled:x.disabled||e.unref(m),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(m),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),se=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,z);return k({open:p,modify:f,formData:r}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[8]||(t[8]=b=>e.isRef(i)?i.value=b:null),title:e.unref(d)("ssl.ssl"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{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]=b=>e.unref(r).domain_id=b),disabled:e.unref(o)},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]=b=>e.unref(r).client=b)},{default:e.withCtx(()=>[e.createVNode(s,{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]=b=>e.unref(r).site_id=b),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=b=>e.unref(r).name=b),disabled:e.unref(o),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(_,{modelValue:e.unref(r).path,"onUpdate:modelValue":t[4]||(t[4]=b=>e.unref(r).path=b),disabled:e.unref(o),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(_,{modelValue:e.unref(r).email,"onUpdate:modelValue":t[5]||(t[5]=b=>e.unref(r).email=b),disabled:e.unref(o),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]=b=>e.unref(r).encryption=b)},{default:e.withCtx(()=>[e.createVNode(s,{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(_,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=b=>e.unref(r).remark=b),disabled:e.unref(o),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"])}}}),Ie=e.defineComponent({__name:"DomainTableDrawer",setup(x,{expose:k}){const{requesting:T}=l.useLoading(j),{visible:C,open:h}=l.useDialog(),{tableRef:m,formModalRef:i,refresh:d,openFormModal:a,editFormModal:r}=l.useCrudPage(),{formRef:w,open:o,edit:p}=l.useSingleFormModal(),{dialogRef:f,open:c}=l.useSingleDialog(),R=[{prop:"provider",label:l.Translate("config.provider"),width:120,cellRenderer:({rowData:N})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[N.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:N})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>r({id:N.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{N.ssl&&N.ssl.id?p({id:N.ssl?.id}):(w.value.formData.domain_id=N.id,w.value.formData.site_id=0,o())}},null)]})}];return k({open:h}),(N,t)=>{const n=e.resolveComponent("el-space"),s=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(C),"onUpdate:modelValue":t[0]||(t[0]=V=>e.isRef(C)?C.value=V:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(s,{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(d),size:"default",loading:e.unref(T)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},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(c),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:m,size:"small","row-key":"id",url:e.unref(j).urls.list,columns:R,loading:e.unref(T)},null,8,["url","loading"]),e.createVNode(Fe,{ref_key:"formModalRef",ref:i,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(se,{ref_key:"sslFormModalRef",ref:w,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(Pe,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),je=e.defineComponent({__name:"SSLTableDrawer",setup(x,{expose:k}){const{requesting:T,executing:C}=l.useLoading(z),h=e.ref(0),{visible:m,open:i}=l.useDialog(),{tableRef:d,formModalRef:a,refresh:r,openFormModal:w,editFormModal:o}=l.useCrudPage(),p=[{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:C.value,onModify:()=>o({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:C.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>f(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:C.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>c(R)},null)]})}],f=R=>{z.gen({id:R}).then(N=>{console.warn("Res:",N)})};function c(R){const N=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(N).then(t=>t.blob()).then(t=>{let n=URL.createObjectURL(t),s=document.createElement("a");s.style.display="none",s.href=n,s.download=R.name+".zip",s.click(),URL.revokeObjectURL(t)})}return k({open:i}),(R,N)=>{const t=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(m),"onUpdate:modelValue":N[0]||(N[0]=n=>e.isRef(m)?m.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(T)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:d,size:"default","row-key":"id",url:e.unref(z).urls.list,columns:p,loading:e.unref(T)},null,8,["url","loading"]),e.createVNode(se,{ref_key:"formModalRef",ref:a,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ie=l.ApiUtils.routineApi("SSLLog","id"),Ke=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(x,{expose:k}){const T=x,{requesting:C,executing:h}=l.useLoading([ie,z]),{visible:m,open:i}=l.useDialog(),{tableRef:d,refresh:a}=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 w(){z.gen({id:T.ssl.id}).then(p=>{console.warn("Res:",p)})}function o(){const p=l.AssetsUtils.getDownloadUrl(T.ssl.path+".zip");fetch(p).then(f=>f.blob()).then(f=>{let c=URL.createObjectURL(f),R=document.createElement("a");R.style.display="none",R.href=c,R.download=T.ssl.name+".zip",R.click(),URL.revokeObjectURL(f)})}return k({open:i}),(p,f)=>{const c=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(m),"onUpdate:modelValue":f[0]||(f[0]=R=>e.isRef(m)?m.value=R:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(c,{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(a),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(h),loading:e.unref(h),onClick:w},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(h),loading:e.unref(h),onClick:o},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:d,size:"small","row-key":"id",url:e.unref(ie).urls.search,columns:r,loading:e.unref(C)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),pe=ee(e.defineComponent({__name:"index",setup(x){const k=Ie,T=je,C=Ke,h=e.ref(),{requesting:m,executing:i}=l.useLoading(P),{tableRef:d,formModalRef:a,reset:r,refresh:w,openFormModal:o,editFormModal:p}=l.useCrudPage(),{dialogRef:f,open:c}=l.useSingleDialog(),{dialogRef:R,open:N}=l.useSingleDialog(),{dialogRef:t,open:n}=l.useSingleDialog(),s=[{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:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[g.ssl?.renewal_days,e.createTextVNode(" 天")]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:b=>{b.stopPropagation(),g.ssl&&g.ssl.id&&(h.value=g.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:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>p({id:g.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:i.value,loading:V.value==g.id&&i.value,onClick:()=>_(g)},null)]})}],V=e.ref(0),_=g=>{V.value=g.id,P.check({id:g.id}).then(b=>{b.data&&(l.notification(b),w())}).finally(()=>{V.value=0})};return(g,b)=>{const U=e.resolveComponent("el-space"),y=e.resolveComponent("el-page-header"),B=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(B,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(y,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(U,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(m),onRefresh:e.unref(r)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(o)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(c),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(N),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:d,size:"small","row-key":"id",url:e.unref(P).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:s},null,8,["url"]),e.createVNode(qe,{ref_key:"formModalRef",ref:a,onRefresh:e.unref(w)},null,8,["onRefresh"]),e.createVNode(e.unref(k),{ref_key:"domainTableDrawerRef",ref:f},null,512),e.createVNode(e.unref(T),{ref_key:"sslTableDrawerRef",ref:R},null,512),e.createVNode(e.unref(C),{ref_key:"sslLogTableDrawerRef",ref:t},null,512)]),_:1})}}}),[["__scopeId","data-v-34e18506"]]),Ye=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),Ge={request:"request",error:"error",sql:"SQL"},I=l.ApiUtils.routineApi("log","id",Ge),fe=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},T=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:a})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(a.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(I),{tableRef:h,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(a,r)=>{const w=e.resolveComponent("el-date-picker"),o=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(o,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(m).dates=c),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]=c=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:r[2]||(r[2]=c=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(I).urls.request,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),We=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),ce=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},T=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:a})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(a.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(I),{tableRef:h,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(a,r)=>{const w=e.resolveComponent("el-date-picker"),o=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(o,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(m).dates=c),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]=c=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:r[2]||(r[2]=c=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(I).urls.error,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),He=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"})),me=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},T=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:a})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(a.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(I),{tableRef:h,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(a,r)=>{const w=e.resolveComponent("el-date-picker"),o=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(o,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(m).dates=c),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]=c=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:r[2]||(r[2]=c=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(I).urls.sql,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"})),Je=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:k}){const T=k,C=x,{requesting:h}=l.useLoading(E),{value:m,options:i,change:d}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"LANGUAGE_SELECT",url:E.urls.languages,api:E,isArray:!0},{formatOptions:a=>a.map(r=>({value:r,label:r}))});return(a,r)=>{const w=e.resolveComponent("el-radio-button"),o=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(o,{modelValue:e.unref(m),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(m)?m.value=p:null),disabled:e.unref(h),onChange:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),p=>(e.openBlock(),e.createBlock(w,{key:p.value,value:p.value},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(p.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])}}}),Xe=()=>Promise.resolve().then(()=>We),Ze=()=>Promise.resolve().then(()=>He),ue=()=>Promise.resolve().then(()=>Qe),Me=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:Xe,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Ze,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:ue,meta:{title:l.Translate("menu.SqlLog")}}],ve={install:x=>{Reflect.ownKeys(x._context.provides).some(k=>String(k)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},el=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>Ee),"./views/language/index.vue":()=>Promise.resolve().then(()=>Ae),"./views/menu/index.vue":()=>Promise.resolve().then(()=>ge),"./views/role/index.vue":()=>Promise.resolve().then(()=>ke),"./views/site/index.vue":()=>Promise.resolve().then(()=>Ye)});D.AdminsPage=oe,D.DomainProviderSelect=ae,D.DomainSelect=H,D.ErrorLogsPage=ce,D.LanguageSelect=Je,D.LanguagesPage=ne,D.LogRoutes=Me,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=el,D.default=ve,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"},O=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:k}){const T=k,C=x,{requesting:h}=l.useLoading(O),{value:m,options:i,change:d,refresh:a,filterOptions:r}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"TOP_MENU_LIST",api:O,url:O.urls.tops,isArray:!0});return(w,o)=>{const p=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":o[1]||(o[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(h)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),"empty-values":[void 0],onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:o[0]||(o[0]=c=>e.unref(a)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),be=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={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}},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,O);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-col"),V=e.resolveComponent("el-input-number"),_=e.resolveComponent("el-row"),g=e.resolveComponent("el-input"),b=e.resolveComponent("el-switch"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[17]||(t[17]=y=>e.isRef(i)?i.value=y:null),title:e.unref(d)(),width:"1000px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{default:e.withCtx(()=>[e.createVNode(_,{gutter:20},{default:e.withCtx(()=>[e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(_,{gutter:10},{default:e.withCtx(()=>[e.createVNode(s,{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]=y=>e.unref(r).menu_id=y),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{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]=y=>e.unref(r).sort=y),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(g,{modelValue:e.unref(r).module,"onUpdate:modelValue":t[2]||(t[2]=y=>e.unref(r).module=y),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(g,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=y=>e.unref(r).name=y),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(g,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[4]||(t[4]=y=>e.unref(r).en_name=y),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(g,{modelValue:e.unref(r).component,"onUpdate:modelValue":t[5]||(t[5]=y=>e.unref(r).component=y),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(g,{modelValue:e.unref(r).url,"onUpdate:modelValue":t[6]||(t[6]=y=>e.unref(r).url=y),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(g,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=y=>e.unref(r).remark=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).icon,"onUpdate:modelValue":t[8]||(t[8]=y=>e.unref(r).icon=y),placeholder:e.unref(l.Translate)("placeholder.input"),onInput:t[9]||(t[9]=y=>{e.unref(r).meta.icon=y})},{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(g,{modelValue:e.unref(r).meta.title,"onUpdate:modelValue":t[10]||(t[10]=y=>e.unref(r).meta.title=y),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(g,{modelValue:e.unref(r).meta.active,"onUpdate:modelValue":t[11]||(t[11]=y=>e.unref(r).meta.active=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.link,"onUpdate:modelValue":t[12]||(t[12]=y=>e.unref(r).meta.link=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{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(b,{modelValue:e.unref(r).meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=y=>e.unref(r).meta.keep_alive=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.hide,"onUpdate:modelValue":t[14]||(t[14]=y=>e.unref(r).meta.hide=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.full,"onUpdate:modelValue":t[15]||(t[15]=y=>e.unref(r).meta.full=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).meta.affix,"onUpdate:modelValue":t[16]||(t[16]=y=>e.unref(r).meta.affix=y)},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:k}){const T=k,C=x,{requesting:h}=l.useLoading(O),{value:m,options:i,change:d,refresh:a,filterOptions:r}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"MENU_LIST",api:O,isArray:!0});return(w,o)=>{const p=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":o[1]||(o[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(h)||x.disabled,placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:o[0]||(o[0]=c=>e.unref(a)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),he=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,X);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-input"),_=e.resolveComponent("el-col"),g=e.resolveComponent("el-row"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=U=>e.isRef(i)?i.value=U:null),title:e.unref(d)("menu.rules"),width:"1000px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{default:e.withCtx(()=>[e.createVNode(g,{gutter:20},{default:e.withCtx(()=>[e.createVNode(_,{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]=U=>e.unref(r).menu_id=U),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(s,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=U=>e.unref(r).sort=U),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]=U=>e.unref(r).name=U),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]=U=>e.unref(r).en_name=U),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]=U=>e.unref(r).remark=U),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(_,{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]=U=>e.unref(r).urls=U),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 k={keyword:"",status:0},T=e.ref(""),C=[{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:T.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:()=>T.value=n.key},{default:()=>[n.translate]}),default:()=>{let s,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:()=>T.value=""},M(s=l.Translate("base.cancel"))?s:{default:()=>[s]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>N(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:O.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:()=>p({id:t.id})},null)}],{requesting:h}=l.useLoading(O),{tableRef:m,formModalRef:i,keyword:d,search:a,refresh:r,reset:w,openFormModal:o,editFormModal:p}=l.useCrudPage(k),{formRef:f,open:c,edit:R}=l.useSingleFormModal(),N=t=>{X[l.DEFAULT_REMOVE_KEY]({key:t}).then(()=>{T.value="",r()})};return(t,n)=>{const s=e.resolveComponent("el-button"),V=e.resolveComponent("el-input"),_=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),b=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),y=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(y,{class:"basic-card flex-full","body-class":"flex-1",onClick:n[5]||(n[5]=()=>T.value="")},{header:e.withCtx(()=>[e.createVNode(U,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(w)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(o)},null,8,["onOpen"]),e.createVNode(s,{circle:"",icon:e.unref(J.Key),onClick:e.unref(c)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(b,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(V,{class:"basic-search-input",modelValue:e.unref(d).keyword,"onUpdate:modelValue":n[0]||(n[0]=B=>e.unref(d).keyword=B),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(B=>e.unref(a)(),["enter"])),onClear:n[2]||(n[2]=B=>e.unref(a)())},null,8,["modelValue","placeholder"]),e.createVNode(g,{modelValue:e.unref(d).status,"onUpdate:modelValue":n[3]||(n[3]=B=>e.unref(d).status=B),onChange:n[4]||(n[4]=B=>e.unref(a)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],B=>e.createVNode(_,{key:B,label:e.unref(l.Translate)(`status.${B}`),value:B},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:e.unref(a)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(d),"auto-search":""},null,8,["url","search-param"]),e.createVNode(be,{ref_key:"formModalRef",ref:i,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:k,emit:T}){const{requesting:C}=l.useLoading(O),h=x,m=T,i=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:a,refresh:r}=l.useSelect(e.toRef(h,"modelValue"),m,{key:"RULE_CHECK",api:O,url:O.urls.rules,isArray:!0},{autoRefresh:!1});function w(){a.value.forEach(N=>{N.rules?.length&&(d.MenuAll[N.id]=!1,d.MenuIndeterminate[N.id]=!1,d.MenuList[N.id]=[])})}function o(N){a.value.forEach(t=>{t.rules?.length&&(d.MenuList[t.id]=N?t.rules.map(n=>n.key):[])}),f()}function p(N,t){const n=a.value.find(s=>s.id===t);d.MenuList[t]=N&&n?n.rules.map(s=>s.key):[],f()}function f(){a.value.forEach(N=>{const t=N.rules?.length||0,n=d.MenuList[N.id]?.length||0;d.MenuAll[N.id]=n===t&&t>0,d.MenuIndeterminate[N.id]=n>0&&n<t}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(N=>N.length>0),m("update:modelValue",Object.values(d.MenuList).flat())}function c(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},w(),m("update:modelValue",[]),i.value=!1}function R(N){if(Array.isArray(a.value)&&a.value.length>0){for(let t of a.value)if(Array.isArray(t.rules)&&t.rules.length>0)for(let n of t.rules)N.some(s=>s===n.key)&&(d.MenuList[t.id]=(d.MenuList?.[t.id]||[]).concat([n.key]));f(),i.value=!0}}return e.onMounted(async()=>{a.value?.length||await r(),!i.value&&h.modelValue&&R(h.modelValue)}),e.watch(()=>h.modelValue,N=>{e.nextTick(()=>{i.value||!a.value?.length||N&&N.length>0&&R(N)})},{deep:!0,immediate:!0}),k({generateOption:R,cleanChecked:c}),(N,t)=>{const n=e.resolveComponent("el-checkbox"),s=e.resolveComponent("el-space"),V=e.resolveComponent("el-text"),_=e.resolveComponent("el-divider"),g=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(s,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:x.disabled,onChange:o},{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(C),text:"",size:"small",onRefresh:t[0]||(t[0]=b=>e.unref(r)(!0))},null,8,["loading"])]),_:1}),e.createVNode(s,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),b=>(e.openBlock(),e.createElementBlock("div",{key:b.id},[e.createVNode(s,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":d.MenuAll[b.id],disabled:x.disabled||!b.rules||b.rules.length<=0,indeterminate:d.MenuIndeterminate[b.id],onChange:U=>p(U,b.id)},{default:e.withCtx(()=>[e.createVNode(V,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(_,{direction:"vertical"}),b.rules?(e.openBlock(),e.createBlock(g,{key:0,modelValue:d.MenuList[b.id],"onUpdate:modelValue":U=>d.MenuList[b.id]=U,disabled:x.disabled,style:{margin:"auto"},onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.rules,U=>(e.openBlock(),e.createBlock(n,{key:U.key,value:U.key},{default:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(U.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=(x,k)=>{const T=x.__vccOpts||x;for(const[C,h]of k)T[C]=h;return T},xe=ee(Te,[["__scopeId","data-v-7adb5f76"]]),Ne=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},i={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:d,title:a,form:r,formData:w,requesting:o,executing:p,open:f,modify:c,submit:R,closed:N}=l.useForm(C,m,Y),t=()=>{h.value?.cleanChecked(),N()};return k({open:f,modify:c}),(n,s)=>{const V=e.resolveComponent("el-input"),_=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-col"),b=e.resolveComponent("el-input-number"),U=e.resolveComponent("el-row"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":s[6]||(s[6]=B=>e.isRef(d)?d.value=B:null),title:e.unref(a)(),width:"1000px",executing:e.unref(p),onClosed:t,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:r,model:e.unref(w),"label-width":"auto",rules:i,disabled:e.unref(o)||e.unref(p)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(g,{span:12},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).module,"onUpdate:modelValue":s[0]||(s[0]=B=>e.unref(w).module=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(g,{span:12},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(b,{class:"w-full",modelValue:e.unref(w).sort,"onUpdate:modelValue":s[1]||(s[1]=B=>e.unref(w).sort=B),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(_,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).name,"onUpdate:modelValue":s[2]||(s[2]=B=>e.unref(w).name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).en_name,"onUpdate:modelValue":s[3]||(s[3]=B=>e.unref(w).en_name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(w).remark,"onUpdate:modelValue":s[4]||(s[4]=B=>e.unref(w).remark=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(xe,{ref_key:"rulesCheck",ref:h,modelValue:e.unref(w).rules,"onUpdate:modelValue":s[5]||(s[5]=B=>e.unref(w).rules=B),disabled:e.unref(o)||e.unref(p)},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 k={keyword:""},T=[{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:p})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>o({key:p.key})},null)}],{requesting:C}=l.useLoading(Y),{tableRef:h,formModalRef:m,keyword:i,search:d,reset:a,refresh:r,openFormModal:w,editFormModal:o}=l.useCrudPage(k);return(p,f)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),N=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(N,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(i).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:f[3]||(f[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,columns:T,url:e.unref(Y).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Ne,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),ke=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:k}){const T=k,C=x,{requesting:h}=l.useLoading(E),{value:m,options:i,change:d,refresh:a,filterOptions:r}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"I18N_MODULES",url:E.urls.modules,api:E,isArray:!0});return(w,o)=>{const p=e.resolveComponent("el-space"),f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":o[1]||(o[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(h)||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(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:o[0]||(o[0]=c=>e.unref(a)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.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:k,emit:T}){const C=T,h={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},m={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"}]},i=e.ref([]),d=l.useCacheStore();function a(){const s={isArray:!0,key:"I18N_LANGUAGES",url:E.urls.languages,params:{}};d.GET_CACHE({...s,force:!0}).then(V=>{i.value=V})}a();const{modal:r,title:w,form:o,formData:p,requesting:f,executing:c,open:R,modify:N,submit:t,closed:n}=l.useForm(C,h,E);return k({open:R,modify:N}),(s,V)=>{const _=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-input"),b=e.resolveComponent("el-space"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(r),"onUpdate:modelValue":V[3]||(V[3]=y=>e.isRef(r)?r.value=y:null),title:e.unref(w)(),width:"600px",executing:e.unref(c),onClosed:e.unref(n),onSubmit:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:o,model:e.unref(p),"label-width":"auto",rules:m,disabled:e.unref(f)||e.unref(c)},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:e.unref(p).module,"onUpdate:modelValue":V[0]||(V[0]=y=>e.unref(p).module=y),disabled:e.unref(c),"allow-create":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).key,"onUpdate:modelValue":V[1]||(V[1]=y=>e.unref(p).key=y),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(b,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y},[e.createVNode(g,{modelValue:e.unref(p).language[y],"onUpdate:modelValue":B=>e.unref(p).language[y]=B,placeholder:e.unref(l.Translate)("i18n.placeholder.language")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).remark,"onUpdate:modelValue":V[2]||(V[2]=y=>e.unref(p).remark=y),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"])}}});function Re(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const te=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(x,{expose:k,emit:T}){const C=T,{visible:h,open:m,close:i}=l.useDialog(void 0,()=>C("closed")),d={keyword:"",module:void 0,status:0},a=[{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",render:({row:_})=>{const b=Object.keys(_.language).filter(U=>!!_.language[U]).map(U=>`${U}: ${_.language[U]}`).join("; ");return e.createVNode(e.resolveComponent("el-space"),null,Re(b)?b:{default:()=>[b]})}},{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",render:({row:_})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",onModify:()=>n({uuid:_.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:w.value,onClick:()=>s(_.uuid)},null)]})}],{requesting:r,executing:w}=l.useLoading(E),{tableRef:o,formModalRef:p,keyword:f,search:c,reset:R,refresh:N,openFormModal:t,editFormModal:n}=l.useCrudPage(d);async function s(_){return E.remove({uuid:_}).finally(()=>{N()})}function V(_){C("choosed",_)}return k({open:m}),(_,g)=>{const b=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-space"),S=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{class:"basic-drawer",modelValue:e.unref(h),"onUpdate:modelValue":g[7]||(g[7]=A=>e.isRef(h)?h.value=A:null),width:"880px","show-close":!1,onClosed:e.unref(i)},{title:e.withCtx(()=>[e.createVNode(S,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(r),disabled:e.unref(w),onRefresh:e.unref(R)},null,8,["loading","disabled","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t),disabled:e.unref(r)||e.unref(w)},null,8,["onOpen","disabled"])]),content:e.withCtx(()=>[e.createVNode(B,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(b,{style:{width:"160px"},modelValue:e.unref(f).keyword,"onUpdate:modelValue":g[0]||(g[0]=A=>e.unref(f).keyword=A),disabled:e.unref(r),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:g[1]||(g[1]=e.withKeys(A=>e.unref(c)(),["enter"])),onClear:g[2]||(g[2]=A=>e.unref(c)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(re,{modelValue:e.unref(f).module,"onUpdate:modelValue":g[3]||(g[3]=A=>e.unref(f).module=A),clearable:!0,disabled:e.unref(r),style:{width:"160px"}},null,8,["modelValue","disabled"]),e.createVNode(y,{modelValue:e.unref(f).status,"onUpdate:modelValue":g[4]||(g[4]=A=>e.unref(f).status=A),onChange:g[5]||(g[5]=A=>e.unref(c)()),disabled:e.unref(r)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(U,{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(r),onSearch:g[6]||(g[6]=A=>e.unref(c)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:o,columns:a,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(f),onRowDblclick:V,"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1},8,["modelValue","onClosed"])}}}),Ve={key:0},Ue={key:1},Be=e.defineComponent({__name:"template",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=e.shallowRef(),h=()=>C.value?.open(),m=T,i=e.ref("600px"),d=e.ref({"zh-CN":"primary","en-US":"success"}),a=e.ref({}),r={uuid:"",app:1,keys:"",values:[],remark:""},w={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:o,title:p,form:f,formData:c,requesting:R,executing:N,open:t,modify:n,submit:s,closed:V}=l.useForm(m,r,F);function _(){i.value="1080px",h()}function g(){i.value="600px"}function b(B){let S=B?.module?.toLowerCase()+"."+B.key.toLowerCase();c.keys=S,c.values.push(S);for(const A in B.language)a.value[A]||(a.value[A]=[]),a.value[A].push(B.language[A])}function U(){i.value="600px",y()}function y(){c.keys="",c.values=[],a.value={"zh-CN":[],"en-US":[]}}return e.watch(()=>o.value,B=>{B?U():V()}),k({open:t,modify:n}),(B,S)=>{const A=e.resolveComponent("el-page-header"),$=e.resolveComponent("el-form-item"),Q=e.resolveComponent("el-button"),L=e.resolveComponent("el-input"),ll=e.resolveComponent("el-tag"),rl=e.resolveComponent("el-space"),tl=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(o),"onUpdate:modelValue":S[3]||(S[3]=q=>e.isRef(o)?o.value=q:null),width:i.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("i18n.template")),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"default",icon:"icon-clear",loading:e.unref(N),onClick:y},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(N),onClick:e.unref(s)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(tl,{ref_key:"form",ref:f,model:e.unref(c),"label-width":"auto",rules:w,disabled:e.unref(R)||e.unref(N)},{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(c).app,"onUpdate:modelValue":S[0]||(S[0]=q=>e.unref(c).app=q),"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(L,{modelValue:e.unref(c).keys,"onUpdate:modelValue":S[1]||(S[1]=q=>e.unref(c).keys=q),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(Q,{icon:e.unref(J.Search),onClick:_},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(c).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(a.value,(q,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:"w-full"},[e.createVNode(rl,null,{default:e.withCtx(()=>[e.createVNode(ll,{type:d.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",Ve,e.toDisplayString(q.join("")),1)):(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(q.join(" ")),1))]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode($,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(L,{modelValue:e.unref(c).remark,"onUpdate:modelValue":S[2]||(S[2]=q=>e.unref(c).remark=q),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:C,onChoosed:b,onClosed:g},null,512)]),_:1},8,["modelValue","width"])}}}),Se=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function De(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const ne=e.defineComponent({__name:"index",setup(x){const k=te,T=Be,C={keyword:"",app:0,status:0},h=({row:g})=>{let b;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+g.app),style:"min-width: 80px"},De(b=l.Translate("i18n.app."+g.app))?b:{default:()=>[b]})},m=({row:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:a.value,onModify:()=>t({uuid:g.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:a.value,onClick:()=>s(g.uuid)},null)]}),i=[{label:l.Translate("base.app"),prop:"app",width:120,render:h},{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:m}],{requesting:d,executing:a}=l.useLoading(F),{tableRef:r,formModalRef:w,dialogRef:o,keyword:p,search:f,reset:c,refresh:R,openFormModal:N,editFormModal:t,openDialog:n}=l.useCrudPage(C);function s(g){return F.remove({uuid:g}).finally(()=>{R()})}function V(){return E.gen().finally(()=>{R()})}function _(){Se.gen().finally(()=>{R()})}return(g,b)=>{const U=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),B=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-space"),A=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(d),onRefresh:e.unref(c)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(N)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(S,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=L=>e.unref(p).keyword=L),disabled:e.unref(d)||e.unref(a),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:b[1]||(b[1]=e.withKeys(L=>e.unref(f)(),["enter"])),onClear:b[2]||(b[2]=L=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(p).app,"onUpdate:modelValue":b[3]||(b[3]=L=>e.unref(p).app=L),"cache-key":"I18NAPPS",disabled:e.unref(d)||e.unref(a),url:e.unref(F).urls.apps,onChange:b[4]||(b[4]=L=>e.unref(f)())},null,8,["modelValue","disabled","url"]),e.createVNode(B,{modelValue:e.unref(p).status,"onUpdate:modelValue":b[5]||(b[5]=L=>e.unref(p).status=L),disabled:e.unref(d)||e.unref(a),onChange:b[6]||(b[6]=L=>e.unref(f)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],L=>e.createVNode(y,{key:L,label:e.unref(l.Translate)(`status.${L}`),value:L},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(d)||e.unref(a),onSearch:b[7]||(b[7]=L=>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(a),onClick:V},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(a),onClick:_},null,8,["loading"]),e.createVNode(A,{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:i,url:e.unref(F).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(e.unref(k),{ref_key:"I18nTableDrawerRef",ref:o},null,512),e.createVNode(e.unref(T),{ref_key:"formModalRef",ref:w,onRefresh:e.unref(R)},null,8,["onRefresh"])]),_:1})}}}),Ae=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"})),W=l.ApiUtils.routineApi("admin","key"),Le=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:i,form:d,formData:a,requesting:r,executing:w,open:o,modify:p,submit:f,closed:c}=l.useForm(C,h,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"}]},N=e.ref([]),t=async()=>{const n=await Y.list();N.value=Array.isArray(n?.data)?n.data:[]};return e.onBeforeMount(async()=>{await t()}),k({open:o,modify:p}),(n,s)=>{const V=e.resolveComponent("el-input"),_=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-radio-button"),b=e.resolveComponent("el-radio-group"),U=e.resolveComponent("el-checkbox"),y=e.resolveComponent("el-checkbox-group"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":s[7]||(s[7]=S=>e.isRef(m)?m.value=S:null),title:e.unref(i)(),width:"600px",executing:e.unref(w),onClosed:e.unref(c),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(a),"label-width":"auto",rules:R,disabled:e.unref(r)||e.unref(w)},{default:e.withCtx(()=>[e.createVNode(_,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).username,"onUpdate:modelValue":s[0]||(s[0]=S=>e.unref(a).username=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).phone,"onUpdate:modelValue":s[1]||(s[1]=S=>e.unref(a).phone=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(a).key},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).password,"onUpdate:modelValue":s[2]||(s[2]=S=>e.unref(a).password=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(_,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).email,"onUpdate:modelValue":s[3]||(s[3]=S=>e.unref(a).email=S),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(a).language,"onUpdate:modelValue":s[4]||(s[4]=S=>e.unref(a).language=S)},{default:e.withCtx(()=>[e.createVNode(g,{value:"zh-CN"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(g,{value:"en-US"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(_,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(a).roles,"onUpdate:modelValue":s[5]||(s[5]=S=>e.unref(a).roles=S)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,S=>(e.openBlock(),e.createBlock(U,{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(_,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(a).remark,"onUpdate:modelValue":s[6]||(s[6]=S=>e.unref(a).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 k={keyword:""},T=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:p})=>e.createVNode(l.BasicAvatar,{src:p.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:p})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[p.username]),e.createVNode("div",null,[p.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:p})=>e.createVNode(l.ModifyButton,{onModify:()=>o({key:p.key})},null)}],{requesting:C}=l.useLoading(W),{tableRef:h,formModalRef:m,keyword:i,search:d,reset:a,refresh:r,openFormModal:w,editFormModal:o}=l.useCrudPage(k);return(p,f)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),N=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(N,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":f[0]||(f[0]=n=>e.unref(i).keyword=n),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:f[1]||(f[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:f[2]||(f[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:f[3]||(f[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(W).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Le,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),Oe={check:"check"},P=l.ApiUtils.routineApi("site","id",Oe),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:k,emit:T}){const C=T,h=x,{requesting:m}=l.useLoading(j),{id:i,options:d,refresh:a,change:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"DOMAIN_LIST",api:j,isArray:!0});return k({refresh:a}),(w,o)=>{const p=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(p,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=f=>e.isRef(i)?i.value=f:null),options:e.unref(d),disabled:x.disabled||e.unref(m),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(m),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),qe=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,P);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-input"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[7]||(t[7]=_=>e.isRef(i)?i.value=_:null),title:e.unref(d)("config.site"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{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]=_=>e.unref(r).domain_id=_),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(r).prefix,"onUpdate:modelValue":t[1]||(t[1]=_=>e.unref(r).prefix=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=_=>e.unref(r).name=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=_=>e.unref(r).en_name=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).dns,"onUpdate:modelValue":t[4]||(t[4]=_=>e.unref(r).dns=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).git,"onUpdate:modelValue":t[5]||(t[5]=_=>e.unref(r).git=_),disabled:e.unref(o),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(s,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[6]||(t[6]=_=>e.unref(r).remark=_),disabled:e.unref(o),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:k,emit:T}){const C=T,h=x,{requesting:m}=l.useLoading(K),{id:i,options:d,refresh:a,change:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"DOMAIN_PROVIDER_LIST",api:K,isArray:!0});return k({refresh:a}),(w,o)=>{const p=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(p,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=f=>e.isRef(i)?i.value=f:null),options:e.unref(d),disabled:x.disabled||e.unref(m),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(m),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Fe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,j);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-input"),V=e.resolveComponent("el-date-picker"),_=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[4]||(t[4]=g=>e.isRef(i)?i.value=g:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(_,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{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]=g=>e.unref(r).provider_id=g),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[1]||(t[1]=g=>e.unref(r).name=g),disabled:e.unref(o),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]=g=>e.unref(r).expired_at=g),disabled:e.unref(o),"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(s,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[3]||(t[3]=g=>e.unref(r).remark=g),disabled:e.unref(o),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:k,emit:T}){const C=T,h={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,K);return k({open:p,modify:f}),(N,t)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=_=>e.isRef(i)?i.value=_:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{default:e.withCtx(()=>[e.createVNode(s,{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]=_=>e.unref(r).name=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).en_name=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).key=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).secret=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).end_point=_),disabled:e.unref(o),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{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]=_=>e.unref(r).remark=_),disabled:e.unref(o),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:k}){const{requesting:T}=l.useLoading(K),C=e.ref(!1),{tableRef:h,formModalRef:m,refresh:i,openFormModal:d,editFormModal:a}=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:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>a({id:o.id})},null)]})}];return k({open:()=>{C.value=!0}}),(o,p)=>{const f=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:C.value,"onUpdate:modelValue":p[0]||(p[0]=c=>C.value=c),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(i),size:"default",loading:e.unref(T)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(K).urls.list,columns:r,loading:e.unref(T)},null,8,["url","loading"]),e.createVNode($e,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(i)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ze={gen:"gen"},z=l.ApiUtils.routineApi("SSL","id",ze),de=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:T}){const C=T,h=x,{requesting:m}=l.useLoading(P),{key:i,options:d,refresh:a,change:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"SITE_LIST",api:P,isArray:!0},{formatOptions:w=>w.map(o=>({...o,label:o.prefix+"."+o.domain?.name,value:o.id}))});return k({refresh:a}),(w,o)=>{const p=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(p,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=f=>e.isRef(i)?i.value=f:null),options:e.unref(d),disabled:x.disabled||e.unref(m),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(m),onRefresh:e.unref(a)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),se=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(x,{expose:k,emit:T}){const C=T,h={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},m={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:i,title:d,form:a,formData:r,requesting:w,executing:o,open:p,modify:f,submit:c,closed:R}=l.useForm(C,h,z);return k({open:p,modify:f,formData:r}),(N,t)=>{const n=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[8]||(t[8]=b=>e.isRef(i)?i.value=b:null),title:e.unref(d)("ssl.ssl"),width:"600px",executing:e.unref(o),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:a,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(o)},{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]=b=>e.unref(r).domain_id=b),disabled:e.unref(o)},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]=b=>e.unref(r).client=b)},{default:e.withCtx(()=>[e.createVNode(s,{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]=b=>e.unref(r).site_id=b),disabled:e.unref(o)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=b=>e.unref(r).name=b),disabled:e.unref(o),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(_,{modelValue:e.unref(r).path,"onUpdate:modelValue":t[4]||(t[4]=b=>e.unref(r).path=b),disabled:e.unref(o),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(_,{modelValue:e.unref(r).email,"onUpdate:modelValue":t[5]||(t[5]=b=>e.unref(r).email=b),disabled:e.unref(o),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]=b=>e.unref(r).encryption=b)},{default:e.withCtx(()=>[e.createVNode(s,{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(_,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=b=>e.unref(r).remark=b),disabled:e.unref(o),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"])}}}),Ie=e.defineComponent({__name:"DomainTableDrawer",setup(x,{expose:k}){const{requesting:T}=l.useLoading(j),{visible:C,open:h}=l.useDialog(),{tableRef:m,formModalRef:i,refresh:d,openFormModal:a,editFormModal:r}=l.useCrudPage(),{formRef:w,open:o,edit:p}=l.useSingleFormModal(),{dialogRef:f,open:c}=l.useSingleDialog(),R=[{prop:"provider",label:l.Translate("config.provider"),width:120,cellRenderer:({rowData:N})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[N.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:N})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>r({id:N.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{N.ssl&&N.ssl.id?p({id:N.ssl?.id}):(w.value.formData.domain_id=N.id,w.value.formData.site_id=0,o())}},null)]})}];return k({open:h}),(N,t)=>{const n=e.resolveComponent("el-space"),s=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(C),"onUpdate:modelValue":t[0]||(t[0]=V=>e.isRef(C)?C.value=V:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(s,{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(d),size:"default",loading:e.unref(T)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},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(c),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:m,size:"small","row-key":"id",url:e.unref(j).urls.list,columns:R,loading:e.unref(T)},null,8,["url","loading"]),e.createVNode(Fe,{ref_key:"formModalRef",ref:i,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(se,{ref_key:"sslFormModalRef",ref:w,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(Pe,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),je=e.defineComponent({__name:"SSLTableDrawer",setup(x,{expose:k}){const{requesting:T,executing:C}=l.useLoading(z),h=e.ref(0),{visible:m,open:i}=l.useDialog(),{tableRef:d,formModalRef:a,refresh:r,openFormModal:w,editFormModal:o}=l.useCrudPage(),p=[{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:C.value,onModify:()=>o({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:C.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>f(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:C.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>c(R)},null)]})}],f=R=>{z.gen({id:R}).then(N=>{console.warn("Res:",N)})};function c(R){const N=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(N).then(t=>t.blob()).then(t=>{let n=URL.createObjectURL(t),s=document.createElement("a");s.style.display="none",s.href=n,s.download=R.name+".zip",s.click(),URL.revokeObjectURL(t)})}return k({open:i}),(R,N)=>{const t=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(m),"onUpdate:modelValue":N[0]||(N[0]=n=>e.isRef(m)?m.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(T)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:d,size:"default","row-key":"id",url:e.unref(z).urls.list,columns:p,loading:e.unref(T)},null,8,["url","loading"]),e.createVNode(se,{ref_key:"formModalRef",ref:a,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ie=l.ApiUtils.routineApi("SSLLog","id"),Ke=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(x,{expose:k}){const T=x,{requesting:C,executing:h}=l.useLoading([ie,z]),{visible:m,open:i}=l.useDialog(),{tableRef:d,refresh:a}=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 w(){z.gen({id:T.ssl.id}).then(p=>{console.warn("Res:",p)})}function o(){const p=l.AssetsUtils.getDownloadUrl(T.ssl.path+".zip");fetch(p).then(f=>f.blob()).then(f=>{let c=URL.createObjectURL(f),R=document.createElement("a");R.style.display="none",R.href=c,R.download=T.ssl.name+".zip",R.click(),URL.revokeObjectURL(f)})}return k({open:i}),(p,f)=>{const c=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(m),"onUpdate:modelValue":f[0]||(f[0]=R=>e.isRef(m)?m.value=R:null),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(c,{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(a),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(h),loading:e.unref(h),onClick:w},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(h),loading:e.unref(h),onClick:o},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:d,size:"small","row-key":"id",url:e.unref(ie).urls.search,columns:r,loading:e.unref(C)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),pe=ee(e.defineComponent({__name:"index",setup(x){const k=Ie,T=je,C=Ke,h=e.ref(),{requesting:m,executing:i}=l.useLoading(P),{tableRef:d,formModalRef:a,reset:r,refresh:w,openFormModal:o,editFormModal:p}=l.useCrudPage(),{dialogRef:f,open:c}=l.useSingleDialog(),{dialogRef:R,open:N}=l.useSingleDialog(),{dialogRef:t,open:n}=l.useSingleDialog(),s=[{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:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>[g.ssl?.renewal_days,e.createTextVNode(" 天")]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:b=>{b.stopPropagation(),g.ssl&&g.ssl.id&&(h.value=g.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:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>p({id:g.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:i.value,loading:V.value==g.id&&i.value,onClick:()=>_(g)},null)]})}],V=e.ref(0),_=g=>{V.value=g.id,P.check({id:g.id}).then(b=>{b.data&&(l.notification(b),w())}).finally(()=>{V.value=0})};return(g,b)=>{const U=e.resolveComponent("el-space"),y=e.resolveComponent("el-page-header"),B=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(B,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(y,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(U,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(m),onRefresh:e.unref(r)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(o)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(c),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(N),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:d,size:"small","row-key":"id",url:e.unref(P).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:s},null,8,["url"]),e.createVNode(qe,{ref_key:"formModalRef",ref:a,onRefresh:e.unref(w)},null,8,["onRefresh"]),e.createVNode(e.unref(k),{ref_key:"domainTableDrawerRef",ref:f},null,512),e.createVNode(e.unref(T),{ref_key:"sslTableDrawerRef",ref:R},null,512),e.createVNode(e.unref(C),{ref_key:"sslLogTableDrawerRef",ref:t},null,512)]),_:1})}}}),[["__scopeId","data-v-34e18506"]]),Ye=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),Ge={request:"request",error:"error",sql:"SQL"},I=l.ApiUtils.routineApi("log","id",Ge),fe=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},T=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:a})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(a.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(I),{tableRef:h,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(a,r)=>{const w=e.resolveComponent("el-date-picker"),o=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(o,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(m).dates=c),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]=c=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:r[2]||(r[2]=c=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(I).urls.request,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),We=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),ce=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},T=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:a})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(a.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(I),{tableRef:h,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(a,r)=>{const w=e.resolveComponent("el-date-picker"),o=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(o,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(m).dates=c),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]=c=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:r[2]||(r[2]=c=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(I).urls.error,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),He=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"})),me=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},T=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:a})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(a.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:C}=l.useLoading(I),{tableRef:h,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(a,r)=>{const w=e.resolveComponent("el-date-picker"),o=e.resolveComponent("el-space"),p=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(p,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(o,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(m).dates=c),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]=c=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(C),onSearch:r[2]||(r[2]=c=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:T,url:e.unref(I).urls.sql,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"})),Je=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:k}){const T=k,C=x,{requesting:h}=l.useLoading(E),{value:m,options:i,change:d}=l.useSelect(e.toRef(C,"modelValue"),T,{key:"LANGUAGE_SELECT",url:E.urls.languages,api:E,isArray:!0},{formatOptions:a=>a.map(r=>({value:r,label:r}))});return(a,r)=>{const w=e.resolveComponent("el-radio-button"),o=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(o,{modelValue:e.unref(m),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(m)?m.value=p:null),disabled:e.unref(h),onChange:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),p=>(e.openBlock(),e.createBlock(w,{key:p.value,value:p.value},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(p.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])}}}),Xe=()=>Promise.resolve().then(()=>We),Ze=()=>Promise.resolve().then(()=>He),ue=()=>Promise.resolve().then(()=>Qe),Me=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:Xe,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Ze,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:ue,meta:{title:l.Translate("menu.SqlLog")}}],ve={install:x=>{Reflect.ownKeys(x._context.provides).some(k=>String(k)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},el=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>Ee),"./views/language/index.vue":()=>Promise.resolve().then(()=>Ae),"./views/menu/index.vue":()=>Promise.resolve().then(()=>ge),"./views/role/index.vue":()=>Promise.resolve().then(()=>ke),"./views/site/index.vue":()=>Promise.resolve().then(()=>Ye)});D.AdminsPage=oe,D.DomainProviderSelect=ae,D.DomainSelect=H,D.ErrorLogsPage=ce,D.LanguageSelect=Je,D.LanguagesPage=ne,D.LogRoutes=Me,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=el,D.default=ve,Object.defineProperties(D,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|