PageSourceSearch

https://app.upmetrics.co/chunks/CO30n-E2.js

js upmetrics.co collected 2026-10-01 11:50:29 UTC 7,252 bytes, 1 lines download raw bytes

1import{j as e}from"./Dem1e8VV.js";import{u as b,de as D,o as O,V as U,c as g,G as L,dh as f,R as w,D as H,B as M,di as y,dj as k}from"../entry/CcVTEBpa.js";import{u as K}from"./t8UF6ojH.js";import{u as C,c as p,a3 as B,a6 as R,d as G,al as E,e_ as F,at as z}from"./dWhdajSv.js";import"./BnZNklX7.js";import{P as V}from"./DVZ8s6AG.js";import"./phrJN640.js";import"./Dh95b2SR.js";import"./CkPMUjKw.js";import"./DYyFy-YE.js";import"./y0NWX92M.js";const S=L("group flex items-start gap-3 rounded-xl border bg-surface p-4 text-start transition-all duration-200","hover:border-primary/40 hover:bg-primary/[0.02] hover:shadow-sm cursor-pointer","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:shadow-none disabled:hover:border-border disabled:hover:bg-surface"),P="shrink-0 h-9 w-9 rounded-lg bg-muted flex items-center justify-center transition-transform duration-200 group-hover:scale-105";function Y({businessId:r,title:c}){const s=b(),t=D(),l=C(),o=O(),h=U(),[u,T]=g("pitchAdmin.setupDeckTemplate"),[I,d]=g("pitchAdmin.setupSlideTemplates");if(!t)return null;async function j(){var x;if(await h.showConfirm({title:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.DECK_DIALOG_TITLE"),content:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.DECK_DIALOG_CONTENT"),okText:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.DECK_DIALOG_OK"),cancelText:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.CANCEL")}))try{const i=await u(r,c||void 0);o.success(s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.DECK_SUCCESS",{count:(x=i==null?void 0:i.slideCount)!=null?x:0})),i!=null&&i.pitchId&&l(f(r,i.pitchId))}catch(i){const n=i;o.error((n==null?void 0:n.reason)||(n==null?void 0:n.message)||String(i))}}async function A(){var x,i,n,_;if(await h.showConfirm({title:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.SLIDES_DIALOG_TITLE"),content:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.SLIDES_DIALOG_CONTENT"),okText:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.SLIDES_DIALOG_OK"),cancelText:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.CANCEL")}))try{const a=await I(r,c||void 0);o.success(s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.SLIDES_SUCCESS",{templates:(x=a==null?void 0:a.templates)!=null?x:0,categories:(i=a==null?void 0:a.categories)!=null?i:0})),a!=null&&a.pitchId&&((_=(n=a.pitchIds)==null?void 0:n.length)!=null?_:1)===1&&l(f(r,a.pitchId))}catch(a){const m=a;o.error((m==null?void 0:m.reason)||(m==null?void 0:m.message)||String(a))}}return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:T,className:S,children:[e.jsx("div",{className:P,children:T?e.jsx(p,{className:"h-4 w-4 animate-spin text-muted-foreground"}):e.jsx(B,{className:"h-5 w-5 text-foreground/70"})}),e.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground leading-tight mb-0.5",children:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.DECK_TITLE")}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.DECK_DESC")})]})]}),e.jsxs("button",{type:"button",onClick:A,disabled:d,className:S,children:[e.jsx("div",{className:P,children:d?e.jsx(p,{className:"h-4 w-4 animate-spin text-muted-foreground"}):e.jsx(R,{className:"h-5 w-5 text-foreground/70"})}),e.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground leading-tight mb-0.5",children:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.SLIDES_TITLE")}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:s("PITCH_STUDIO_LIST.ADMIN_TEMPLATE.SLIDES_DESC")})]})]})]})}function ie(){const{businessId:r="",pitchId:c=""}=G(),s=C(),t=b(),{title:l,isProcessing:o,commitBlank:h}=K(),u=D(),T=()=>s(y(r,c)),I=()=>s(k(r,c));return e.jsxs("div",{className:"flex flex-col min-h-full bg-background",children:[e.jsx(V,{backTo:w(r),backLabel:t("PITCH_SETUP.BACK_TO_LIST")}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-8 space-y-8",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("div",{className:"text-2xl font-bold text-foreground",children:t("PITCH_SETUP.TITLE")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("PITCH_SETUP.SUBTITLE")})]}),e.jsx("div",{role:"button",tabIndex:0,onClick:T,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),T())},className:"relative w-full text-start rounded-xl border-2 border-ai/30 bg-surface p-6 cursor-pointer transition-all duration-200 hover:border-ai/50 hover:shadow-lg hover:shadow-ai/5",children:e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsx("div",{className:"size-12 rounded-xl flex items-center justify-center shrink-0 bg-ai",children:e.jsx(E,{className:"size-6 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:t("PITCH_SETUP.AUTHOR_TITLE")}),e.jsx(H,{className:"bg-ai/10 text-ai border-ai/20 text-xs",children:t("PITCH_SETUP.AI_BADGE")}
1)]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("PITCH_SETUP.AUTHOR_DESC")}),e.jsxs(M,{className:"mt-5 bg-ai hover:bg-ai/90 text-white cursor-pointer",disabled:o,onClick:d=>{d.stopPropagation(),T()},children:[e.jsx(E,{className:"size-4"}),t("PITCH_SETUP.AUTHOR_BUTTON")]})]})]})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:t("PITCH_SETUP.OTHER_OPTIONS_TITLE")}),e.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[e.jsx(N,{title:t("PITCH_SETUP.IMPORT_PPT_TITLE"),description:t("PITCH_SETUP.IMPORT_PPT_DESC"),icon:e.jsx(F,{className:"h-5 w-5 text-foreground/70"}),disabled:o,onClick:I}),e.jsx(N,{title:t("PITCH_SETUP.BLANK_TITLE"),description:t("PITCH_SETUP.BLANK_DESC"),icon:e.jsx(z,{className:"h-5 w-5 text-foreground/70"}),loading:o,disabled:o,onClick:()=>{h()}}),u&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:t("PITCH_SETUP.ADMIN_ONLY_DIVIDER")}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),e.jsx(Y,{businessId:r,title:l})]})]})]})]})})]})}function N({title:r,description:c,icon:s,loading:t=!1,disabled:l,onClick:o}){return e.jsxs("button",{type:"button",onClick:o,disabled:l,className:L("group flex items-start gap-3 rounded-xl border bg-surface p-4 text-start transition-all duration-200","hover:border-primary/40 hover:bg-primary/[0.02] hover:shadow-sm cursor-pointer","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:shadow-none disabled:hover:border-border disabled:hover:bg-surface"),children:[e.jsx("div",{className:"shrink-0 h-9 w-9 rounded-lg bg-muted flex items-center justify-center transition-transform duration-200 group-hover:scale-105",children:t?e.jsx(p,{className:"h-4 w-4 animate-spin text-muted-foreground"}):s}),e.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight mb-1.5",children:r}),e.jsx("p",{className:"text-xs text-muted-foreground leading-snug",children:c})]})]})}export{ie 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.