@acedatacloud/nexior 2.11.15 → 2.11.16

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 (43) hide show
  1. package/dist/assets/{Auth.cd79b929.js → Auth.d40f2a78.js} +1 -1
  2. package/dist/assets/{Buy.46c8cf2c.js → Buy.0ded7a45.js} +1 -1
  3. package/dist/assets/Buy.b62e038a.js +1 -0
  4. package/dist/assets/{Callback.88787622.js → Callback.6ed38357.js} +1 -1
  5. package/dist/assets/{Chatdoc.fe7a660d.js → Chatdoc.2435396e.js} +1 -1
  6. package/dist/assets/{Console.f713384e.js → Console.296519db.js} +1 -1
  7. package/dist/assets/{Conversation.062f489c.js → Conversation.9ac9f557.js} +1 -1
  8. package/dist/assets/{Conversation.8ffca333.js → Conversation.fc0a1a83.js} +1 -1
  9. package/dist/assets/{CopyToClipboard.504ba79f.js → CopyToClipboard.3039bd92.js} +1 -1
  10. package/dist/assets/{DarkSelector.eef88e99.js → DarkSelector.46873470.js} +1 -1
  11. package/dist/assets/{Detail.9fb732ce.js → Detail.cbaa80d6.js} +1 -1
  12. package/dist/assets/{History.507d6e2e.js → History.f3c51ba3.js} +1 -1
  13. package/dist/assets/{Index.a42f1d61.js → Index.0d15b4f1.js} +1 -1
  14. package/dist/assets/{Index.6c48c190.js → Index.0e557464.js} +1 -1
  15. package/dist/assets/{Index.29400e01.js → Index.1aa2508d.js} +1 -1
  16. package/dist/assets/{Index.36ceb6e7.js → Index.1acb75c3.js} +1 -1
  17. package/dist/assets/{Index.2046cdee.js → Index.3bc51765.js} +1 -1
  18. package/dist/assets/{Index.a45661e2.js → Index.5fcc85c9.js} +1 -1
  19. package/dist/assets/{Index.b0b78ef6.js → Index.8dcad017.js} +1 -1
  20. package/dist/assets/{Index.d78f3c8c.js → Index.9cf54275.js} +1 -1
  21. package/dist/assets/{Index.189bf653.js → Index.c4445723.js} +1 -1
  22. package/dist/assets/{Index.635fe955.js → Index.cb49130b.js} +1 -1
  23. package/dist/assets/{InfoIcon.53552d9f.js → InfoIcon.8d11b6b9.js} +1 -1
  24. package/dist/assets/{Invitees.f4abd2f0.js → Invitees.db4d30a2.js} +1 -1
  25. package/dist/assets/{List.75678f4f.js → List.1ddb5986.js} +1 -1
  26. package/dist/assets/{List.598d2e4e.js → List.ca2a7159.js} +1 -1
  27. package/dist/assets/{List.1681a92a.js → List.ecf84098.js} +1 -1
  28. package/dist/assets/{Login.c74025c2.js → Login.f9f40020.js} +1 -1
  29. package/dist/assets/{Main.d32007ba.js → Main.385fce41.js} +1 -1
  30. package/dist/assets/{Manage.c8eb1abd.js → Manage.56d7f0f6.js} +1 -1
  31. package/dist/assets/{MarkdownRenderer.08db2c8d.js → MarkdownRenderer.4f6cf5fc.js} +1 -1
  32. package/dist/assets/{Navigator.6923fd1d.js → Navigator.f3fa138a.js} +1 -1
  33. package/dist/assets/{Pagination.1ef6a016.js → Pagination.8b7200cd.js} +1 -1
  34. package/dist/assets/{Setting.788adb1f.js → Setting.7382c56f.js} +1 -1
  35. package/dist/assets/{Status.66e99033.js → Status.d9f6f683.js} +1 -1
  36. package/dist/assets/{distribution.8314823b.js → distribution.ba2cc1f8.js} +1 -1
  37. package/dist/assets/{index.1efdf21e.js → index.c079f52d.js} +1 -1
  38. package/dist/assets/{order.50857e01.js → order.3144f3b9.js} +1 -1
  39. package/dist/assets/price.f7354364.js +1 -0
  40. package/dist/index.html +1 -1
  41. package/package.json +1 -1
  42. package/dist/assets/Buy.40554a7d.js +0 -1
  43. package/dist/assets/price.c330460c.js +0 -1
