@acedatacloud/nexior 3.5.1 → 3.5.2

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.
Files changed (61) hide show
  1. package/dist/assets/{Auth.a90cc399.js → Auth.a21ceb87.js} +1 -1
  2. package/dist/assets/{Callback.a82acc75.js → Callback.9d1efb14.js} +1 -1
  3. package/dist/assets/{Chatdoc.5263125f.js → Chatdoc.273c3eed.js} +1 -1
  4. package/dist/assets/{Console.83a7d90a.js → Console.df0a185d.js} +1 -1
  5. package/dist/assets/Conversation.5b91179b.js +1 -0
  6. package/dist/assets/Conversation.61f3cac0.js +1 -0
  7. package/dist/assets/{CopyToClipboard.dcbf7182.js → CopyToClipboard.b1fffe0f.js} +1 -1
  8. package/dist/assets/{Detail.24cd6940.js → Detail.736ab7b3.js} +1 -1
  9. package/dist/assets/EditArray.5990f3dd.js +1 -0
  10. package/dist/assets/Extra.1d16a1af.js +1 -0
  11. package/dist/assets/{History.d91b1f04.js → History.f131fc4f.js} +1 -1
  12. package/dist/assets/{ImagePreview.025cfc09.js → ImagePreview.33ef2f8c.js} +1 -1
  13. package/dist/assets/Index.14d54260.js +1 -0
  14. package/dist/assets/Index.4656fc30.js +1 -0
  15. package/dist/assets/{Index.77acf7ce.js → Index.47136fa2.js} +1 -1
  16. package/dist/assets/Index.5154ecc9.js +1 -0
  17. package/dist/assets/Index.5774625e.js +1 -0
  18. package/dist/assets/Index.61a1ecec.js +1 -0
  19. package/dist/assets/{Index.5a7e5cc0.js → Index.8b79d6c4.js} +2 -2
  20. package/dist/assets/Index.a7bd4a7b.js +1 -0
  21. package/dist/assets/{Index.646d79c3.js → Index.aecfea0c.js} +1 -1
  22. package/dist/assets/Index.b736a93b.js +1 -0
  23. package/dist/assets/{Index.7dada60b.js → Index.bff92738.js} +1 -1
  24. package/dist/assets/Index.c0c9d360.js +1 -0
  25. package/dist/assets/Index.d5bb6b0a.js +1 -0
  26. package/dist/assets/{InfoIcon.b6bd8d58.js → InfoIcon.523bd2db.js} +1 -1
  27. package/dist/assets/{Invitees.9fba250b.js → Invitees.ecb943e1.js} +1 -1
  28. package/dist/assets/{List.011b2c71.js → List.3ac2eda7.js} +1 -1
  29. package/dist/assets/{List.69d56b67.js → List.76b1ee8d.js} +1 -1
  30. package/dist/assets/{List.67c11343.js → List.876b0dcd.js} +1 -1
  31. package/dist/assets/{Login.4c26f374.js → Login.287bed07.js} +1 -1
  32. package/dist/assets/Main.6c3eb960.js +1 -0
  33. package/dist/assets/{Manage.f12c92bd.js → Manage.e9a1fd37.js} +1 -1
  34. package/dist/assets/{MarkdownRenderer.3fb8276a.js → MarkdownRenderer.31aa9b9c.js} +1 -1
  35. package/dist/assets/Navigator.d336ddf5.js +1 -0
  36. package/dist/assets/{Pagination.3c242094.js → Pagination.4a82380d.js} +1 -1
  37. package/dist/assets/{Setting.6cf3ec08.js → Setting.7c0a47a4.js} +1 -1
  38. package/dist/assets/{Status.ce9bc4cb.js → Status.68f53ef7.js} +1 -1
  39. package/dist/assets/Subscribe.15409729.js +1 -0
  40. package/dist/assets/{distribution.fd10b951.js → distribution.39db3da4.js} +1 -1
  41. package/dist/assets/{index.97386539.js → index.f9e15558.js} +3 -3
  42. package/dist/assets/{order.f1773d29.js → order.b1edf3c0.js} +1 -1
  43. package/dist/assets/{price.cb59d1b0.js → price.1b4f3d3e.js} +1 -1
  44. package/dist/index.html +17 -17
  45. package/package.json +1 -1
  46. package/dist/assets/Conversation.33a8676d.js +0 -1
  47. package/dist/assets/Conversation.fc58efa8.js +0 -1
  48. package/dist/assets/EditArray.fc90290f.js +0 -1
  49. package/dist/assets/Extra.d9e8ad3d.js +0 -1
  50. package/dist/assets/Index.19d318b4.js +0 -1
  51. package/dist/assets/Index.3d4c7011.js +0 -1
  52. package/dist/assets/Index.40702b91.js +0 -1
  53. package/dist/assets/Index.49dc3c46.js +0 -1
  54. package/dist/assets/Index.503e0f7b.js +0 -1
  55. package/dist/assets/Index.6edc0543.js +0 -1
  56. package/dist/assets/Index.76db79a3.js +0 -1
  57. package/dist/assets/Index.9edce037.js +0 -1
  58. package/dist/assets/Index.f10f48b2.js +0 -1
  59. package/dist/assets/Main.421f61bd.js +0 -1
  60. package/dist/assets/Navigator.3204ea1d.js +0 -1
  61. package/dist/assets/Subscribe.8bf14b5c.js +0 -1
