PageSourceSearch

https://animechat.ai/js/BZllb5D-ia.js

js animechat.ai collected 2026-10-05 14:39:03 UTC 91,487 bytes, 33 lines download raw bytes

1import{t as O}from"./CAzdJxL5qq.js";import{$ as ie,A as se,Ct as Oe,Dt as Ye,Et as K,J as r,L as D,P as We,S as U,St as J,Tt as x,V as Ge,W as Je,X as ce,Z as T,_ as g,d as De,et as Ze,f as Q,g as L,h as a,j as Fe,kt as Xe,o as X,ot as i,pt as z,tt as $,u as Le,v as p,w as pe,x as A,xt as Ce,z as et}from"./BlZcJmLfRY.js";import{a as tt}from"./B2zzTuAtRm.js";import{G as at,V as ot,_t as be,i as Se}from"./BccehddyUE.js";import{t as ne}from"./CDi541Olhp.js";import{t as Y}from"./BAYocCBqKS.js";import{t as st}from"./DiwFWSgPAU.js";import{E as Be,Et as nt,V as xe,Xt as he,Zt as Ee,on as it,p as rt,yt as ze}from"../assets/index-BQMMr1NT.js";import"./DRLVjeRxUt.js";import{t as Ke}from"./BSicylJnht.js";import{t as lt}from"./B2fcfKo0fU.js";import{t as dt}from"./BHmjarpXTy2.js";import{t as qe}from"./nDApRH1-AG.js";import{t as ut}from"./COyPZUVxY1.js";import{r as Ue}from"./l_GkZCK5B6.js";import{t as ct}from"./CRKiT__vap.js";import{t as ht}from"./Bf-bmRJKgZ.js";import{t as pt}from"./BezNXM5DHb.js";import{t as mt}from"./Dlq4dlWwnn.js";import{t as ft}from"./BXm_GoIR7u2.js";import{t as gt}from"./B1A9RCSefx.js";import{t as bt}from"./B_KAdnqV7l2.js";import{t as re}from"./-2euXENRkN2.js";import{i as Re,r as yt}from"./D8jLUSQVri.js";import{t as vt}from"./Dcp4EOSF3W.js";import{t as Ve}from"./DcUur634Px.js";import{t as St}from"./BYOvFdHeib.js";import{t as Ct}from"./aS7hYm5mhV2.js";var _t="/assets/D8BiWTJOdT.png";se();var ye="unknown",wt=540*60*1e3,Pt={name:"OriginalStoryContents",components:{UploadedContentThumbnail:Ve},props:{entries:{type:Array,default:()=>[]},isMobile:{type:Boolean,required:!0},forceFetch:{type:Boolean,default:!1}},emits:["content-copied","content-deleted"],data(){return{contentMetadataSet:{},expandedMonths:{},metadataRequestVersion:0}},computed:{currentMonthKey(){const e=new Date(Date.now()+wt);return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}`},normalizedEntries(){return this.entries.filter(e=>e?.contentOid&&["active","released"].includes(e.originalStatus))},monthGroups(){const e=new Map;for(const s of this.normalizedEntries){const c=/^\d{4}-\d{2}$/.test(String(s.activationMonthKey||""))?s.activationMonthKey:ye;e.has(c)||e.set(c,[]),e.get(c).push(s)}const t=s=>s.originalStatus==="released"?3:s.contentStatus==="wip"?0:s.contentStatus==="waiting"?1:2;return[...e.entries()].sort(([s],[c])=>s===ye?1:c===ye?-1:c.localeCompare(s)).map(([s,c])=>{const o=[...c].sort((n,S)=>{const d=t(n)-t(S);return d!==0?d:new Date(S.activatedAt||0).getTime()-new Date(n.activatedAt||0).getTime()});return{monthKey:s,items:o,wipCount:o.filter(n=>n.originalStatus==="active"&&n.contentStatus==="wip").length,waitingCount:o.filter(n=>n.originalStatus==="active"&&n.contentStatus==="waiting").length,publishedCount:o.filter(n=>n.originalStatus==="active"&&n.contentStatus==="published").length,releasedCount:o.filter(n=>n.originalStatus==="released").length}})},currentMonthQuotaSummary(){const e=this.normalizedEntries.filter(s=>s.activationMonthKey===this.currentMonthKey&&s.requestorQuota?.counted===!0),t=e.map(s=>Number(s.requestorQuota?.limitSnapshot)).filter(s=>Number.isFinite(s)&&s>0);return e.length===0||t.length===0?null:{used:e.length,limit:Math.max(...t)}},locale(){return{en:"en-US",ko:"ko-KR",jp:"ja-JP",es:"es-ES","zh-Hant":"zh-TW",zh:"zh-CN"}[Y.methods._getLang()]||"en-US"}},watch:{entries:{immediate:!0,deep:!0,handler(){this.syncExpandedMonths(),this.fetchContentMetadata()}}},methods:{syncExpandedMonths(){const e={};this.monthGroups.forEach((t,s)=>{e[t.monthKey]=this.expandedMonths[t.monthKey]??(t.monthKey===this.currentMonthKey||s===0)}),this.expandedMonths=e},toggleMonth(e){this.expandedMonths={...this.expandedMonths,[e]:!this.isMonthExpanded(e)}},isMonthExpanded(e){return this.expandedMonths[e]===!0},formatMonth(e){if(e===ye)return this._tr("Studio","original-activation-month-unknown");const[t,s]=e.split("-").map(Number);return new Intl.DateTimeFormat(this.locale,{year:"numeric",month:"long",timeZone:"UTC"}).format(new Date(Date.UTC(t,s-1,1)))},formatDate(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(this.locale,{year:"numeric",month:"short",day:"numeric",timeZone:"Asia/Seoul"}).format(t)},statusLabel(e){return e.originalStatus==="released"?this._tr("Studio","original-status-released"):e.contentStatus==="waiting"?this._tr("Studio","original-status-waiting"):e.contentStatus==="published"?this._tr("Studio","original-status-published"):this._tr("Studio","original-status-wip")},statusClass(e){return e.originalStatus==="released"?"bg-surface-interactive text-content-secondary":e.contentStatus==="waiting"?"bg-status-info/minimal text-status-info-foreground":e.contentStatus==="published"?"bg-status-success-emphasis/minimal text-status-success-foreground":"bg-status-caution-emphasis/minimal text-status-caution-content"},async fetchContentMetadata(){const e=[...new Set(this.normalizedEntries.map(o=>o.contentOid))].filter(o=>!this.contentMetadataSet[o]);if(e.length===0)return;const t=++this.metadataRequestVersion,s=[];for(let o=0;o<e.length;o+=100)s.push(e.slice(o,o+100));const c=await Promise.all(s.map(o=>he.bulkGetContentWithOid(o,"storyChat","collaborators|encrypted|drm|drmPurchased|discountCodeSettings|canvasCompilationSummary",!1,void 0,!1,this.forceFetch).catch(n=>({}))));t===this.metadataRequestVersion&&(this.contentMetadataSet=Object.assign({},this.contentMetadataSet,...c))},handleContentDeleted(e){this.$emit("content-deleted",e)}}},kt={class:"my-2 w-full overflow-hidden rounded-lg border-strong border-accent-default bg-surface-raised text-content-primary"},Mt={class:"flex flex-col gap-3 bg-accent-default/minimal p-4 md:flex-row md:items-center md:justify-between md:p-6"},Tt={class:"flex items-start gap-3"},Lt={class:"text-lg font-weight-bold leading-relaxed"},xt={class:"mt-1 text-xs leading-standard text-content-secondary"}
1,Et={key:0,class:"w-fit rounded-pill border border-accent-default px-3 py-1 text-xs font-weight-bold leading-standard text-accent-default"},Ot=["onClick"],Dt={class:"min-w-0"},Ut={class:"flex flex-wrap items-center gap-2"},Rt={class:"text-sm font-weight-bold leading-standard"},At={key:0,class:"rounded-pill bg-accent-default/very-low px-2 py-component-3xs text-caption-label text-accent-default"},Nt={class:"text-xs leading-standard text-content-secondary"},jt={class:"mt-2 flex flex-wrap gap-2"},It={key:0,class:"rounded-pill bg-status-caution-emphasis/minimal px-2 py-component-3xs text-caption-label text-status-caution-content"},$t={key:1,class:"rounded-pill bg-status-info/minimal px-2 py-component-3xs text-caption-label text-status-info-foreground"},Gt={key:2,class:"rounded-pill bg-status-success-emphasis/minimal px-2 py-component-3xs text-caption-label text-status-success-foreground"},Ft={key:3,class:"rounded-pill bg-surface-interactive px-2 py-component-3xs text-caption-label text-content-secondary"},Bt={class:"space-y-3 bg-surface-sunken p-3 md:p-4"},zt={class:"mb-2 flex flex-wrap items-center gap-2 px-1"},Kt={key:0,class:"text-xs leading-standard text-content-secondary"},qt={key:1,class:"text-xs leading-standard text-content-secondary"},Vt={key:2,class:"text-xs leading-standard text-content-tertiary"},Ht={key:3,class:"rounded-pill bg-status-caution-emphasis/minimal px-2 py-component-3xs text-caption-label text-status-caution-content"};function Qt(e,t,s,c,o,n){const S=$("UploadedContentThumbnail");return r(),p("section",kt,[a("header",Mt,[a("div",Tt,[t[1]||(t[1]=a("div",{class:"flex h-9 w-9 flex-none items-center justify-center rounded-pill bg-accent-default text-accent-content"},[a("img",{class:"h-5 w-5",src:"/assets/C3f6Dn32FC.svg",alt:"","aria-hidden":"true"})],-1)),a("div",null,[a("h2",Lt,i(e._tr("Studio","original-content")),1),a("p",xt,i(e._tr("Studio","original-content-description")),1)])]),n.currentMonthQuotaSummary?(r(),p("div",Et,i(e._tr("Studio","original-current-month-usage",{used:n.currentMonthQuotaSummary.used,limit:n.currentMonthQuotaSummary.limit})),1)):g("",!0)]),(r(!0),p(X,null,ie(n.monthGroups,d=>(r(),p("div",{class:"border-t border-border-subtle",key:d.monthKey},[a("button",{class:"flex w-full items-center justify-between gap-3 px-4 py-4 text-left transition-colors hover:bg-surface-interactive md:px-6",type:"button",onClick:l=>n.toggleMonth(d.monthKey)},[a("div",Dt,[a("div",Ut,[a("h3",Rt,i(n.formatMonth(d.monthKey)),1),d.monthKey===n.currentMonthKey?(r(),p("span",At,i(e._tr("Studio","original-current-month")),1)):g("",!0),a("span",Nt,i(e._tr("Studio","original-record-count",{count:d.items.length})),1)]),a("div",jt,[d.wipCount>0?(r(),p("span",It,i(e._tr("Studio","original-status-wip"))+" "+i(d.wipCount),1)):g("",!0),d.waitingCount>0?(r(),p("span",$t,i(e._tr("Studio","original-status-waiting"))+" "+i(d.waitingCount),1)):g("",!0),d.publishedCount>0?(r(),p("span",Gt,i(e._tr("Studio","original-status-published"))+" "+i(d.publishedCount),1)):g("",!0),d.releasedCount>0?(r(),p("span",Ft,i(e._tr("Studio","original-status-released"))+" "+i(d.releasedCount),1)):g("",!0)])]),(r(),p("svg",{class:D(["h-5 w-5 flex-none text-content-secondary transition-transform duration-standard",{"rotate-180":n.isMonthExpanded(d.monthKey)}]),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...t[2]||(t[2]=[a("path",{d:"m6 9 6 6 6-6"},null,-1)])],2))],8,Ot),K(a("div",Bt,[(r(!0),p(X,null,ie(d.items,(l,f)=>(r(),p("article",{class:D(["rounded-md border border-border-subtle bg-surface-raised p-2",{"opacity-supporting":l.originalStatus==="released"}]),key:l.originalStoryOid||`${l.contentOid}-${f}`},[a("div",zt,[a("span",{class:D(["rounded-pill px-2 py-component-3xs text-caption-label font-weight-bold",n.statusClass(l)])},i(n.statusLabel(l)),3),l.activatedAt?(r(),p("span",Kt,i(e._tr("Studio","original-activated-at",{date:n.formatDate(l.activatedAt)})),1)):g("",!0),l.originalStatus==="active"&&l.lockedUntil?(r(),p("span",qt,i(e._tr("Studio","original-locked-until",{date:n.formatDate(l.lockedUntil)})),1)):g("",!0),l.originalStatus==="released"&&l.releasedAt?(r(),p("span",Vt,i(e._tr("Studio","original-released-at",{date:n.formatDate(l.releasedAt)})),1)):g("",!0),l.originalStatus==="released"&&l.requestorQuota?.counted?(r(),p("span",Ht,i(e._tr("Studio","original-released-quota-counted")),1)):g("",!0)]),U(S,{isMobile:s.isMobile,modelValue:!1,contentOid:l.contentOid,contentType:"storyChat",allowSelection:!1,contentMetadata:o.contentMetadataSet[l.contentOid],onOnDeleteContent:P=>n.handleContentDeleted(l.contentOid),onOnContentCopied:t[0]||(t[0]=P=>e.$emit("content-copied"))},null,8,["isMobile","contentOid","contentMetadata","onOnDeleteContent"])],2))),128))],512),[[J,n.isMonthExpanded(d.monthKey)]])]))),128))])}var Yt=ne(Pt,[["render",Qt]]);se();var Z=Y.methods._tr,Wt=pe({name:"BulkModifyPopup",components:{ToggleSwitch:Be,DropdownButton:dt,PlaxButton:xe,HashtagField:bt,InputInvitationRules:rt,ContentDiscountSettings:St},props:{data:{type:Object}},computed:{currentUserInfo(){return this.$store.getters["AccountModule/currentUserInfo"]}
1,titleOperationList(){return[{value:"prefix",title:Z("StudioPublishPrompt","prepend")},{value:"suffix",title:Z("StudioPublishPrompt","suffix")},{value:"replace",title:Z("StudioPublishPrompt","replace")}]},tagOperationList(){return[{value:"append",title:Z("StudioPublishPrompt","tag-append")},{value:"remove",title:Z("StudioPublishPrompt","tag-remove")},{value:"replace",title:Z("StudioPublishPrompt","tag-replace")}]}},setup(e,{emit:t}){const s=T("home"),c=T(""),o=e.data.contentType,n=e.data.checkedContents,S=e.data.contentMetadataSet||{},d=e.data.callbackOnClose||(()=>{}),l=T({}),f=["en",...Re.filter(C=>C!=="en")].map(C=>({lang:C,name:`${Z("GameBuild",`language-${C}`)} ${yt[C]}`}));Z("Studio","title"),Z("Studio","tags"),Z("Studio","price"),Z("Studio","discount");const P=C=>{s.value=C;const F=Re.reduce((N,V)=>(N[V]="",N),{});if(C==="title")l.value={singleTitle:"",titleLanguages:F};else if(C==="hashtags")l.value={tags:[]};else if(C==="price"){const N=Se.getters["AccountModule/currentUserInfo"]?.subscriptionTiers,V=[];for(const B of N)V.push({use:!1,name:B.name,tierHash:B.tierHash});l.value={price:0,useSubscriber:!1,useCoin:!1,useBonusCoin:!1,tierDatas:V}}else C==="discount"&&(l.value={useDiscountSetting:!1,discountSettings:{value:0,discountType:"fixed"}})};function w(){l.value.useDiscountSetting=!l.value.useDiscountSetting}function k(C){c.value=C}function R(C){l.value=C}function M(){s.value="home"}function j(C){l.value.tags=C}function h(){return new Promise((C,F)=>{he.updateContent({metaData:{contents:n,mode:"many",operationType:s.value,operation:c.value,data:l.value}},o).then(N=>{setTimeout(()=>{d().then(()=>{C(N),t("close-popup")})},1e3)}).catch(N=>{F(N)})})}function u(C){l.value.discountSettings=C}return{operationData:l,currentPage:s,setPage:P,selectedOperation:c,operationSelect:k,cancel:M,confirm:h,updateTags:j,updateInvitationRules:R,tr:Z,titleLanguageList:f,updateDiscountSettings:u,onToggleDiscountSettings:w,isPink:Fe("romanticplay"),hasDiscountedContents:Q(()=>{const C=new Date;return n.some(F=>{const N=S[F];if(!N?.discountSettings)return!1;const V=new Date(N.discountSettings.startAt),B=new Date(N.discountSettings.endAt);return V<=C&&B>C})})}}}),Jt={class:"flex w-screen max-w-464px flex-col gap-2"},Zt={class:"flex w-full flex-col items-end justify-center gap-2"},Xt={class:"flex w-full items-center justify-start",key:"top-nav"},ea={class:"flex w-full justify-end",key:"home-image"},ta={key:0,class:"w-200px opacity-quarter",src:Ke,alt:"mascot"},aa={key:1,class:"w-200px opacity-quarter",src:lt,alt:"mascot"},oa={class:"flex w-full flex-row gap-2",key:"home"},sa={class:"w-full pt-6",key:"title"},na={class:"flex w-full flex-col items-start justify-center"},ia={class:"flex flex-col items-start justify-center"},ra={class:"mr-2 px-2 font-weight-bold"},la={class:"mt-4 flex w-full flex-col items-start justify-start"},da={class:"mb-6 mr-2 px-2 font-weight-bold"},ua={class:"flex w-full flex-col items-start justify-start px-2"},ca={class:"text-12px"},ha={class:"my-4 w-full"},pa=["placeholder"],ma={class:"text-12px"},fa={class:"my-4 w-full"},ga={class:"flex w-20 items-center pb-2 text-sm leading-standard font-weight-medium"},ba=["onUpdate:modelValue","placeholder"],ya={class:"flex w-full flex-row items-center justify-center"},va={class:"mt-6 flex flex-row justify-center text-xs leading-standard"},Sa={class:"text-content-secondary"},Ca={class:"w-full pt-6",key:"hashtags"},_a={class:"flex w-full flex-col items-start justify-center"},wa={class:"flex flex-col items-start justify-center"},Pa={class:"mr-2 px-2 font-weight-bold"},ka={class:"flex w-full flex-col items-start justify-start px-2 pt-6"},Ma={class:"mt-6 w-full"},Ta={class:"w-full pb-2 font-weight-bold"},La={class:"flex w-full flex-row items-center justify-center"},xa={class:"mt-6 flex flex-row justify-center text-xs leading-standard"},Ea={class:"text-content-secondary"},Oa={class:"w-full",key:"price"},Da={class:"flex w-full flex-col items-start justify-center px-2 pt-6"},Ua={class:"text-14px mb-6 font-weight-bold"},Ra={key:0,class:"mb-3 w-full rounded-md bg-status-danger-deep/faint px-3 py-2 text-xs leading-standard text-status-danger-content-subtle"},Aa={class:"flex w-full flex-row items-center justify-center"},Na={class:"mt-6 flex flex-row justify-center text-xs leading-standard"},ja={class:"text-content-secondary"},Ia={class:"flex w-full flex-col",key:"discount"},$a={class:"flex flex-row items-center justify-start p-2"},Ga={class:"mr-2 text-sm leading-standard font-weight-bold text-content-primary"},Fa={class:"flex w-full flex-row items-center justify-center"},Ba={class:"mt-6 flex flex-row justify-center text-xs leading-standard"},za={class:"text-content-secondary"};function Ka(e,t,s,c,o,n){const S=$("DropdownButton"),d=$("PlaxButton"),l=$("HashtagField"),f=$("InputInvitationRules"),P=$("ToggleSwitch"),w=$("ContentDiscountSettings");return r(),p("div",Jt,[a("div",Zt,[U(De,{class:"w-full",name:"left",tag:"div",mode:"out-in"},{default:x(()=>[a("div",Xt,[a("div",{class:"cursor-pointer select-none",onClick:t[0]||(t[0]=k=>e.currentPage="home")},i(e.currentPage==="home"?e._tr("StudioPublishPrompt","modify-contents"):e._tr("StudioPublishPrompt","back")),1)]),e.currentPage==="home"?(r(),p("div",ea,[e.isPink?(r(),p("img",ta)):(r(),p("img",aa))])):g("",!0)],void 0,!0),_:1})]),U(Le,{name:"left",mode:"out-in"},{default:x(()=>[e.currentPage==="home"?(r(),p("div",oa,[a("button",{class:"mx-1 flex flex-grow items-center justify-center rounded-md bg-surface-interactive",style:{height:"100px"},onClick:t[1]||(t[1]=k=>e.setPage("title"))},i(e._tr("Studio","title")),1),a("button",{class:"mx-1 flex flex-grow items-center justify-center rounded-md bg-surface-interactive",style:{height:"100px"},onClick:t[2]||(t[2]=k=>e.setPage("hashtags"))},i(e._tr("Studio","tags")),1),a("button",{class:"mx-1 flex flex-grow items-center justify-center rounded-md bg-surface-interactive",style:{height:"100px"},onClick:t[3]||(t[3]=k=>e.setPage("price"))},i(e._tr("Studio","price")),1),a("button",{class:"mx-1 flex flex-grow items-center justify-center rounded-md bg-surface-interactive",style:{height:"100px"},onClick:t[4]||(t[4]=k=>e.setPage("discount"))},i(e._tr("Studio","discount")),1)])):g("",!0)],void 0,!0),_:1}),U(De,{class:"w-full",name:"right",tag:"div",mode:"out-in"},{default:x(()=>[e.currentPage==="title"?(r(),p("div",sa,[a("div",na,[a("div",ia,[a("div",ra,i(e._tr("Studio","select-operation-method")),1),U(S,{class:"mt-4",width:"250px",items:e.titleOperationList,initItem:e.titleOperationList[0],titleAndValueMode:!0,onSelected:e.operationSelect},null,8,["items","initItem","onSelected"])]),a("div",la,[a("div",da,i(e._tr("Studio","input-edits")),1),a("div",ua,[a("div",ca,i(e._tr("StudioPublishPrompt","single-title")),1),a("div",ha,[K(a("input",{class:"block w-full rounded border border-border-subtle bg-surface-sunken px-3 py-1 placeholder-content-disabled sm:text-xs sm:leading-standard md:py-3","onUpdate:modelValue":t[5]||(t[5]=k=>e.operationData.singleTitle=k),placeholder:e._tr("Studio","need-modifications")},null,8,pa),[[Ce,e.operationData.singleTitle]])]),a("div",ma,i(e._tr("StudioPublishPrompt","multi-title")),1),a("div",fa,[(r(!0),p(X,null,ie(e.titleLanguageList,(k,R)=>(r(),p("div",{class:"mb-2 flex items-center",key:R},[a("h2",ga,i(k.name),1),K(a("input",{class:"block w-full flex-1 rounded border border-border-subtle bg-surface-sunken px-3 py-1 placeholder-content-disabled sm:text-xs sm:leading-standard md:py-3","onUpdate:modelValue":M=>e.operationData.titleLanguages[k.lang]=M,placeholder:e._tr("Studio","need-modifications")},null,8,ba),[[Ce,e.operationData.titleLanguages[k.lang]]])]))),128))])])]),a("div",ya,[a("div",va,[U(d,{class:"px-4 py-2",buttonColor:"plaxgray-160",callback:e.cancel,isRenewal:!0},{default:x(()=>[a("span",Sa,i(e.tr("Studio","cancel")),1)],void 0,!0),_:1},8,["callback"]),U(d,{class:"ml-3 px-4 py-2",buttonColor:"plaxsky",callback:e.confirm,isRenewal:!0},{default:x(()=>[A(i(e.tr("Studio","confirm")),1)],void 0,!0),_:1},8,["callback"])])])])])):e.currentPage==="hashtags"?(r(),p("div",Ca,[a("div",_a,[a("div",wa,[a("div",Pa,i(e._tr("StudioPublishPrompt","provide-operation-type")),1),U(S,{class:"mt-4",width:"250px",items:e.tagOperationList,initItem:e.tagOperationList[0],titleAndValueMode:!0,onSelected:e.operationSelect},null,8,["items","initItem","onSelected"])]),a("div",ka,[a("div",Ma,[a("h2",Ta,i(e._tr("StudioPublishPrompt","hashtags-label")),1),U(l,{class:"w-full",tagInput:e.operationData.tags,onTagUpdate:e.updateTags},null,8,["tagInput","onTagUpdate"])])])]),a("div",La,[a("div",xa,[U(d,{class:"px-4 py-2",buttonColor:"plaxgray-160",callback:e.cancel,isRenewal:!0},{default:x(()=>[a("span",Ea,i(e.tr("Studio","cancel")),1)],void 0,!0),_:1},8,["callback"]),U(d,{class:"ml-3 px-4 py-2",buttonColor:"plaxsky",callback:e.confirm,isRenewal:!0},{default:x(()=>[A(i(e.tr("Studio","confirm")),1)],void 0,!0),_:1},8,["callback"])])])])):e.currentPage==="price"?(r(),p("div",Oa,[a("div",Da,[a("div",Ua,i(e._tr("StudioPublishPrompt","bulk-edit-price")),1),e.hasDiscountedContents?(r(),p("div",Ra,i(e._tr("StudioPublishPrompt","bulk-edit-price-discount-warning")),1)):g("",!0),U(f,{modelValue:e.operationData,"onUpdate:modelValue":t[6]||(t[6]=k=>e.operationData=k),onUpdate:e.updateInvitationRules,mode:"replay"},null,8,["modelValue","onUpdate"])]),a("div",Aa,[a("div",Na,[U(d,{class:"px-4 py-2",buttonColor:"plaxgray-160",callback:e.cancel,isRenewal:!0},{default:x(()=>[a("span",ja,i(e.tr("Studio","cancel")),1)],void 0,!0),_:1},8,["callback"]),U(d,{class:"ml-3 px-4 py-2",buttonColor:"plaxsky",callback:e.confirm,isRenewal:!0},{default:x(()=>[A(i(e.tr("Studio","confirm")),1)],void 0,!0),_:1},8,["callback"])])])])):e.currentPage==="discount"?(r(),p("div",Ia,[a("div",$a,[a("div",Ga,i(e._tr("StudioPublishPrompt","edit-or-enable-discount")),1),U(P,{class:"my-2 mr-4",onClick:e.onToggleDiscountSettings,isActive:e.operationData.useDiscountSetting},null,8,["onClick","isActive"])]),e.operationData.useDiscountSetting?(r(),L(w,{key:0,discountSettingsInput:e.operationData.discountSettings,onUpdate:e.updateDiscountSettings},null,8,["discountSettingsInput","onUpdate"])):g("",!0),a("div",Fa,[a("div",Ba,[U(d,{class:"px-4 py-2",buttonColor:"plaxgray-160",callback:e.cancel,isRenewal:!0},{default:x(()=>[a("span",za,i(e.tr("Studio","cancel")),1)],void 0,!0),_:1},8,["callback"]),U(d,{class:"ml-3 px-4 py-2",buttonColor:"plaxsky",callback:e.confirm,isRenewal:!0},{default:x(()=>[A(i(e.tr("Studio","confirm")),1)],void 0,!0),_:1},8,["callback"])])])])):g("",!0)],void 0,!0),_:1})])}var qa=ne(Wt,[["render",Ka],["__scopeId","data-v-ccae14aa"]]);se();var Ae=Y.methods._tr,Ne={inprogress:0,scheduled:1,autorecorded:2,other:3},Va=30*1e3,Ha=5*1e3,je=5,Qa=new Set(["COMPLETE","ERROR","CANCELED","NOT_FOUND"]),Ya=pe({name:"UploadedContents",components:{PlaxButton:xe,UploadedContentThumbn
1ail:Ve,PaginationControl:ht},props:{seriesOid:{type:String,default:""},embedded:{type:Boolean,default:!1},allowSelection:{type:Boolean,default:!0},contentTypeMap:{type:Object,default:()=>{}},isMobile:{type:Boolean,required:!0},contents:{type:Array,default:()=>[]},prefetchedMetadataSet:{type:Object,default:()=>{}},beingEncoded:{type:Array,default:()=>[]},forceFetch:{type:Boolean,default:!1}},emits:["content-copied","content-deleted","encoding-status-terminal"],setup(e,{emit:t}){const s=T(void 0),c=T({}),o=T(0),n=T([]),S=T(1),d=50,l=T({}),f=T(!1),P=T({}),w=new Set;let k=null,R=0;Se.dispatch("AccountModule/updateUserInfo");const M=Q(()=>Se.getters["AccountModule/currentUserInfo"]),j=T("recent"),h=(y,_)=>{c.value[y]=_,_?o.value++:o.value--};async function u(y){if(!(!y||y.length===0)){f.value=!0;try{y.forEach(b=>{b in c.value||(c.value[b]=!1)});let _=y.filter(b=>!(b in l.value||e.prefetchedMetadataSet&&b in e.prefetchedMetadataSet));if(_.length===0){f.value=!1;return}const m={};_.forEach(b=>{const E=e.contentTypeMap[b];m[E]||(m[E]=[]),m[E].push(b)});const v=[];for(const b in m){const E=m[b],W="collaborators|encrypted|drm|drmPurchased|discountCodeSettings"+(b==="storyChat"?"|canvasCompilationSummary":""),I=100;for(let G=0;G<E.length;G+=I){const oe=E.slice(G,G+I);v.push(he.bulkGetContentWithOid(oe,b,W,!1,void 0,!1,e.forceFetch).then(de=>{!de||Object.keys(de).length===0||(l.value={...l.value,...de})}).catch(de=>{}))}}await Promise.all(v)}catch{}finally{f.value=!1}}}function C(y){return new Date(parseInt(y.substring(0,8),16)*1e3)}function F(y){const _=l.value[y];return _?.publishedAt?new Date(_.publishedAt):C(y)}function N(y){const _=e.prefetchedMetadataSet?.[y]||l.value[y],m=_?.publishedAt||_?.created,v=m?new Date(m):C(y);return Number.isNaN(v.getTime())?C(y):v}function V(y){const _=e.contentTypeMap?.[y];return _==="game"||_==="comics"?N(y):F(y)}const B=Q(()=>[...e.contents.filter(y=>y&&!n.value.includes(y))].sort((y,_)=>{const m=e.contentTypeMap[y]||"other",v=e.contentTypeMap[_]||"other";if(m==="encoding")return-1;if(v==="encoding")return 1;const b=Ne[m]??1/0,E=Ne[v]??1/0;if(b!==E)return b-E;const W=V(y);return V(_).getTime()-W.getTime()})),te=Q(()=>{const y=B.value.length;return y>0?Math.ceil(y/d):1}),q=Q(()=>(S.value>te.value&&te.value>0?S.value=te.value:te.value===0&&S.value!==1&&(S.value=1),B.value.slice((S.value-1)*d,S.value*d))),ae=Q(()=>q.value.filter(y=>e.contentTypeMap?.[y]==="encoding"));function le(){R++,k&&(clearTimeout(k),k=null)}function H(y){if(y!==R)return;const _=ae.value.filter(v=>!w.has(v));if(_.length===0)return;const m=Math.floor(Math.random()*Ha);k=setTimeout(()=>{ue(_,y).catch(console.error)},Va+m)}async function ue(y,_){const m={},v=[];for(let b=0;b<y.length;b+=je){if(_!==R)return;const E=y.slice(b,b+je),W=await Promise.all(E.map(async I=>{try{const{data:G}=await he.getEncodingStatus(I);return{oid:I,data:G}}catch{return null}}));if(_!==R)return;W.filter(Boolean).forEach(({oid:I,data:G})=>{const oe=typeof G?.status=="string"?G.status.toUpperCase():"UNKNOWN";m[I]={...G,status:oe},Qa.has(oe)&&!w.has(I)&&(oe!=="COMPLETE"&&w.add(I),v.push({oid:I,status:oe}))})}_===R&&(Object.keys(m).length>0&&(P.value={...P.value,...m}),v.length>0&&t("encoding-status-terminal",v),H(_))}function ee(){le();const y=R,_=new Set(ae.value);Object.keys(P.value).forEach(v=>{_.has(v)||delete P.value[v]}),Array.from(w).forEach(v=>{_.has(v)||w.delete(v)});const m=ae.value.filter(v=>!w.has(v));m.length!==0&&ue(m,y).catch(console.error)}Oe(()=>q.value.join("|"),()=>{q.value.length>0&&u(q.value).catch(console.error)},{immediate:!0}),Oe(()=>ae.value.join("|"),ee,{immediate:!0}),Ge(le);const me=y=>{},fe=()=>{O.$emit("open-upload-format-popup")},_e=()=>{Se.dispatch("AccountModule/updateScenarioWip",{scenarioOid:void 0}),it.push({name:"ScenarioStudio"})},we=()=>{const y=Object.keys(c.value).filter(m=>c.value[m]===!0),_={};y.forEach(m=>{_[m]=e.prefetchedMetadataSet?.[m]||l.value[m]||null}),O.$emit("open-multi-popup",{component:qa,data:{checkedContents:y,contentType:s.value,contentMetadataSet:_,callbackOnClose:async()=>{await u(q.value)}}})};function ge(y){n.value.includes(y)||n.value.push(y),c.value[y]&&o.value--,delete c.value[y],t("content-deleted",y)}async function Pe(y){const _=e.contentTypeMap[y],m=M.value.oid;_==="recording"?await nt.deleteRecordingContent(m,y):_==="storyChat"?await Ee.deleteStoryChat(m,y):_==="game"?await ze.deleteGame(y):_==="comics"?await qe.deleteComic(y):await he.deleteContent(m,y,_)}const ke=()=>{const y=Object.keys(c.value).filter(_=>c.value[_]===!0);y.length!==0&&O.$emit("on-open-confirm-popup",{question:Ae("Studio","bulk-delete-confirm",{count:y.length}
1),message:Ae("ContentThumbnail","no-turning-back"),callbackYes:async()=>{O.$emit("progress-start");for(const _ of y)try{await Pe(_),ge(_)}catch{}O.$emit("progress-end")}})};function Me(){t("content-copied")}return{handleDeleteContent:ge,handleContentCopied:Me,checkedContents:c,totalCheckedContents:o,currentUserInfo:M,sortOption:j,sortedContents:B,formatNumber:ot,editContent:me,contentMetadataSet:l,encodingStatusSet:P,updateCheckedContent:h,handleBulkModify:we,handleBulkDelete:ke,handleNewContent:fe,handleNewScenario:_e,paginatedContents:q,page:S,totalPages:te,loadingMetadata:f}}}),Wa={key:0,class:"flex flex-row items-start justify-start"},Ja={class:"relative"};function Za(e,t,s,c,o,n){const S=$("PlaxButton"),d=$("UploadedContentThumbnail"),l=$("PaginationControl");return e.currentUserInfo?(r(),p("div",{key:0,class:D(["relative flex w-full flex-col items-start text-sm leading-standard text-content-primary",{"py-2":!e.embedded,"flex-col":e.isMobile,"pt-0":e.isMobile}])},[a("div",{class:D(["flex w-full flex-col text-content-primary",e.embedded?"overflow-visible py-3":"overflow-hidden rounded-lg bg-surface-raised p-6"]),style:{height:"fit-content"}},[a("div",{class:D(["flex w-full items-center justify-start border-b border-border-subtle",e.embedded?"mb-4 pb-3":"mb-4 pb-4"])},[e.totalCheckedContents>0?(r(),p("div",Wa,[U(S,{class:"mr-3 rounded-md px-2",style:{width:"120px",height:"32px"},callback:e.handleBulkModify,noDefaultRadius:!0,buttonColor:"plaxsky",shadow:!1,isActive:e.totalCheckedContents>0},{default:x(()=>[A(i(e._tr("Studio","quick-edit"))+": "+i(e.totalCheckedContents)+" "+i(e._tr("Studio","count")),1)],void 0,!0),_:1},8,["callback","isActive"]),U(S,{class:"mr-3 rounded-md px-2",style:{width:"120px",height:"32px"},callback:e.handleBulkDelete,noDefaultRadius:!0,buttonColor:"red-500",shadow:!1,isActive:e.totalCheckedContents>0},{default:x(()=>[A(i(e._tr("Studio","bulk-delete"))+": "+i(e.totalCheckedContents)+" "+i(e._tr("Studio","count")),1)],void 0,!0),_:1},8,["callback","isActive"])])):g("",!0),a("h2",{class:D(e.embedded?"text-sm leading-standard font-weight-bold":"text-lg leading-relaxed font-weight-bold")},[Ze(e.$slots,"default")],2),t[1]||(t[1]=a("div",{class:"flex items-center"},null,-1))],2),a("div",Ja,[(r(!0),p(X,null,ie(e.paginatedContents,f=>(r(),L(d,{isMobile:e.isMobile,embedded:e.embedded,seriesOid:e.seriesOid,modelValue:e.checkedContents[f],onOnDeleteContent:P=>e.handleDeleteContent(f),"onUpdate:modelValue":P=>e.updateCheckedContent(f,P),onOnContentCopied:e.handleContentCopied,key:f,contentOid:f,contentType:e.contentTypeMap[f],allowSelection:e.allowSelection&&e.contentTypeMap[f]!=="scenario"&&e.contentTypeMap[f]!=="comics",contentMetadata:e.prefetchedMetadataSet?.[f]||e.contentMetadataSet[f],encodingJobStatus:e.encodingStatusSet[f]},null,8,["isMobile","embedded","seriesOid","modelValue","onOnDeleteContent","onUpdate:modelValue","onOnContentCopied","contentOid","contentType","allowSelection","contentMetadata","encodingJobStatus"]))),128))]),e.totalPages>1?(r(),L(l,{key:0,currentPage:e.page,totalPages:e.totalPages,"onUpdate:currentPage":t[0]||(t[0]=f=>e.page=f)},null,8,["currentPage","totalPages"])):g("",!0)],2)],2)):g("",!0)}var He=ne(Ya,[["render",Za]]);se();var Xa={name:"StudioEmptyState",props:{message:{type:String,required:!0},actionLabel:{type:String,required:!0}},emits:["action"]},eo={class:"flex w-full flex-col items-center gap-4 px-4 py-10 text-center text-sm leading-standard text-content-secondary"},to={class:"m-0"};function ao(e,t,s,c,o,n){return r(),p("div",eo,[a("p",to,i(s.message),1),a("button",{class:"max-w-full rounded-compact bg-accent-default px-6 py-3 text-sm leading-standard font-weight-bold text-accent-content transition-opacity hover:opacity-strong",type:"button",onClick:t[0]||(t[0]=S=>e.$emit("action"))},i(s.actionLabel),1)])}var Qe=ne(Xa,[["render",ao]]),oo="/assets/CGX_J1U98A.png",so="/assets/ubK9wEd_TE.png",no="/assets/CrmnH4mDVA.jpeg",io="/assets/N007Q6ReO8.jpeg",ro="/assets/CL6i7m5NSl.png",lo="/assets/sGwxeqb2PH.jpeg",uo="/assets/DHzpDNt4Oe.png",co="/assets/D9Z5KIy9Uc.jpeg";se();var ho=pe({name:"StoryChatSampleSelector",components:{SvgEdit:ut},props:{isMobile:{type:Boolean,default:!1},data:{type:Object}}
1,setup(e){const t=e.data?.onCharacterSelected,s=T(null),c=T(null),o=e.data?.currentUserOid,n=e.data?.onSampleCopied,S=Fe("romanticplay"),d=(h,u,C)=>Y.methods._tr(h,u,C),l=h=>h?.response?.data?.error==="Permission denied to copy this content"?d("StoryChat","sample-copy-permission-denied"):d("StoryChat","sample-copy-failed")||h?.message||"Failed to copy sample content",f=Y.methods._getLang(),P=T([{id:"ava",name:"AVA",oid:"6a7962169fff6720a10d410d",thumbnail:co,image:uo,description:d("StoryChat","sample-ava-description"),copyOptions:{preferredLanguage:f}},{id:"drmia",name:"Dr. Mia",oid:"6a795a56b4ac69bfddc514fe",thumbnail:lo,image:ro,description:d("StoryChat","sample-mia-description"),copyOptions:{preferredLanguage:f}},{id:"lab",name:f==="jp"?"ORENTECH 第3研究棟":"ORENTECH 제3연구동",oid:"6a797c6cb4ac69bfddd7ee1b",thumbnail:io,image:no,description:d("StoryChat","sample-orentech-description"),copyOptions:{preferredLanguage:f}}]);S&&f==="ko"&&P.value.push({id:"rocat",name:"Rocat",oid:"68d20c3bf60fb9b866b0784c",thumbnail:so,image:oo,description:"초간단 1대1 캐릭터 제작용 샘플 캐릭터입니다."});const w=Q(()=>c.value||s.value),k=Q(()=>{const h=w.value;return P.value.find(u=>u.id===h)||{}});return{hoveredCharacter:s,selectedCharacter:c,displayCharacter:w,characters:P,currentCharacter:k,handleCharacterClick:h=>{h.id!=="placeholder"&&(c.value=h.id)},selectCharacter:h=>{h.id!=="placeholder"&&t&&t(h)},editStoryChat:async()=>{if(!(!k.value?.id||!o)){O.$emit("progress-start");try{const h=await Ee.copyStoryChat(k.value.oid,o,k.value.copyOptions);O.$emit("progress-end"),h?.data.success&&(O.$emit("show-toast",{message:Y.methods._tr("StoryChat","copy-complete"),type:"success",duration:2e3}),n&&await n(),O.$emit("close-multi-popup"))}catch(h){O.$emit("progress-end"),O.$emit("show-toast",{type:"error",message:l(h),duration:3e3})}}}}}}),po={class:"character-selector w-full rounded bg-surface-canvas text-content-primary",style:{"min-height":"400px",width:"700px",margin:"-var(--space-5) -var(--space-component-sm-roomy)"}},mo={class:"flex w-full flex-row p-4",style:{height:"400px"}},fo={class:"flex w-2/5 flex-col gap-2"},go=["onMouseenter","onMouseleave","onClick"],bo={class:"relative h-full w-full"},yo=["src","alt"],vo={class:"character-name-overlay absolute bottom-0 left-0 right-0 p-2"},So={class:"sample-content text-xs font-weight-bold leading-standard"},Co={class:"relative w-3/5 pl-4"},_o={class:"absolute inset-0"},wo={class:"absolute inset-0 overflow-hidden"},Po=["src","alt"],ko={class:"character-info absolute bottom-0 left-0 right-0 z-local-content p-4",style:{"max-height":"50%"}},Mo={class:"character-name sample-content mb-2 font-weight-bold uppercase tracking-wider-ui"},To={class:"character-description sample-content overflow-y-auto text-xs leading-standard",style:{"max-height":"60px"}},Lo={key:1,class:"flex h-full items-center justify-center text-content-tertiary"};function xo(e,t,s,c,o,n){const S=$("SvgEdit");return r(),p("div",po,[a("div",mo,[a("div",fo,[(r(!0),p(X,null,ie(e.characters,d=>(r(),p("div",{class:D(["character-slot relative cursor-pointer overflow-hidden transition-all duration-moderate",{active:e.hoveredCharacter===d.id||e.selectedCharacter===d.id,selected:e.selectedCharacter===d.id}]),key:d.id,style:{height:"120px",border:"2px solid transparent"},onMouseenter:l=>e.hoveredCharacter=d.id,onMouseleave:l=>e.hoveredCharacter=e.selectedCharacter?d.id:null,onClick:l=>e.handleCharacterClick(d)},[t[1]||(t[1]=a("div",{class:"hover-overlay absolute inset-0 opacity-hidden transition-opacity duration-moderate"},null,-1)),a("div",bo,[d.thumbnail?(r(),p("img",{key:0,class:"h-full w-full object-cover",src:d.thumbnail,alt:d.name},null,8,yo)):g("",!0),a("div",vo,[a("h3",So,i(d.name),1)])]),t[2]||(t[2]=a("div",{class:"glow-effect pointer-events-none absolute inset-0"},null,-1))],42,go))),128))]),a("div",Co,[U(Le,{name:"character-preview",mode:"out-in"},{default:x(()=>[e.displayCharacter?(r(),p("div",{class:"character-preview relative h-full w-full overflow-hidden",key:e.displayCharacter,style:{background:`radial-gradient(
2                circle at center,
3                var(--color-inverse-overlay-minimal) 0%,
4                transparent 70%
5              )`}},[a("div",_o,[a("div",wo,[a("img",{class:"character-image absolute inset-0 h-full w-full object-contain",src:e.currentCharacter.image,alt:e.currentCharacter.name},null,8,Po),t[3]||(t[3]=a("div",{class:"power-lines absolute inset-0"},null,-1))]),a("div",ko,[a("h2",Mo,i(e.currentCharacter.name),1),a("p",To,i(e.currentCharacter.description),1),a("div",{class:D(["my-3 flex w-full justify-center",e.isMobile?"px-2":""])},[a("button",{class:"flex w-full items-center justify-center rounded-md border-strong border-border-subtle bg-transparent py-component-md-roomy text-sm leading-standard font-weight-bold text-content-secondary hover:border-accent-default hover:text-accent-default",onClick:t[0]||(t[0]=(...d)=>e.editStoryChat&&e.editStoryChat(...d))},[U(S,{class:"mr-2",width:"20",height:"20",active:!0,color:"currentColor"}),A(" "+i(e._tr("StoryChat","edit-story-chat")),1)])],2)])]),t[4]||(t[4]=a("div",{class:"scan-line absolute left-0 right-0 top-0 h-1 bg-gradient-to-r from-transparent to-transparent opacity-disabled"},null,-1))])):(r(),p("div",Lo,[...t[5]||(t[5]=[a("div",{class:"text-center"},null,-1)])]))],void 0,!0),_:1})])])])}var Eo=ne(ho,[["render",xo],["__scopeId","data-v-555131e3"]]);se();var Oo=pe({name:"StoryCreateModeSelectPopup",props:{data:{type:Object,default:()=>({})}},setup(e){const t=T(null);return{selectedMode:t,_tr:(n,S,d)=>Y.methods._tr(n,S,d),onCancel:()=>{O.$emit("close-multi-popup")},onConfirm:()=>{t.value&&(O.$emit("close-multi-popup"),e.data?.onModeSelected&&e.data.onModeSelected(t.value))}}}}),Do={class:"mode-select-popup w-full rounded-compact bg-surface-raised p-5 text-content-primary sm:p-6",style:{"max-width":"720px"}},Uo={class:"mb-5 text-center"},Ro={class:"text-lg leading-relaxed font-weight-bold"},Ao={class:"mt-2 text-sm leading-standard text-content-secondary"},No={class:"flex flex-col gap-3 sm:flex-row sm:gap-4"},jo={class:"flex flex-col"},Io={class:"mt-1 text-supporting text-content-secondary"},$o={class:"mt-3 space-y-1 text-supporting text-content-secondary"},Go={class:"flex items-start gap-2"},Fo={class:"flex items-start gap-2"},Bo={class:"flex items-start gap-2"},zo={class:"flex flex-col"},Ko={class:"mt-1 text-supporting text-content-secondary"},qo={class:"mt-3 space-y-1 text-supporting text-content-secondary"},Vo={class:"flex items-start gap-2"},Ho={class:"flex items-start gap-2"},Qo={class:"flex items-start gap-2"},Yo={class:"mt-5 flex justify-center gap-3"},Wo=["disabled"];function Jo(e,t,s,c,o,n){return r(),p("div",Do,[a("div",Uo,[a("h2",Ro,i(e._tr("StoryChat","select-create-mode")),1),a("p",Ao,i(e._tr("StoryChat","select-create-mode-desc")),1
5)]),a("div",No,[a("div",{class:D(["mode-card flex-1 cursor-pointer rounded-compact border-strong p-4 transition-all sm:min-w-[300px]",e.selectedMode==="canvas"?"border-accent-default bg-accent-default/minimal":"border-border-subtle  hover:border-border-hint"]),onClick:t[0]||(t[0]=S=>e.selectedMode="canvas")},[a("div",jo,[a("h3",{class:D(["text-body-compact font-weight-bold",e.selectedMode==="canvas"?"text-accent-default":"text-content-primary"])},i(e._tr("StoryChat","canvas-mode")),3),a("p",Io,i(e._tr("StoryChat","canvas-mode-desc")),1),a("ul",$o,[a("li",Go,[t[4]||(t[4]=a("span",{class:"text-content-secondary"},"·",-1)),a("span",null,i(e._tr("StoryChat","canvas-feature-1")),1)]),a("li",Fo,[t[5]||(t[5]=a("span",{class:"text-content-secondary"},"·",-1)),a("span",null,i(e._tr("StoryChat","canvas-feature-2")),1)]),a("li",Bo,[t[6]||(t[6]=a("span",{class:"text-content-secondary"},"·",-1)),a("span",null,i(e._tr("StoryChat","canvas-feature-3")),1)])])])],2),a("div",{class:D(["mode-card flex-1 cursor-pointer rounded-compact border-strong p-4 transition-all sm:min-w-[300px]",e.selectedMode==="lite"?"border-accent-default bg-accent-default/minimal":"border-border-subtle  hover:border-border-hint"]),onClick:t[1]||(t[1]=S=>e.selectedMode="lite")},[a("div",zo,[a("h3",{class:D(["text-body-compact font-weight-bold",e.selectedMode==="lite"?"text-accent-default":"text-content-primary"])},i(e._tr("StoryChat","lite-mode")),3),a("p",Ko,i(e._tr("StoryChat","lite-mode-desc")),1),a("ul",qo,[a("li",Vo,[t[7]||(t[7]=a("span",{class:"text-content-secondary"},"·",-1)),a("span",null,i(e._tr("StoryChat","lite-feature-1")),1)]),a("li",Ho,[t[8]||(t[8]=a("span",{class:"text-content-secondary"},"·",-1)),a("span",null,i(e._tr("StoryChat","lite-feature-2")),1)]),a("li",Qo,[t[9]||(t[9]=a("span",{class:"text-content-secondary"},"·",-1)),a("span",null,i(e._tr("StoryChat","lite-feature-3")),1)])])])],2)]),a("div",Yo,[a("button",{class:"cursor-pointer select-none rounded-md bg-action-primary-disabled px-5 py-2 text-supporting font-weight-bold text-content-secondary",onClick:t[2]||(t[2]=(...S)=>e.onCancel&&e.onCancel(...S))},i(e._tr("Common","cancel")),1),a("button",{class:"cursor-pointer select-none rounded-md bg-accent-default px-5 py-2 text-supporting font-weight-bold text-accent-content hover:opacity-prominent disabled:cursor-not-allowed disabled:opacity-disabled",disabled:!e.selectedMode,onClick:t[3]||(t[3]=(...S)=>e.onConfirm&&e.onConfirm(...S))},i(e._tr("Common","confirm")),9,Wo)])])}var Zo=ne(Oo,[["render",Jo],["__scopeId","data-v-d5447a06"]]);se();var Xo=["aria-label"],es={class:"short-drama-series-popup-title"},ts={class:"short-drama-series-popup-body"},as={class:"short-drama-series-label-row"},os={class:"short-drama-series-label"},ss={key:0,class:"short-drama-language-tabs",role:"tablist"},ns=["aria-selected","disabled","onClick"],is={key:0,class:"short-drama-language-filled"},rs=["disabled"],ls={class:"short-drama-series-field"},ds={class:"short-drama-series-label-row"},us={class:"short-drama-series-label"},cs={class:"short-drama-series-required"},hs={class:"short-drama-series-input-wrap"},ps=["placeholder","onKeydown"],ms={class:"short-drama-series-counter"},fs={class:"short-drama-series-field"},gs={class:"short-drama-series-label"},bs={class:"short-drama-series-input-wrap short-drama-series-textarea-wrap"}
5,ys=["placeholder"],vs={class:"short-drama-series-counter short-drama-series-counter-bottom"},Ss={class:"short-drama-series-field"},Cs={class:"short-drama-series-label-row"},_s={class:"short-drama-series-label"},ws={class:"short-drama-series-required"},Ps={key:0,class:"short-drama-series-error"},ks={class:"short-drama-series-actions"},Ms=["disabled"],Ts=["disabled"],Ie=32,$e=100,Ls=10*1024*1024,xs={__name:"ShortDramaSeriesPopup",props:{data:{type:Object,default:()=>({})}},emits:["close-popup"],setup(e,{emit:t}){const s=["ko","jp","en","zh","zh-Hant","es"],c={ko:"KO",jp:"JP",en:"EN",zh:"简","zh-Hant":"繁",es:"ES"},o=["image/jpeg","image/png","image/webp"],n=e,S=t,d=Y.methods._tr,l=n.data?.series||{},f=T(l._id?{...l}:null),P=Q(()=>!!f.value?._id),w=Q(()=>P.value?d("ShortDrama","edit-series"):d("ShortDrama","add-series")),k=T(l.title||""),R=T(l.introText||""),M=T(l.useMultiLang===!0),j=T("ko"),h=ce({}),u=ce({}),C=Q({get:()=>M.value?h[j.value]||"":k.value,set:m=>{M.value?h[j.value]=m:k.value=m}}),F=Q({get:()=>M.value?u[j.value]||"":R.value,set:m=>{M.value?u[j.value]=m:R.value=m}}),N=ce({}),V=ce({}),B=ce({}),te=new WeakMap,q=T([]),ae=T(l.useMultiLang?"":Ue(l,"ko")),le=T(l.thumbnailAsset?.fileName||""),H=T(!1);let ue=!1;const ee=T(""),me=[];for(const m of s)h[m]=l.multiLangTitle?.[m]||"",u[m]=l.multiLangIntroText?.[m]||"",N[m]=l.useMultiLang?Ue(l,m,{allowFallback:!1}):"",V[m]=l.multiLangThumbnailAsset?.[m]?.fileName||"";const fe=Q(()=>M.value?s.some(m=>!!h[m]?.trim()&&!!N[m]):!!k.value.trim()&&!!ae.value);function _e(){H.value||S("close-popup",ue?{series:f.value}:void 0)}function we(){if(!H.value){if(!M.value){h.ko||(h.ko=k.value),u.ko||(u.ko=R.value),M.value=!0;return}k.value=h.ko||h.en||h.jp||k.value,R.value=u.ko||u.en||u.jp||R.value,M.value=!1}}function ge(m){const v=m||"default";q.value.includes(v)||(q.value=[...q.value,v])}function Pe(m,v){if(H.value)return;const b=m.target?.files?.[0]||m.dataTransfer?.files?.[0];if(m.target?.type==="file"&&(m.target.value=""),!b)return;const E=/\.(jpe?g|png|webp)$/i.test(b?.name||"");if(!b||b.size>Ls||!o.includes(b.type)&&!E){ee.value=d("ShortDrama","cover-help");return}O.$emit("open-multi-popup",{component:Ct,defaultStyle:!1,preventDimdClick:!0,data:{file:b},event:{onClose:W=>{if(W?.decodeFailed){ee.value=d("ShortDrama","cover-help");return}if(!W?.file)return;const I=W.file,G=URL.createObjectURL(I);me.push(G);const oe=v||"default";B[oe]=I,q.value=q.value.filter(de=>de!==oe),v?(N[v]=G,V[v]=I.name):(ae.value=G,le.value=I.name),ee.value=""}}})}function ke(m){const v=m||"default";delete B[v],ge(m),m?(N[m]="",V[m]=""):(ae.value="",le.value="")}function Me(m){return new Promise(v=>{const b=new Image,E=URL.createObjectURL(m);b.onload=()=>{URL.revokeObjectURL(E),v({width:b.width,height:b.height})},b.onerror=()=>{URL.revokeObjectURL(E),v({width:0,height:0})},b.src=E})}async function y(m,v,b){let E=te.get(v);if(!E){const I=await Me(v),{data:G}=await re.getThumbnailUploadUrl({seriesOid:m,assetLang:b,fileName:v.name,fileSize:v.size});await st.upload(G.uploadUrl,v,v.type||"image/jpeg"),E={s3Key:G.s3Key,...I},te.set(v,E)}const W=await re.completeThumbnailUpload({seriesOid:m,assetLang:b,s3Key:E.s3Key,fileName:v.name,fileSize:v.size,width:E.width,height:E.height});return te.delete(v),W.data.series}async function _(){if(!H.value){if(!fe.value){ee.value=d("ShortDrama","same-language-required");return}H.value=!0,ee.value="";try{const m=s.find(b=>h[b]?.trim()&&N[b]),v={title:M.value?h[m]?.trim():k.value.trim(),introText:M.value?u[m]?.trim()||"":R.value.trim(),useMultiLang:M.value,multiLangTitle:M.value?{...h}:{},multiLangIntroText:M.value?{...u}:{}};f.value=(f.value?._id?await re.updateSeries(f.value._id,v):await re.createSeries(v)).data.series,ue=!0;for(const b of[...q.value]){const E=b==="default"?void 0:b,W=E?f.value.multiLangThumbnailAsset?.[E]:f.value.thumbnailAsset;f.value=(await re.deleteThumbnail({seriesOid:f.value._id,assetLang:E,s3Key:W?.s3Key||""})).data.series,q.value=q.value.filter(I=>I!==b)}B.default&&(f.value=await y(f.value._id,B.default),delete B.default);for(const b of s)B[b]&&(f.value=await y(f.value._id,B[b],b),delete B[b]);S("close-popup",{series:f.value})}catch{ee.value=d("ShortDrama","save-failed")}finally{H.value=!1}}}return Ge(()=>{me.forEach(m=>URL.revokeObjectURL(m))}),(m,v)=>(r(),p("div",{class:"short-drama-series-popup",role:"dialog","aria-modal":"true","aria-label":w.value},[a("h2",es,i(w.value),1),a("div",ts,[a("div",as,[a("span",os,i(z(d)("ShortDrama","multi-language")),1),U(Be,{isActive:M.value,disabled:H.value,ariaLabel:z(d)("ShortDrama","multi-language"),onClick:we},null,8,["isActive","disabled","ariaLabel"])]),a("div",{class:D({"short-drama-language-panel":M.value})},[M.value?(r(),p("div",ss,[(r(),p(X,null,ie(s,b=>a("button",{class:D(["short-drama-language-tab",{"short-drama-language-tab-active":j.value===b}]),type:"button",key:b,"aria-selected":j.value===b?"true":"false",disabled:H.value,onClick:E=>j.value=b},[A(i(c[b])+" ",1),h[b]?.trim()||u[b]?.trim()||N[b]?(r(),p("span",is)):g("",!0)],10,ns)),64))])):g("",!0),a("fieldset",{class:D(["short-drama-series-fields",{"short-drama-language-content":M.value}]),disabled:H.value},[a("label",ls,[a("span",ds,[a("span",us,i(z(d)("ShortDrama","series-title")),1),a("span",cs,i(z(d)("ShortDrama","required")),1)]),a("span",hs,[K(a("input",{class:"short-drama-series-input","onUpdate:modelValue":v[0]||(v[0]=b=>C.value=b),maxlength:Ie,placeholder:z(d)("ShortDrama","series-title-placeholder"),onKeydown:Ye(Xe(_,["prevent"]),["enter"])},null,40,ps),[[Ce,C.value]]),a("span",ms,i(C.value.length)+"/"+i(Ie),1)])]),a("label",fs,[a("span",gs,i(z(d)("ShortDrama","series-intro")),1
5),a("span",bs,[K(a("textarea",{class:"short-drama-series-input short-drama-series-textarea","onUpdate:modelValue":v[1]||(v[1]=b=>F.value=b),maxlength:$e,placeholder:z(d)("ShortDrama","series-intro-placeholder")},null,8,ys),[[Ce,F.value]]),a("span",vs,i(F.value.length)+"/"+i($e),1)])]),a("div",Ss,[a("span",Cs,[a("span",_s,i(z(d)("ShortDrama","cover-image")),1),a("span",ws,i(z(d)("ShortDrama","required")),1)]),U(pt,{class:"short-drama-series-cover-box",inputId:"short-drama-series-cover",accept:"image/png,image/jpeg,image/webp",aspectRatio:"auto",imageSrc:M.value?N[j.value]:ae.value,imageName:(M.value?V[j.value]:le.value)||z(d)("ShortDrama","cover-image"),title:z(d)("ShortDrama","choose-cover"),description:z(d)("ShortDrama","cover-help"),acceptedText:z(d)("ShortDrama","recommended-image-size"),deleteLabel:z(d)("ShortDrama","remove-cover"),onChange:v[2]||(v[2]=b=>Pe(b,M.value?j.value:void 0)),onDelete:v[3]||(v[3]=b=>ke(M.value?j.value:void 0))},null,8,["imageSrc","imageName","title","description","acceptedText","deleteLabel"])])],10,rs)],2),ee.value?(r(),p("p",Ps,i(ee.value),1)):g("",!0)]),a("div",ks,[a("button",{class:"short-drama-series-secondary",type:"button",disabled:H.value,onClick:_e},i(z(d)("Common","cancel")),9,Ms),a("button",{class:"short-drama-series-primary",type:"button",disabled:H.value||!fe.value,onClick:_},i(H.value?z(d)("Common","saving"):z(d)("Common","save")),9,Ts)])],8,Xo))}},Es=ne(xs,[["__scopeId","data-v-2b9cd7cb"]]);se();var Os=pe({name:"ShortDramaManager",components:{ShortDramaSeriesCard:ct,UploadedContents:He,StudioEmptyState:Qe},props:{isMobile:{type:Boolean,required:!0}},setup(e,{expose:t}){const s=tt(),c=T([]),o=T(!0),n=T(!1),S=T(""),d=T("");let l=0;const f=Q(()=>{const h=c.value.find(u=>u._id===S.value);return h?["unpublished","published"].map(u=>{const C=h.linkedContentOids.filter(F=>u==="published"?h.contentTypeMap[F]==="published":h.contentTypeMap[F]!=="published");return{status:u,contents:C,key:`${u}:${C.map(F=>`${F}:${h.contentTypeMap[F]}`).sort().join("|")}`}}).filter(u=>u.contents.length):[]});async function P(){const h=++l;o.value=!0;try{const{data:u}=await re.getMySeries();if(h!==l)return;c.value=u.series||[],n.value=!0,c.value.some(C=>C._id===S.value&&C.linkedContentOids.length)||(S.value="")}catch{if(h!==l)return}finally{h===l&&(o.value=!1)}}async function w(h,u){h.linkedContentOids=h.linkedContentOids.filter(C=>C!==u),delete h.contentTypeMap[u],h.numEpisodes=h.linkedContentOids.length,h.numEpisodes===0&&S.value===h._id&&(S.value=""),await P()}function k(h){O.$emit("open-multi-popup",{component:We(Es),defaultStyle:!1,preventDimdClick:!0,data:{series:h},event:{onClose:u=>{if(u?.series?._id)return P()}}})}function R(){k(null)}function M(h){d.value||O.$emit("on-open-confirm-popup",{question:Y.methods._tr("ShortDrama","delete-series"),message:Y.methods._tr("ShortDrama","delete-confirm"),callbackYes:async()=>{if(!d.value){d.value=h._id;try{await re.deleteSeries(h._id),c.value=c.value.filter(u=>u._id!==h._id),S.value===h._id&&(S.value=""),await P()}catch(u){O.$emit("show-toast",{message:Y.methods._tr("ShortDrama",u?.response?.status===409?"delete-blocked":"delete-failed"),type:"error"})}finally{d.value=""}}},popupProps:{messageYes:Y.methods._tr("ShortDrama","delete-series")}})}function j(h){s.push({name:"SimpleUploader",params:{videoLayout:"vertical"},query:{seriesOid:h._id}})}return t({openCreatePopup:R}),Je(P),{tr:Y.methods._tr,confirmDelete:M,deletingSeriesOid:d,loaded:n,expandedEpisodeGroups:f,expandedSeriesOid:S,loading:o,loadSeries:P,onEpisodeDeleted:w,openCreatePopup:R,openSeriesPopup:k,seriesList:c,uploadEpisode:j}}}),Ds=["aria-busy"],Us=["aria-label"],Rs={key:1,class:"flex w-full flex-col overflow-hidden rounded-lg bg-surface-raised p-6 text-content-primary"},As={class:"mb-4 flex w-full items-center justify-start border-b border-border-subtle pb-4"},Ns={class:"text-lg leading-relaxed font-weight-bold"},js={class:"short-drama-manager-series-header"},Is=["id","aria-labelledby"],$s={class:"short-drama-manager-group-count"};function Gs(e,t,s,c,o,n){const S=$("ShortDramaSeriesCard"),d=$("UploadedContents"),l=$("StudioEmptyState");return r(),p("section",{class:D(["short-drama-manager w-full",{"py-2":e.seriesList.length>0,"pt-0":e.isMobile}]),"aria-busy":e.loading},[e.loading&&!e.seriesList.length?(r(),p("div",{key:0,class:"flex w-full items-center justify-center py-10",role:"progressbar","aria-label":e.tr("Common","loading")},[...t[0]||(t[0]=[a("span",{class:"loader","aria-hidden":"true"},null,-1)])],8,Us)):e.seriesList.length?(r(),p("div",Rs,[a("div",As,[a("h2",Ns,i(e.tr("ShortDrama","series")),1)]),(r(!0),p(X,null,ie(e.seriesList,f=>(r(),p("section",{class:"short-drama-manager-series",key:f._id},[a("div",js,[U(S,{series:f,manage:!0,expanded:e.expandedSeriesOid===f._id,deleting:e.deletingSeriesOid===f._id,onToggle:P=>e.expandedSeriesOid=e.expandedSeriesOid===f._id?"":f._id,onEdit:e.openSeriesPopup,onUpload:e.uploadEpisode,onDelete:e.confirmDelete},null,8,["series","expanded","deleting","onToggle","onEdit","onUpload","onDelete"])]),K(a("div",{class:"short-drama-manager-episodes",id:`short-drama-episodes-${f._id}`,"aria-labelledby":`short-drama-toggle-${f._id}`,role:"region"},[e.expandedSeriesOid===f._id&&f.linkedContentOids.length?(r(!0),p(X,{key:0},ie(e.expandedEpisodeGroups,P=>(r(),L(d,{key:P.key,contents:P.contents,contentTypeMap:f.contentTypeMap,seriesOid:f._id,isMobile:e.isMobile,allowSelection:!1,embedded:"",onContentDeleted:w=>e.onEpisodeDeleted(f,w),onEncodingStatusTerminal:e.loadSeries},{default:x(()=>[A(i(e.tr("ShortDrama",`${P.status}-episodes`))+" ",1),a("span",$s,i(e.tr("ShortDrama","episode-count",{count:P.contents.length})),1)],void 0,!0),_:2},1032,["contents","contentTypeMap","seriesOid","isMobile","onContentDeleted","onEncodingStatusTerminal"]))),128)):g("",!0)],8,Is),[[J,e.expandedSeriesOid===f._id]])]))),128))])):e.loaded?(r(),L(l,{key:2,message:e.tr("ShortDrama","no-series"),actionLabel:e.tr("ShortDrama","create-series"),onAction:e.openCreatePopup},null,8,["message","actionLabel","onAction"])):g("",!0)],10,Ds)}var Fs=ne(Os,[["render",Gs],["__scopeId","data-v-94240bd2"]]);se();var Te=Object.freeze({storyengine:Object.freeze({discordUrl:"https://discord.gg/yJhujaT4cd"}),romplay:Object.freeze({discordUrl:"https://discord.gg/j6wqy5WFYw",guideUrl:({}.VUE_APP_MELO,"https://animechat.ai/guide")})}),ve=Object.freeze({en:"https://docs.google.com/forms/d/e/1FAIpQLSfHkZsSAXFVpJFkkhv2JjGaDsz6uSXGG4PkLl0-uMubmDvc5w/viewform",jp:"https://docs.google.com/forms/d/e/1FAIpQLSdnm43Xkdbr9QoaOXCnH6V1DvoQKw1Pl1CP2lGR-syejouAGw/viewform"}
5),Bs={name:"StudioHome",components:{PlaxButton:xe,ContentThumbnail:gt,ContentThumbnailScenario:vt,OriginalStoryContents:Yt,UploadedContents:He,StudioEmptyState:Qe,CreatorLegalConsultationLink:ft,ShortDramaManager:Fs},inject:["story-engine","romanticplay"],props:{isMobile:{default:!1}},computed:{platformType(){return at()},isMultiChatApp(){return this["story-engine"]||this.romanticplay},selfServePlatformType(){return this.platformType==="melo"?"romplay":this.platformType},isSelfServePlatform(){return["storyengine","romplay"].includes(this.selfServePlatformType)},isStoryEngine(){return this["story-engine"]},hasUploadedContent(){return this.contentListLoaded&&(this.storyChatPagePublished.length>0||this.storyChatPageOriginalPublished.length>0||this.fileContentPosts.length>0||this.publishedGameOids.length>0)},hasStoryChatContents(){return this.storyChatOriginalEntries.length>0||this.storyChatPageNotPublished.length>0||this.storyChatPagePublished.length>0},isPink(){return this.romanticplay},romplayCreatorGuideUrl(){return Te.romplay.guideUrl},unpublishedReplayList(){return this.autoRecords.concat(this.workInProgressReplay)},currentUserInfo(){return this.$store.getters["AccountModule/currentUserInfo"]},showStudioShortDramaTab(){return this.romanticplay&&!!this.currentUserInfo},isGameTester(){return this.currentUserInfo?.admin||this.currentUserInfo?.creatorTags?.includes("game")||!1},showStudioGameTab(){return["romplay","melo"].includes(this.platformType)||!this.$router.hasRoute("GameUpload")?!1:this.isGameTester},isComicTester(){return this.currentUserInfo?.admin||this.currentUserInfo?.creatorTags?.includes("comics")||!1},showStudioComicsTab(){return this.isComicTester&&!this.isMultiChatApp},hideStoryChatForEnRplay(){return this.currentUserInfo?.channelLanguage==="en"&&!this.isStoryEngine&&!this.isPink}},methods:{newScenario(){this.$store.dispatch("AccountModule/updateScenarioWip",{scenarioOid:void 0}),this.$router.push({name:"ScenarioStudio"})},dateFromObjectId(e){return new Date(parseInt(e.substring(0,8),16)*1e3)},removeContent(e){if(e.status==="inprogress"){let t=0;for(const s of this.workInProgress){if(s===e.contentOid)break;t+=1}this.workInProgress.splice(t,1)}else if(e.status==="scheduled"){let t=this.scheduled.findIndex(s=>s===e.contentOid);if(t>=0){this.scheduled.splice(t,1);return}t=this.scheduledClips.findIndex(s=>s===e.contentOid),t>=0&&this.scheduledClips.splice(t,1)}else if(e.status==="published"||e.status==="publishedClips"){let t=this.publishedWork.findIndex(s=>s===e.contentOid);t>=0&&this.publishedWork.splice(t,1)}else if(e.status==="scenario"){let t=this.scenarioEditing.findIndex(s=>s===e.contentOid);if(t>=0){this.scenarioEditing.splice(t,1);return}t=this.scenarioPublished.findIndex(s=>s===e.contentOid),t>=0&&this.scenarioPublished.splice(t,1)}else if(e.status==="encoding"){let t=this.beingEncoded.findIndex(s=>s===e.contentOid);if(t>=0){this.beingEncoded.splice(t,1);return}t=this.beingEncodedClips.findIndex(s=>s===e.contentOid),t>=0&&this.beingEncodedClips.splice(t,1)}},async getUserContentList(e,t){try{let s;if(t){const{data:u}=await this.$accountService.getUserInfo(e,["beingEncoded","beingEncoded-clips","published","publishedClips","publishedGames","fileContentPosts","pinnedFileContentPosts","selfServeCreatorRegistrationNotice","work_in_progress","work_in_progress_clips","scenario","scheduled","scheduled-clips","scheduled-replays","beingEncoded-autoreplay","publishedAutoReplays","beingEncoded-replay","publishedReplays","work_in_progress_replay","work_in_progress_storyChat","publishedStoryChat"],{includeReplayMetadata:!0});s=u}else s=this.currentUserInfo;let c=[],o=[],n=[],S=[],d=[],l=[],f=[];s.scenario&&(s.scenario.editing&&(n=Object.keys(s.scenario.editing)),s.scenario.published&&(S=Object.keys(s.scenario.published)),n.sort((u,C)=>this.dateFromObjectId(C).getTime()-this.dateFromObjectId(u).getTime()),S.sort((u,C)=>this.dateFromObjectId(C).getTime()-this.dateFromObjectId(u).getTime())),c=Object.keys(s.beingEncoded||{}),o=Object.keys(s["beingEncoded-clips"]||{}),s.scheduled?d=Object.keys(s.scheduled):d=[],s["scheduled-clips"]?l=Object.keys(s["scheduled-clips"]):l=[],s["scheduled-replays"]?f=Object.keys(s["scheduled-replays"]):f=[];const P=s.metadataSet?.recordingContents.map(u=>u._id)||[],w={};for(const u of s.metadataSet?.recordingContents||[])w[u._id]=u;const k=Object.keys(s["beingEncoded-replay"]||{}),R=Object.keys(s["beingEncoded-autoreplay"]||{}),M=s.publishedReplays||[],j=s.publishedAutoReplays||[],h={};return n?.forEach(u=>{h[u]="scenario"}),S?.forEach(u=>{h[u]="scenario"}),s.work_in_progress?.forEach(u=>{h[u]="inprogress"}),s.work_in_progress_clips?.forEach(u=>{h[u]="inprogress"}),s.work_in_progress_replay?.forEach(u=>{h[u]="inprogress"}),d?.forEach(u=>{h[u]="scheduled"}),l?.forEach(u=>{h[u]="scheduled"}),f?.forEach(u=>{h[u]="scheduled"}),s.published?.forEach(u=>{h[u]="published"}),s.publishedClips?.forEach(u=>{h[u]="published"}),s.publishedStoryChat?.forEach(u=>{h[u]="storyChat"}),s.work_in_progress_storyChat?.forEach(u=>{h[u]="storyChat"}),M?.forEach(u=>{h[u]="published"}),j?.forEach(u=>{h[u]="published"}),c?.forEach(u=>{h[u]="encoding"}),o?.forEach(u=>{h[u]="encoding"}),k?.forEach(u=>{h[u]="encoding"}),R?.forEach(u=>{h[u]="encoding"}),P?.forEach(u=>{h[u]="recording"}),{inProgress:s.work_in_progress||[],inProgressClips:s.work_in_progress_clips||[],scheduled:d||[],scheduledClips:l||[],scheduledReplays:f||[],published:s.published||[],publishedReplays:M,publishedAutoReplays:j,publishedClips:s.publishedClips||[],publishedStoryChat:s.publishedStoryChat||[],publishedOriginalStoryChat:s.publishedOriginalStoryChat||[],publishedGames:s.publishedGames||[],fileContentPosts:[...s.fileContentPosts||[],...s.pinnedFileContentPosts||[]],selfServeCreatorRegistrationNotice:s.selfServeCreatorRegistrationNotice||null,inProgressStoryChat:s.work_in_progress_storyChat||[],inProgressOriginalStoryChat:s.work_in_progress_original_storyChat||[],originalStoryEntries:[...s.work_in_progress_original_storyChatEntries||[],...s.publishedOriginalStoryChatEntries||[]],beingEncoded:c||[],beingEncodedClips:o||[],beingEncodedReplay:k||[],beingEncodedAutoReplay:R||[],scenarioEditing:n||[],scenarioPublished:S||[],autoRecords:P||[],inProgressReplay:s.work_in_progress_replay||[],autoRecordsMetadataSet:w||{},contentTypeMap:h}}catch{}},toLogin(){O.$emit("signinup-visible","signin")},popUpConsent(){this.currentUserInfo||this.toLogin(),!this.isSelfServePlatform&&this.currentUserInfo&&!this.currentUserInfo.isCreator&&O.$emit("consent-visible",!0)},async refreshPayoutStatus(){if(!(!this.isSelfServePlatform||!this.currentUserOid)){this.shouldShowPayoutRegistrationButton=!1;try{const{data:e}=await be.getPayoutRegistrationStatus();
5this.payoutRegistrationStatus=e?.status||"none",this.shouldShowPayoutRegistrationButton=e?.shouldShowRegistrationButton===!0}catch{this.payoutRegistrationStatus=null,this.shouldShowPayoutRegistrationButton=!1}}},showPayoutRegistrationNotice(e,t){O.$emit("on-open-confirm-popup",{question:this._tr("Studio",t||"payout-registration"),message:this._tr("Studio",e),callbackYes:()=>Promise.resolve(),popupProps:{messageYes:this._tr("Common","confirm"),messageNo:this._tr("Common","close")}})},async openPayoutRegistration(){if(!this.currentUserOid){this.toLogin();return}if(!(this.payoutEligibilityLoading||!this.shouldShowPayoutRegistrationButton)){this.payoutEligibilityLoading=!0;try{const{data:e}=await be.requestPayoutRegistrationContract();(e?.sent||e?.alreadyRequested)&&(this.payoutRegistrationStatus=e?.status||"submitted",this.shouldShowPayoutRegistrationButton=!1,this.showPayoutRegistrationNotice("payout-contract-email-description","payout-contract-requested"))}catch(e){const t=e.response?.data?.error;t==="PAYOUT_THRESHOLD_NOT_MET"?this.showPayoutRegistrationNotice("payout-threshold-description"):t==="PAYOUT_EMAIL_REQUIRED"?this.showPayoutRegistrationNotice("payout-contract-email-required"):(t==="PAYOUT_CONTRACT_SEND_FAILED"&&(this.payoutRegistrationStatus="submitted",this.shouldShowPayoutRegistrationButton=!1),this.showPayoutRegistrationNotice("payout-contract-send-error"))}finally{this.payoutEligibilityLoading=!1}}},getCreatorGuideUrl(){const e=Te[this.selfServePlatformType];if(e?.guideUrl)return e.guideUrl;const t=this._getLang();return t==="ko"?"https://storyengine.gitbook.io/storyengine/lang/ko":t==="en"||t==="es"?"https://storyengine.gitbook.io/storyengine/":"https://animechat.ai/guide"},showCreatorRegistrationComplete(){if(!this.isSelfServePlatform||!(this.hasUploadedContent&&this.selfServeCreatorRegistrationNotice?.platformType===this.selfServePlatformType))return;const e=Te[this.selfServePlatformType];if(!this.hasShownCreatorRegistrationComplete){this.hasShownCreatorRegistrationComplete=!0;const t=this.getCreatorGuideUrl(),s=this.platformType==="melo",c=`
6            <div class="flex flex-col items-center gap-3">
7              <p>${this._tr("Studio",s?"creator-registration-complete-description-melo":"creator-registration-complete-description")}</p>
8              <a href="${t}"
9                 target="_blank"
10                 rel="noopener noreferrer"
11                 class="font-weight-bold text-accent-default hover:underline">
12                ${this._tr("Studio","creator-guide-link")}
13              </a>
14              ${s?"":`<a href="${e.discordUrl}"
15                 target="_blank"
16                 rel="noopener noreferrer"
17                 class="font-weight-bold text-accent-default hover:underline">
18                ${this._tr("Studio","creator-discord-link")}
19              </a>`}
20            </div>
21          `;O.$emit("on-open-confirm-popup",{question:this._tr("Studio","creator-registration-complete-title"),message:c,callbackYes:()=>Promise.resolve(),popupProps:{messageYes:this._tr("Common","confirm"),messageNo:this._tr("Common","close")}})}this.selfServeCreatorRegistrationNotice=null,be.acknowledgeSelfServeCreatorRegistration().catch(()=>{})},async refreshContentList(){this.contentListLoadCount+=1,this.contentListLoading=!0;try{const e=await this.getUserContentList(this.currentUserOid,!0);if(e){this.contentTypeMap=e.contentTypeMap||{},this.beingEncoded=[...e.beingEncoded],this.beingEncodedClips=[...e.beingEncodedClips],this.contentPagePublished=[...e.published],this.contentPageNotPublished=[...e.beingEncoded,...e.inProgress,...e.scheduled],this.replayPageNotPublished=[...e.beingEncodedReplay,...e.beingEncodedAutoReplay,...e.autoRecords,...e.inProgressReplay,...e.scheduledReplays],this.replayPagePublished=[...e.publishedReplays,...e.publishedAutoReplays],this.clipPagePublished=[...e.publishedClips],this.clipPageNotPublished=[...e.beingEncodedClips,...e.inProgressClips,...e.scheduledClips];const t=new Set([...e.inProgressOriginalStoryChat,...e.publishedOriginalStoryChat]),s=Array.isArray(e.originalStoryEntries)?[...e.originalStoryEntries]:[],c=new Map;
21s.forEach(l=>{const f=l.originalStoryOid||`${l.contentOid}:${l.originalStatus}:${l.activationMonthKey}`;c.set(f,l)});const o=[...c.values()],n=new Set(c.keys()),S=(l,f)=>{if(o.some(w=>w.contentOid===l&&w.originalStatus==="active"))return;const P=`${l}:active:legacy`;n.has(P)||(n.add(P),o.push({originalStoryOid:null,contentOid:l,activationMonthKey:null,activatedAt:null,originalStatus:"active",contentStatus:f,lockedUntil:null,releasedAt:null,requestorQuota:null}))};e.inProgressOriginalStoryChat.forEach(l=>S(l,"wip")),e.publishedOriginalStoryChat.forEach(l=>S(l,"published")),this.storyChatOriginalEntries=o;const d=e.inProgressStoryChat.filter(l=>t.has(l));this.storyChatPageOriginalPublished=e.publishedStoryChat.filter(l=>t.has(l)),this.storyChatPageOriginal=[...d,...this.storyChatPageOriginalPublished],this.storyChatPageNotPublished=e.inProgressStoryChat.filter(l=>!t.has(l)),this.storyChatPagePublished=e.publishedStoryChat.filter(l=>!t.has(l)),this.publishedGameOids=[...e.publishedGames],this.fileContentPosts=[...e.fileContentPosts],this.selfServeCreatorRegistrationNotice=e.selfServeCreatorRegistrationNotice,this.scenarioPagePublished=e.scenarioPublished,this.scenarioPageNotPublished=e.scenarioEditing}(this.showStudioGameTab||this.selectedTab==="game")&&await this.loadGameList(),this.showStudioComicsTab&&this.selectedTab==="comics"&&await this.loadComicList(),this.contentListLoaded=!0,this.showCreatorRegistrationComplete(),this.contentListKey=Date.now(),!this.isSelfServePlatform&&this.selectedTab==="storyChat"&&setTimeout(()=>{this.checkAndShowStoryChatGuide()},1e3)}finally{this.contentListLoadCount=Math.max(0,this.contentListLoadCount-1),this.contentListLoading=this.contentListLoadCount>0}},async loadGameList(){try{const e=await ze.getMyGames();if(e?.data?.games){const t=e.data.games;this.gamePagePublished=t.filter(c=>!c.deleted&&c.isPublished).map(c=>c._id),this.gamePageNotPublished=t.filter(c=>!c.deleted&&!c.isPublished).map(c=>c._id);const s={};t.forEach(c=>
21{this.contentTypeMap[c._id]="game",s[c._id]=c}),this.gameMetadataSet=s}}catch{}},async loadComicList(){try{const e=await qe.getMyComics();if(e?.data?.comics){const t=e.data.comics;this.comicPagePublished=t.filter(c=>!c.deleted&&c.status==="published").map(c=>c._id),this.comicPageNotPublished=t.filter(c=>!c.deleted&&c.status!=="published").map(c=>c._id);const s={};t.forEach(c=>{this.contentTypeMap[c._id]="comics",s[c._id]=c}),this.comicMetadataSet=s}}catch{}},onGameContentDeleted(e){const t=this.gamePagePublished.indexOf(e);t!==-1&&this.gamePagePublished.splice(t,1);const s=this.gamePageNotPublished.indexOf(e);s!==-1&&this.gamePageNotPublished.splice(s,1),delete this.contentTypeMap[e],delete this.gameMetadataSet[e]},onComicContentDeleted(e){const t=this.comicPagePublished.indexOf(e);t!==-1&&this.comicPagePublished.splice(t,1);const s=this.comicPageNotPublished.indexOf(e);s!==-1&&this.comicPageNotPublished.splice(s,1),delete this.contentTypeMap[e],delete this.comicMetadataSet[e]},onClickUpload(){switch(this.selectedTab){case"content":this.$router.push({name:"SimpleUploader",params:{videoLayout:"horizontal"}});break;case"replay":this.$router.push({name:"SimpleUploader",params:{videoLayout:"horizontal",isReplayContent:!0}});break;case"clips":this.$router.push({name:"SimpleUploader",params:{videoLayout:"vertical"}});break;case"scenario":this.$store.dispatch("AccountModule/updateScenarioWip",{scenarioOid:void 0}),this.$router.push({name:"ScenarioStudio"});break;case"storyChat":this.openCreateModeSelectPopup();break;case"game":if(!this.showStudioGameTab)return;this.$router.push({name:"GameUpload"});break;case"comics":if(!this.showStudioComicsTab)return;this.$router.push({name:"ComicUpload"});break;case"shortDrama":if(!this.showStudioShortDramaTab)return;this.$refs.shortDramaManager?.openCreatePopup();break;case"fileContent":this.handleFileContentUpload();break}},async handleFileContentUpload(){if(!this.currentUserOid){this.toLogin();return}if(this.isSelfServePlatform){this.$router.push({name:"FileContentsWrite"}).catch(()=>{});return}const e=this.$store.getters["AccountModule/currentUserInfo"];if(e.tabMenu?.disableFileContents===!0)try{await be.modifyUserInfo(this.currentUserOid,{"tabMenu.disableFileContents":!1}),this.$store.commit("AccountModule/WRITE_USER_INFO_KEY",{key:"tabMenu",val:{...e.tabMenu,disableFileContents:!1}})}catch{}this.$router.push({path:`/creatorhome/${this.currentUserOid}`,query:{page:"file-contents"}}).catch(()=>{})},load(){},selectTab(e){e==="game"&&(["romplay","melo"].includes(this.platformType)||!this.$router.hasRoute("GameUpload"))&&(e=this.isMultiChatApp?"storyChat":"content"),e==="comics"&&!this.showStudioComicsTab&&(e=this.isMultiChatApp?"storyChat":"content"),e==="shortDrama"&&!this.romanticplay&&(e=this.isMultiChatApp?"storyChat":"content"),this.$route.query.tab!==e&&this.$router.replace({query:{tab:e}}).catch(t=>{t.name}),this.selectedTab!==e&&(this.selectedTab=e,e==="game"&&this.currentUserOid&&this.contentListLoaded&&this.gamePagePublished.length===0&&this.gamePageNotPublished.length===0&&this.loadGameList(),e==="comics"&&this.showStudioComicsTab&&this.currentUserOid&&this.contentListLoaded&&this.comicPagePublished.length===0&&this.comicPageNotPublished.length===0&&this.loadComicList(),!this.isSelfServePlatform&&e==="storyChat"&&this.contentListLoaded&&setTimeout(()=>{this.checkAndShowStoryChatGuide()},1e3))},checkAndShowStoryChatGuide(){if(!this.isSelfServePlatform&&!this.currentUserInfo?.isCreator&&this.storyChatPagePublished.length<1&&this.storyChatPageOriginalPublished.length<1&&!this.hasShownStoryChatGuide){this.hasShownStoryChatGuide=!0;const e=this._getLang();let t,s;e==="ko"?(t="환영합니다! 알플챗 제작 가이드를 읽어 주세요!",s="https://animechat.ai/guide"):e==="jp"||e==="ja"?(t="クリエイターになりませんか?<br>クリエイター申請を完了して、作品の公開を始めましょう!",s=ve.jp):e==="zh-Hant"?(t="想成為創作者嗎?<br>完成創作者申請,開始發布您的作品!",s=ve.en):e==="zh"?(t="想成为创作者吗?<br>完成创作者申请,开始发布您的作品!",s=ve.en):(t="Want to become a creator?<br>Complete your creator application to start publishing!",s=ve.en);const c=e!=="ko",o=c?{jp:"申請する",ja:"申請する","zh-Hant":"立即申請",zh:"立即申请"}[e]||"Apply Now":this._tr("Common","view-guide"),n=`
22            <div class="flex flex-col items-center">
23              <img src="${{}.VUE_APP_MELO?mt:this.isPink?Ke:_t}"
24                   alt="Mascot"
25                   class="w-32 h-32 mb-4" />
26              <div class="text-center mb-4">${t}</div>
27              <a href="${s}"
28                 target="_blank"
29                 class="text-accent-default hover:underline">
30                ${o}
31              </a>
32            </div>
33          `;O.$emit("on-open-confirm-popup",{question:c?{jp:"クリエイター申請",ja:"クリエイター申請","zh-Hant":"創作者申請",zh:"创作者申请"}[e]||"Creator Application":this._tr("Studio","ai-roleplay"),message:n,callbackYes:()=>{window.open(s,"_blank")},popupProps:{messageYes:o,messageNo:this._tr("Common","close")}})}},openSampleSelector(){O.$emit("open-multi-popup",{component:Eo,data:{currentUserOid:this.currentUserOid,onSampleCopied:async()=>{await this.refreshContentList()}}})},openCreateModeSelectPopup(){O.$emit("open-multi-popup",{component:Zo,data:{onModeSelected:async e=>{if(!(e!=="canvas"&&e!=="lite"))try{O.$emit("progress-start");const{data:t}=await Ee.createStoryChat({isLiteMode:e==="lite"});t?.storyChat?._id&&this.$router.push({name:"StoryChatStudio",params:{contentOid:t.storyChat._id}})}catch{}finally{O.$emit("progress-end")}}}})},handleSampleSelected(e){this.refreshContentList(),O.$emit("display-message",{type:"success",text:this._tr("Common","success")})}},watch:{"$route.query.tab"(e){const t=this.isSelfServePlatform?"storyChat":"content";this.selectTab(e||t)},showStudioGameTab(e){e&&this.selectedTab==="game"&&this.currentUserOid&&this.contentListLoaded&&this.gamePagePublished.length===0&&this.gamePageNotPublished.length===0&&this.loadGameList()}},async created(){this.popUpConsent(),this.currentUserOid=this.$store.getters["AccountModule/currentUserOid"],this.$route.query.refresh==="true"&&(this.forceFetch=!0),this.currentUserOid?this.refreshContentList().then(()=>{this.isSelfServePlatform&&this.hasUploadedContent&&this.refreshPayoutStatus()}):O.$emit("signinup-visible","signin");const e=this.isSelfServePlatform?"storyChat":"content";this.selectTab(this.$route.query.tab||e),O.$emit("on-load")},mounted(){this.$store.dispatch("AccountModule/updateUserInfo")},data(){return{clipSet:new Set,selectedTab:void 0,forceFetch:!1,beingEncoded:[],beingEncodedClips:[],contentPagePublished:[],contentPageNotPublished:[],replayPagePublished:[],replayPageNotPublished:[],autoSaved:[],scenarioPagePublished:[],scenarioPageNotPublished:[],storyChatPagePublished:[],storyChatPageNotPublished:[],storyChatPageOriginal:[],storyChatPageOriginalPublished:[],storyChatOriginalEntries:[],publishedGameOids:[],fileContentPosts:[],selfServeCreatorRegistrationNotice:null,gamePagePublished:[],gamePageNotPublished:[],gameMetadataSet:{},comicPagePublished:[],comicPageNotPublished:[],comicMetadataSet:{},clipPageNotPublished:[],clipPagePublished:[],publishedClips:[],publishedReplays:[],contentListLoaded:!1,contentListLoadCount:0,contentListLoading:!1,payoutEligibilityLoading:!1,payoutRegistrationStatus:null,shouldShowPayoutRegistrationButton:!1,currentUserOid:void 0,inprogressBulkGetter:void 0,publishedBulkGetter:void 0,scenarioBulkGetter:void 0,autoRecords:[],autoRecordsMetadataSet:{},contentTypeMap:{},isOpen:!1,selectedContentSubTab:"work-in-progress",tr:Y.methods._tr,contentListKey:0,hasShownStoryChatGuide:!1,hasShownCreatorRegistrationComplete:!1,showSampleSelector:!1}}},zs={key:0,class:"w-full"},Ks=["href"],qs={key:1,class:"w-full"},Vs={key:0,class:"w-full",href:"https://storyengine.gitbook.io/storyengine/",target:"_blank"}
33,Hs={key:1,class:"w-full",href:"https://storyengine.gitbook.io/storyengine/lang/ko",target:"_blank"},Qs={key:2,class:"w-full",href:"https://animechat.ai/guide",target:"_blank"},Ys={key:2,class:"w-full"},Ws={key:0,class:"w-full",href:"https://animechat.ai/guide",target:"_blank"},Js={key:1,class:"w-full",href:"https://animechat.ai/guide",target:"_blank"},Zs={key:2,class:"w-full",href:"https://animechat.ai/guide",target:"_blank"},Xs={class:"mb-3 mt-10 flex w-full flex-col justify-between gap-2 sm:flex-row"},en=["disabled"],tn={key:4,class:"-mt-1 mb-3 w-full text-xs leading-standard text-content-secondary"},an={class:"z-popover flex w-full flex-col justify-between border-b border-border-subtle pt-4"},on={class:"flex flex-row"},sn=["aria-label"],nn=["aria-busy"],rn={class:"flex w-full flex-col",key:"content"},ln={class:"flex w-full flex-col",key:"clips"},dn={class:"flex w-full flex-col",key:"replay"},un={class:"flex w-full flex-col",key:"scenario"},cn={class:"flex w-full flex-col",key:"storyChat"},hn={class:"flex w-full flex-col",key:"game"},pn={class:"flex w-full flex-col",key:"comics"};function mn(e,t,s,c,o,n){const S=$("CreatorLegalConsultationLink"),d=$("StudioEmptyState"),l=$("UploadedContents"),f=$("OriginalStoryContents"),P=$("ShortDramaManager");return r(),p("div",{class:"flex h-full w-full flex-grow flex-col items-center text-content-primary",style:et({"padding-bottom":s.isMobile?"3rem":"2rem"})},[n.isPink?(r(),p("div",zs,[a("a",{class:"w-full",href:n.romplayCreatorGuideUrl,target:"_blank"},[...t[14]||(t[14]=[a("img",{class:"studio-creator-guide-banner w-full",src:"/assets/KZe2ZYE3zx.png"},null,-1)])],8,Ks)])):n.isStoryEngine?(r(),p("div",qs,[e._getLang()==="en"||e._getLang()==="es"?(r(),p("a",Vs,[...t[15]||(t[15]=[a("img",{class:"w-full",src:"/assets/BavlveZc6h.png"},null,-1)])])):e._getLang()==="ko"?(r(),p("a",Hs,[...t[16]||(t[16]=[a("img",{class:"w-full",src:"/assets/6kq_aOvxQp.png"},null,-1)])])):(r(),p("a",Qs,[...t[17]||(t[17]=[a("img",{class:"w-full",src:"/assets/CXZhCJoagE.png"},null,-1)])]))])):(r(),p("div",Ys,[e._getLang()==="en"||e._getLang()==="es"?(r(),p("a",Ws,[...t[18]||(t[18]=[a("img",{class:"w-full",src:"/assets/CfkiRE5kiR.jpg"},null,-1)])])):e._getLang()==="ko"?(r(),p("a",Js,[...t[19]||(t[19]=[a("img",{class:"w-full",src:"/assets/CdNQyJ-CvS.jpg"},null,-1)])])):(r(),p("a",Zs,[...t[20]||(t[20]=[a("img",{class:"w-full",src:"/assets/bL3chUepgQ.jpg"},null,-1)])]))])),e._getLang()==="ko"?(r(),L(S,{key:3,class:"mt-3"})):g("",!0),a("div",Xs,[o.selectedTab!=="shortDrama"||n.showStudioShortDramaTab?(r(),p("button",{key:0,class:"flex-1 rounded-compact bg-accent-default px-2 py-1 text-sm font-weight-bold leading-standard",onClick:t[0]||(t[0]=(...w)=>n.onClickUpload&&n.onClickUpload(...w)),style:{height:"50px"}},[n.isMultiChatApp?(r(),p(X,{key:0},[K(a("span",null,i(n.romanticplay?e._tr("CreatorHome","rplay-chat"):e._tr("Studio","ai-roleplay-upload")),513),[[J,o.selectedTab==="storyChat"]]),K(a("span",null,i(e._tr("Studio","file-content-upload")),513),[[J,o.selectedTab==="fileContent"]]),K(a("span",null,i(e._tr("Studio","game-upload")),513),[[J,o.selectedTab==="game"&&n.showStudioGameTab]]),K(a("span",null,i(e._tr("ShortDrama","create-series")),513),[[J,o.selectedTab==="shortDrama"]])],64)):(r(),p(X,{key:1},[K(a("span",null,i(e._tr("Studio","contents")),513),[[J,o.selectedTab==="content"]]),K(a("span",null,i(e._tr("Studio","vod")),513),[[J,o.selectedTab==="replay"]]),K(a("span",null,i(e._tr("Studio","clips")),513),[[J,o.selectedTab==="clips"]]),K(a("span",null,i(e._tr("Studio","scenario")),513),[[J,o.selectedTab==="scenario"]]),K(a("span",null,i(e._tr("Studio","ai-roleplay-upload")),513),[[J,o.selectedTab==="storyChat"]]),n.showStudioGameTab?K((r(),p("span",{key:0},i(e._tr("Studio","game-upload")),513)),[[J,o.selectedTab==="game"]]):g("",!0),K(a("span",null,i(e._tr("Comic","comics")),513),[[J,o.selectedTab==="comics"&&n.showStudioComicsTab]])],64))])):g("",!0),n.isSelfServePlatform&&o.currentUserOid&&n.hasUploadedContent&&o.shouldShowPayoutRegistrationButton?(r(),p("button",{key:1,class:"rounded-compact border border-border-subtle bg-surface-interactive px-5 py-1 text-sm font-weight-bold leading-standard text-content-primary transition-opacity hover:opacity-strong",style:{height:"50px"},disabled:o.payoutEligibilityLoading,onClick:t[1]||(t[1]=(...w)=>n.openPayoutRegistration&&n.openPayoutRegistration(...w))},i(e._tr("Studio",o.payoutEligibilityLoading?"sending-payout-contract":"payout-registration")),9,en)):g("",!0)]),n.isSelfServePlatform&&n.hasUploadedContent?(r(),p("p",tn,i(e._tr("Studio","payout-independent-description")),1)):g("",!0),a("div",an,[a("div",on,[n.isMultiChatApp?(r(),p(X,{key:0},[n.showStudioShortDramaTab?(r(),p("button",{key:0,class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="shortDrama"}]),onClick:t[2]||(t[2]=w=>n.selectTab("shortDrama"))},i(e._tr("ShortDrama","short-drama")),3)):g("",!0),a("button",{class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="storyChat"}]),onClick:t[3]||(t[3]=w=>n.selectTab("storyChat"))},i(n.romanticplay?e._tr("CreatorHome","rplay-chat"):e._tr("Studio","ai-roleplay")),3),a("button",{class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="fileContent"}]),onClick:t[4]||(t[4]=w=>n.selectTab("fileContent"))},i(e._tr("BurgerMenu","studio-file-content")),3),n.showStudioGameTab?(r(),p("button",{key:1,class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="game"}]),onClick:t[5]||(t[5]=w=>n.selectTab("game"))},i(e._tr("Studio","game")),3)):g("",!0)],64)):(r(),p(X,{key:1},[a("button",{class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="content"}]),onClick:t[6]||(t[6]=w=>n.selectTab("content"))},i(e._tr("Studio","contents")),3),a("button",{class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="replay"}]),onClick:t[7]||(t[7]=w=>n.selectTab("replay"))},i(e._tr("Studio","vod")),3),a("button",{class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="clips"}]),onClick:t[8]||(t[8]=w=>n.selectTab("clips"))},i(e._tr("Studio","clips")),3),a("button",{class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="scenario"}]),onClick:t[9]||(t[9]=w=>n.selectTab("scenario"))},i(e._tr("Studio","scenario")),3),n.hideStoryChatForEnRplay?g("",!0):(r(),p("button",{key:0,class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="storyChat"}
33]),onClick:t[10]||(t[10]=w=>n.selectTab("storyChat"))},i(e._tr("Studio","ai-roleplay")),3)),n.showStudioGameTab?(r(),p("button",{key:1,class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="game"}]),onClick:t[11]||(t[11]=w=>n.selectTab("game"))},i(e._tr("Studio","game")),3)):g("",!0),n.showStudioComicsTab?(r(),p("button",{key:2,class:D(["studio-home-tab z-floating-panel h-10 border-b-strong px-4 transition-colors duration-moderate",{"studio-home-tab--active text-accent-default":o.selectedTab==="comics"}]),onClick:t[12]||(t[12]=w=>n.selectTab("comics"))},i(e._tr("Comic","comics")),3)):g("",!0)],64))])]),o.contentListLoading&&o.selectedTab!=="shortDrama"?(r(),p("div",{key:5,class:"flex w-full items-center justify-center py-10","data-token-visual":"studio-content-loading",role:"progressbar","aria-label":e._tr("Common","loading")},[...t[21]||(t[21]=[a("div",{class:"loader","aria-hidden":"true"},null,-1)])],8,sn)):g("",!0),U(Le,{name:"fade",mode:"out-in"},{default:x(()=>[(r(),p("div",{class:"w-full pt-2","data-token-visual":"studio-content-results",key:o.selectedTab,"aria-busy":o.contentListLoading&&o.selectedTab!=="shortDrama"},[o.selectedTab==="content"?(r(),p("div",rn,[o.contentListLoaded&&!o.contentListLoading&&!o.contentPageNotPublished.length&&!o.contentPagePublished.length?(r(),L(d,{key:0,message:e._tr("UploadedContents","no-contents"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0),o.contentPageNotPublished.length>0?(r(),L(l,{key:1,contents:o.contentPageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,onEncodingStatusTerminal:n.refreshContentList},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","onEncodingStatusTerminal"])):g("",!0),o.contentPagePublished.length>0?(r(),L(l,{key:2,contents:o.contentPagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap},{default:x(()=>[A(i(e._tr("Studio","published")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap"])):g("",!0)])):g("",!0),o.selectedTab==="clips"?(r(),p("div",ln,[o.contentListLoaded&&!o.contentListLoading&&!o.clipPageNotPublished.length&&!o.clipPagePublished.length?(r(),L(d,{key:0,message:e._tr("UploadedContents","no-contents"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0),o.clipPageNotPublished.length>0?(r(),L(l,{key:1,contents:o.clipPageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,onEncodingStatusTerminal:n.refreshContentList},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","onEncodingStatusTerminal"])):g("",!0),o.clipPagePublished.length>0?(r(),L(l,{key:2,contents:o.clipPagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap},{default:x(()=>[A(i(e._tr("Studio","published")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap"])):g("",!0)])):o.selectedTab==="replay"?(r(),p("div",dn,[o.contentListLoaded&&!o.contentListLoading&&!o.replayPageNotPublished.length&&!o.replayPagePublished.length?(r(),L(d,{key:0,message:e._tr("UploadedContents","no-contents"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0),o.replayPageNotPublished.length>0?(r(),L(l,{key:1,contents:o.replayPageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,forceFetch:o.forceFetch,onEncodingStatusTerminal:n.refreshContentList},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","forceFetch","onEncodingStatusTerminal"])):g("",!0),o.replayPagePublished.length>0?(r(),L(l,{key:2,contents:o.replayPagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,forceFetch:o.forceFetch},{default:x(()=>[A(i(e._tr("Studio","published-replays")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","forceFetch"])):g("",!0)])):g("",!0),o.selectedTab==="scenario"?(r(),p("div",un,[o.contentListLoaded&&!o.contentListLoading&&!o.scenarioPageNotPublished.length&&!o.scenarioPagePublished.length?(r(),L(d,{key:0,message:e._tr("UploadedContents","no-contents"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0),o.scenarioPageNotPublished.length>0?(r(),L(l,{key:1,contents:o.scenarioPageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap"])):g("",!0),o.scenarioPagePublished.length>0?(r(),L(l,{key:2,contents:o.scenarioPagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap},{default:x(()=>[A(i(e._tr("Studio","published")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap"])):g("",!0)])):g("",!0),o.selectedTab==="storyChat"?(r(),p("div",cn,[o.contentListLoaded&&!o.contentListLoading&&!n.hasStoryChatContents?(r(),L(d,{key:0,message:e._tr("UploadedContents","no-contents"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0),a("div",{class:D(["my-2 flex",n.hasStoryChatContents?"justify-start":"justify-center"])},[a("button",{class:"flex w-full items-center justify-center gap-2 rounded-compact bg-surface-interactive px-6 py-3 text-sm leading-standard font-weight-bold text-content-primary transition-colors hover:bg-accent-default sm:w-auto",type:"button",onClick:t[13]||(t[13]=(...w)=>n.openSampleSelector&&n.openSampleSelector(...w))},[t[22]||(t[22]=a("svg",{class:"h-5 w-5 flex-none",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),A(" "+i(e._tr("StoryChat","select-sample-content")),1)])],2),o.storyChatOriginalEntries.length>
330?(r(),L(f,{entries:o.storyChatOriginalEntries,isMobile:s.isMobile,forceFetch:o.forceFetch,onContentCopied:n.refreshContentList,onContentDeleted:n.refreshContentList,key:`original-${o.contentListKey}`},null,8,["entries","isMobile","forceFetch","onContentCopied","onContentDeleted"])):g("",!0),o.storyChatPageNotPublished.length>0?(r(),L(l,{contents:o.storyChatPageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,onContentCopied:n.refreshContentList,key:`unpublished-${o.contentListKey}`},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","onContentCopied"])):g("",!0),o.storyChatPagePublished.length>0?(r(),L(l,{contents:o.storyChatPagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,onContentCopied:n.refreshContentList,key:`published-${o.contentListKey}`},{default:x(()=>[A(i(e._tr("Studio","published")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","onContentCopied"])):g("",!0)])):g("",!0),o.selectedTab==="fileContent"?(r(),L(d,{key:"fileContent",message:e._tr("BurgerMenu","studio-file-content"),actionLabel:e._tr("Studio","file-content-upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0),o.selectedTab==="game"&&n.showStudioGameTab?(r(),p("div",hn,[o.gamePageNotPublished.length>0?(r(),L(l,{contents:o.gamePageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,prefetchedMetadataSet:o.gameMetadataSet,key:`game-unpublished-${o.contentListKey}`,onContentDeleted:n.onGameContentDeleted},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","prefetchedMetadataSet","onContentDeleted"])):g("",!0),o.gamePagePublished.length>0?(r(),L(l,{contents:o.gamePagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,prefetchedMetadataSet:o.gameMetadataSet,key:`game-published-${o.contentListKey}`,onContentDeleted:n.onGameContentDeleted},{default:x(()=>[A(i(e._tr("Studio","published")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","prefetchedMetadataSet","onContentDeleted"])):g("",!0),o.gamePagePublished.length===0&&o.gamePageNotPublished.length===0&&o.contentListLoaded&&!o.contentListLoading?(r(),L(d,{key:2,message:e._tr("CreatorHome","no-game"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0)])):g("",!0),o.selectedTab==="shortDrama"&&n.showStudioShortDramaTab?(r(),L(P,{ref:"shortDramaManager",isMobile:s.isMobile,key:"shortDrama"},null,8,["isMobile"])):g("",!0),o.selectedTab==="comics"&&n.showStudioComicsTab?(r(),p("div",pn,[o.comicPageNotPublished.length>0?(r(),L(l,{contents:o.comicPageNotPublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,prefetchedMetadataSet:o.comicMetadataSet,key:`comic-unpublished-${o.contentListKey}`,onContentDeleted:n.onComicContentDeleted},{default:x(()=>[A(i(e._tr("Studio","unpublished")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","prefetchedMetadataSet","onContentDeleted"])):g("",!0),o.comicPagePublished.length>0?(r(),L(l,{contents:o.comicPagePublished,isMobile:s.isMobile,contentTypeMap:o.contentTypeMap,prefetchedMetadataSet:o.comicMetadataSet,key:`comic-published-${o.contentListKey}`,onContentDeleted:n.onComicContentDeleted},{default:x(()=>[A(i(e._tr("Studio","published")),1)],void 0,!0),_:1},8,["contents","isMobile","contentTypeMap","prefetchedMetadataSet","onContentDeleted"])):g("",!0),o.comicPagePublished.length===0&&o.comicPageNotPublished.length===0&&o.contentListLoaded&&!o.contentListLoading?(r(),L(d,{key:2,message:e._tr("Comic","
33no-uploaded-comics"),actionLabel:e._tr("Studio","upload"),onAction:n.onClickUpload},null,8,["message","actionLabel","onAction"])):g("",!0)])):g("",!0)],8,nn))],void 0,!0),_:1})],4)}var Kn=ne(Bs,[["render",mn]]);export{Kn as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.