@@ -1 +1 @@
1
- var Ve=Object.defineProperty,Ee=Object.defineProperties;var Se=Object.getOwnPropertyDescriptors;var ye=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable;var ke=(e,t,o)=>t in e?Ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,k=(e,t)=>{for(var o in t||(t={}))Ue.call(t,o)&&ke(e,o,t[o]);if(ye)for(var o of ye(t))Ce.call(t,o)&&ke(e,o,t[o]);return e},b=(e,t)=>Ee(e,Se(t));import{J as Ie}from"./vendor-others.3942faf7.js";import{am as K}from"./vendor-fortawesome.9316cbe8.js";import{_ as w,ar as Le,as as Pe,at as Ne,H as Q,T as H,z as Ae,au as Te}from"./index.1efdf21e.js";import{P as Ge,k as D,T as W,N as X,L as y,M as Re,r as De,D as ze,t as Oe,B as je,R as Fe}from"./vendor-element-plus.351bec67.js";import{H as I,al as n,o as l,e as m,f as a,I as J,V as s,M as p,U as c,T as $,L as A,S as h,Q as M,W as be,ai as we}from"./vendor-@vue.460d47cf.js";import{I as R}from"./InfoIcon.53552d9f.js";import{A as Be,i as qe,h as Me}from"./Status.66e99033.js";import{C as He}from"./CopyToClipboard.504ba79f.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.f14582ab.js";const Je=I({name:"LayoutLuma",components:{ElDrawer:Ge,ElButton:D,FontAwesomeIcon:K},data(){return{drawer:!1}}}),Ke={class:"main"},Qe={class:"config"},We={class:"result"};function Xe(e,t,o,i,f,v){const r=n("font-awesome-icon"),u=n("el-button"),d=n("el-drawer");return l(),m("div",Ke,[a("div",Qe,[J(e.$slots,"config",{},void 0,!0)]),a("div",We,[J(e.$slots,"result",{},void 0,!0)]),s(u,{round:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:p(()=>[s(r,{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:p(()=>[J(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var Ye=w(Je,[["render",Xe],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const Ze=I({name:"EnhancementSelector",components:{ElSwitch:W,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{enhancement:e}))}}},mounted(){this.value===void 0&&(this.value=Le)}}),xe={class:"field"},et={class:"title"};function tt(e,t,o,i,f,v){const r=n("el-switch"),u=n("info-icon");return l(),m("div",xe,[a("h2",et,c(e.$t("luma.name.enhancement")),1),s(r,{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 ot=w(Ze,[["render",tt],["__scopeId","data-v-175365a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const st=I({name:"CustomSelector",components:{ElSwitch:W,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{custom:e}))}}},mounted(){this.value===void 0&&(this.value=Pe)}}),nt={class:"field"},at={class:"title"};function it(e,t,o,i,f,v){const r=n("el-switch"),u=n("info-icon");return l(),m("div",nt,[a("h2",at,c(e.$t("luma.name.custom")),1),s(r,{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 lt=w(st,[["render",it],["__scopeId","data-v-5ac2addb"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const rt=I({name:"LoopSelector",components:{ElSwitch:W,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{loop:e}))}}},mounted(){this.value===void 0&&(this.value=Ne)}}),ct={class:"field"},ut={class:"title"};function dt(e,t,o,i,f,v){const r=n("el-switch"),u=n("info-icon");return l(),m("div",ct,[a("h2",ut,c(e.$t("luma.name.loop")),1),s(r,{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 mt=w(rt,[["render",dt],["__scopeId","data-v-69cccd4e"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const pt=I({name:"ContentInput",components:{ElUpload:X,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:Q()+"/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(e){var o,i;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",b(k({},(i=this.$store.state.luma)==null?void 0:i.config),{end_image_url:t}))}}},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",b(k({},(o=this.$store.state.luma)==null?void 0:o.config),{end_image_url:e}))},async onSuccess(){this.onSetEndImageUrl()}}}),_t={class:"field"},ft={class:"title"},ht={class:"upload-wrapper"};function vt(e,t,o,i,f,v){const r=n("el-button"),u=n("el-upload"),d=n("info-icon");return l(),m("div",_t,[a("h2",ft,c(e.$t("luma.name.endImageUrl")),1),a("div",ht,[s(u,{"file-list":e.fileList,"onUpdate:file-list":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:p(()=>[s(r,{size:"small",type:"primary",round:""},{default:p(()=>[$(c(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 gt=w(pt,[["render",vt],["__scopeId","data-v-97900bb4"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageUrlInput.vue"]]);const $t=I({name:"StartImageUrlInput",components:{ElUpload:X,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:Q()+"/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,i;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",b(k({},(i=this.$store.state.luma)==null?void 0:i.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",b(k({},(o=this.$store.state.luma)==null?void 0:o.config),{start_image_url:e}))},async onSuccess(){this.onSetStartImageUrl()}}}),yt={class:"field"},kt={class:"title"},bt={class:"upload-wrapper"};function wt(e,t,o,i,f,v){const r=n("el-button"),u=n("el-upload"),d=n("info-icon");return l(),m("div",yt,[a("h2",kt,c(e.$t("luma.name.startImageUrl")),1),a("div",bt,[s(u,{"file-list":e.fileList,"onUpdate:file-list":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:p(()=>[s(r,{size:"small",type:"primary",round:""},{default:p(()=>[$(c(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 It=w($t,[["render",wt],["__scopeId","data-v-5440a4bf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageUrlInput.vue"]]);const Vt=I({name:"UploadVideo",components:{ElUpload:X,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:Q()+"/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(e){var o,i;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",b(k({},(i=this.$store.state.luma)==null?void 0:i.config),{video_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetVideoUrl()},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",b(k({},(o=this.$store.state.luma)==null?void 0:o.config),{video_url:e,action:"extend"}))},async onSuccess(){this.onSetVideoUrl()}}}),Et={class:"field"},St={class:"title"},Ut={class:"upload-wrapper"};function Ct(e,t,o,i,f,v){const r=n("el-button"),u=n("el-upload"),d=n("info-icon");return l(),m("div",Et,[a("h2",St,c(e.$t("luma.name.videoUrl")),1),a("div",Ut,[s(u,{"file-list":e.fileList,"onUpdate:file-list":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:p(()=>[s(r,{size:"small",type:"primary",round:""},{default:p(()=>[$(c(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 Lt=w(Vt,[["render",Ct],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const Pt="",Nt=I({name:"PromptInput",components:{ElInput:Re,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=Pt)}}),At={class:"field"},Tt={class:"box"},Gt={class:"title"};function Rt(e,t,o,i,f,v){const r=n("info-icon"),u=n("el-input");return l(),m("div",At,[a("div",Tt,[a("h2",Gt,c(e.$t("luma.name.prompt")),1),s(r,{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:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Dt=w(Nt,[["render",Rt],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const zt=I({name:"ExtendFromInput",components:{VuePlyr:Ie},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}}}),Ot={class:"field"},jt={class:"box"},Ft={class:"title"},Bt={class:"task"},qt=["data-poster"],Mt=["src"];function Ht(e,t,o,i,f,v){const r=n("vue-plyr");return l(),m("div",Ot,[a("div",jt,[a("h2",Ft,c(e.$t("luma.name.extend")),1)]),a("div",Bt,[a("div",null,[s(r,{options:e.options,class:"video"},{default:p(()=>{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,Mt)],8,qt)]}),_:1},8,["options"])])])])}var Jt=w(zt,[["render",Ht],["__scopeId","data-v-1cefb16b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const Kt=I({name:"PresetPanel",components:{LoopSelector:mt,StartImageUrlInput:It,EndImageUrlInput:gt,EnhancementSelector:ot,ElButton:D,FontAwesomeIcon:K,PromptInput:Dt,ExtendFromInput:Jt,CustomSelector:lt,UploadVideo:Lt},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Qt={class:"panel"},Wt={class:"config"},Xt={class:"actions"};function Yt(e,t,o,i,f,v){var N,U,G,z,O,j,F,B,q;const r=n("extend-from-input"),u=n("prompt-input"),d=n("custom-selector"),_=n("upload-video"),g=n("start-image-url-input"),E=n("end-image-url-input"),C=n("enhancement-selector"),T=n("loop-selector"),L=n("font-awesome-icon"),P=n("el-button");return l(),m("div",Qt,[a("div",Wt,[((N=e.config)==null?void 0:N.video_id)||((U=e.config)==null?void 0:U.video_url)?(l(),A(r,{key:0,class:"mb-4"})):h("v-if",!0),s(u,{class:"mb-4"}),(G=e.config)!=null&&G.video_id?h("v-if",!0):(l(),A(d,{key:1,class:"mb-4"})),(z=e.config)!=null&&z.custom?(l(),A(_,{key:2,class:"mb-4"})):h("v-if",!0),!(((O=e.config)==null?void 0:O.video_id)||((j=e.config)==null?void 0:j.video_url))&&!((F=e.config)!=null&&F.custom)?(l(),A(g,{key:3,class:"mb-4"})):h("v-if",!0),s(E,{class:"mb-4"}),s(C,{class:"mb-4"}),s(T,{class:"mb-4"}),a("div",Xt,[((B=e.config)==null?void 0:B.video_url)!==void 0||((q=e.config)==null?void 0:q.custom)?(l(),A(P,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:p(()=>[s(L,{icon:"fa-solid fa-magic",class:"mr-2"}),$(" "+c(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(l(),A(P,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:p(()=>[s(L,{icon:"fa-solid fa-magic",class:"mr-2"}),$(" "+c(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var Zt=w(Kt,[["render",Yt],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const xt=I({name:"VideoPlayer",components:{VuePlyr:Ie},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}}}),eo=["data-poster"],to=["src"];function oo(e,t,o,i,f,v){const r=n("vue-plyr");return l(),m("div",null,[s(r,{options:e.options,class:"video"},{default:p(()=>{var u,d,_,g;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:(g=(_=e.modelValue)==null?void 0:_.response)==null?void 0:g.video_url,type:"video/mp4"},null,8,to)],8,eo)]}),_:1},8,["options"])])}var so=w(xt,[["render",oo],["__scopeId","data-v-759e400c"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/VideoPlayer.vue"]]);const no=I({name:"TaskPreview",components:{ElImage:De,CopyToClipboard:He,FontAwesomeIcon:K,ElAlert:ze,VideoPlayer:so,ElTooltip:Oe,ElButton:D},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",b(k({},(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}))},onReload(e){const t=e.target,o=new URL(t.src),i=o.searchParams.get("retry");if(!i)o.searchParams.set("retry","1");else if(parseInt(i)<2)o.searchParams.set("retry",(parseInt(i)+1).toString());else return;t.src=o.toString()},onOpenVideo(e){window.open(e,"_blank")},onDownload(e){const t=document.createElement("a");t.href=e,t.download=e.split("/").pop(),t.click()}}}),ao={class:"preview"},io={class:"left"},lo={class:"main"},ro={class:"bot"},co={class:"datetime"},uo={class:"info"},mo={key:0,class:"prompt mt-2"},po={key:0},_o={key:1},fo={key:0,class:M({content:!0,failed:!0})},ho={class:"image-wrapper"},vo={key:0,class:M({operations:!0,"mt-2":!0})},go={class:"description"},$o={key:1,class:M({content:!0})},yo={class:"description"},ko={class:"description"},bo={class:"description"},wo={key:2,class:M({content:!0})},Io={class:"description"};function Vo(e,t,o,i,f,v){var T,L,P,N,U,G,z,O,j,F,B,q,Y,Z,x,ee,te,oe,se,ne,ae,ie,le,re,ce;const r=n("el-image"),u=n("VideoPlayer"),d=n("el-button"),_=n("el-tooltip"),g=n("font-awesome-icon"),E=n("copy-to-clipboard"),C=n("el-alert");return l(),m("div",ao,[a("div",io,[s(r,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",lo,[a("div",ro,[$(c(e.$t("luma.name.lumaBot"))+" ",1),a("span",co,c(e.$dayjs.format(""+new Date(parseFloat(((T=e.modelValue)==null?void 0:T.created_at)||"")*1e3))),1)]),a("div",uo,[(P=(L=e.modelValue)==null?void 0:L.request)!=null&&P.prompt?(l(),m("p",mo,[$(c((U=(N=e.modelValue)==null?void 0:N.request)==null?void 0:U.prompt)+" ",1),(G=e.modelValue)!=null&&G.response?h("v-if",!0):(l(),m("span",po," - ("+c(e.$t("luma.status.pending"))+") ",1)),((j=(O=(z=e.modelValue)==null?void 0:z.response)==null?void 0:O.data)==null?void 0:j.state)==="processing"||((q=(B=(F=e.modelValue)==null?void 0:F.response)==null?void 0:B.data)==null?void 0:q.state)==="pending"?(l(),m("span",_o," - ("+c(e.$t("luma.status.processing"))+") ",1)):h("v-if",!0)])):h("v-if",!0)]),h(" Display success message "),((Z=(Y=e.modelValue)==null?void 0:Y.response)==null?void 0:Z.success)===!0?(l(),m("div",fo,[a("div",ho,[s(u,{"model-value":e.modelValue},null,8,["model-value"])]),((x=e.modelValue)==null?void 0:x.response)&&!((ee=e.config)!=null&&ee.custom)?(l(),m("div",vo,[s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:p(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=S=>{var V;return e.onExtend(S,(V=e.modelValue)==null?void 0:V.response)})},{default:p(()=>[$(c(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"])])):h("v-if",!0),s(C,{closable:!1,class:"mt-2 success"},{default:p(()=>{var S,V;return[a("p",go,[s(g,{icon:"fa-solid fa-magic",class:"mr-1"}),$(" "+c(e.$t("luma.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),((oe=(te=e.modelValue)==null?void 0:te.response)==null?void 0:oe.success)===!1?(l(),m("div",$o,[s(C,{closable:!1,class:"failure"},{template:p(()=>[s(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),$(" "+c(e.$t("luma.name.failure")),1)]),default:p(()=>{var S,V,ue,de,me,pe,_e,fe,he,ve,ge,$e;return[a("p",yo,[s(g,{icon:"fa-solid fa-magic",class:"mr-1"}),$(" "+c(e.$t("luma.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])]),a("p",ko,[s(g,{icon:"fa-solid fa-circle-info",class:"mr-1"}),$(" "+c(e.$t("luma.name.failureReason"))+": "+c((me=(de=(ue=e.modelValue)==null?void 0:ue.response)==null?void 0:de.error)==null?void 0:me.message)+" ",1),s(E,{content:(fe=(_e=(pe=e.modelValue)==null?void 0:pe.response)==null?void 0:_e.error)==null?void 0:fe.message,class:"btn-copy"},null,8,["content"])]),a("p",bo,[s(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),$(" "+c(e.$t("luma.name.traceId"))+": "+c((ve=(he=e.modelValue)==null?void 0:he.response)==null?void 0:ve.trace_id)+" ",1),s(E,{content:($e=(ge=e.modelValue)==null?void 0:ge.response)==null?void 0:$e.trace_id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),!((se=e.modelValue)!=null&&se.response)||((ie=(ae=(ne=e.modelValue)==null?void 0:ne.response)==null?void 0:ae.data)==null?void 0:ie.state)==="processing"||((ce=(re=(le=e.modelValue)==null?void 0:le.response)==null?void 0:re.data)==null?void 0:ce.state)==="pending"?(l(),m("div",wo,[s(C,{closable:!1,class:"info"},{template:p(()=>[s(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),$(" "+c(e.$t("luma.name.failure")),1)]),default:p(()=>{var S,V;return[a("p",Io,[s(g,{icon:"fa-solid fa-magic",class:"mr-1"}),$(" "+c(e.$t("luma.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0)])])}var Eo=w(no,[["render",Vo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const So=I({name:"RecentPanel",components:{TaskPreview:Eo,ElSkeleton:je,ElSkeletonItem:Fe},data(){return{job:0}},computed:{tasks(){var e,t,o,i;return b(k({},(e=this.$store.state.luma)==null?void 0:e.tasks),{items:(i=(o=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:i.slice().reverse()})}}}),Uo={class:"panel recent"},Co={key:0,class:"tasks"},Lo={class:"left"},Po={class:"main"},No={key:1,class:"tasks"},Ao={key:2,class:"description"};function To(e,t,o,i,f,v){var _,g,E,C,T,L,P,N;const r=n("el-skeleton-item"),u=n("el-skeleton"),d=n("task-preview");return l(),m("div",Uo,[((_=e.tasks)==null?void 0:_.items)===void 0?(l(),m("div",Co,[(l(),m(be,null,we(3,U=>a("div",{key:U,class:"task placeholder"},[a("div",Lo,[s(u,{animated:""},{template:p(()=>[s(r,{variant:"image",class:"avatar"})]),_:1})]),a("div",Po,[s(u,{animated:""},{template:p(()=>[s(r,{variant:"p",class:"title"}),s(r,{variant:"image",class:"icon"})]),_:1})])])),64))])):((E=(g=e.tasks)==null?void 0:g.items)==null?void 0:E.length)&&((T=(C=e.tasks)==null?void 0:C.items)==null?void 0:T.length)>0?(l(),m("div",No,[(l(!0),m(be,null,we((L=e.tasks)==null?void 0:L.items,(U,G)=>(l(),A(d,{key:G,"model-value":U,class:"preview"},null,8,["model-value"]))),128))])):h("v-if",!0),((N=(P=e.tasks)==null?void 0:P.items)==null?void 0:N.length)===0?(l(),m("p",Ao,c(e.$t("luma.message.noTasks")),1)):h("v-if",!0)])}var Go=w(So,[["render",To],["__scopeId","data-v-2f8302a7"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const Ro="https://webhook.acedata.cloud/luma",Do=I({name:"LumaIndex",components:{ConfigPanel:Zt,Layout:Ye,ApplicationStatus:Be,RecentPanel:Go},data(){return{task:void 0,job:0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===H.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===H.Request},needApply(){return this.$store.state.luma.status.getApplications===H.Success&&!this.application},application(){return this.$store.state.luma.application}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job)},methods:{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(){Ae.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)===qe&&y.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("luma/getTasks",{limit:30,offset:0})},async onGenerateVideo(){var o;const e=b(k({},this.config),{callback_url:Ro}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}y.info(this.$t("luma.message.startingTask")),Te.generate(e,{token:t}).then(()=>{y.success(this.$t("luma.message.startTaskSuccess")),this.$store.commit("luma/setConfig",{config:void 0})}).catch(i=>{var v,r;const f=(v=i==null?void 0:i.response)==null?void 0:v.data;((r=f==null?void 0:f.error)==null?void 0:r.code)===Me?y.error(this.$t("luma.message.usedUp")):y.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function zo(e,t,o,i,f,v){const r=n("config-panel"),u=n("application-status"),d=n("recent-panel"),_=n("layout");return l(),A(_,null,{config:p(()=>[s(r,{onGenerate:e.onGenerateVideo},null,8,["onGenerate"])]),result:p(()=>[s(u,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),s(d,{class:"panel recent"}),h(' <operation-panel class="panel operation" @generate="onGenerate" /> ')]),_:1})}var Xo=w(Do,[["render",zo],["__scopeId","data-v-c45e0af8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{Xo as default};
1
+ var Ve=Object.defineProperty,Ee=Object.defineProperties;var Se=Object.getOwnPropertyDescriptors;var ye=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable;var ke=(e,t,o)=>t in e?Ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,k=(e,t)=>{for(var o in t||(t={}))Ue.call(t,o)&&ke(e,o,t[o]);if(ye)for(var o of ye(t))Ce.call(t,o)&&ke(e,o,t[o]);return e},b=(e,t)=>Ee(e,Se(t));import{J as Ie}from"./vendor-others.3942faf7.js";import{am as K}from"./vendor-fortawesome.9316cbe8.js";import{_ as w,ar as Le,as as Pe,at as Ne,H as Q,T as H,z as Ae,au as Te}from"./index.c079f52d.js";import{P as Ge,k as D,T as W,N as X,L as y,M as Re,r as De,D as ze,t as Oe,B as je,R as Fe}from"./vendor-element-plus.351bec67.js";import{H as I,al as n,o as l,e as m,f as a,I as J,V as s,M as p,U as c,T as $,L as A,S as h,Q as M,W as be,ai as we}from"./vendor-@vue.460d47cf.js";import{I as R}from"./InfoIcon.8d11b6b9.js";import{A as Be,i as qe,h as Me}from"./Status.d9f6f683.js";import{C as He}from"./CopyToClipboard.3039bd92.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.f14582ab.js";const Je=I({name:"LayoutLuma",components:{ElDrawer:Ge,ElButton:D,FontAwesomeIcon:K},data(){return{drawer:!1}}}),Ke={class:"main"},Qe={class:"config"},We={class:"result"};function Xe(e,t,o,i,f,v){const r=n("font-awesome-icon"),u=n("el-button"),d=n("el-drawer");return l(),m("div",Ke,[a("div",Qe,[J(e.$slots,"config",{},void 0,!0)]),a("div",We,[J(e.$slots,"result",{},void 0,!0)]),s(u,{round:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:p(()=>[s(r,{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:p(()=>[J(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var Ye=w(Je,[["render",Xe],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const Ze=I({name:"EnhancementSelector",components:{ElSwitch:W,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{enhancement:e}))}}},mounted(){this.value===void 0&&(this.value=Le)}}),xe={class:"field"},et={class:"title"};function tt(e,t,o,i,f,v){const r=n("el-switch"),u=n("info-icon");return l(),m("div",xe,[a("h2",et,c(e.$t("luma.name.enhancement")),1),s(r,{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 ot=w(Ze,[["render",tt],["__scopeId","data-v-175365a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const st=I({name:"CustomSelector",components:{ElSwitch:W,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{custom:e}))}}},mounted(){this.value===void 0&&(this.value=Pe)}}),nt={class:"field"},at={class:"title"};function it(e,t,o,i,f,v){const r=n("el-switch"),u=n("info-icon");return l(),m("div",nt,[a("h2",at,c(e.$t("luma.name.custom")),1),s(r,{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 lt=w(st,[["render",it],["__scopeId","data-v-5ac2addb"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const rt=I({name:"LoopSelector",components:{ElSwitch:W,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{loop:e}))}}},mounted(){this.value===void 0&&(this.value=Ne)}}),ct={class:"field"},ut={class:"title"};function dt(e,t,o,i,f,v){const r=n("el-switch"),u=n("info-icon");return l(),m("div",ct,[a("h2",ut,c(e.$t("luma.name.loop")),1),s(r,{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 mt=w(rt,[["render",dt],["__scopeId","data-v-69cccd4e"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const pt=I({name:"ContentInput",components:{ElUpload:X,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:Q()+"/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(e){var o,i;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",b(k({},(i=this.$store.state.luma)==null?void 0:i.config),{end_image_url:t}))}}},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",b(k({},(o=this.$store.state.luma)==null?void 0:o.config),{end_image_url:e}))},async onSuccess(){this.onSetEndImageUrl()}}}),_t={class:"field"},ft={class:"title"},ht={class:"upload-wrapper"};function vt(e,t,o,i,f,v){const r=n("el-button"),u=n("el-upload"),d=n("info-icon");return l(),m("div",_t,[a("h2",ft,c(e.$t("luma.name.endImageUrl")),1),a("div",ht,[s(u,{"file-list":e.fileList,"onUpdate:file-list":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:p(()=>[s(r,{size:"small",type:"primary",round:""},{default:p(()=>[$(c(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 gt=w(pt,[["render",vt],["__scopeId","data-v-97900bb4"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageUrlInput.vue"]]);const $t=I({name:"StartImageUrlInput",components:{ElUpload:X,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:Q()+"/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,i;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",b(k({},(i=this.$store.state.luma)==null?void 0:i.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",b(k({},(o=this.$store.state.luma)==null?void 0:o.config),{start_image_url:e}))},async onSuccess(){this.onSetStartImageUrl()}}}),yt={class:"field"},kt={class:"title"},bt={class:"upload-wrapper"};function wt(e,t,o,i,f,v){const r=n("el-button"),u=n("el-upload"),d=n("info-icon");return l(),m("div",yt,[a("h2",kt,c(e.$t("luma.name.startImageUrl")),1),a("div",bt,[s(u,{"file-list":e.fileList,"onUpdate:file-list":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:p(()=>[s(r,{size:"small",type:"primary",round:""},{default:p(()=>[$(c(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 It=w($t,[["render",wt],["__scopeId","data-v-5440a4bf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageUrlInput.vue"]]);const Vt=I({name:"UploadVideo",components:{ElUpload:X,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:Q()+"/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(e){var o,i;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",b(k({},(i=this.$store.state.luma)==null?void 0:i.config),{video_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetVideoUrl()},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",b(k({},(o=this.$store.state.luma)==null?void 0:o.config),{video_url:e,action:"extend"}))},async onSuccess(){this.onSetVideoUrl()}}}),Et={class:"field"},St={class:"title"},Ut={class:"upload-wrapper"};function Ct(e,t,o,i,f,v){const r=n("el-button"),u=n("el-upload"),d=n("info-icon");return l(),m("div",Et,[a("h2",St,c(e.$t("luma.name.videoUrl")),1),a("div",Ut,[s(u,{"file-list":e.fileList,"onUpdate:file-list":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:p(()=>[s(r,{size:"small",type:"primary",round:""},{default:p(()=>[$(c(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 Lt=w(Vt,[["render",Ct],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const Pt="",Nt=I({name:"PromptInput",components:{ElInput:Re,InfoIcon:R},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",b(k({},(t=this.$store.state.luma)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=Pt)}}),At={class:"field"},Tt={class:"box"},Gt={class:"title"};function Rt(e,t,o,i,f,v){const r=n("info-icon"),u=n("el-input");return l(),m("div",At,[a("div",Tt,[a("h2",Gt,c(e.$t("luma.name.prompt")),1),s(r,{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:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Dt=w(Nt,[["render",Rt],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const zt=I({name:"ExtendFromInput",components:{VuePlyr:Ie},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}}}),Ot={class:"field"},jt={class:"box"},Ft={class:"title"},Bt={class:"task"},qt=["data-poster"],Mt=["src"];function Ht(e,t,o,i,f,v){const r=n("vue-plyr");return l(),m("div",Ot,[a("div",jt,[a("h2",Ft,c(e.$t("luma.name.extend")),1)]),a("div",Bt,[a("div",null,[s(r,{options:e.options,class:"video"},{default:p(()=>{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,Mt)],8,qt)]}),_:1},8,["options"])])])])}var Jt=w(zt,[["render",Ht],["__scopeId","data-v-1cefb16b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const Kt=I({name:"PresetPanel",components:{LoopSelector:mt,StartImageUrlInput:It,EndImageUrlInput:gt,EnhancementSelector:ot,ElButton:D,FontAwesomeIcon:K,PromptInput:Dt,ExtendFromInput:Jt,CustomSelector:lt,UploadVideo:Lt},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Qt={class:"panel"},Wt={class:"config"},Xt={class:"actions"};function Yt(e,t,o,i,f,v){var N,U,G,z,O,j,F,B,q;const r=n("extend-from-input"),u=n("prompt-input"),d=n("custom-selector"),_=n("upload-video"),g=n("start-image-url-input"),E=n("end-image-url-input"),C=n("enhancement-selector"),T=n("loop-selector"),L=n("font-awesome-icon"),P=n("el-button");return l(),m("div",Qt,[a("div",Wt,[((N=e.config)==null?void 0:N.video_id)||((U=e.config)==null?void 0:U.video_url)?(l(),A(r,{key:0,class:"mb-4"})):h("v-if",!0),s(u,{class:"mb-4"}),(G=e.config)!=null&&G.video_id?h("v-if",!0):(l(),A(d,{key:1,class:"mb-4"})),(z=e.config)!=null&&z.custom?(l(),A(_,{key:2,class:"mb-4"})):h("v-if",!0),!(((O=e.config)==null?void 0:O.video_id)||((j=e.config)==null?void 0:j.video_url))&&!((F=e.config)!=null&&F.custom)?(l(),A(g,{key:3,class:"mb-4"})):h("v-if",!0),s(E,{class:"mb-4"}),s(C,{class:"mb-4"}),s(T,{class:"mb-4"}),a("div",Xt,[((B=e.config)==null?void 0:B.video_url)!==void 0||((q=e.config)==null?void 0:q.custom)?(l(),A(P,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:p(()=>[s(L,{icon:"fa-solid fa-magic",class:"mr-2"}),$(" "+c(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(l(),A(P,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:p(()=>[s(L,{icon:"fa-solid fa-magic",class:"mr-2"}),$(" "+c(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var Zt=w(Kt,[["render",Yt],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const xt=I({name:"VideoPlayer",components:{VuePlyr:Ie},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}}}),eo=["data-poster"],to=["src"];function oo(e,t,o,i,f,v){const r=n("vue-plyr");return l(),m("div",null,[s(r,{options:e.options,class:"video"},{default:p(()=>{var u,d,_,g;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:(g=(_=e.modelValue)==null?void 0:_.response)==null?void 0:g.video_url,type:"video/mp4"},null,8,to)],8,eo)]}),_:1},8,["options"])])}var so=w(xt,[["render",oo],["__scopeId","data-v-759e400c"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/VideoPlayer.vue"]]);const no=I({name:"TaskPreview",components:{ElImage:De,CopyToClipboard:He,FontAwesomeIcon:K,ElAlert:ze,VideoPlayer:so,ElTooltip:Oe,ElButton:D},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",b(k({},(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}))},onReload(e){const t=e.target,o=new URL(t.src),i=o.searchParams.get("retry");if(!i)o.searchParams.set("retry","1");else if(parseInt(i)<2)o.searchParams.set("retry",(parseInt(i)+1).toString());else return;t.src=o.toString()},onOpenVideo(e){window.open(e,"_blank")},onDownload(e){const t=document.createElement("a");t.href=e,t.download=e.split("/").pop(),t.click()}}}),ao={class:"preview"},io={class:"left"},lo={class:"main"},ro={class:"bot"},co={class:"datetime"},uo={class:"info"},mo={key:0,class:"prompt mt-2"},po={key:0},_o={key:1},fo={key:0,class:M({content:!0,failed:!0})},ho={class:"image-wrapper"},vo={key:0,class:M({operations:!0,"mt-2":!0})},go={class:"description"},$o={key:1,class:M({content:!0})},yo={class:"description"},ko={class:"description"},bo={class:"description"},wo={key:2,class:M({content:!0})},Io={class:"description"};function Vo(e,t,o,i,f,v){var T,L,P,N,U,G,z,O,j,F,B,q,Y,Z,x,ee,te,oe,se,ne,ae,ie,le,re,ce;const r=n("el-image"),u=n("VideoPlayer"),d=n("el-button"),_=n("el-tooltip"),g=n("font-awesome-icon"),E=n("copy-to-clipboard"),C=n("el-alert");return l(),m("div",ao,[a("div",io,[s(r,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",lo,[a("div",ro,[$(c(e.$t("luma.name.lumaBot"))+" ",1),a("span",co,c(e.$dayjs.format(""+new Date(parseFloat(((T=e.modelValue)==null?void 0:T.created_at)||"")*1e3))),1)]),a("div",uo,[(P=(L=e.modelValue)==null?void 0:L.request)!=null&&P.prompt?(l(),m("p",mo,[$(c((U=(N=e.modelValue)==null?void 0:N.request)==null?void 0:U.prompt)+" ",1),(G=e.modelValue)!=null&&G.response?h("v-if",!0):(l(),m("span",po," - ("+c(e.$t("luma.status.pending"))+") ",1)),((j=(O=(z=e.modelValue)==null?void 0:z.response)==null?void 0:O.data)==null?void 0:j.state)==="processing"||((q=(B=(F=e.modelValue)==null?void 0:F.response)==null?void 0:B.data)==null?void 0:q.state)==="pending"?(l(),m("span",_o," - ("+c(e.$t("luma.status.processing"))+") ",1)):h("v-if",!0)])):h("v-if",!0)]),h(" Display success message "),((Z=(Y=e.modelValue)==null?void 0:Y.response)==null?void 0:Z.success)===!0?(l(),m("div",fo,[a("div",ho,[s(u,{"model-value":e.modelValue},null,8,["model-value"])]),((x=e.modelValue)==null?void 0:x.response)&&!((ee=e.config)!=null&&ee.custom)?(l(),m("div",vo,[s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:p(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=S=>{var V;return e.onExtend(S,(V=e.modelValue)==null?void 0:V.response)})},{default:p(()=>[$(c(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"])])):h("v-if",!0),s(C,{closable:!1,class:"mt-2 success"},{default:p(()=>{var S,V;return[a("p",go,[s(g,{icon:"fa-solid fa-magic",class:"mr-1"}),$(" "+c(e.$t("luma.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),((oe=(te=e.modelValue)==null?void 0:te.response)==null?void 0:oe.success)===!1?(l(),m("div",$o,[s(C,{closable:!1,class:"failure"},{template:p(()=>[s(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),$(" "+c(e.$t("luma.name.failure")),1)]),default:p(()=>{var S,V,ue,de,me,pe,_e,fe,he,ve,ge,$e;return[a("p",yo,[s(g,{icon:"fa-solid fa-magic",class:"mr-1"}),$(" "+c(e.$t("luma.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])]),a("p",ko,[s(g,{icon:"fa-solid fa-circle-info",class:"mr-1"}),$(" "+c(e.$t("luma.name.failureReason"))+": "+c((me=(de=(ue=e.modelValue)==null?void 0:ue.response)==null?void 0:de.error)==null?void 0:me.message)+" ",1),s(E,{content:(fe=(_e=(pe=e.modelValue)==null?void 0:pe.response)==null?void 0:_e.error)==null?void 0:fe.message,class:"btn-copy"},null,8,["content"])]),a("p",bo,[s(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),$(" "+c(e.$t("luma.name.traceId"))+": "+c((ve=(he=e.modelValue)==null?void 0:he.response)==null?void 0:ve.trace_id)+" ",1),s(E,{content:($e=(ge=e.modelValue)==null?void 0:ge.response)==null?void 0:$e.trace_id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),!((se=e.modelValue)!=null&&se.response)||((ie=(ae=(ne=e.modelValue)==null?void 0:ne.response)==null?void 0:ae.data)==null?void 0:ie.state)==="processing"||((ce=(re=(le=e.modelValue)==null?void 0:le.response)==null?void 0:re.data)==null?void 0:ce.state)==="pending"?(l(),m("div",wo,[s(C,{closable:!1,class:"info"},{template:p(()=>[s(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),$(" "+c(e.$t("luma.name.failure")),1)]),default:p(()=>{var S,V;return[a("p",Io,[s(g,{icon:"fa-solid fa-magic",class:"mr-1"}),$(" "+c(e.$t("luma.name.taskId"))+": "+c((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(V=e.modelValue)==null?void 0:V.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0)])])}var Eo=w(no,[["render",Vo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const So=I({name:"RecentPanel",components:{TaskPreview:Eo,ElSkeleton:je,ElSkeletonItem:Fe},data(){return{job:0}},computed:{tasks(){var e,t,o,i;return b(k({},(e=this.$store.state.luma)==null?void 0:e.tasks),{items:(i=(o=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:i.slice().reverse()})}}}),Uo={class:"panel recent"},Co={key:0,class:"tasks"},Lo={class:"left"},Po={class:"main"},No={key:1,class:"tasks"},Ao={key:2,class:"description"};function To(e,t,o,i,f,v){var _,g,E,C,T,L,P,N;const r=n("el-skeleton-item"),u=n("el-skeleton"),d=n("task-preview");return l(),m("div",Uo,[((_=e.tasks)==null?void 0:_.items)===void 0?(l(),m("div",Co,[(l(),m(be,null,we(3,U=>a("div",{key:U,class:"task placeholder"},[a("div",Lo,[s(u,{animated:""},{template:p(()=>[s(r,{variant:"image",class:"avatar"})]),_:1})]),a("div",Po,[s(u,{animated:""},{template:p(()=>[s(r,{variant:"p",class:"title"}),s(r,{variant:"image",class:"icon"})]),_:1})])])),64))])):((E=(g=e.tasks)==null?void 0:g.items)==null?void 0:E.length)&&((T=(C=e.tasks)==null?void 0:C.items)==null?void 0:T.length)>0?(l(),m("div",No,[(l(!0),m(be,null,we((L=e.tasks)==null?void 0:L.items,(U,G)=>(l(),A(d,{key:G,"model-value":U,class:"preview"},null,8,["model-value"]))),128))])):h("v-if",!0),((N=(P=e.tasks)==null?void 0:P.items)==null?void 0:N.length)===0?(l(),m("p",Ao,c(e.$t("luma.message.noTasks")),1)):h("v-if",!0)])}var Go=w(So,[["render",To],["__scopeId","data-v-2f8302a7"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const Ro="https://webhook.acedata.cloud/luma",Do=I({name:"LumaIndex",components:{ConfigPanel:Zt,Layout:Ye,ApplicationStatus:Be,RecentPanel:Go},data(){return{task:void 0,job:0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===H.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===H.Request},needApply(){return this.$store.state.luma.status.getApplications===H.Success&&!this.application},application(){return this.$store.state.luma.application}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job)},methods:{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(){Ae.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)===qe&&y.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("luma/getTasks",{limit:30,offset:0})},async onGenerateVideo(){var o;const e=b(k({},this.config),{callback_url:Ro}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}y.info(this.$t("luma.message.startingTask")),Te.generate(e,{token:t}).then(()=>{y.success(this.$t("luma.message.startTaskSuccess")),this.$store.commit("luma/setConfig",{config:void 0})}).catch(i=>{var v,r;const f=(v=i==null?void 0:i.response)==null?void 0:v.data;((r=f==null?void 0:f.error)==null?void 0:r.code)===Me?y.error(this.$t("luma.message.usedUp")):y.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function zo(e,t,o,i,f,v){const r=n("config-panel"),u=n("application-status"),d=n("recent-panel"),_=n("layout");return l(),A(_,null,{config:p(()=>[s(r,{onGenerate:e.onGenerateVideo},null,8,["onGenerate"])]),result:p(()=>[s(u,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),s(d,{class:"panel recent"}),h(' <operation-panel class="panel operation" @generate="onGenerate" /> ')]),_:1})}var Xo=w(Do,[["render",zo],["__scopeId","data-v-c45e0af8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{Xo as default};