@acedatacloud/nexior 3.5.0 → 3.5.1
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/assets/{Auth.0c0816f7.js → Auth.a90cc399.js} +1 -1
- package/dist/assets/{Callback.4ee50c3a.js → Callback.a82acc75.js} +1 -1
- package/dist/assets/{Chatdoc.0d355719.js → Chatdoc.5263125f.js} +1 -1
- package/dist/assets/{Console.1508b2bb.js → Console.83a7d90a.js} +1 -1
- package/dist/assets/{Conversation.7750a789.js → Conversation.33a8676d.js} +1 -1
- package/dist/assets/Conversation.fc58efa8.js +1 -0
- package/dist/assets/{CopyToClipboard.2d20734e.js → CopyToClipboard.dcbf7182.js} +1 -1
- package/dist/assets/{Detail.4e297711.js → Detail.24cd6940.js} +1 -1
- package/dist/assets/{EditArray.4e85afd6.js → EditArray.fc90290f.js} +1 -1
- package/dist/assets/{Extra.d5cd3529.js → Extra.d9e8ad3d.js} +1 -1
- package/dist/assets/{History.49f74045.js → History.d91b1f04.js} +1 -1
- package/dist/assets/{ImagePreview.d6abc713.js → ImagePreview.025cfc09.js} +1 -1
- package/dist/assets/{Index.35aec0de.js → Index.19d318b4.js} +1 -1
- package/dist/assets/Index.3d4c7011.js +1 -0
- package/dist/assets/Index.40702b91.js +1 -0
- package/dist/assets/{Index.bc14909f.js → Index.49dc3c46.js} +1 -1
- package/dist/assets/Index.503e0f7b.js +1 -0
- package/dist/assets/Index.5a7e5cc0.js +3 -0
- package/dist/assets/{Index.a960a1be.js → Index.646d79c3.js} +1 -1
- package/dist/assets/{Index.3c60148f.js → Index.6edc0543.js} +1 -1
- package/dist/assets/Index.76db79a3.js +1 -0
- package/dist/assets/{Index.e470bccd.js → Index.77acf7ce.js} +1 -1
- package/dist/assets/{Index.9a0bc85d.js → Index.7dada60b.js} +1 -1
- package/dist/assets/Index.9edce037.js +1 -0
- package/dist/assets/{Index.01f67d91.js → Index.f10f48b2.js} +1 -1
- package/dist/assets/{InfoIcon.5a350f1f.js → InfoIcon.b6bd8d58.js} +1 -1
- package/dist/assets/{Invitees.7decaaca.js → Invitees.9fba250b.js} +1 -1
- package/dist/assets/{List.91afc11f.js → List.011b2c71.js} +1 -1
- package/dist/assets/{List.86d591dc.js → List.67c11343.js} +1 -1
- package/dist/assets/{List.cebbf55e.js → List.69d56b67.js} +1 -1
- package/dist/assets/{Login.2228fb31.js → Login.4c26f374.js} +1 -1
- package/dist/assets/{Main.54e04e19.js → Main.421f61bd.js} +1 -1
- package/dist/assets/{Manage.db7fe09d.js → Manage.f12c92bd.js} +1 -1
- package/dist/assets/{MarkdownRenderer.2bf00ae2.js → MarkdownRenderer.3fb8276a.js} +1 -1
- package/dist/assets/{Navigator.778b9aca.js → Navigator.3204ea1d.js} +1 -1
- package/dist/assets/{Pagination.e3c91ab4.js → Pagination.3c242094.js} +1 -1
- package/dist/assets/{Setting.8a4e8a39.js → Setting.6cf3ec08.js} +1 -1
- package/dist/assets/Status.ce9bc4cb.js +1 -0
- package/dist/assets/{Subscribe.a2f42d1b.js → Subscribe.8bf14b5c.js} +1 -1
- package/dist/assets/{distribution.62c0b679.js → distribution.fd10b951.js} +1 -1
- package/dist/assets/{index.60bb4e0a.js → index.97386539.js} +3 -3
- package/dist/assets/{order.1ca24c7f.js → order.f1773d29.js} +1 -1
- package/dist/assets/{price.c9d715ac.js → price.cb59d1b0.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +2 -1
- package/dist/assets/Conversation.ea9a6ab9.js +0 -1
- package/dist/assets/Index.15439550.js +0 -1
- package/dist/assets/Index.279159eb.js +0 -1
- package/dist/assets/Index.34f31b25.js +0 -1
- package/dist/assets/Index.7dc5f524.js +0 -1
- package/dist/assets/Index.7e50d1f1.js +0 -3
- package/dist/assets/Index.c25e9222.js +0 -1
- package/dist/assets/Status.54e386d8.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{an as ve}from"./vendor-others.cdfefb59.js";import{ar as K}from"./vendor-fortawesome.2b54ad1b.js";import{_ as k,aD as ge,aE as $e,aF as ye,A as Z,K as B,F as be,M as ke,aG as we,Z as Ie}from"./index.97386539.js";import{T as Ve,u as R,p as J,x as Q,y,t as Se,m as Ee,I as Ue,s as Ce,H as Le,R as Pe}from"./vendor-element-plus.1fa87efb.js";import{H as w,al as n,o as r,e as p,f as a,I as H,V as s,M as m,T as i,S as v,L as P,R as g,P as q,U as fe,ai as he}from"./vendor-@vue.6c0309d3.js";import{I as A}from"./InfoIcon.b6bd8d58.js";import{C as Ne}from"./CopyToClipboard.dcbf7182.js";import"./vendor-markdown.cf3e96ae.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.6ab44f81.js";const Te=w({name:"LayoutLuma",components:{ElDrawer:Ve,ElButton:R,FontAwesomeIcon:K},data(){return{drawer:!1}}}),Ae={class:"main"},Re={class:"config"},Ge={class:"result"};function De(e,t,o,l,f,h){const c=n("font-awesome-icon"),u=n("el-button"),d=n("el-drawer");return r(),p("div",Ae,[a("div",Re,[H(e.$slots,"config",{},void 0,!0)]),a("div",Ge,[H(e.$slots,"result",{},void 0,!0)]),s(u,{round:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:m(()=>[s(c,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),s(d,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),"with-header":!1,size:"340px",class:"drawer"},{default:m(()=>[H(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var Me=k(Te,[["render",De],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const ze=w({name:"EnhancementSelector",components:{ElSwitch:J,InfoIcon:A},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.enhancement},set(e){var t;console.debug("set enhancement",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=ge)}}),Fe={class:"field"},Oe={class:"title font-bold"};function je(e,t,o,l,f,h){const c=n("el-switch"),u=n("info-icon");return r(),p("div",Fe,[a("h2",Oe,i(e.$t("luma.name.enhancement")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.enhancement"),class:"info"},null,8,["content"])])}var qe=k(ze,[["render",je],["__scopeId","data-v-175365a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const Be=w({name:"CustomSelector",components:{ElSwitch:J,InfoIcon:A},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=$e)}}),He={class:"field"},Ke={class:"title font-bold"};function Ze(e,t,o,l,f,h){const c=n("el-switch"),u=n("info-icon");return r(),p("div",He,[a("h2",Ke,i(e.$t("luma.name.custom")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.custom"),class:"info"},null,8,["content"])])}var Je=k(Be,[["render",Ze],["__scopeId","data-v-5ac2addb"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const Qe=w({name:"LoopSelector",components:{ElSwitch:J,InfoIcon:A},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.loop},set(e){var t;console.debug("set loop",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=ye)}}),We={class:"field"},Xe={class:"title font-bold"};function Ye(e,t,o,l,f,h){const c=n("el-switch"),u=n("info-icon");return r(),p("div",We,[a("h2",Xe,i(e.$t("luma.name.loop")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.loop"),class:"info"},null,8,["content"])])}var xe=k(Qe,[["render",Ye],["__scopeId","data-v-69cccd4e"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const et=w({name:"ContentInput",components:{ElUpload:Q,ElButton:R,InfoIcon:A},data(){return{fileList:[],uploadUrl:Z()+"/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;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.end_image_url},set(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(o=this.$store.state.luma)==null?void 0:o.config,end_image_url:e})}}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadEndImageExceed"))},onError(){y.error(this.$t("luma.message.uploadEndImageError"))},onSetEndImageUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(o=this.$store.state.luma)==null?void 0:o.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),tt={class:"field"},ot={class:"title font-bold"},st={class:"upload-wrapper"};function nt(e,t,o,l,f,h){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",tt,[a("h2",ot,i(e.$t("luma.name.endImageUrl")),1),a("div",st,[s(u,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[v(i(e.$t("luma.button.uploadEndImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])]),s(d,{content:e.$t("luma.description.endImageUrl"),class:"info"},null,8,["content"])])}var at=k(et,[["render",nt],["__scopeId","data-v-97900bb4"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageUrlInput.vue"]]);const lt=w({name:"StartImageUrlInput",components:{ElUpload:Q,ElButton:R,InfoIcon:A},data(){return{fileList:[],uploadUrl:Z()+"/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;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.start_image_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",{...(l=this.$store.state.luma)==null?void 0:l.config,start_image_url:t})}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadStartImageExceed"))},onError(){y.error(this.$t("luma.message.uploadStartImageError"))},async onRemove(){y.error(this.$t("luma.message.uploadStartImageError"))},onSetStartImageUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(o=this.$store.state.luma)==null?void 0:o.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),it={class:"field"},rt={class:"title font-bold"},ct={class:"upload-wrapper"};function ut(e,t,o,l,f,h){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",it,[a("h2",rt,i(e.$t("luma.name.startImageUrl")),1),a("div",ct,[s(u,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-remove":e.onRemove,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[v(i(e.$t("luma.button.uploadStartImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-remove","on-success","headers"])]),s(d,{content:e.$t("luma.description.startImageUrl"),class:"info"},null,8,["content"])])}var dt=k(lt,[["render",ut],["__scopeId","data-v-5440a4bf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageUrlInput.vue"]]);const mt=w({name:"UploadVideo",components:{ElUpload:Q,ElButton:R,InfoIcon:A},data(){return{fileList:[],uploadUrl:Z()+"/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;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.video_url},set(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(o=this.$store.state.luma)==null?void 0:o.config,video_url:e})}}},mounted(){this.value||(this.value=void 0)},methods:{onExceed(){y.warning(this.$t("luma.message.uploadVideoExceed"))},onError(){y.error(this.$t("luma.message.uploadVideoError"))},beforeUpload(e){const t=e.type==="video/mp4",o=e.size/1024/1024<10;return t?o?!0:(y.error(this.$t("luma.message.uploadVideoSizeExceed")),!1):(y.error(this.$t("luma.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(o=this.$store.state.luma)==null?void 0:o.config,video_url:e,action:"extend"})},async onSuccess(){this.onSetVideoUrl()}}}),pt={class:"field"},_t={class:"title font-bold"},ft={class:"upload-wrapper"};function ht(e,t,o,l,f,h){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",pt,[a("h2",_t,i(e.$t("luma.name.videoUrl")),1),a("div",ft,[s(u,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),accept:".mp4",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[v(i(e.$t("luma.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])]),s(d,{content:e.$t("luma.description.videoUrl"),class:"info"},null,8,["content"])])}var vt=k(mt,[["render",ht],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const gt="",$t=w({name:"PromptInput",components:{ElInput:Se,InfoIcon:A},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,prompt:e})}}},mounted(){this.value||(this.value=gt)}}),yt={class:"field"},bt={class:"box"},kt={class:"title font-bold"};function wt(e,t,o,l,f,h){const c=n("info-icon"),u=n("el-input");return r(),p("div",yt,[a("div",bt,[a("h2",kt,i(e.$t("luma.name.prompt")),1),s(c,{content:e.$t("luma.description.prompt"),class:"info"},null,8,["content"])]),s(u,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=d=>e.prompt=d),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("luma.placeholder.prompt"),maxlength:2e3,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var It=k($t,[["render",wt],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const Vt=w({name:"ExtendFromInput",components:{VuePlyr:ve},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}},computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}}}),St={class:"field"},Et={class:"box"},Ut={class:"title font-bold"},Ct={class:"task"},Lt=["data-poster"],Pt=["src"];function Nt(e,t,o,l,f,h){const c=n("vue-plyr");return r(),p("div",St,[a("div",Et,[a("h2",Ut,i(e.$t("luma.name.extend")),1)]),a("div",Ct,[a("div",null,[s(c,{options:e.options,class:"video"},{default:m(()=>{var u,d;return[a("video",{controls:"",crossorigin:"",playsinline:"","data-poster":(u=e.config)==null?void 0:u.thumbnail_url},[a("source",{size:"1080",src:(d=e.config)==null?void 0:d.video_url,type:"video/mp4"},null,8,Pt)],8,Lt)]}),_:1},8,["options"])])])])}var Tt=k(Vt,[["render",Nt],["__scopeId","data-v-1cefb16b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const At=w({name:"PresetPanel",components:{LoopSelector:xe,StartImageUrlInput:dt,EndImageUrlInput:at,EnhancementSelector:qe,ElButton:R,FontAwesomeIcon:K,PromptInput:It,ExtendFromInput:Tt,CustomSelector:Je,UploadVideo:vt},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Rt={class:"panel"},Gt={class:"config"},Dt={class:"actions"};function Mt(e,t,o,l,f,h){var L,V,T,G,D,M,z,F,O;const c=n("extend-from-input"),u=n("prompt-input"),d=n("custom-selector"),_=n("upload-video"),$=n("start-image-url-input"),S=n("end-image-url-input"),E=n("enhancement-selector"),N=n("loop-selector"),U=n("font-awesome-icon"),C=n("el-button");return r(),p("div",Rt,[a("div",Gt,[((L=e.config)==null?void 0:L.video_id)||((V=e.config)==null?void 0:V.video_url)?(r(),P(c,{key:0,class:"mb-4"})):g("v-if",!0),s(u,{class:"mb-4"}),(T=e.config)!=null&&T.video_id?g("v-if",!0):(r(),P(d,{key:1,class:"mb-4"})),(G=e.config)!=null&&G.custom?(r(),P(_,{key:2,class:"mb-4"})):g("v-if",!0),!(((D=e.config)==null?void 0:D.video_id)||((M=e.config)==null?void 0:M.video_url))&&!((z=e.config)!=null&&z.custom)?(r(),P($,{key:3,class:"mb-4"})):g("v-if",!0),s(S,{class:"mb-4"}),s(E,{class:"mb-4"}),s(N,{class:"mb-4"}),a("div",Dt,[((F=e.config)==null?void 0:F.video_url)!==void 0||((O=e.config)==null?void 0:O.custom)?(r(),P(C,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[s(U,{icon:"fa-solid fa-magic",class:"mr-2"}),v(" "+i(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(r(),P(C,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[s(U,{icon:"fa-solid fa-magic",class:"mr-2"}),v(" "+i(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var zt=k(At,[["render",Mt],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const Ft=w({name:"VideoPlayer",components:{VuePlyr:ve},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}}}),Ot=["data-poster"],jt=["src"];function qt(e,t,o,l,f,h){const c=n("vue-plyr");return r(),p("div",null,[s(c,{options:e.options,class:"video"},{default:m(()=>{var u,d,_,$;return[a("video",{controls:"",crossorigin:"",playsinline:"","data-poster":(d=(u=e.modelValue)==null?void 0:u.response)==null?void 0:d.thumbnail_url},[a("source",{size:"1080",src:($=(_=e.modelValue)==null?void 0:_.response)==null?void 0:$.video_url,type:"video/mp4"},null,8,jt)],8,Ot)]}),_:1},8,["options"])])}var Bt=k(Ft,[["render",qt],["__scopeId","data-v-759e400c"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/VideoPlayer.vue"]]);const Ht=w({name:"TaskPreview",components:{ElImage:Ee,CopyToClipboard:Ne,FontAwesomeIcon:K,ElAlert:Ue,VideoPlayer:Bt,ElTooltip:Ce,ElButton:R},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){var e;return(e=this.$store.state.luma)==null?void 0:e.application},config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onExtend(e,t){var o;e.stopPropagation(),console.debug("set config",t),this.$store.commit("luma/setConfig",{...(o=this.$store.state.luma)==null?void 0:o.config,video_id:t.video_id,prompt:t.prompt,action:"extend",thumbnail_url:t.thumbnail_url,video_url:t.video_url})},onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onReload(e){const t=e.target,o=new URL(t.src),l=o.searchParams.get("retry");if(!l)o.searchParams.set("retry","1");else if(parseInt(l)<2)o.searchParams.set("retry",(parseInt(l)+1).toString());else return;t.src=o.toString()},onOpenVideo(e){window.open(e,"_blank")}}}),Kt={class:"preview"},Zt={class:"left"},Jt={class:"main"},Qt={class:"bot"},Wt={class:"datetime"},Xt={class:"info"},Yt={key:0,class:"prompt mt-2"},xt={key:0},eo={key:1},to={key:0,class:q({content:!0,failed:!0})},oo={class:"image-wrapper"},so={key:0,class:q({operations:!0,"mt-2":!0})},no={class:"description"},ao={key:1,class:q({content:!0})},lo={class:"description"},io={class:"description"},ro={class:"description"},co={key:2,class:q({content:!0})},uo={class:"description"};function mo(e,t,o,l,f,h){var N,U,C,L,V,T,G,D,M,z,F,O,W,X,Y,x,ee,te,oe,se,ne,ae,le;const c=n("el-image"),u=n("VideoPlayer"),d=n("el-button"),_=n("el-tooltip"),$=n("font-awesome-icon"),S=n("copy-to-clipboard"),E=n("el-alert");return r(),p("div",Kt,[a("div",Zt,[s(c,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",Jt,[a("div",Qt,[v(i(e.$t("luma.name.lumaBot"))+" ",1),a("span",Wt,i(e.$dayjs.format(""+new Date(parseFloat(((N=e.modelValue)==null?void 0:N.created_at)||"")*1e3))),1)]),a("div",Xt,[(C=(U=e.modelValue)==null?void 0:U.request)!=null&&C.prompt?(r(),p("p",Yt,[v(i((V=(L=e.modelValue)==null?void 0:L.request)==null?void 0:V.prompt)+" ",1),(T=e.modelValue)!=null&&T.response?g("v-if",!0):(r(),p("span",xt," - ("+i(e.$t("luma.status.pending"))+") ",1)),((D=(G=e.modelValue)==null?void 0:G.response)==null?void 0:D.state)==="processing"||((z=(M=e.modelValue)==null?void 0:M.response)==null?void 0:z.state)==="pending"?(r(),p("span",eo," - ("+i(e.$t("luma.status.processing"))+") ",1)):g("v-if",!0)])):g("v-if",!0)]),g(" Display success message "),((O=(F=e.modelValue)==null?void 0:F.response)==null?void 0:O.success)===!0?(r(),p("div",to,[a("div",oo,[s(u,{"model-value":e.modelValue},null,8,["model-value"])]),((W=e.modelValue)==null?void 0:W.response)&&!((X=e.config)!=null&&X.custom)?(r(),p("div",so,[s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:m(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=I=>{var b;return e.onExtend(I,(b=e.modelValue)==null?void 0:b.response)})},{default:m(()=>[v(i(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"]),s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.downloadVideo"),placement:"top-start"},{default:m(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[1]||(t[1]=I=>{var b,j;return e.onDownload(I,(j=(b=e.modelValue)==null?void 0:b.response)==null?void 0:j.video_url)})},{default:m(()=>[v(i(e.$t("luma.button.download")),1)]),_:1})]),_:1},8,["content"])])):g("v-if",!0),s(E,{closable:!1,class:"mt-2 success"},{default:m(()=>{var I,b;return[a("p",no,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),v(" "+i(e.$t("luma.name.taskId"))+": "+i((I=e.modelValue)==null?void 0:I.id)+" ",1),s(S,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):g("v-if",!0),g(" Display error message "),((x=(Y=e.modelValue)==null?void 0:Y.response)==null?void 0:x.state)==="failed"||((te=(ee=e.modelValue)==null?void 0:ee.response)==null?void 0:te.success)===!1?(r(),p("div",ao,[s(E,{closable:!1,class:"failure"},{template:m(()=>[s($,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),v(" "+i(e.$t("luma.name.failure")),1)]),default:m(()=>{var I,b,j,ie,re,ce,ue,de,me,pe,_e;return[a("p",lo,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),v(" "+i(e.$t("luma.name.taskId"))+": "+i((I=e.modelValue)==null?void 0:I.id)+" ",1),s(S,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])]),a("p",io,[s($,{icon:"fa-solid fa-circle-info",class:"mr-1"}),v(" "+i(e.$t("luma.name.failureReason"))+": "+i((re=(ie=(j=e.modelValue)==null?void 0:j.response)==null?void 0:ie.error)==null?void 0:re.message)+" ",1),s(S,{content:(de=(ue=(ce=e.modelValue)==null?void 0:ce.response)==null?void 0:ue.error)==null?void 0:de.message,class:"btn-copy"},null,8,["content"])]),a("p",ro,[s($,{icon:"fa-solid fa-hashtag",class:"mr-1"}),v(" "+i(e.$t("luma.name.traceId"))+": "+i((me=e.modelValue)==null?void 0:me.trace_id)+" ",1),s(S,{content:(_e=(pe=e.modelValue)==null?void 0:pe.response)==null?void 0:_e.trace_id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):g("v-if",!0),g(" Display error message "),!((oe=e.modelValue)!=null&&oe.response)||((ne=(se=e.modelValue)==null?void 0:se.response)==null?void 0:ne.state)==="processing"||((le=(ae=e.modelValue)==null?void 0:ae.response)==null?void 0:le.state)==="pending"?(r(),p("div",co,[s(E,{closable:!1,class:"info"},{template:m(()=>[s($,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),v(" "+i(e.$t("luma.name.failure")),1)]),default:m(()=>{var I,b;return[a("p",uo,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),v(" "+i(e.$t("luma.name.taskId"))+": "+i((I=e.modelValue)==null?void 0:I.id)+" ",1),s(S,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):g("v-if",!0)])])}var po=k(Ht,[["render",mo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const _o=w({name:"RecentPanel",components:{TaskPreview:po,ElSkeleton:Le,ElSkeletonItem:Pe},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){var e,t,o,l;return{...(e=this.$store.state.luma)==null?void 0:e.tasks,items:(l=(o=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:l.slice()}}},methods:{onHandleScroll(){const e=this.$refs.panel;console.log("reach-top reach-top reach-top"),e.scrollTop===0&&this.$emit("reach-top")}}}),fo={key:0,class:"tasks"},ho={class:"left"},vo={class:"main"},go={key:1,class:"tasks"},$o={key:2,class:"description"};function yo(e,t,o,l,f,h){var _,$,S,E,N,U,C,L;const c=n("el-skeleton-item"),u=n("el-skeleton"),d=n("task-preview");return r(),p("div",{ref:"panel",class:"panel recent",onScroll:t[0]||(t[0]=(...V)=>e.onHandleScroll&&e.onHandleScroll(...V))},[((_=e.tasks)==null?void 0:_.items)===void 0?(r(),p("div",fo,[(r(),p(fe,null,he(3,V=>a("div",{key:V,class:"task placeholder"},[a("div",ho,[s(u,{animated:""},{template:m(()=>[s(c,{variant:"image",class:"avatar"})]),_:1})]),a("div",vo,[s(u,{animated:""},{template:m(()=>[s(c,{variant:"p",class:"title"}),s(c,{variant:"image",class:"icon"})]),_:1})])])),64))])):((S=($=e.tasks)==null?void 0:$.items)==null?void 0:S.length)&&((N=(E=e.tasks)==null?void 0:E.items)==null?void 0:N.length)>0?(r(),p("div",go,[(r(!0),p(fe,null,he((U=e.tasks)==null?void 0:U.items,(V,T)=>(r(),P(d,{key:T,"model-value":V,class:"preview"},null,8,["model-value"]))),128))])):g("v-if",!0),((L=(C=e.tasks)==null?void 0:C.items)==null?void 0:L.length)===0?(r(),p("p",$o,i(e.$t("luma.message.noTasks")),1)):g("v-if",!0)],544)}var bo=k(_o,[["render",yo],["__scopeId","data-v-2f8302a7"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const ko="https://webhook.acedata.cloud/luma",wo=w({name:"LumaIndex",components:{ConfigPanel:zt,Layout:Me,RecentPanel:bo},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===B.Request},service(){return this.$store.state.luma.service},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},initializing(){return this.$store.state.luma.status.getApplications===B.Request},needApply(){return this.$store.state.luma.status.getApplications===B.Success&&!this.application},application(){return this.$store.state.luma.application},applications(){return this.$store.state.luma.applications},tasks(){return this.$store.state.luma.tasks}},watch:{tasks:{handler(e,t){var o,l;((o=e==null?void 0:e.items)==null?void 0:o.length)>((l=t==null?void 0:t.items)==null?void 0:l.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,o;console.debug("reached top"),await this.onGetTasks({createdAtMax:(o=(t=(e=this.tasks)==null?void 0:e.items)==null?void 0:t[0])==null?void 0:o.created_at})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("luma/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("luma/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){be.create({application:this.application}).then(({data:e})=>{this.application=e,y.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,o;((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.code)===ke&&y.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:o,createdAtMax:l}=e||{};console.debug("limit",t,"createdAtMin",o,"createdAtMax",l),await this.$store.dispatch("luma/getTasks",{limit:t,createdAtMin:o,createdAtMax:l})},async onGenerate(){var o;const e={...this.config,callback_url:ko},t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}y.info(this.$t("luma.message.startingTask")),we.generate(e,{token:t}).then(()=>{y.success(this.$t("luma.message.startTaskSuccess")),this.$store.commit("luma/setConfig",{config:void 0})}).catch(l=>{var h,c;const f=(h=l==null?void 0:l.response)==null?void 0:h.data;((c=f==null?void 0:f.error)==null?void 0:c.code)===Ie?y.error(this.$t("luma.message.usedUp")):y.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}});function Io(e,t,o,l,f,h){const c=n("config-panel"),u=n("recent-panel"),d=n("layout");return r(),P(d,null,{config:m(()=>[s(c,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:m(()=>[s(u,{class:"panel recent",onReachTop:e.onReachTop},null,8,["onReachTop"])]),_:1})}var Ro=k(wo,[["render",Io],["__scopeId","data-v-c45e0af8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{Ro as default};
|