@@ -1 +0,0 @@
1
- import{an as Ve}from"./vendor-others.cdfefb59.js";import{ar as z}from"./vendor-fortawesome.2b54ad1b.js";import{_ as y,aL as Se,aM as Ee,aN as Ne,aO as Pe,A as ye,aP as Te,K as H,F as Ce,M as Re,aQ as Le,Z as Ue}from"./index.97386539.js";import{T as Ae,u as B,N as Z,O as J,x as be,y as E,U as De,V as Ge,t as we,m as Me,I as Oe,s as je,H as Fe,R as qe}from"./vendor-element-plus.1fa87efb.js";import{H as b,al as n,o as l,e as p,f as a,I as Q,V as o,M as _,T as c,U,ai as A,L,P as D,a0 as ze,S as k,R as $}from"./vendor-@vue.6c0309d3.js";import{I as K}from"./InfoIcon.b6bd8d58.js";import{I as Ie}from"./ImagePreview.025cfc09.js";import{C as Be}from"./CopyToClipboard.dcbf7182.js";import"./vendor-markdown.cf3e96ae.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.6ab44f81.js";const Ke=b({name:"LayoutKling",components:{ElDrawer:Ae,ElButton:B,FontAwesomeIcon:z},data(){return{drawer:!1}}}),He={class:"main"},Qe={class:"config"},Ze={class:"result"};function Je(e,t,s,d,g,f){const i=n("font-awesome-icon"),u=n("el-button"),r=n("el-drawer");return l(),p("div",He,[a("div",Qe,[Q(e.$slots,"config",{},void 0,!0)]),a("div",Ze,[Q(e.$slots,"result",{},void 0,!0)]),o(u,{round:"",class:"menu",onClick:t[0]||(t[0]=v=>e.drawer=!0)},{default:_(()=>[o(i,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),o(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=v=>e.drawer=v),"with-header":!1,size:"340px",class:"drawer"},{default:_(()=>[Q(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var We=y(Ke,[["render",Je],["__scopeId","data-v-50bc0f32"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Kling.vue"]]);const Xe=b({name:"ModelSelector",components:{ElSelect:Z,ElOption:J},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{value:"kling-v1",label:"V1"},{value:"kling-v1-5",label:"V1.5"},{value:"kling-v1-6",label:"V1.6"}]}},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.kling)==null?void 0:e.config)==null?void 0:t.model},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}},mounted(){this.value||(this.value=Se)}}),Ye={class:"field"},xe={class:"title font-bold"};function et(e,t,s,d,g,f){const i=n("el-option"),u=n("el-select");return l(),p("div",Ye,[a("h2",xe,c(e.$t("pika.name.model")),1),o(u,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=r=>e.value=r),class:"value",placeholder:e.$t("pika.placeholder.select")},{default:_(()=>[(l(!0),p(U,null,A(e.options,r=>(l(),L(i,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}var tt=y(Xe,[["render",et],["__scopeId","data-v-13cacdf9"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/ModelSelector.vue"]]);const ot=b({name:"ModeSelector",components:{ElSelect:Z,ElOption:J},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{value:"std",label:"\u6807\u51C6"},{value:"pro",label:"\u9AD8\u901F"}]}},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.kling)==null?void 0:e.config)==null?void 0:t.mode},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}},mounted(){this.value||(this.value=Ee)}}),st={class:"field"},nt={class:"title font-bold"};function at(e,t,s,d,g,f){const i=n("el-option"),u=n("el-select");return l(),p("div",st,[a("h2",nt,c(e.$t("kling.name.mode")),1),o(u,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=r=>e.value=r),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:_(()=>[(l(!0),p(U,null,A(e.options,r=>(l(),L(i,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}var lt=y(ot,[["render",at],["__scopeId","data-v-3af5203e"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/ModeSelector.vue"]]);const it=b({name:"DurationSelector",components:{ElSelect:Z,ElOption:J},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{value:5,label:"5\u79D2"},{value:10,label:"10\u79D2"}]}},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.kling)==null?void 0:e.config)==null?void 0:t.duration},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}},mounted(){this.value||(this.value=Ne)}}),rt={class:"field"},ct={class:"title font-bold"};function dt(e,t,s,d,g,f){const i=n("el-option"),u=n("el-select");return l(),p("div",rt,[a("h2",ct,c(e.$t("kling.name.duration")),1),o(u,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=r=>e.value=r),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:_(()=>[(l(!0),p(U,null,A(e.options,r=>(l(),L(i,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}var pt=y(it,[["render",dt],["__scopeId","data-v-6434f6d2"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/DurationSelector.vue"]]);const ut=b({name:"RatioSelector",data(){return{options:[{value:"1:1",label:"1:1",width:20,height:20},{value:"16:9",label:"16:9",width:25,height:13},{value:"9:16",label:"9:16",width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.kling)==null?void 0:t.config)==null?void 0:s.aspect_ratio},set(e){var t,s;console.debug("set ratio",e),this.$store.commit("kling/setConfig",{...(s=(t=this.$store.state)==null?void 0:t.kling)==null?void 0:s.config,aspect_ratio:e})}}},mounted(){this.value||(this.value=Pe)}}),mt={class:"text-sm font-bold mb-2 block"},_t={class:"items"},gt=["onClick"],ft={class:"name"};function vt(e,t,s,d,g,f){return l(),p("div",null,[a("span",mt,c(e.$t("kling.name.ratio")),1),a("div",_t,[(l(!0),p(U,null,A(e.options,(i,u)=>(l(),p("div",{key:u,class:D({active:e.active===u,item:!0}),onClick:r=>e.value=i.value},[a("div",{class:D(["preview",i.label])},[a("div",{class:"rect",style:ze({width:i.width+"px",height:i.height+"px"})},null,4)],2),a("p",ft,c(i.label),1)],10,gt))),128))])])}var ht=y(ut,[["render",vt],["__scopeId","data-v-41d8dfdb"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/RatioSelector.vue"]]);const $t=b({name:"StartImage",components:{ElUpload:be,ElButton:B,InfoIcon:K,FontAwesomeIcon:z,ImagePreview:Ie},emits:["change"],data(){return{fileList:[],uploadUrl:ye()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.kling)==null?void 0:t.config)==null?void 0:s.start_image_url},set(e){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){E.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){E.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){var t,s,d;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("kling/setConfig",{...(d=(s=this.$store.state)==null?void 0:s.kling)==null?void 0:d.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),kt={class:"relative"},yt={class:"flex justify-between"},bt={class:"flex justify-start items-center"},wt={class:"text-sm font-bold"};function It(e,t,s,d,g,f){const i=n("info-icon"),u=n("image-preview"),r=n("font-awesome-icon"),v=n("el-button"),h=n("el-upload");return l(),p("div",kt,[a("div",yt,[a("div",bt,[a("span",wt,c(e.$t("kling.name.startImage")),1),o(i,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),o(h,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=m=>e.fileList=m),name:"file",limit:5,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:m})=>{var w;return[o(u,{url:m.url||((w=m.response)==null?void 0:w.file_url),name:m.name,percentage:m.percentage,onRemove:N=>e.fileList.splice(e.fileList.indexOf(m),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(v,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(r,{icon:"fa-solid fa-upload",class:"icon mr-1"}),k(" "+c(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}var Vt=y($t,[["render",It],["__scopeId","data-v-6e6084d0"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/StartImage.vue"]]);const St=b({name:"EndImage",components:{ElUpload:be,ElButton:B,ImagePreview:Ie,InfoIcon:K,FontAwesomeIcon:z},data(){return{fileList:[],uploadUrl:ye()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.kling)==null?void 0:t.config)==null?void 0:s.start_image_url},set(e){}}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onExceed(){E.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){E.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("kling/setConfig",{...(s=this.$store.state.kling)==null?void 0:s.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Et={class:"relative"},Nt={class:"flex justify-between"},Pt={class:"flex justify-start items-center"},Tt={class:"text-sm font-bold"};function Ct(e,t,s,d,g,f){const i=n("info-icon"),u=n("image-preview"),r=n("font-awesome-icon"),v=n("el-button"),h=n("el-upload");return l(),p("div",Et,[a("div",Nt,[a("div",Pt,[a("span",Tt,c(e.$t("kling.name.endImage")),1),o(i,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),o(h,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=m=>e.fileList=m),name:"file",limit:5,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:m})=>{var w;return[o(u,{url:m.url||((w=m.response)==null?void 0:w.file_url),name:m.name,percentage:m.percentage,onRemove:N=>e.fileList.splice(e.fileList.indexOf(m),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(v,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(r,{icon:"fa-solid fa-upload",class:"icon mr-1"}),k(" "+c(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}var Rt=y(St,[["render",Ct],["__scopeId","data-v-72a21eff"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/EndImage.vue"]]);const Lt=b({name:"CfgScaleSelector",components:{ElSlider:De,InfoIcon:K,ElInputNumber:Ge},computed:{value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.kling)==null?void 0:t.config)==null?void 0:s.cfg_scale},set(e){var t,s;console.debug("set cfg_scale",e),this.$store.commit("kling/setConfig",{...(s=(t=this.$store.state)==null?void 0:t.kling)==null?void 0:s.config,cfg_scale:e})}}},mounted(){this.value||(this.value=Te)}}),Ut={class:"flex justify-between"},At={class:"flex justify-start items-center"},Dt={class:"text-sm font-bold"},Gt={class:"flex justify-end items-center"},Mt={class:"w-full"};function Ot(e,t,s,d,g,f){const i=n("info-icon"),u=n("el-input-number"),r=n("el-slider");return l(),p("div",null,[a("div",Ut,[a("div",At,[a("span",Dt,c(e.$t("kling.name.cfgScale")),1),o(i,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),a("div",Gt,[o(u,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=v=>e.value=v),"controls-position":"right"},null,8,["modelValue"])])]),a("div",Mt,[o(r,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=v=>e.value=v),min:0,max:1,step:.1},null,8,["modelValue"])])])}var jt=y(Lt,[["render",Ot],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/CfgScaleSelector.vue"]]);const Ft="",qt=b({name:"PromptInput",components:{ElInput:we,InfoIcon:K},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.kling)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...(t=this.$store.state.kling)==null?void 0:t.config,prompt:e})}}},mounted(){this.value||(this.value=Ft)}}),zt={class:"field"},Bt={class:"box"},Kt={class:"title font-bold"};function Ht(e,t,s,d,g,f){const i=n("info-icon"),u=n("el-input");return l(),p("div",zt,[a("div",Bt,[a("h2",Kt,c(e.$t("kling.name.prompt")),1),o(i,{content:e.$t("kling.description.prompt"),class:"info"},null,8,["content"])]),o(u,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=r=>e.prompt=r),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.prompt"),maxlength:500,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Qt=y(qt,[["render",Ht],["__scopeId","data-v-fd830852"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/PromptInput.vue"]]);const Zt="",Jt=b({name:"NegativePromptInput",components:{ElInput:we,InfoIcon:K},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.kling)==null?void 0:e.config)==null?void 0:t.negative_prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...(t=this.$store.state.kling)==null?void 0:t.config,negative_prompt:e})}}},mounted(){this.value||(this.value=Zt)}}),Wt={class:"field"},Xt={class:"box"},Yt={class:"title font-bold"};function xt(e,t,s,d,g,f){const i=n("info-icon"),u=n("el-input");return l(),p("div",Wt,[a("div",Xt,[a("h2",Yt,c(e.$t("kling.name.negativePrompt")),1),o(i,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),o(u,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=r=>e.prompt=r),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt"),maxlength:200,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var eo=y(Jt,[["render",xt],["__scopeId","data-v-6c3d0de2"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/config/NegativePromptInput.vue"]]);const to=b({name:"PresetPanel",components:{ElButton:B,FontAwesomeIcon:z,PromptInput:Qt,NegativePromptInput:eo,ModelSelector:tt,ModeSelector:lt,DurationSelector:pt,RatioSelector:ht,StartImage:Vt,CfgScaleSelector:jt,EndImage:Rt},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.kling)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),oo={class:"panel"},so={class:"config"},no={class:"actions"};function ao(e,t,s,d,g,f){var I,R;const i=n("prompt-input"),u=n("model-selector"),r=n("mode-selector"),v=n("ratio-selector"),h=n("start-image"),m=n("end-image"),w=n("cfg-scale-selector"),N=n("duration-selector"),C=n("negative-prompt-input"),P=n("font-awesome-icon"),T=n("el-button");return l(),p("div",oo,[a("div",so,[o(i,{class:"mb-4"}),o(u,{class:"mb-4"}),o(r,{class:"mb-4"}),o(v,{class:"mb-4"}),o(h,{class:"mb-2"}),o(m,{class:"mb-2"}),o(w,{class:"mb-4"}),o(N,{class:"mb-4"}),o(C,{class:"mb-4"}),a("div",no,[((I=e.config)==null?void 0:I.video_url)!==void 0||((R=e.config)==null?void 0:R.custom)?(l(),L(T,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:_(()=>[o(P,{icon:"fa-solid fa-magic",class:"mr-2"}),k(" "+c(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),L(T,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:_(()=>[o(P,{icon:"fa-solid fa-magic",class:"mr-2"}),k(" "+c(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))])])])}var lo=y(to,[["render",ao],["__scopeId","data-v-301363b4"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/ConfigPanel.vue"]]);const io=b({name:"VideoPlayer",components:{VuePlyr:Ve},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}}}),ro={controls:"",crossorigin:"",playsinline:""},co=["src"];function po(e,t,s,d,g,f){const i=n("vue-plyr");return l(),p("div",null,[o(i,{options:e.options,class:"video"},{default:_(()=>{var u;return[a("video",ro,[a("source",{size:"1080",src:(u=e.modelValue)==null?void 0:u.video_url,type:"video/mp4"},null,8,co)])]}),_:1},8,["options"])])}var uo=y(io,[["render",po],["__scopeId","data-v-3fd1ea0e"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/VideoPlayer.vue"]]);const mo=b({name:"TaskPreview",components:{ElImage:Me,CopyToClipboard:Be,FontAwesomeIcon:z,ElAlert:Oe,VideoPlayer:uo,ElTooltip:je,ElButton:B},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){var e;return(e=this.$store.state.kling)==null?void 0:e.application},config(){var e;return(e=this.$store.state.kling)==null?void 0:e.config}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onReload(e){const t=e.target,s=new URL(t.src),d=s.searchParams.get("retry");if(!d)s.searchParams.set("retry","1");else if(parseInt(d)<2)s.searchParams.set("retry",(parseInt(d)+1).toString());else return;t.src=s.toString()},onOpenVideo(e){window.open(e,"_blank")}}}),_o={class:"preview"},go={class:"left"},fo={class:"main"},vo={class:"bot"},ho={class:"datetime"},$o={class:"info"},ko={key:0,class:"prompt mt-2"},yo={key:0},bo={key:1},wo={key:0,class:D({content:!0,failed:!0})},Io={class:"image-wrapper"},Vo={key:0,class:D({operations:!0,"mt-2":!0})},So={class:"description"},Eo={key:1,class:D({content:!0})},No={class:"description"},Po={class:"description"},To={key:0,class:"description"},Co={key:2,class:D({content:!0})},Ro={class:"description"},Lo={key:0,class:"description"};function Uo(e,t,s,d,g,f){var N,C,P,T,I,R,W,X,Y,x,ee,te,oe,se,ne,ae,le,ie,re,ce,de,pe,ue,me,_e;const i=n("el-image"),u=n("VideoPlayer"),r=n("el-button"),v=n("el-tooltip"),h=n("font-awesome-icon"),m=n("copy-to-clipboard"),w=n("el-alert");return l(),p("div",_o,[a("div",go,[o(i,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),a("div",fo,[a("div",vo,[k(c(e.$t("kling.name.klingBot"))+" ",1),a("span",ho,c(e.$dayjs.format(""+new Date(parseFloat(((N=e.modelValue)==null?void 0:N.created_at)||"")*1e3))),1)]),a("div",$o,[(P=(C=e.modelValue)==null?void 0:C.request)!=null&&P.prompt?(l(),p("p",ko,[k(c((I=(T=e.modelValue)==null?void 0:T.request)==null?void 0:I.prompt)+" ",1),(R=e.modelValue)!=null&&R.response?$("v-if",!0):(l(),p("span",yo," - ("+c(e.$t("kling.status.pending"))+") ",1)),((X=(W=e.modelValue)==null?void 0:W.response)==null?void 0:X.state)==="submitted"||((x=(Y=e.modelValue)==null?void 0:Y.response)==null?void 0:x.state)==="processing"||((te=(ee=e.modelValue)==null?void 0:ee.response)==null?void 0:te.state)==="pending"||((se=(oe=e.modelValue)==null?void 0:oe.response)==null?void 0:se.state)==="completed"?(l(),p("span",bo," - ("+c(e.$t("kling.status.processing"))+") ",1)):$("v-if",!0)])):$("v-if",!0)]),$(" Display success message "),((ae=(ne=e.modelValue)==null?void 0:ne.response)==null?void 0:ae.success)===!0?(l(),p("div",wo,[a("div",Io,[o(u,{"model-value":(le=e.modelValue)==null?void 0:le.response},null,8,["model-value"])]),(ie=e.modelValue)!=null&&ie.response.success?(l(),p("div",Vo,[o(v,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:_(()=>[o(r,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=S=>{var V;return e.onDownload(S,(V=e.modelValue)==null?void 0:V.response.video_url)})},{default:_(()=>[k(c(e.$t("kling.button.download")),1)]),_:1})]),_:1},8,["content"])])):$("v-if",!0),o(w,{closable:!1,class:"mt-2 success"},{default:_(()=>{var S,V;return[a("p",So,[o(h,{icon:"fa-solid fa-magic",class:"mr-1"}),k(" "+c(e.$t("kling.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),o(m,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):$("v-if",!0),$(" Display error message "),((ce=(re=e.modelValue)==null?void 0:re.response)==null?void 0:ce.success)===!1?(l(),p("div",Eo,[o(w,{closable:!1,class:"failure"},{template:_(()=>[o(h,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),k(" "+c(e.$t("kling.name.failure")),1)]),default:_(()=>{var S,V,G,M,O,j,F,q,ge,fe,ve,he,$e,ke;return[a("p",No,[o(h,{icon:"fa-solid fa-magic",class:"mr-1"}),k(" "+c(e.$t("kling.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),o(m,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])]),a("p",Po,[o(h,{icon:"fa-solid fa-circle-info",class:"mr-1"}),k(" "+c(e.$t("kling.name.failureReason"))+": "+c((O=(M=(G=e.modelValue)==null?void 0:G.response)==null?void 0:M.error)==null?void 0:O.message)+" ",1),o(m,{content:(q=(F=(j=e.modelValue)==null?void 0:j.response)==null?void 0:F.error)==null?void 0:q.message,class:"btn-copy"},null,8,["content"])]),(fe=(ge=e.modelValue)==null?void 0:ge.response)!=null&&fe.trace_id?(l(),p("p",To,[o(h,{icon:"fa-solid fa-hashtag",class:"mr-1"}),k(" "+c(e.$t("kling.name.traceId"))+": "+c((he=(ve=e.modelValue)==null?void 0:ve.response)==null?void 0:he.trace_id)+" ",1),o(m,{content:(ke=($e=e.modelValue)==null?void 0:$e.response)==null?void 0:ke.trace_id,class:"btn-copy"},null,8,["content"])])):$("v-if",!0)]}),_:1})])):$("v-if",!0),$(" Display error message "),!((de=e.modelValue)!=null&&de.response)||((ue=(pe=e.modelValue)==null?void 0:pe.response)==null?void 0:ue.state)==="processing"||((_e=(me=e.modelValue)==null?void 0:me.response)==null?void 0:_e.state)==="pending"?(l(),p("div",Co,[o(w,{closable:!1,class:"info"},{template:_(()=>[o(h,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),k(" "+c(e.$t("kling.name.failure")),1)]),default:_(()=>{var S,V,G,M,O,j,F,q;return[a("p",Ro,[o(h,{icon:"fa-solid fa-magic",class:"mr-1"}),k(" "+c(e.$t("kling.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),o(m,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])]),(M=(G=e.modelValue)==null?void 0:G.response)!=null&&M.trace_id?(l(),p("p",Lo,[o(h,{icon:"fa-solid fa-hashtag",class:"mr-1"}),k(" "+c(e.$t("kling.name.traceId"))+": "+c((j=(O=e.modelValue)==null?void 0:O.response)==null?void 0:j.trace_id)+" ",1),o(m,{content:(q=(F=e.modelValue)==null?void 0:F.response)==null?void 0:q.trace_id,class:"btn-copy"},null,8,["content"])])):$("v-if",!0)]}),_:1})])):$("v-if",!0)])])}var Ao=y(mo,[["render",Uo],["__scopeId","data-v-547724c8"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/task/Preview.vue"]]);const Do=b({name:"RecentPanel",components:{TaskPreview:Ao,ElSkeleton:Fe,ElSkeletonItem:qe},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){var e,t,s,d;return{...(e=this.$store.state.kling)==null?void 0:e.tasks,items:(d=(s=(t=this.$store.state.kling)==null?void 0:t.tasks)==null?void 0:s.items)==null?void 0:d.slice()}}},methods:{onHandleScroll(){const e=this.$refs.panel;console.log("reach-top reach-top reach-top"),e.scrollTop===0&&this.$emit("reach-top")}}}),Go={key:0,class:"tasks"},Mo={class:"left"},Oo={class:"main"},jo={key:1,class:"tasks"},Fo={key:2,class:"description"};function qo(e,t,s,d,g,f){var v,h,m,w,N,C,P,T;const i=n("el-skeleton-item"),u=n("el-skeleton"),r=n("task-preview");return l(),p("div",{ref:"panel",class:"panel recent",onScroll:t[0]||(t[0]=(...I)=>e.onHandleScroll&&e.onHandleScroll(...I))},[((v=e.tasks)==null?void 0:v.items)===void 0?(l(),p("div",Go,[(l(),p(U,null,A(3,I=>a("div",{key:I,class:"task placeholder"},[a("div",Mo,[o(u,{animated:""},{template:_(()=>[o(i,{variant:"image",class:"avatar"})]),_:1})]),a("div",Oo,[o(u,{animated:""},{template:_(()=>[o(i,{variant:"p",class:"title"}),o(i,{variant:"image",class:"icon"})]),_:1})])])),64))])):((m=(h=e.tasks)==null?void 0:h.items)==null?void 0:m.length)&&((N=(w=e.tasks)==null?void 0:w.items)==null?void 0:N.length)>0?(l(),p("div",jo,[$(" {{ tasks?.items }} "),(l(!0),p(U,null,A((C=e.tasks)==null?void 0:C.items,(I,R)=>(l(),L(r,{key:R,"model-value":I,class:"preview"},null,8,["model-value"]))),128))])):$("v-if",!0),((T=(P=e.tasks)==null?void 0:P.items)==null?void 0:T.length)===0?(l(),p("p",Fo,c(e.$t("kling.message.noTasks")),1)):$("v-if",!0)],544)}var zo=y(Do,[["render",qo],["__scopeId","data-v-abb7e68a"],["__file","/home/runner/work/Nexior/Nexior/src/components/kling/RecentPanel.vue"]]);const Bo="https://webhook.acedata.cloud/kling",Ko=b({name:"KlingIndex",components:{ConfigPanel:lo,Layout:We,RecentPanel:zo},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.kling)==null?void 0:e.status)==null?void 0:t.getApplications)===H.Request},service(){return this.$store.state.kling.service},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},initializing(){return this.$store.state.kling.status.getApplications===H.Request},needApply(){return this.$store.state.kling.status.getApplications===H.Success&&!this.application},application(){return this.$store.state.kling.application},applications(){return this.$store.state.kling.applications},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){var s,d;((s=e==null?void 0:e.items)==null?void 0:s.length)>((d=t==null?void 0:t.items)==null?void 0:d.length)&&console.debug("new tasks detected")},deep:!0}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job),clearInterval(this.timer)},methods:{async onReachTop(){var e,t,s;console.debug("reached top"),await this.onGetTasks({createdAtMax:(s=(t=(e=this.tasks)==null?void 0:e.items)==null?void 0:t[0])==null?void 0:s.created_at})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("kling/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("kling/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){Ce.create({application:this.application}).then(({data:e})=>{this.application=e,E.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,s;((s=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:s.code)===Re&&E.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(e){if(this.loading){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:s,createdAtMax:d}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",d),await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:d})},async onGenerate(){var s;const e={...this.config,callback_url:Bo},t=(s=this.credential)==null?void 0:s.token;if(!t){console.error("no token specified");return}E.info(this.$t("kling.message.startingTask")),Le.generate(e,{token:t}).then(()=>{E.success(this.$t("kling.message.startTaskSuccess")),this.$store.commit("kling/setConfig",{config:void 0})}).catch(d=>{var f,i;const g=(f=d==null?void 0:d.response)==null?void 0:f.data;((i=g==null?void 0:g.error)==null?void 0:i.code)===Ue?E.error(this.$t("kling.message.usedUp")):E.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}});function Ho(e,t,s,d,g,f){const i=n("config-panel"),u=n("recent-panel"),r=n("layout");return l(),L(r,null,{config:_(()=>[o(i,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:_(()=>[o(u,{class:"panel recent",onReachTop:e.onReachTop},null,8,["onReachTop"])]),_:1})}var ns=y(Ko,[["render",Ho],["__scopeId","data-v-e48d89a0"],["__file","/home/runner/work/Nexior/Nexior/src/pages/kling/Index.vue"]]);export{ns as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.cdfefb59.js";import{N as c}from"./Navigator.3204ea1d.js";import{A as m}from"./Status.ce9bc4cb.js";import{_ as u,K as i}from"./index.97386539.js";import{H as d,al as a,e as h,V as s,L as v,R as $,o as n}from"./vendor-@vue.6c0309d3.js";import"./vendor-element-plus.1fa87efb.js";import"./vendor-markdown.cf3e96ae.js";import"./vendor-fortawesome.2b54ad1b.js";import"./EditArray.fc90290f.js";import"./CopyToClipboard.dcbf7182.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.6ab44f81.js";const N=d({name:"LayoutMain",components:{Navigator:c,ApplicationStatus:m},data(){return{mobile:window.innerWidth<768}},computed:{appName(){return this.$route.meta.appName},initializing(){var t;return((t=this.$store.state[this.appName])==null?void 0:t.status.getApplications)===i.Request},needApply(){return this.$store.state[this.appName].status.getApplications===i.Success&&!this.application},application(){return this.$store.state[this.appName].application},applications(){return this.$store.state[this.appName].applications},loading(){var t,e;return((e=(t=this.$store.state[this.appName])==null?void 0:t.status)==null?void 0:e.getApplications)===i.Request},service(){var t;return(t=this.$store.state[this.appName])==null?void 0:t.service}},mounted(){window.addEventListener("resize",()=>{this.mobile=window.innerWidth<768})}}),_={class:"wrapper"};function f(t,e,g,w,y,A){const p=a("router-view"),r=a("navigator"),l=a("application-status");return n(),h("div",_,[s(p,{class:"main"}),s(r,{class:"navigator",direction:t.mobile?"row":"column"},null,8,["direction"]),t.application?(n(),v(l,{key:0,class:"fixed right-2 top-2",application:t.application,applications:t.applications,initializing:t.initializing,"show-price":!1,authenticated:!!t.$store.state.token.access,service:t.service,"need-apply":t.needApply,onSelect:e[0]||(e[0]=o=>t.$store.dispatch(`${t.appName}/setApplication`,o)),onRefresh:e[1]||(e[1]=o=>t.$store.dispatch(`${t.appName}/getApplications`))},null,8,["application","applications","initializing","authenticated","service","need-apply"])):$("v-if",!0)])}var W=u(N,[["render",f],["__scopeId","data-v-63155678"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Main.vue"]]);export{W as default};
@@ -1 +0,0 @@
1
- import{ab as Ie,ah as Te}from"./vendor-others.cdfefb59.js";import{_ as N,g as Ne,S as Ve,s as Fe,d as M,e as Ge,f as Me,h as fe,j as He,k as ve,l as Xe,m as ge,n as Je,o as $e,p as be,q as we,r as Be,t as ke,u as Ke,v as ye,w as Qe,x as Se,y as Ye,z as Ee,c as qe}from"./index.97386539.js";import{H as O,o as c,e as g,al as o,L as T,M as n,V as t,S as b,T as d,f as l,ai as H,U as V,O as K,W as Q,R as L,P as Oe}from"./vendor-@vue.6c0309d3.js";import{ar as Ce,as as ze,at as Pe,au as je,av as Ze,ac as We}from"./vendor-fortawesome.2b54ad1b.js";import{f as Ue,h as Y,i as q,j as z,k as Ae,l as Le,m as P,n as X,o as J,p as xe,E as et,q as tt,r as ot,s as st}from"./vendor-element-plus.1fa87efb.js";import{E as B,a as Re,b as De}from"./EditArray.fc90290f.js";const it=O({emits:["click"],computed:{dark(){return Ie("THEME")==="dark"},url(){var e;return(e=this.$store.state.site)==null?void 0:e.favicon}}}),nt=["src"];function at(e,s,m,u,$,k){return c(),g("img",{src:e.url,class:"logo tiny",onClick:s[0]||(s[0]=a=>e.$emit("click"))},null,8,nt)}var lt=N(it,[["render",at],["__file","/home/runner/work/Nexior/Nexior/src/components/common/LogoTiny.vue"]]),rt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAMFBMVEX///+3t7f4+Pi8vLzAwMDExMTS0tLIyMjk5OTz8/PY2NjOzs7u7u7d3d3p6enh4eFVKkJDAAAIfUlEQVR4nNVd15akOAylyRRQ9f9/O02BZJtgBQszfR/2zPahsJCvguVUFJYop35ux66pq6r6+fn9T910bTv3U2najBXK9zw2PxE07fz+n0Qf+raOyetL3g9PS7vgzRUYULfvZyXuR5nAgLF/SuK3UuJN7gf0PbyErDiieuU1zKmLyFJ3Y9u+vmh//V9dXT/b5VN3f+HbFq82nGivHH6999Vv8rC7P+NFzfBlF56xvl/sEy1Xbc8mZ9m3R7bcrO0jl+vXJH7J0YY78UvYKNuDjpWNTQd9tzd5ks9ePUm92u877WMlp4dhR+Y2OYkYdh3XmKclc9iATVwoXyFLZouXIobuBpEXlK+QcYbK7gOF2NpMaN2Vmfdr71LGirAbW5N3lr4F1rckC0GQbQw6cqrM1XACvzOr5EjT+2q+L24Vk6/sRGL7no6t5un9eQE+7JG4r+wk3+e9iGfXwzyeZHLjzDGFt0fEBB564ymOeRwzCg8dHaZ9kx8NZGZ8+UyOv0bSW3o9q5Tac5+0luajjGfqpsT2krIuTeaKZGQf4UUIKpx6xFbo2nGD9HSlpJZAGfSQILVjV02Z4CQsJhD2UdbcJ/dwyRfpNvozwaLo4q/0nMhLIrMThJSZZ4EhiJd6Ugti43SvzCTlPKnZmUNZMV+u4cYKwp85XlfcTBi/s6Z+MZ2LxADhGZzUDU9m5zjIr0woQhLxasAHWS7E9TgZU/Z1EBEIjbzxQYYxOudOxu73qTBcUGEaIzqD1hi96W6JTgzRoDSI/UhmITP7yUPFSYqaagD1R4wJkP8VnT8nTwVQqnauN06QjvtCvYt2IL3Zm/Uk9jjDz0RmMLggwx3SOuIUSniGpJv3bAJo1SAFr9mKH8aI+LqkI0RFtoIh9/L76Cc8GLCDoxxSjyAHgxxFYSEzJ18Ggly4YHQHnCQ2LRoCGINXQirim0JYUJpDatf/p24PP4mVwSblSg6MEhDGuzNVg6J5o8nEvAPAGZiAfk5MDRXNqxcmx/AVHPMprx8G1TEHwOzqTByseTgoDRxYDT6akSh9YSMzr6aLidOeTGCj3EqDkdC8GU9Q9c6voYlyJzxy0sOxOnRs8C3sQpSR92DOO4EDCXkAzoA935bPTy8AIgTBCIIyvyZsExF/uM2Byfk9A7VafuksfdyygFmJcc35NZ7tT5xUYMNwJYcI/FouGP7xOyT1YBOh+aVcsCHHBWCHZHLTxOfxF6ZA8HP82P7ASv4BJj5PMNMO/g3+H9ghqrtnGm4hIJLAd7byVxg5asGCA+AH2N2meYHvKPxZmQRIGtyMaOMweC/ZXJJJdJE0CF27Bm0oK8kWLKSWHxeILB8s7xN8gmxFi0VIFAkNqd5KiI3S7JBqJ7Ssycb70vAL2LAofMiE9hkBrQvX4OTXNLS4eGpwA8KlaxaGKHOy4OWWcSVoXSZz9ohYYLaxpB8bv4V2aFGeFiYOvqTb74V2mHkQ8IXjBKhMuKrMJIoLOQlmVGIiIlyPmXdguwJ6d8J/CZ1H0m4iB1Gr4D569HjCZalPaNoxeWtd5jKf4TRkpy30syh3KbLXPVZsWdIIQUK6dO8Jl+dkbUB6GfRranwIWx3hUzeVi5fRmggtDA6b/dWO3ELkLiF4QldqoXOPxhe8QOjt57LUpXhguGUhtEUFUtq9EBzUQluQWrphIV1oA1JLm0R6VFqh0z21eH30XmjFdofbF14dgC5PG1zS0w9pjuYFF2UYL9KHiXJGYhhXJkwLEk1RvrEMZVWmpgvSVC1XtEtNlYOAL1JYrdESOg3lcGtFQsVGs+Nu++msHdiu0BNEQQ5vYKssIWxQx3JNc1AqnbTFmg3qSoKmYz0mb//S7QDU1k5Vdu+VSnUFyA3aBES1ca9zkqb4PPVQUUVG74OVRfUNSqencXh+UR1sUnfqgy6+qLrVn75QThRt0I26VG0FU4dbRNfE1ULpqVVBIZBTN/kJ0PBDxY6QEbpp5v27JFCxI5xm1k3oIxT+Q+Wowgl93dIJhHzqVrW5erd0QrdIxUE8wFXxcL9IBXSlSRcLuSnq3NR+OZBq4ZWD1FXr8sn9wivVEjcPwtVuKtd6XOKmWUzoQeY/dCczHBcTKpZtnr2QB104gN70ukm+QNaHzBJV7DhbIAt/040ERMMXnbUDAwOtgvZVsUo0KaCi9Omib/SCqleKhE7KSsNIIt7IkFXoi40MSBrNO28X+ooHOKxWqPpuoVHRh7FDo3+pyHsorOZyG5R0w5kPUZmJffYFIrLhTLi1DzFJT0X+aWaZ3JGtfcJNlCvesTOuIpAcLBrdRIms5g4s+jFlM0PFPYY6ul1VtDG4PJzwqQHnGGpKKlA1fVKN0VqxX31Tx1DjOTBXaRFvs3vaWdkniPIEF3hdGgEmxpev0VpeHNf8ZuiROMBhet0hMch9qkogR2wXbeSojHI22jd5ifp1cLbY9dHB8NWhJCbOgkYzBxpFzxH3wu74F++ro8ckWsM7a5l7/IuzVnAxJX1MojGQ3shHslKCPPimY+b+jYfmU0qONPIOj5rzK9lDi33OyQttVpEaglXXMFoabQVmqny3QxaBW4opM3o4CtwDJazWGZtAUMi12ONkAtGMrNGS/1QI5yb+CxciLmc8EwoDKEokefK6CBKPRf47Mj/MEIujvv+MzA/6kKQLCR7y18q5Y8AjiWryrR1T9uwp/RqJ3YUdGWBxYUeR2RzN7gThn6ifCrtLaA7X/dwG4xtusvg+24uVihzKtr/Cqrh7OFPdcVlYcXItmyHS7x67ROwyxxTceAHegqsLHVOQ4WLH00sdE5DhUsev2IbaznR95gKrCnDGi0oXDOmTRrmvhP3i712+u+LvXXO84u9dKL2Cf3V33X7+i6u7N/y5S9IdvOvoF0G/19GP9tfR/wPQ21eEI8clLwAAAABJRU5ErkJggg==";const dt=O({name:"UserAvatar",data(){return{defaultAvatar:rt}},computed:{user(){var e;return(e=this.$store.getters)==null?void 0:e.user}}}),ct=["src"];function mt(e,s,m,u,$,k){var a;return c(),g("img",{src:((a=e.user)==null?void 0:a.avatar)||e.defaultAvatar,class:"avatar"},null,8,ct)}var ut=N(dt,[["render",mt],["__scopeId","data-v-1dac1046"],["__file","/home/runner/work/Nexior/Nexior/src/components/user/Avatar.vue"]]);const pt=O({name:"ThemeSelector",components:{ArrowDown:Ue,ElDropdown:Y,ElDropdownMenu:q,ElDropdownItem:z,ElIcon:Ae},data(){return{theme:"light"}},computed:{currentLabel(){return this.theme==="dark"?this.$t("common.theme.dark"):this.$t("common.theme.light")}},mounted(){this.theme=this.loadFromCookie(),this.applyTheme()},methods:{onSelect(e){this.theme=e,this.applyTheme()},applyTheme(){Te("THEME",this.theme,{path:"/",domain:Ne()}),this.theme==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},loadFromCookie(){return Ie("THEME")==="dark"?"dark":"light"}}}),_t={class:"el-dropdown-link"};function ht(e,s,m,u,$,k){const a=o("arrow-down"),p=o("el-icon"),h=o("el-dropdown-item"),_=o("el-dropdown-menu"),r=o("el-dropdown");return c(),T(r,{trigger:"click",onCommand:e.onSelect},{dropdown:n(()=>[t(_,null,{default:n(()=>[t(h,{command:"light"},{default:n(()=>[b(d(e.$t("common.theme.light")),1)]),_:1}),t(h,{command:"dark"},{default:n(()=>[b(d(e.$t("common.theme.dark")),1)]),_:1})]),_:1})]),default:n(()=>[l("span",_t,[b(d(e.currentLabel)+" ",1),t(p,{class:"el-icon--right"},{default:n(()=>[t(a)]),_:1})])]),_:1},8,["onCommand"])}var ft=N(pt,[["render",ht],["__file","/home/runner/work/Nexior/Nexior/src/components/user/Theme.vue"]]);const vt=O({name:"LocaleSelector",components:{ElDropdown:Y,ElDropdownMenu:q,ElDropdownItem:z,ElIcon:Ae,ArrowDown:Ue},data(){return{locales:Ve}},computed:{value(){return this.$i18n.locale},currentLabel(){const e=this.locales.find(s=>s.value===this.value);return e?e.label:this.value}},methods:{async onSelectLocale(e){this.$router.push({query:{...this.$route.query,locale:void 0}}),await Fe(e),Te("LOCALE",e,{path:"/",domain:Ne()})}}}),gt={class:"el-dropdown-link"};function $t(e,s,m,u,$,k){const a=o("arrow-down"),p=o("el-icon"),h=o("el-dropdown-item"),_=o("el-dropdown-menu"),r=o("el-dropdown");return c(),T(r,{trigger:"click",onCommand:e.onSelectLocale},{dropdown:n(()=>[t(_,null,{default:n(()=>[(c(!0),g(V,null,H(e.locales,(f,i)=>(c(),T(h,{key:i,command:f.value},{default:n(()=>[b(d(f.label),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:n(()=>[l("span",gt,[b(d(e.currentLabel)+" ",1),t(p,{class:"el-icon--right"},{default:n(()=>[t(a)]),_:1})])]),_:1},8,["onCommand"])}var bt=N(vt,[["render",$t],["__file","/home/runner/work/Nexior/Nexior/src/components/user/Locale.vue"]]);const wt=O({name:"GeneralSettings",components:{ThemeSwitcher:ft,LocaleSwitcher:bt}}),kt={class:"flex justify-between items-center mb-4"},yt={class:"block mb-2 text-sm"},St={class:"flex justify-between items-center mb-4"},Et={class:"block mb-2 text-sm"};function It(e,s,m,u,$,k){const a=o("theme-switcher"),p=o("locale-switcher");return c(),g(V,null,[l("div",kt,[l("label",yt,d(e.$t("common.settings.theme")),1),t(a)]),l("div",St,[l("label",Et,d(e.$t("common.settings.language")),1),t(p)])],64)}var Tt=N(wt,[["render",It],["__file","/home/runner/work/Nexior/Nexior/src/components/setting/General.vue"]]);const Nt=O({name:"SiteIndex",components:{EditText:B,EditImage:Re,EditArray:De,ElDivider:Le,ElImage:P,ElForm:X,ElFormItem:J},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var m;const s={...this.site,...e};M.update((m=this.site)==null?void 0:m.id,s).then(()=>{var u;console.debug("getSite for id",(u=this.site)==null?void 0:u.id),this.$store.dispatch("getSite")})}}}),Ot={class:"block w-full"},Ct={class:"block tip"},Ut={class:"block w-full"},At={class:"block tip"},Lt={class:"block w-full"},Rt={class:"block tip"},Dt={class:"block w-full"},Vt={class:"block tip"},Ft={class:"block w-full"},Gt={class:"block tip"};function Mt(e,s,m,u,$,k){const a=o("el-form-item"),p=o("edit-text"),h=o("el-image"),_=o("edit-image"),r=o("el-divider"),f=o("edit-array"),i=o("el-form");return c(),T(i,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:n(()=>[t(a,{label:e.$t("site.field.origin")},{default:n(()=>[l("span",Ot,d(e.site.origin),1),l("span",Ct,d(e.$t("site.message.originTip")),1)]),_:1},8,["label"]),t(a,{label:e.$t("site.field.title")},{default:n(()=>[l("span",Ut,[b(d(e.site.title)+" ",1),t(p,{"model-value":e.site.title,title:e.$t("site.title.editTitle"),placeholder:e.$t("site.placeholder.title"),onConfirm:s[0]||(s[0]=v=>e.onSave({title:v}))},null,8,["model-value","title","placeholder"])]),l("span",At,d(e.$t("site.message.titleTip")),1)]),_:1},8,["label"]),t(a,{label:e.$t("site.field.logo")},{default:n(()=>[l("span",Lt,[t(h,{src:e.site.logo,class:"logo"},null,8,["src"]),t(_,{"model-value":e.site.logo,title:e.$t("site.title.editLogo"),tip:e.$t("site.message.editLogoTip"),onConfirm:s[1]||(s[1]=v=>e.onSave({logo:v}))},null,8,["model-value","title","tip"])]),l("span",Rt,d(e.$t("site.message.logoTip")),1)]),_:1},8,["label"]),t(a,{label:e.$t("site.field.favicon")},{default:n(()=>[l("span",Dt,[t(h,{src:e.site.favicon,class:"favicon"},null,8,["src"]),t(_,{"model-value":e.site.favicon,title:e.$t("site.title.editFavicon"),tip:e.$t("site.message.editFaviconTip"),onConfirm:s[2]||(s[2]=v=>e.onSave({favicon:v}))},null,8,["model-value","title","tip"])]),l("span",Vt,d(e.$t("site.message.faviconTip")),1)]),_:1},8,["label"]),t(r,{"border-style":"dashed"}),t(a,{label:e.$t("site.field.admins")},{default:n(()=>{var v,C;return[l("span",Ft,[b(d((v=e.site.admins)==null?void 0:v.join(", "))+" ",1),t(f,{"model-value":((C=e.site)==null?void 0:C.admins)||[],title:e.$t("site.title.editAdmins"),placeholder:e.$t("site.placeholder.admins"),tip:e.$t("site.message.adminsTip2"),min:1,"min-error-message":e.$t("site.message.atLeastOneAdmin"),onConfirm:s[3]||(s[3]=E=>e.onSave({admins:E}))},null,8,["model-value","title","placeholder","tip","min-error-message"])]),l("span",Gt,d(e.$t("site.message.adminsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])}var Ht=N(Nt,[["render",Mt],["__scopeId","data-v-e38df654"],["__file","/home/runner/work/Nexior/Nexior/src/components/setting/Site.vue"]]);const Xt=O({name:"SettingSeo",components:{EditText:B,EditArray:De,ElForm:X,ElFormItem:J},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var m;const s={...this.site,...e};M.update((m=this.site)==null?void 0:m.id,s).then(()=>{var u;console.debug("getSite for id",(u=this.site)==null?void 0:u.id),this.$store.dispatch("getSite")})}}}),Jt={class:"block w-full"},Bt={class:"block tip"},Kt={class:"block w-full"},Qt={class:"block tip"};function Yt(e,s,m,u,$,k){const a=o("edit-text"),p=o("el-form-item"),h=o("edit-array"),_=o("el-form");return c(),T(_,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:n(()=>[t(p,{label:e.$t("site.field.description")},{default:n(()=>[l("span",Jt,[b(d(e.site.description)+" ",1),t(a,{"model-value":e.site.description,title:e.$t("site.title.editDescription"),placeholder:e.$t("site.placeholder.description"),onConfirm:s[0]||(s[0]=r=>e.onSave({description:r}))},null,8,["model-value","title","placeholder"])]),l("span",Bt,d(e.$t("site.message.descriptionTip")),1)]),_:1},8,["label"]),t(p,{label:e.$t("site.field.keywords")},{default:n(()=>{var r,f;return[l("span",Kt,[b(d((r=e.site.keywords)==null?void 0:r.join(", "))+" ",1),t(h,{"model-value":((f=e.site)==null?void 0:f.keywords)||[],title:e.$t("site.title.editKeywords"),placeholder:e.$t("site.placeholder.keywords"),tip:e.$t("site.message.keywordsTip2"),onConfirm:s[1]||(s[1]=i=>e.onSave({keywords:i}))},null,8,["model-value","title","placeholder","tip"])]),l("span",Qt,d(e.$t("site.message.keywordsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])}var qt=N(Xt,[["render",Yt],["__scopeId","data-v-57cb41c4"],["__file","/home/runner/work/Nexior/Nexior/src/components/setting/Seo.vue"]]);const zt=O({name:"SiteIndex",components:{EditText:B,ElForm:X,ElFormItem:J},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var m;const s={...this.site,...e};M.update((m=this.site)==null?void 0:m.id,s).then(()=>{var u;console.debug("getSite for id",(u=this.site)==null?void 0:u.id),this.$store.dispatch("getSite")})}}}),Pt={class:"block tip"},jt={class:"block tip"};function Zt(e,s,m,u,$,k){const a=o("edit-text"),p=o("el-form-item"),h=o("el-form");return c(),T(h,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:n(()=>[t(p,{label:e.$t("site.field.distributionDefaultInviterId")},{default:n(()=>{var _,r;return[b(d((_=e.site.distribution)==null?void 0:_.default_inviter_id)+" ",1),t(a,{"model-value":(r=e.site.distribution)==null?void 0:r.default_inviter_id,title:e.$t("site.title.editDistributionDefaultInviterId"),placeholder:e.$t("site.placeholder.editDistributionDefaultInviterId"),onConfirm:s[0]||(s[0]=f=>e.onSave({distribution:{...e.site.distribution,default_inviter_id:f}}))},null,8,["model-value","title","placeholder"]),l("span",Pt,d(e.$t("site.message.distributionDefaultInviterIdTip")),1)]}),_:1},8,["label"]),t(p,{label:e.$t("site.field.distributionForceInviterId")},{default:n(()=>{var _,r;return[b(d((_=e.site.distribution)==null?void 0:_.force_inviter_id)+" ",1),t(a,{"model-value":(r=e.site.distribution)==null?void 0:r.force_inviter_id,title:e.$t("site.title.editDistributionForceInviterId"),placeholder:e.$t("site.placeholder.editDistributionForceInviterId"),onConfirm:s[1]||(s[1]=f=>e.onSave({distribution:{...e.site.distribution,force_inviter_id:f}}))},null,8,["model-value","title","placeholder"]),l("span",jt,d(e.$t("site.message.distributionForceInviterIdTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])}var Wt=N(zt,[["render",Zt],["__scopeId","data-v-4ed92693"],["__file","/home/runner/work/Nexior/Nexior/src/components/setting/Distribution.vue"]]);const xt=O({name:"SiteIndex",components:{EditText:B,EditImage:Re,ElImage:P,ElForm:X,ElSwitch:xe,ElFormItem:J},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var m;const s={...this.site,...e};M.update((m=this.site)==null?void 0:m.id,s).then(()=>{var u;console.debug("getSite for id",(u=this.site)==null?void 0:u.id),this.$store.dispatch("getSite")})}}}),eo={class:"w-full"},to={class:"block tip w-full"},oo={key:0},so={class:"block w-full"},io={class:"block w-full"};function no(e,s,m,u,$,k){const a=o("el-switch"),p=o("el-form-item"),h=o("el-image"),_=o("edit-image"),r=o("edit-text"),f=o("el-form");return c(),T(f,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:n(()=>[(c(),g(V,null,H(["chatgpt","grok","deepseek","midjourney","qrart","suno","luma","pika","kling","flux","hailuo","headshots"],(i,v)=>t(p,{key:v,label:e.$t("site.field.features"+i.charAt(0).toUpperCase()+i.slice(1))},{default:n(()=>{var C,E,A,R,F,G;return[l("div",eo,[t(a,{"model-value":((C=e.site.features[i])==null?void 0:C.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":w=>e.onSave({features:{...e.site.features,[i]:{...e.site.features[i],enabled:w}}})},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]),l("span",to,d(e.$t("site.message.features"+i.charAt(0).toUpperCase()+i.slice(1))),1),i==="support"?K((c(),g("div",oo,[t(p,{label:"WeChat"},{default:n(()=>{var w,y;return[t(a,{"model-value":((y=(w=e.site.features[i])==null?void 0:w.wechat)==null?void 0:y.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":I=>{var S;return e.onSave({features:{...e.site.features,[i]:{...e.site.features[i],wechat:{...(S=e.site.features[i])==null?void 0:S.wechat,enabled:I}}}})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),K(t(p,{label:e.$t("site.field.qr")},{default:n(()=>{var w,y,I,S;return[l("span",so,[t(h,{src:(y=(w=e.site.features[i])==null?void 0:w.wechat)==null?void 0:y.qr},null,8,["src"]),t(_,{"model-value":(S=(I=e.site.features[i])==null?void 0:I.wechat)==null?void 0:S.qr,title:e.$t("site.title.editQR"),tip:e.$t("site.message.editQRTip"),onConfirm:D=>{var U;return e.onSave({features:{...e.site.features,[i]:{...e.site.features[i],wechat:{...(U=e.site.features[i])==null?void 0:U.wechat,qr:D}}}})}},null,8,["model-value","title","tip","onConfirm"])])]}),_:2},1032,["label"]),[[Q,(A=(E=e.site.features[i])==null?void 0:E.wechat)==null?void 0:A.enabled]]),t(p,{label:"Discord"},{default:n(()=>{var w,y;return[t(a,{"model-value":((y=(w=e.site.features[i])==null?void 0:w.discord)==null?void 0:y.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":I=>{var S;return e.onSave({features:{...e.site.features,[i]:{...e.site.features[i],discord:{...(S=e.site.features[i])==null?void 0:S.discord,enabled:I}}}})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),K(t(p,{label:e.$t("site.field.url")},{default:n(()=>{var w,y,I,S;return[l("span",io,[b(d((y=(w=e.site.features[i])==null?void 0:w.discord)==null?void 0:y.url)+" ",1),t(r,{"model-value":(S=(I=e.site.features[i])==null?void 0:I.discord)==null?void 0:S.url,title:e.$t("site.title.editUrl"),placeholder:e.$t("site.placeholder.editUrl"),onConfirm:D=>{var U;return e.onSave({features:{...e.site.features,[i]:{...e.site.features[i],discord:{...(U=e.site.features[i])==null?void 0:U.discord,url:D}}}})}},null,8,["model-value","title","placeholder","onConfirm"])])]}),_:2},1032,["label"]),[[Q,(F=(R=e.site.features[i])==null?void 0:R.discord)==null?void 0:F.enabled]])],512)),[[Q,(G=e.site.features[i])==null?void 0:G.enabled]]):L("v-if",!0)]}),_:2},1032,["label"])),64))]),_:1},8,["model"])}var ao=N(xt,[["render",no],["__scopeId","data-v-7089d567"],["__file","/home/runner/work/Nexior/Nexior/src/components/setting/Function.vue"]]);const lo=O({name:"UserSetting",components:{ElDialog:et,ElMenu:tt,ElMenuItem:ot,FontAwesomeIcon:Ce,GeneralSetting:Tt,SiteSetting:Ht,SeoSetting:qt,DistributionSetting:Wt,FunctionSetting:ao},props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],data(){return{activeTab:"general",showSuggestions:!0,navItems:[{key:"general",label:this.$t("common.settings.general"),icon:ze},{key:"site",label:this.$t("common.settings.site"),icon:Pe},{key:"seo",label:this.$t("common.settings.seo"),icon:je},{key:"distribution",label:this.$t("common.settings.distribution"),icon:Ze},{key:"function",label:this.$t("common.settings.function"),icon:We}]}},computed:{currentTabTitle(){const e=this.navItems.find(s=>s.key===this.activeTab);return e?e.label:""},isSiteAdmin(){var e,s,m,u,$;return!!(($=(m=(s=(e=this.$store)==null?void 0:e.state)==null?void 0:s.site)==null?void 0:m.admins)!=null&&$.includes((u=this.$store.getters.user)==null?void 0:u.id))}},methods:{onClose(){this.$emit("update:visible",!1)}}}),ro={class:"flex settings"},co={class:"w-40 h-full border-r"},mo={class:"flex-1 p-6 overflow-y-auto"},uo={key:0},po={key:1},_o={key:2},ho={key:3},fo={key:4};function vo(e,s,m,u,$,k){const a=o("font-awesome-icon"),p=o("el-menu-item"),h=o("el-menu"),_=o("general-setting"),r=o("site-setting"),f=o("seo-setting"),i=o("distribution-setting"),v=o("function-setting"),C=o("el-dialog");return c(),T(C,{"model-value":e.visible,onClose:e.onClose},{default:n(()=>[l("div",ro,[l("aside",co,[t(h,{class:"border-r-0"},{default:n(()=>[(c(!0),g(V,null,H(e.navItems,(E,A)=>(c(),T(p,{key:A,index:E.key,class:Oe(["flex items-center px-2 cursor-pointer py-2",e.activeTab===E.key?"active":""]),onClick:R=>e.activeTab=E.key},{default:n(()=>[t(a,{icon:E.icon,class:"mr-2"},null,8,["icon"]),b(" "+d(E.label),1)]),_:2},1032,["index","class","onClick"]))),128))]),_:1})]),l("main",mo,[e.activeTab==="general"?(c(),g("div",uo,[t(_)])):e.activeTab==="site"&&e.isSiteAdmin?(c(),g("div",po,[t(r)])):e.activeTab==="seo"&&e.isSiteAdmin?(c(),g("div",_o,[t(f)])):e.activeTab==="distribution"&&e.isSiteAdmin?(c(),g("div",ho,[t(i)])):e.activeTab==="function"&&e.isSiteAdmin?(c(),g("div",fo,[t(v)])):L("v-if",!0)])])]),_:1},8,["model-value","onClose"])}var go=N(lo,[["render",vo],["__scopeId","data-v-17be4dfc"],["__file","/home/runner/work/Nexior/Nexior/src/components/user/Setting.vue"]]);const $o=O({name:"UserCenter",components:{UserAvatar:ut,UserSetting:go,FontAwesomeIcon:Ce,ElDivider:Le,ElDropdownMenu:q,ElDropdownItem:z,ElDropdown:Y},data(){return{showMenu:!1,showSetting:!1}},computed:{user(){var e;return(e=this.$store.getters)==null?void 0:e.user}},mounted(){document.addEventListener("click",this.closeMenu)},unmounted(){document.removeEventListener("click",this.closeMenu)},methods:{toggleMenu(){this.showMenu=!this.showMenu},closeMenu(e){const s=e.target;this.$el.contains(s)||(this.showMenu=!1)},async onLogout(){await this.$store.dispatch("logout")},onConsole(){this.$router.push({name:Ge})},onDistribution(){this.$router.push({name:Me})},onSettings(){this.showSetting=!0}}}),bo={class:"center"},wo={key:0,class:"px-4 py-4 text-sm font-medium"};function ko(e,s,m,u,$,k){const a=o("user-avatar"),p=o("el-divider"),h=o("font-awesome-icon"),_=o("el-dropdown-item"),r=o("el-dropdown-menu"),f=o("el-dropdown"),i=o("user-setting");return c(),g(V,null,[l("div",bo,[t(f,{trigger:"click"},{dropdown:n(()=>{var v;return[e.user.email?(c(),g("div",wo,d((v=e.user)==null?void 0:v.email),1)):L("v-if",!0),e.user.email?(c(),T(p,{key:1,class:"mb-1 mt-1"})):L("v-if",!0),t(r,null,{default:n(()=>[t(_,{class:"py-2",onClick:e.onSettings},{default:n(()=>[t(h,{icon:"fa-solid fa-cog",class:"mr-1"}),b(" "+d(e.$t("common.nav.setting")),1)]),_:1},8,["onClick"]),t(_,{class:"py-2",onClick:e.onDistribution},{default:n(()=>[t(h,{icon:"fa-solid fa-coins",class:"mr-1"}),b(" "+d(e.$t("common.nav.distribution")),1)]),_:1},8,["onClick"]),t(_,{class:"py-2",onClick:e.onConsole},{default:n(()=>[t(h,{icon:"fa-solid fa-compass",class:"mr-1"}),b(" "+d(e.$t("common.nav.console")),1)]),_:1},8,["onClick"]),t(_,{class:"py-2",onClick:e.onLogout},{default:n(()=>[t(h,{icon:"fa-solid fa-arrow-right-from-bracket",class:"mr-1"}),b(" "+d(e.$t("common.nav.logOut")),1)]),_:1},8,["onClick"])]),_:1})]}),default:n(()=>[t(a,{class:"cursor-pointer"})]),_:1})]),t(i,{visible:e.showSetting,"onUpdate:visible":s[0]||(s[0]=v=>e.showSetting=v)},null,8,["visible"])],64)}var yo=N($o,[["render",ko],["__file","/home/runner/work/Nexior/Nexior/src/components/user/Center.vue"]]);const So=O({name:"Navigator",components:{ElImage:P,LogoTiny:lt,ElTooltip:st,UserCenter:yo},props:{direction:{type:String,default:"column"}},data(){return{operating:{dark:!1,locale:!1},activeIndex:this.$route.name}},computed:{links(){var s,m,u,$,k,a,p,h,_,r,f,i,v,C,E,A,R,F,G,w,y,I,S,D,U,j,Z,W,x,ee,te,oe,se,ie,ne,ae,le,re,de,ce,me,ue,pe,_e,he;const e=[];return(k=($=(u=(m=(s=this.$store)==null?void 0:s.state)==null?void 0:m.site)==null?void 0:u.features)==null?void 0:$.chatgpt)!=null&&k.enabled&&e.push({route:{name:fe},displayName:this.$t("common.nav.chatgpt"),logo:"https://cdn.acedata.cloud/7dljuv.png",routes:[He,fe]}),(r=(_=(h=(p=(a=this.$store)==null?void 0:a.state)==null?void 0:p.site)==null?void 0:h.features)==null?void 0:_.deepseek)!=null&&r.enabled&&e.push({route:{name:ve},displayName:this.$t("common.nav.deepseek"),logo:"https://cdn.acedata.cloud/4rb23t.jpg",routes:[Xe,ve]}),(E=(C=(v=(i=(f=this.$store)==null?void 0:f.state)==null?void 0:i.site)==null?void 0:v.features)==null?void 0:C.grok)!=null&&E.enabled&&e.push({route:{name:ge},displayName:this.$t("common.nav.grok"),logo:"https://cdn.acedata.cloud/p1ge98.png",routes:[Je,ge]}),(w=(G=(F=(R=(A=this.$store)==null?void 0:A.state)==null?void 0:R.site)==null?void 0:F.features)==null?void 0:G.midjourney)!=null&&w.enabled&&e.push({route:{name:$e},displayName:this.$t("common.nav.midjourney"),logo:"https://cdn.acedata.cloud/wto43b.png",routes:[$e]}),(U=(D=(S=(I=(y=this.$store)==null?void 0:y.state)==null?void 0:I.site)==null?void 0:S.features)==null?void 0:D.flux)!=null&&U.enabled&&e.push({route:{name:be},displayName:this.$t("common.nav.flux"),logo:"https://cdn.acedata.cloud/ogm2oa.png",routes:[be]}),(ee=(x=(W=(Z=(j=this.$store)==null?void 0:j.state)==null?void 0:Z.site)==null?void 0:W.features)==null?void 0:x.suno)!=null&&ee.enabled&&e.push({route:{name:we},displayName:this.$t("common.nav.suno"),logo:"https://cdn.acedata.cloud/l3ffw7.jpg",routes:[we,Be]}),(ne=(ie=(se=(oe=(te=this.$store)==null?void 0:te.state)==null?void 0:oe.site)==null?void 0:se.features)==null?void 0:ie.luma)!=null&&ne.enabled&&e.push({route:{name:ke},displayName:this.$t("common.nav.luma"),logo:"https://cdn.acedata.cloud/ahjfwi.png",routes:[ke,Ke]}),(ce=(de=(re=(le=(ae=this.$store)==null?void 0:ae.state)==null?void 0:le.site)==null?void 0:re.features)==null?void 0:de.hailuo)!=null&&ce.enabled&&e.push({route:{name:ye},displayName:this.$t("common.nav.hailuo"),logo:"https://cdn.acedata.cloud/0qg4gp.png",routes:[ye,Qe]}),(he=(_e=(pe=(ue=(me=this.$store)==null?void 0:me.state)==null?void 0:ue.site)==null?void 0:pe.features)==null?void 0:_e.kling)!=null&&he.enabled&&e.push({route:{name:Se},displayName:this.$t("common.nav.kling"),logo:"https://cdn.acedata.cloud/qpbbbb.jpg",routes:[Se,Ye]}),this.direction==="row"&&e.push({route:{name:Ee},displayName:this.$t("common.nav.profile"),icon:"fa-solid fa-user",routes:[Ee]}),e},authenticated(){return!!this.$store.state.token.access}},methods:{onHome(){this.$router.push({name:qe})}}}),Eo=["direction"],Io={class:"top"},To={key:0},No={class:"bottom"};function Oo(e,s,m,u,$,k){const a=o("logo-tiny"),p=o("el-image"),h=o("el-tooltip"),_=o("user-center");return c(),g("div",{direction:e.direction,class:"navigator"},[l("div",Io,[e.direction==="column"?(c(),g("div",To,[t(a,{onClick:e.onHome},null,8,["onClick"])])):L("v-if",!0),(c(!0),g(V,null,H(e.links,(r,f)=>(c(),g("div",{key:f,class:Oe({link:!0,active:r.routes.includes(e.$route.name)})},[e.direction==="column"?(c(),T(h,{key:0,effect:"dark",content:r.displayName,placement:"right"},{default:n(()=>[r.logo?(c(),T(p,{key:0,src:r.logo,class:"avatar",onClick:i=>e.$router.push(r.route)},null,8,["src","onClick"])):L("v-if",!0)]),_:2},1032,["content"])):L("v-if",!0)],2))),128))]),l("div",No,[t(_)])],8,Eo)}var Vo=N(So,[["render",Oo],["__scopeId","data-v-a43dbcba"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/Navigator.vue"]]);export{Vo as N};
@@ -1 +0,0 @@
1
- import"./vendor-others.cdfefb59.js";import{I as D}from"./api.f60246f3.js";import{_ as L,I as $,H as A,F as k,J as V,G as H}from"./index.97386539.js";import{o as M}from"./order.f1773d29.js";import{g as W}from"./price.cb59d1b0.js";import{ar as x}from"./vendor-fortawesome.2b54ad1b.js";import{H as K,A as U,b as z,B as G,F as J,u as X,y as S}from"./vendor-element-plus.1fa87efb.js";import{H as Y,al as f,L as m,M as o,o as c,V as l,f as d,T as p,e as _,ai as P,P as j,S as b,R as T,U as F}from"./vendor-@vue.6c0309d3.js";import"./vendor-markdown.cf3e96ae.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.6ab44f81.js";const q=Y({name:"ConsoleSubscriptionBuy",components:{ElSkeleton:K,ElRow:U,ElTag:z,ElCol:G,ElCard:J,FontAwesomeIcon:x,ElButton:X},data(){return{application:void 0,application2:void 0,type:$.PERIOD,services:[],loading:!1,creating:!1,subscription:void 0}},computed:{site(){return this.$store.getters.site},applicationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},subscriptions(){var t,r,h,u;const e=[{name:"WEEK",label:this.$t("console.subscription.weekly"),description:this.$t("console.subscription.weekly.description"),duration:604800},{name:"MONTH",label:this.$t("console.subscription.monthly"),description:this.$t("console.subscription.monthly.description"),duration:2592e3},{name:"YEAR",tag:this.$t("console.button.suggested"),label:this.$t("console.subscription.yearly"),description:this.$t("console.subscription.yearly.description"),duration:31536e3}];for(const i of e){console.log("item",i);const a=this.getPackages(i.duration);console.log("pkgs",a),a&&(i.price=a.reduce((s,g)=>s+g.price,0));for(const s of a)i.benefits||(i.benefits=[]),i.benefits.push({enabled:!0,content:`${(t=s==null?void 0:s.service)==null?void 0:t.title} - ${s.amount} `+this.$t("service.unit."+((r=s==null?void 0:s.service)==null?void 0:r.unit)+"s")});(h=i.benefits)==null||h.push({enabled:i.name!=="WEEK",content:this.$t("console.message.benefit1")}),(u=i.benefits)==null||u.push({enabled:i.name!=="WEEK",content:this.$t("console.message.benefit2")})}return e},service(){var e;return(e=this.application)==null?void 0:e.service},serviceIds(){return!this.application||!this.application.service?[]:[this.application.service.id]}},async mounted(){this.loading=!0,await this.onFetchApplication(),await this.onFetchApplication2(),await this.onCreateApplications(),this.loading=!1,this.subscription=this.subscriptions[2]},methods:{getPriceString:W,onBuyExtra(){this.$router.push({name:A,params:{id:this.applicationId}})},getPackages(e){let t=[];if(!this.service)return[];const h=[this.service].sort((u,i)=>this.serviceIds.indexOf(u.id)-this.serviceIds.indexOf(i.id));for(const u of h){const i=u.packages,a=i==null?void 0:i.find(s=>s.type===D.PERIOD&&s.duration===e);a&&t.push({...a,service:u})}return t},async onCreateApplications(){var t,r;const e=[];if(this.application2||e.push((r=(t=this.application)==null?void 0:t.service)==null?void 0:r.id),e.length>0){for(const h of e)await k.create({service_id:h,type:$.PERIOD});await this.onFetchApplication2()}},onChangeType(){console.log("onChangeType",this.type),this.$router.push({name:A,params:this.$route.params})},async onFetchServices(){const{data:e}=await V.getAll({id:this.serviceIds});this.services=e.items,console.debug("services",this.services)},async onFetchApplication(){const{data:e}=await k.get(this.applicationId);this.application=e,console.debug("application",this.application)},async onFetchApplication2(){var t;const{data:e}=await k.getAll({limit:100,offset:0,user_id:this.$store.getters.user.id,ordering:"-created_at",service_id:this.serviceIds,type:$.PERIOD});this.application2=(t=e.items)==null?void 0:t[0],console.debug("application2",this.application2)},onCreateOrder(e){var t;if(this.subscription=e,this.creating=!0,!this.application2||!this.application2.id){S.error(this.$t("console.message.applicationNotFound")),this.creating=!1;return}M.create({application_ids:[this.application2.id],package_ids:this.getPackages(e.duration).map(r=>r.id),description:((t=this.service)==null?void 0:t.title)+" - "+e.label}).then(({data:r})=>{this.creating=!1,this.$router.push({name:H,params:{id:r.id}})}).catch(()=>{S.error(this.$t("order.message.createFailed")),this.creating=!1})}}}),Q={class:"title"},Z={class:"introduction"},ee={class:"name"},te={class:"price"},se={class:"description"},ie={class:"benefits"},oe={class:"operations"},ae={key:2,class:"extra"};function ne(e,t,r,h,u,i){const a=f("el-col"),s=f("el-row"),g=f("el-skeleton"),N=f("el-tag"),E=f("font-awesome-icon"),C=f("el-button"),I=f("el-card");return c(),m(s,{class:"panel"},{default:o(()=>[l(a,{span:24},{default:o(()=>[l(s,null,{default:o(()=>[l(a,{span:24},{default:o(()=>[d("h2",Q,p(e.$t("common.title.buyMore")),1)]),_:1})]),_:1}),l(s,null,{default:o(()=>[l(a,{span:24},{default:o(()=>[l(I,{shadow:"hover",class:"card"},{default:o(()=>[l(s,null,{default:o(()=>[l(a,{span:16,offset:4},{default:o(()=>[d("p",Z,p(e.$t("console.subscription.title")),1),e.loading?(c(),m(g,{key:0})):(c(),m(s,{key:1,gutter:15,class:"subscriptions"},{default:o(()=>[(c(!0),_(F,null,P(e.subscriptions,(n,R)=>{var w;return c(),m(a,{key:R,xs:24,md:24/(((w=e.subscriptions)==null?void 0:w.length)||4)},{default:o(()=>{var O;return[l(I,{shadow:"hover",class:j({subscription:!0,active:((O=e.subscription)==null?void 0:O.name)===n.name}),onClick:v=>e.subscription=n},{default:o(()=>{var v;return[d("h4",ee,[b(p(n.label)+" ",1),n.tag?(c(),m(N,{key:0,type:"warning"},{default:o(()=>[b(p(n.tag),1)]),_:2},1024)):T("v-if",!0)]),d("h2",te,p(e.getPriceString({value:n.price})),1),d("p",se,p(n.description),1),d("div",ie,[(c(!0),_(F,null,P(n.benefits,(y,B)=>(c(),_("div",{key:B,class:"benefit"},[y.enabled?(c(),m(E,{key:0,icon:"fa-solid fa-check",class:"icon icon-check"})):(c(),m(E,{key:1,icon:"fa-solid fa-xmark",class:"icon icon-xmark"})),d("span",null,p(y.content),1)]))),128))]),d("div",oe,[l(C,{class:"btn btn-subscribe",type:((v=e.subscription)==null?void 0:v.name)===(n==null?void 0:n.name)?"primary":"",round:"",onClick:y=>e.onCreateOrder(n)},{default:o(()=>[b(p(e.$t("common.button.buy")),1)]),_:2},1032,["type","onClick"])])]}),_:2},1032,["class","onClick"])]}),_:2},1032,["md"])}),128))]),_:1})),e.loading?T("v-if",!0):(c(),_("div",ae,[d("span",null,p(e.$t("console.message.doNotWantSubscribe")),1),l(C,{type:"primary",class:"btn btn-extra",round:"",size:"small",onClick:e.onBuyExtra},{default:o(()=>[b(p(e.$t("console.message.buyExtra")),1)]),_:1},8,["onClick"])]))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var ge=L(q,[["render",ne],["__scopeId","data-v-56303b1f"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/application/Subscribe.vue"]]);export{ge as default};