1import{j as e}from"./vendor-motion-hRg_q8lq.js";import{d as h,l as m,f as S,b as P,p as I,H as E}from"./index-BKzE8EQ8.js";import{r as j,b as L,N as B}from"./vendor-react-E98sgxjj.js";import{b as q,a as b,u as C}from"./vendor-query-bOUN_gKe.js";import{du as u}from"./vendor-fa-Bn2dnpnC.js";import{u as T}from"./useIsStaff-DZf24Ivp.js";import"./SidebarContext-BL6EZ3Xi.js";import"./AuthPanel-B4zt6SJ5.js";import"./plans-CbMJY2XS.js";import"./index-i1nPji9k.js";import"./tabBarStore-624ukDKJ.js";import"./GameCard-koPJLRWA.js";import"./ExploreGameCard-CoU7JXPp.js";import"./GamePreview-DXVKEh7P.js";import"./GameFrame-COJWxWBt.js";import"./PlayPanelHost-DZaYs6Qz.js";import"./ChatPanel-YMYP4TKG.js";import"./AvatarCarousel-DJMyzfiE.js";import"./pendingReferral-B4JPXhl_.js";import"./exploreHandoff-RQymaHkp.js";import"./paywall-CG7xVZtx.js";import"./pricingExperiments-zMZby8z7.js";import"./useLocaleNavigate-BNriJdRU.js";import"./organization-BuGhuc22.js";import"./MediaImage-DKgx-nW4.js";import"./Tooltip-C8AvPGtA.js";import"./ShareModal-YOmfr9ti.js";import"./SubmitVideoModal-DzX5MAqQ.js";import"./earnProgram-B9pqjKbP.js";import"./trailerShare-BGlMG0RV.js";import"./usePublishingFeatures-C8zY31rs.js";import"./useIsPaid-Cw2jGyd_.js";import"./makeCopy-DTZjoJnY.js";import"./MakeCopy-DWExybqc.js";import"./OrgScopeLabel-C9yeV7Fb.js";import"./MemberAvatar-CfukMFmI.js";import"./Avatar-B60wpoS5.js";import"./planChat-Cir7UVv6.js";import"./cardParts-5JiJu2RB.js";import"./usePlanChat-D_HjNnxd.js";import"./plansApi-C_2vGYRm.js";import"./MediaVideo-CBR0-TKg.js";import"./BadgeRow-Dfwgl-tB.js";import"./PlayingNowBadge-CH2HUoBo.js";import"./playingNowApi-CB_pr25U.js";import"./AdminGameMenu-DlEcDyIv.js";import"./useFullscreen-Cs7diftf.js";import"./screenshotStore-B6ItflPb.js";import"./ActivityGrid-DDQeSjer.js";import"./VolumeControl-DJ2K5ohZ.js";import"./CoinTopUpModal-CAwRJTIr.js";import"./useHasCredits-D0Kot1Ju.js";import"./index-BxtVm1Yj.js";import"./AuthShell-DPeun0C_.js";import"./LaunchPromoClips-eRoWsyBt.js";import"./useFocusTrap-BzqZufCW.js";import"./StudioContext-C1fnzqLL.js";import"./useOrchestrationEnabled-BWYxrOff.js";import"./Markdown-BgzYVg9N.js";import"./StreamingWords-Ds3Ch0UQ.js";import"./index-DtA29OOy.js";import"./index-Cq7f-X06.js";import"./LoopBudgetModal-MJKH0M3w.js";import"./useIsMaxTier-CA74KWZY.js";import"./useDevModelsVisible-BHgONHQI.js";import"./index-DoPwtVAc.js";function Q(t){const i=!!t.apple_id&&!!t.bundle_id,r=!!t.submitted_at,l=!!t.in_review_at||t.status==="in_review_apple",a=!!t.published_at||t.status==="live",c=[{key:"handover",label:"Handed over",hint:t.status==="draft"?"The creator has not marked it ready":"The creator marked it ready for Tesana",done:t.status!=="draft"},{key:"identifiers",label:"App Store Connect record",hint:i?`App ${t.apple_id}`:t.apple_id?"Bundle identifier not recorded":"App id and bundle id not recorded",done:i},{key:"listing",label:"Listing complete",hint:t.ready_for_submission?"Checklist complete":`${t.missing_requirements.length} items outstanding`,done:t.ready_for_submission},{key:"submitted",label:"Submitted to Apple",hint:r?"Sent to App Review":"Not submitted",done:r},{key:"in_review",label:"In review with Apple",hint:l?"Apple is reviewing â the long wait":"Review not started",done:l},{key:"released",label:"Released",hint:a?"Live on the App Store":"Not released",done:a}],d=c.findIndex(n=>!n.done);return c.map((n,x)=>({key:n.key,label:n.label,hint:n.hint,state:n.done?"done":x===d?"current":"todo"}))}function D({detail:t}){const i=Q(t);return e.jsx("ol",{className:"flex flex-col gap-1",children:i.map((r,l)=>e.jsxs("li",{className:"flex gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("span",{className:h("flex h-5 w-5 items-center justify-center rounded-full border text-[10px]",r.state==="done"?"border-emerald-400/40 bg-emerald-500/20 text-emerald-300":r.state==="current"?"border-sky-400/50 bg-sky-500/20 text-sky-300":"border-white/15 bg-white/5 text-white/30"),children:r.state==="done"?e.jsx(u,{icon:["far","check"],className:"h-2.5 w-2.5"}
1):r.state==="current"?e.jsx(u,{icon:["far","circle-dot"],className:"h-2 w-2"}):e.jsx(u,{icon:["far","circle"],className:"h-1.5 w-1.5"})}),l<i.length-1?e.jsx("span",{className:h("w-px flex-1 my-0.5",r.state==="done"?"bg-emerald-400/30":"bg-white/10")}):null]}),e.jsxs("div",{className:"pb-3",children:[e.jsx("div",{className:h("text-xs font-medium",r.state==="todo"?"text-white/40":"text-white/90"),children:r.label}),e.jsx("div",{className:"text-[10px] text-white/45",children:r.hint})]})]},r.key))})}const H=["draft","ready","in_review","submitted","in_review_apple","live","blocked"],W=[{value:"hidden",label:"Hidden â creator sees no progress"},{value:"preparing",label:"Being prepared"},{value:"with_tesana",label:"With the Tesana publishing team"},{value:"submitted",label:"Submitted to Apple"},{value:"in_review_apple",label:"In review with Apple"},{value:"live",label:"Released on the App Store"}];function w({error:t}){if(!t)return null;const i=t?.response?.data,r=i?.message??t?.message??"Something went wrong.";return e.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-red-500/30 bg-red-500/10 p-2.5 text-[11px] text-red-200",children:[e.jsx(u,{icon:["far","circle-exclamation"],className:"mt-0.5 h-3 w-3 shrink-0"}),e.jsxs("div",{children:[r,i?.blocking?e.jsxs("span",{className:"text-red-300/70",children:[" (missing: ",i.blocking.replace("_"," "),")"]}):null]})]})}function k({gate:t,label:i,onRun:r,pending:l,tone:a="primary"}){const c={primary:"bg-sky-500/90 hover:bg-sky-400 text-white",secondary:"bg-white/10 hover:bg-white/15 text-white",danger:"bg-red-500/85 hover:bg-red-500 text-white"};return e.jsxs("div",{children:[e.jsx("button",{type:"button",disabled:!t.ok||l,onClick:r,className:h("rounded-md px-3 py-1.5 text-xs font-medium transition disabled:cursor-not-allowed disabled:opacity-40",c[a]),children:l?"Workingâ¦":i}),t.reason?e.jsx("div",{className:h("mt-1 text-[10px]",t.ok?"text-amber-300/80":"text-white/40"),children:t.reason}):null]})}function $({detail:t}){const i=q(),[r,l]=j.useState(!1),[a,c]=j.useState(t.reviewer_notes),[d,n]=j.useState(t.apple_id),[x,o]=j.useState(t.bundle_id),p=()=>{i.invalidateQueries({queryKey:["app-store-publishing-detail",t.game_id]}),i.invalidateQueries({queryKey:["app-store-publishing-queue"]})},v=b({mutationFn:()=>m.recordAppStoreIdentifiers(t.game_id,{apple_id:d,bundle_id:x}),onSuccess:p}),N=b({mutationFn:()=>m.submitAppStoreForReview(t.game_id),onSuccess:p}),y=b({mutationFn:()=>m.markAppStoreInReview(t.game_id),onSuccess:p}),_=b({mutationFn:()=>m.releaseAppStore(t.game_id),onSuccess:p}),f=b({mutationFn:s=>m.setAppStoreSubmissionStatus(t.game_id,s.status,s.notes),onSuccess:p}),A=b({mutationFn:s=>m.setAppStoreCreatorStage(t.game_id,s),onSuccess:p}),R=t.schedule,F=d!==t.apple_id||x!==t.bundle_id;return e.jsxs("div",{className:"p-6",children:[e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"truncate text-lg font-semibold text-white",children:t.app_name||t.game_name}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[11px] text-white/50",children:[e.jsx("span",{children:t.creator??"unknown creator"}),e.jsxs("span",{children:["· ",t.game_name]}),e.jsxs("span",{children:["· ",t.completion_percent,"% complete"]})]})]}),e.jsx("select",{value:t.status,"aria-label":"Submission status",onChange:s=>f.mutate({status:s.target.value}),className:"rounded-md border border-white/15 bg-white/5 px-2 py-1.5 text-xs text-white outline-none [color-scheme:dark]",children:H.map(s=>e.jsx("option",{value:s,children:s.replace(/_/g," ")},s))}),e.jsx("button",{type:"button",onClick:()=>l(s=>!s),className:"rounded-md border border-white/15 bg-white/5 p-2 text-white/60 hover:text-white","aria-label":"Toggle submission history",children:e.jsx(u,{icon:["far","ellipsis-vertical"],className:"h-3.5 w-3.5"})})]}),R.warnings.length>0?e.jsx("div",{className:"mt-4 rounded-md border border-amber-500/30 bg-amber-500/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2 text-[11px] text-amber-200",children:[e.jsx(u,{icon:["far","hourglass-half"],className:"mt-0.5 h-3 w-3 shrink-0"}),e.jsx("div",{className:"space-y-1",children:R.warnings.map(s=>e.jsx("div",{children:s},s))})]})}):null,e.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-6 lg:grid-cols-[320px_1fr]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"Process"}),e.jsx(D,{detail:t})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"Next step"}),e.jsx("div",{className:"rounded-md border border-white/10 bg-white/5 p-3 text-xs text-white/80",children:t.next_step.label})]}),e.jsxs("section",{className:"space-y-3",children:[e.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"Actions"}),e.jsx(k,{gate:t.gates.submit,label:"Submit the listing to Apple",pending:N.isPending,onRun:()=>N.mutate()}),e.jsx(w,{error:N.error}),e.jsx(k,{gate:t.gates.in_review,label:"Record that Apple started its review",pending:y.isPending,onRun:()=>y.mutate()}),e.jsx(w,{error:y.error}),e.jsx(k,{gate:t.gates.release,label:"Release on the App Store",tone:"danger",pending:_.isPending,onRun:()=>_.mutate()}),e.jsx(w,{error:_.error})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"App Store Connect"}),e.jsxs("div",{className:"space-y-2 rounded-md border border-white/10 bg-white/5 p-3",children:[e.jsxs("label",{className:"block text-[10px] uppercase tracking-wide text-white/40",children:["Apple ID",e.jsx("input",{value:d,onChange:s=>n(s.target.value),placeholder:"Not recorded",className:"mt-1 w-full rounded-md border border-white/15 bg-white/5 px-2 py-1.5 text-xs text-white outline-none focus:border-white/30"})]}),e.jsxs("label",{className:"block text-[10px] uppercase tracking-wide text-white/40",children:["Bundle identifier",e.jsx("input",{value:x,onChange:s=>o(s.target.value),placeholder:"Not recorded",className:"mt-1 w-full rounded-md border border-white/15 bg-white/5 px-2 py-1.5 text-xs text-white outline-none focus:border-white/30"})]}),e.jsx("button",{type:"button",disabled:v.isPending||!F,onClick:()=>v.mutate(),className:"rounded-md bg-white/10 px-3 py-1.5 text-xs text-white transition hover:bg-white/15 disabled:opacity-40",children:"Save identifiers"}),e.jsx(w,{error:v.error})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"What the creator can see"}),e.jsxs("div",{className:"rounded-md border border-white/10 bg-white/5 p-3",children:[e.jsx("select",{value:t.creator_stage,"aria-label":"Creator stage",onCh
1ange:s=>A.mutate(s.target.value),className:"w-full rounded-md border border-white/15 bg-white/5 px-2 py-1.5 text-xs text-white outline-none [color-scheme:dark]",children:W.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))}),e.jsx("p",{className:"mt-2 text-[10px] leading-relaxed text-white/45",children:t.creator_stage==="hidden"?"The creator sees no progress and no milestone dates. Move this when there is something true to tell them.":`The creator is shown: "${t.creator_stage_label}".`}),e.jsx(w,{error:A.error})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"Notes for the creator"}),e.jsx("textarea",{value:a,onChange:s=>c(s.target.value),rows:3,placeholder:"Why the submission was blocked, or what Apple asked for.",className:"w-full rounded-md border border-white/15 bg-white/5 p-2 text-xs text-white outline-none focus:border-white/30"}),e.jsx("button",{type:"button",disabled:f.isPending||a===t.reviewer_notes,onClick:()=>f.mutate({status:t.status,notes:a}),className:"mt-2 rounded-md bg-white/10 px-3 py-1.5 text-xs text-white transition hover:bg-white/15 disabled:opacity-40",children:"Save notes"}),e.jsx(w,{error:f.error})]})]}),e.jsxs("div",{className:"space-y-6 min-w-0",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"Handover"}),e.jsxs("dl",{className:"grid grid-cols-2 gap-3 text-[11px]",children:[e.jsx(g,{label:"Devices",value:t.devices.join(", ")||"None chosen"}),e.jsx(g,{label:"Release option",value:t.release_option.replace(/_/g," ")}),e.jsx(g,{label:"Release date",value:t.release_date??"Not set"}),e.jsx(g,{label:"Submitted to Apple",value:t.submitted_at?new Date(t.submitted_at).toLocaleString():"â"}),e.jsx(g,{label:"Review started",value:t.in_review_at?new Date(t.in_review_at).toLocaleString():"â"}),e.jsx(g,{label:"Released",value:t.published_at?new Date(t.published_at).toLocaleString():"â"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"Outstanding before submission"}),t.missing_requirements.length===0?e.jsx("div",{className:"rounded-md border border-emerald-500/25 bg-emerald-500/10 p-3 text-[11px] text-emerald-200",children:"The creatorâs checklist is complete."}):e.jsx("ul",{className:"space-y-1.5",children:t.missing_requirements.map(s=>e.jsx("li",{className:"rounded-md border border-white/10 bg-white/5 px-2.5 py-1.5 text-[11px] text-white/70",children:s.replace(/_/g," ")},s))})]}),r?e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-white/40",children:"History"}),e.jsxs("ol",{className:"space-y-2",children:[(t.events??[]).map(s=>e.jsx("li",{className:"flex items-start gap-3 rounded-md border border-white/10 bg-white/5 p-2.5",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[11px] text-white/85",children:s.message||s.kind_display}),e.jsxs("div",{className:"mt-0.5 text-[10px] text-white/40",children:[new Date(s.created_at).toLocaleString(),s.actor_username?` · ${s.actor_username}`:" · system",s.to_status&&s.from_status?` · ${s.from_status} â ${s.to_status}`:""]})]})},s.id)),t.events.length===0?e.jsx("li",{className:"text-[11px] text-white/40",children:"No activity yet."}):null]})]}):null]})]})]})}function g({label:t,value:i}){return e.jsxs("div",{className:"rounded-md border border-white/10 bg-white/5 p-2.5",children:[e.jsx("dt",{className:"text-[10px] uppercase tracking-wide text-white/40",children:t}),e.jsx("dd",{className:"mt-0.5 truncate text-white/85",children:i})]})}const K=[{key:"all",label:"All open"},{key:"ready",label:"Waiting on us"},{key:"in_review",label:"With us"},{key:"submitted",label:"Submitted"},{key:"in_review_apple",label:"With Apple"},{key:"blocked",label:"Blocked"},{key:"live",label:"Live"}];function O(t){switch(t){case"live":return"bg-emerald-500/15 text-emerald-300 border-emerald-500/30";case"blocked":return"bg-red-500/15 text-red-300 border-red-500/30";case"in_review":case"submitted":case"in_review_apple":return"bg-amber-500/15 text-amber-300 border-amber-500/30";case"ready":return"bg-sky-500/15 text-sky-300 border-sky-500/30";default:return"bg-white/10 text-white/70 border-white/20"}}function U(){const t=T(),i=q(),[r,l]=j.useState("all"),[a,c]=j.useState(null),d=C({queryKey:["app-store-publishing-queue",r],queryFn:()=>m.getAppStorePublisherQueue({all:r==="live",status:r==="all"?void 0:r}),enabled:t,refetchInterval:3e4}),n=C({queryKey:["app-store-publishing-detail",a],queryFn:()=>m.getAppStorePublisherDetail(a),enabled:t&&a!==null});return t?e.jsxs("div",{className:"flex h-full min-h-0",children:[e.jsx(M,{rows:d.data?.results??[],counts:d.data?.counts_by_status??{},loading:d.isLoading,error:d.isError,filter:r,onFilter:l,selected:a,onSelect:c,onRefresh:()=>i.invalidateQueries({queryKey:["app-store-publishing-queue"]})}),e.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto",children:a===null?e.jsx(G,{}):n.isLoading?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(S,{})}):n.isError||!n.data?e.jsx("div",{className:"p-6 text-sm text-red-300",children:"Could not load that submission."}):e.jsx($,{detail:n.data})})]}):e.jsx("div",{className:"p-6 text-sm text-white/60",children:"This page is for the Tesana publishing team."})}function G(){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-center",children:[e.jsx("div",{className:"text-sm text-white/60",children:"Pick a submission to see its stages, identifiers and next step."}),e.jsx("div",{className:"max-w-md text-xs text-white/40",children:"Apple reviews the listing against what it can see, and holds it for as long as the review takes. Each row shows the next step in that order."})]})}function M({rows:t,counts:i,loading:r,error:l,filter:a,onFilter:c,selected:d,onSelect:n,onRefresh:x}){return e.jsxs("aside",{className:"w-[380px] shrink-0 border-r border-white/10 flex flex-col min-h-0",children:[e.jsxs("header",{className:"p-4 border-b border-white/10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-white",children:"App Store publishing"}),e.jsx("button",{type:"button",onClick:x,className:"rounded-md p-1.5 text-white/50 hover:bg-white/10 hover:text-white","aria-label":"Refresh the queue",children:e.jsx(u,{icon:["far","rotate-right"],className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:K.map(o=>{const p=o.key==="all"?void 0:i[o.key];return e.jsxs("button",{type:"button",onClick:()=>c(o.key),className:h("rounded-full border px-2.5 py-1 text-[11px] transition",a===o.key?"border-white/40 bg-white/15 text-white":"border-white/10 text-white/60 hover:border-white/25 hover:text-white/90"),children:[o.label,p?e.jsx("span",{className:"ml-1 text-white/40",children:p}):null]},o.key)})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:r?e.jsx("div",{className:"flex justify-center p-8",children:e.jsx(S,{})}):l?e.jsx("div",{className:"p-4 text-xs text-red-300",children:"Could not load the queue."}):t.length===0?e.jsx("div",{className:"p-6 text-xs text-white/50",children:"Nothing waiting. A submission appears here once its creator marks it ready for Tesana."}):t.map(o=>e.jsx(z,{row:o,selected:d===o.game_id,onSelect:()=>n(o.game_id)},o.id))})]})}function z({row:t,selected:i,onSelect:r}){return e.jsx("button",{type:"button",onClick:r,className:h("w-full border-b border-white/5 p-3 text-left transition",i?"bg-white/10":"hover:bg-white/5"),children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-md bg-white/5",children:t.game_poster?e.jsx("img",{src:t.game_poster,alt:"",className:"h-full w-full object-cover"}):null}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-white",children:t.app_name||t.game_name}),e.jsx("span",{className:h("shrink-0 rounded-full border px-2 py-0.5 text-[10px] uppercase tracking-wide",O(t.status)),children:t.status.replace(/_/g," ")})]}),e.jsx("div",{className:"mt-1 truncate text-[11px] text-white/60",children:t.next_step.label}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-2 text-[10px] text-white/40",children:[e.jsx("span",{children:t.creator??"unknown"}),t.apple_id?e.jsxs("span",{children:["· App ",t.apple_id]}):null,t.devices.length>0?e.jsxs("span",{children:["· ",t.devices.join("/")]}):null,e.jsxs("span",{children:["· ",t.completion_percent,"%"]})]})]})]})})}function lt(){const{lang:t}=L(),{loading:i}=P(),r=T();return i?e.jsx("div",{className:"flex h-screen items-center justify-center",children:e.jsx(S,{})}):r?e.jsxs(e.Fragment,{children:[e.jsxs(E,{children:[e.jsx("title",{children:"App Store publishing · Tesana"}),e.jsx("meta",{name:"robots",content:"noindex"})]}),e.jsx("div",{className:"h-screen",children:e.jsx(U,{})})]}):e.jsx(B,{to:I("/dashboard",t),replace:!0})}export{lt 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.