PageSourceSearch

https://datasuite.fptcloud.com/assets/GettingStartedScreen-DdihMdrS.js

js fptcloud.com collected 2026-10-01 12:40:41 UTC 39,277 bytes, 1 lines download raw bytes

1import{r as b,j as e}from"./react-DJo-hRcj.js";import{k as T,m as E,r as _,S as c,T as l,c as n,A as O,bx as Pe,h as j,a_ as H,o as Fe,B as V,v as ze,K as ie,bf as Ke,Y as Ge,Z as We,aq as He,ar as Ve,ba as Qe,j as Ye,by as Xe,M as qe,X as Ze}from"./index-B5XNITP8.js";import{I as v,bq as Je,bd as be,ba as et,c1 as q,J as P,bc as k,be as tt}from"./vendors-_9dKRPAn.js";import{M as Ce}from"./ModalV2-Bwgoj2D8.js";import{N as s,p as R,D as nt,S as ce}from"./constants-Bi-Hdh3e.js";import{c as rt}from"./Search-CSvDv4Dl.js";import"./lodash-D9U91hCZ.js";import"./index-D44FK_Cc.js";import"./index-MmSGyg3S.js";import"./index-XVdP7IIM.js";import"./IconMenu-ivf-GgzL.js";import{u as ot,U as st}from"./UseTemplateDialog-BByIM3R2.js";import{a as at}from"./toastifyV2-JsPZrQKQ.js";import"./index-PcIn_X-S.js";import{T as it}from"./templateTypeData-DpikQVZA.js";import{Q as ct}from"./index-CcAzmD-6.js";import{S as g,b as F,C as M,c as A,f as lt,d as L}from"./useWorkspaceSetupState-BWf12IGm.js";import{t as le,C as de}from"./trackCreateReportCompleted-CQBzfb72.js";import{C as G}from"./ChevronRight-CXiTarPm.js";import{ap as Te,ba as dt}from"./mui-core-DIGHSUz9.js";import{D as ut}from"./Data-BwHTWoKj.js";import{R as pt}from"./Refresh-BPohCR86.js";import{U as xt}from"./Upload-0iWyH4MJ.js";import{D as mt}from"./LocalStorageManager-Brbsb2wO.js";import{C as ht}from"./ChevronLeft-Tgkhoz-X.js";import{r as gt,R as bt}from"./queryKeys-kKAYVQ50.js";import{S as Ct}from"./SearchReportTemplates-OWMnp8q0.js";import{C as Tt}from"./index-B-ToFt0m.js";import{C as Et}from"./Chart-DVZ-CjbV.js";import"./mui-x-WaaF4sFd.js";import"./Search-BtClgkYE.js";import"./Plus-VBX5Yw5b.js";import"./pipelineType-DVVfCPWU.js";import"./index-BG5wa17B.js";import"./ControlledInput-t0pN4OLl.js";import"./index-DYZEocfk.js";import"./type-G2_1j9FO.js";import"./index-CLyt0jiz.js";import"./Check-DzZWfpvT.js";import"./SheetSelectionPanel-Db0PoJaU.js";import"./Info-BluSCmph.js";import"./Trash-Ckxrgalv.js";import"./SharePoint-CWJgnpZR.js";import"./confirmLeaveIfNeeded-BQYfSmoD.js";import"./getNextStep-JGPpQ-7F.js";import"./CheckCircle-vPlkSdpP.js";import"./WarningCircle-BIpr5ckM.js";import"./selectFieldV2-BkN7uktw.js";import"./useCheckPermissionSidebar-BJ_M-sXv.js";import"./index-C6hXkfvS.js";import"./useUrlParams-9vBjnh_J.js";import"./org-switch-rules-CALv74Cz.js";import"./useOrgList-CLYvyZdj.js";import"./DashboardQueryRepository-BaKnPLob.js";import"./Building-_OqbRV1u.js";import"./languageManager-_RIZidnS.js";import"./SharedComponents-CFIIYYlL.js";import"./LocalStorageManager-Cf9EMmua.js";import"./constants-BhQb0AAi.js";import"./getHttpStatusCode-D6Fy-dO9.js";import"./useOrgConnections-BrZ2FWLA.js";const _t="data:image/svg+xml,%3csvg%20width='77'%20height='60'%20viewBox='0%200%2072%2056'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20role='presentation'%3e%3crect%20x='4'%20y='6'%20width='64'%20height='38'%20rx='4'%20fill='%231B4E7E'/%3e%3crect%20x='8'%20y='10'%20width='56'%20height='30'%20rx='2'%20fill='%23CFE7F8'/%3e%3crect%20x='12'%20y='14'%20width='13'%20height='3'%20rx='1.5'%20fill='%234A9FDC'/%3e%3crect%20x='12'%20y='20'%20width='9'%20height='3'%20rx='1.5'%20fill='%237FC1EA'/%3e%3crect%20x='12'%20y='26'%20width='11'%20height='3'%20rx='1.5'%20fill='%237FC1EA'/%3e%3crect%20x='30'%20y='24'%20width='7'%20height='16'%20rx='1.5'%20fill='%23EF476F'/%3e%3crect%20x='50'%20y='18'%20width='7'%20height='22'%20rx='1.5'%20fill='%23A9D8F5'/%3e%3crect%20x='32'%20y='44'%20width='8'%20height='6'%20fill='%231B4E7E'/%3e%3crect%20x='22'%20y='50'%20width='28'%20height='4'%20rx='2'%20fill='%231B4E7E'/%3e%3crect%20x='40'%20y='2'%20width='7'%20height='38'%20rx='1.5'%20fill='%23FFC145'/%3e%3c/svg%3e",ft=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,St=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgent||"";return ft.test(t)?!0:/Macintosh/.test(t)&&(navigator.maxTouchPoints||0)>1},Ot="width=1200",jt=t=>{b.useEffect(()=>{if(!t)return;const o=document.querySelector('meta[name="viewport"]');if(!o)return;const i=o.getAttribute("content");return o.setAttribute("content",Ot),()=>{i===null?o.removeAttribute("content"):o.setAttribute("content",i)}},[t])};function vt({open:t,tenantId:o,workspaceId:i,onContinue:r}){const{t:a}=v(),d=b.useRef(!1);b.useEffect(()=>{!t||d.current||(d.current=!0,T({eventName:_.ONBOARDING_MOBILE_DETECTED,eventType:E.session,tenantId:o,workspaceId:i}))},[t,o,i]);const x=()=>{Pe(),T({eventName:_.ONBOARDING_MOBILE_CONTINUE,eventType:E["click-button"],tenantId:o,workspaceId:i}),r()};return e.jsx(Ce,{open:t,isLocked:!0,hideCloseButton:!0,size:"sm","data-testid":"continue-on-desktop-modal",sxPaper:{width:"calc(100% - 32px)",maxWidth:"358px !important",m:4,gap:6,boxShadow:"0 2px 4px -2px rgba(16, 24, 40, 0.06), 0 4px 8px -2px rgba(16, 24, 40, 0.10)"},children:e.jsxs(c,{direction:"column",alignItems:"center",sx:{gap:6},children:[e.jsx("img",{src:_t,height:60,alt:""}),e.jsx(l,{variant:"h3MBaseSemibold",component:"h2",sx:{textAlign:"center",color:n.content.neutral.neutralStrong},children:a(`${s}.MOBILE_TITLE`)}),e.jsx(l,{variant:"bodySmRegular",component:"p",sx:{textAlign:"center",color:n.content.neutral.neutralLight},children:a(`${s}.MOBILE_DESC`)}),e.jsx(O,{variant:"primary",fullWidth:!0,"data-testid":"continue-on-desktop-cta",onClick:x,children:a(`${s}.MOBILE_CTA`)})]})})}function Nt({userName:t,onLogout:o}){const{t:i}=v();return e.jsxs(c,{"data-testid":"onboarding-header",direction:"row",alignItems:"center",sx:{gap:2},children:[e.jsx(l,{"data-testid":"onboarding-greeting",variant:"h2Semibold",sx:{color:n.content.neutral.neutralStrong},children:i(`${s}.WELCOME_GREETING`,{userName:t})}),e.jsx(l,{"data-testid":"onboarding-logout-button",variant:"captionRegular",onClick:o,sx:{color:n.content.brand.brandLight,cursor:"pointer","&:hover":{textDecoration:"underline"}},children:i(`${s}.LOG_OUT`)})]})}function At({projectId:t,name:o,pageSize:i=10,pageNumber:r=1,enabled:a=!0,templateChartCategoryId:d}={}){const x=new bt,p=new Ct(x);return Je({queryKey:gt.search(t,o,d,i,r),queryFn:()=>p.execute({projectId:t,name:o,templateChartCategoryId:d,pageSize:i,pageNumber:r}),enabled:a,keepPreviousData:!0})}const Dt=60*1e3,Rt=({visible:t,onCheck:o,intervalMs:i=Dt})=>{const r=b.useRef(o);r.current=o,b.useEffect(()=>{if(!t)return;const a=setInterval(()=>r.current(),i);return()=>clearInterval(a)},[t,i])},ue="step",It=t=>Object.values(g).includes(t);function kt(t=g.ConnectData){const o=be(),{search:i}=et(),r=q.parse(i)[ue],a=It(r)?r:t,d=b.useCallback(x=>{const p={...q.parse(o.location.search),[ue]:x};o.replace({search:q.stringify(p)})},[o]);return[a,d]}function wt({activeStep:t,onStepChange:o,onSkipClick:i,steps:r}){const{t:a}=v(),d=r[g.ConnectData]===F.Done,x=r[g.CreateReport]===F.Done;return e.jsxs(c,{"data-testid":"onboarding-steps-sidebar",direction:"column",sx:{flex:"0 0 28
10px",minWidth:280,gap:2},children:[e.jsxs(c,{direction:"column",sx:{gap:1,border:R,borderRadius:j.large,bgcolor:n.background.white,p:2},children:[e.jsxs(c,{"data-testid":"onboarding-step-nav-connect-data",direction:"row",alignItems:"center",justifyContent:"space-between",role:"button",tabIndex:0,"aria-current":t===g.ConnectData?"step":void 0,onClick:()=>o(g.ConnectData),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(g.ConnectData))},sx:{px:3,py:2,gap:2,borderRadius:j.medium,cursor:"pointer",bgcolor:t===g.ConnectData?n.background.brand.surface1Strong:"transparent"},children:[e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:2},children:[e.jsx(c,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,borderRadius:"50%",bgcolor:d?n.background.success.surface1Strong:t===g.ConnectData?n.background.white:n.background.neutral.surface1},children:d?e.jsx(H,{size:"xs",sx:{color:n.content.neutral.onBrand}}):e.jsx(l,{variant:"captionMedium",sx:{color:t===g.ConnectData?n.content.brand.brandLight:n.content.neutral.neutralMedium},children:"1"})}),e.jsx(l,{variant:"bodySmSemibold",sx:{color:t===g.ConnectData?n.content.neutral.onBrand:n.content.neutral.neutralStrong},children:a(`${s}.STEP_CONNECT_DATA`)})]}),e.jsx(G,{size:"sm",sx:{color:t===g.ConnectData?n.content.neutral.onBrand:n.content.neutral.neutralLight}})]}),e.jsxs(c,{"data-testid":"onboarding-step-nav-create-report",direction:"row",alignItems:"center",justifyContent:"space-between",role:"button",tabIndex:0,"aria-current":t===g.CreateReport?"step":void 0,onClick:()=>o(g.CreateReport),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(g.CreateReport))},sx:{px:3,py:2,gap:2,borderRadius:j.medium,cursor:"pointer",bgcolor:t===g.CreateReport?n.background.brand.surface1Strong:"transparent"},children:[e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:1},children:[e.jsx(c,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,borderRadius:"50%",bgcolor:x?n.background.success.surface1Strong:t===g.CreateReport?n.background.white:n.background.neutral.surface1},children:x?e.jsx(H,{size:"xs",sx:{color:n.content.neutral.onBrand}}):e.jsx(l,{variant:"captionMedium",sx:{color:t===g.CreateReport?n.content.brand.brandLight:n.content.neutral.neutralMedium},children:"2"})}),e.jsx(l,{variant:"bodySmSemibold",sx:{color:t===g.CreateReport?n.content.neutral.onBrand:n.content.neutral.neutralMedium},children:a(`${s}.STEP_CREATE_REPORT`)})]}),e.jsx(G,{size:"sm",sx:{color:t===g.CreateReport?n.content.neutral.onBrand:n.content.neutral.neutralLight}})]})]}),e.jsx(l,{"data-testid":"onboarding-skip-setup-button",variant:"captionRegular",role:"button",tabIndex:0,onClick:i,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),i())},sx:{color:n.content.brand.brandLight,cursor:"pointer",px:3,"&:hover":{textDecoration:"underline"}},children:a(`${s}.SKIP_SETUP_AND_GO_HOME`)})]})}const w=({size:t="sm",fill:o="currentColor",width:i,height:r,sx:a,...d})=>{const x=()=>{switch(t){case"xs":return 12;case"sm":return 16;case"md":return 20;case"lg":return 24;case"xl":return 32;case"2xl":return 40;default:return 16}},p=i!==void 0?i:x(),f=r!==void 0?r:x();return e.jsx(Te,{...d,sx:{width:p,height:f,...a},children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14.7917 17.8974L19.9481 12.7306C20.1414 12.5368 20.25 12.274 20.25 12C20.25 11.726 20.1414 11.4632 19.9481 11.2694L14.7917 6.10258C14.5972 5.91434 14.3367 5.81018 14.0663 5.81254C13.796 5.81489 13.5373 5.92357 13.3461 6.11517C13.1549 6.30676 13.0464 6.56594 13.0441 6.83689C13.0417 7.10783 13.1457 7.36886 13.3335 7.56376L16.7295 10.9666H4.78126C4.50775 10.9666 4.24545 11.0755 4.05205 11.2693C3.85865 11.4631 3.75 11.7259 3.75 12C3.75 12.2741 3.85865 12.5369 4.05205 12.7307C4.24545 12.9245 4.50775 13.0334 4.78126 13.0334H16.7295L13.3335 16.4362C13.1457 16.6311 13.0417 16.8922 13.0441 17.1631C13.0464 17.4341 13.1549 17.6932 13.3461 17.8848C13.5373 18.0764 13.796 18.1851 14.0663 18.1875C14.3367 18.1898 14.5972 18.0857 14.7917 17.8974Z",fill:o})})})};
1function pe({"data-testid":t,selected:o,onClick:i,title:r,description:a}){return e.jsxs(c,{"data-testid":t,direction:"row",alignItems:"flex-start",role:"radio","aria-checked":o,tabIndex:0,onClick:i,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},sx:{flex:1,gap:2,p:3,border:`1px solid ${o?n.border.brand.border1Strong:n.border.neutral.border1}`,borderRadius:j.medium,cursor:"pointer"},children:[e.jsx(dt,{size:"small",checked:o,tabIndex:-1,inputProps:{"aria-hidden":!0},sx:{p:0,pt:"2px"}}),e.jsxs(c,{direction:"column",sx:{gap:.5},children:[e.jsx(l,{variant:"bodySmMedium",sx:{color:n.content.neutral.neutralStrong},children:r}),e.jsx(l,{variant:"captionRegular",sx:{color:n.content.neutral.neutralLight},children:a})]})]})}const Ee=({size:t="sm",fill:o="currentColor",width:i,height:r,sx:a,...d})=>{const x=()=>{switch(t){case"xs":return 12;case"sm":return 16;case"md":return 20;case"lg":return 24;case"xl":return 32;case"2xl":return 40;default:return 16}},p=i!==void 0?i:x(),f=r!==void 0?r:x();return e.jsx(Te,{...d,sx:{width:p,height:f,...a},children:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12 16.1415C12.5021 16.1415 12.9091 16.5485 12.9091 17.0506V17.0607C12.9091 17.5628 12.5021 17.9698 12 17.9698C11.4979 17.9698 11.0909 17.5628 11.0909 17.0607V17.0506C11.0909 16.5485 11.4979 16.1415 12 16.1415Z",fill:o}),e.jsx("path",{d:"M12.0815 6.01191C11.5343 6.01039 10.9942 6.13591 10.5038 6.37858C10.0134 6.62126 9.58595 6.97446 9.25522 7.41038C8.95175 7.81037 9.02999 8.38063 9.42997 8.6841C9.82996 8.98757 10.4002 8.90933 10.7037 8.50934C10.8643 8.29761 11.0719 8.12605 11.3101 8.00818C11.5484 7.89031 11.8107 7.82935 12.0765 7.83009C12.3422 7.83082 12.6042 7.89324 12.8418 8.01243C13.0793 8.13162 13.286 8.30433 13.4454 8.51695C13.6049 8.72957 13.7128 8.97631 13.7607 9.23773C13.8086 9.49915 13.7952 9.76813 13.7215 10.0235C13.6478 10.2788 13.5158 10.5136 13.336 10.7093C13.1583 10.9026 12.9387 11.0526 12.694 11.1477C12.2043 11.3233 11.784 11.6518 11.4953 12.0849C11.2038 12.5221 11.0623 13.0422 11.092 13.5669C11.1205 14.0682 11.5499 14.4515 12.0511 14.423C12.5524 14.3946 12.9357 13.9652 12.9073 13.4639C12.8998 13.3328 12.9352 13.2027 13.0081 13.0934C13.081 12.9841 13.1874 12.9015 13.3113 12.8579C13.3191 12.8552 13.3268 12.8523 13.3345 12.8494C13.8456 12.6539 14.3043 12.3425 14.6746 11.9396C15.0449 11.5368 15.3166 11.0535 15.4684 10.5277C15.6201 10.002 15.6478 9.44823 15.5491 8.91C15.4505 8.37178 15.2283 7.86379 14.9 7.42604C14.5717 6.98829 14.1462 6.63272 13.6571 6.38733C13.168 6.14194 12.6287 6.01343 12.0815 6.01191Z",fill:o}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.17317 2.7612C9.38642 2.25866 10.6868 2 12 2C13.3132 2 14.6136 2.25866 15.8268 2.7612C17.0401 3.26375 18.1425 4.00035 19.0711 4.92893C19.9997 5.85752 20.7362 6.95991 21.2388 8.17317C21.7413 9.38642 22 10.6868 22 12C22 13.3132 21.7413 14.6136 21.2388 15.8268C20.7362 17.0401 19.9997 18.1425 19.0711 19.0711C18.1425 19.9997 17.0401 20.7362 15.8268 21.2388C14.6136 21.7413 13.3132 22 12 22C10.6868 22 9.38642 21.7413 8.17317 21.2388C6.95991 20.7362 5.85752 19.9997 4.92893 19.0711C4.00035 18.1425 3.26375 17.0401 2.7612 15.8268C2.25866 14.6136 2 13.3132 2 12C2 10.6868 2.25866 9.38642 2.7612 8.17317C3.26375 6.95991 4.00035 5.85752 4.92893 4.92893C5.85752 4.00035 6.95991 3.26375 8.17317 2.7612ZM12 3.81818C10.9255 3.81818 9.86162 4.02981 8.86895 4.44099C7.87629 4.85216 6.97433 5.45483 6.21458 6.21458C5.45483 6.97433 4.85216 7.87629 4.44099 8.86895C4.02981 9.86162 3.81818 10.9255 3.81818 12C3.81818 13.0745 4.02981 14.1384 4.44099 15.131C4.85216 16.1237 5.45483 17.0257 6.21458 17.7854C6.97433 18.5452 7.87629 19.1478 8.86895 19.559C9.86162 19.9702 10.9255 20.1818 12 20.1818C13.0745 20.1818 14.1384 19.9702 15.131 19.559C16.1237 19.1478 17.0257 18.5452 17.7854 17.7854C18.5452 17.0257 19.1478 16.1237 19.559 15.131C19.9702 14.1384 20.1818 13.0745 20.1818 12C20.1818 10.9255 19.9702 9.86162 19.559 8.86895C19.1478 7.87629 18.5452 6.97433 17.7854 6.21458C17.0257 5.45483 16.1237 4.85216 15.131 4.44099C14.1384 4.02981 13.0745 3.81818 12 3.81818Z",fill:o})]})})};function z({"data-testid":t,stepNumber:o,done:i,showConnector:r,circleBorderVariant:a,stepNumberColor:d,title:x,tooltip:p,status:f,action:S}
1){const{t:C}=v(),m=a==="strong"?n.border.brand.border1Strong:n.border.neutral.border1,y=d==="brand"?n.content.brand.brandLight:n.content.neutral.neutralLight;return e.jsxs(c,{"data-testid":t,direction:"row",alignItems:"flex-start",justifyContent:"space-between",sx:{gap:2},children:[e.jsxs(c,{direction:"row",alignItems:"flex-start",sx:{gap:2},children:[e.jsx(c,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,flexShrink:0,borderRadius:"50%",border:i?"none":`1px solid ${m}`,bgcolor:i?n.background.success.surface1Strong:"transparent",...r?{position:"relative","&::after":{content:'""',position:"absolute",top:"100%",left:"50%",width:0,height:28,transform:"translateX(-50%)",borderLeft:`1px dashed ${n.border.neutral.border2}`}}:{}},children:i?e.jsx(H,{size:"xs",sx:{color:n.content.neutral.onBrand}}):e.jsx(l,{variant:"captionMedium",sx:{color:y},children:o})}),e.jsxs(c,{direction:"column",sx:{gap:.5},children:[e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:1},children:[e.jsx(l,{variant:"bodySmMedium",sx:{color:n.content.neutral.neutralStrong},children:x}),e.jsx(Fe,{title:p,children:e.jsx("span",{role:"button",tabIndex:0,"aria-label":C(`${s}.MORE_INFO_LABEL`),children:e.jsx(Ee,{size:"xs",sx:{color:n.content.neutral.neutralLight}})})})]}),f]})]}),S]})}function K({text:t,onRefresh:o,refreshTestId:i}){const{t:r}=v(),[a,d]=b.useState(0),x=()=>{d(p=>p+1),o()};return e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:1},children:[e.jsx(l,{variant:"captionRegular",sx:{color:n.content.brand.brandLight},children:t}),e.jsxs(c,{"data-testid":i,direction:"row",alignItems:"center",role:"button",tabIndex:0,onClick:x,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),x())},sx:{gap:.5,cursor:"pointer",color:n.content.brand.brandLight,"& svg":{transform:`rotate(${a*180}deg)`,transition:"transform 0.3s ease"}},children:[e.jsx(pt,{size:"xs"}),e.jsx(l,{variant:"captionMedium",sx:{textDecoration:"underline"},children:r(`${s}.REFRESH_STATUS`)})]})]})}function yt({dbOption:t,onSelectOption:o,connectionActivated:i,tablesSynced:r,connectionName:a,datasetCount:d,onAddConnectionClick:x,onSyncTablesClick:p,onRefreshConnection:f,onRefreshDataset:S,onNextStep:C}){const{t:m}=v();return e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"bodySemibold",sx:{color:n.content.neutral.neutralStrong},children:m(`${s}.CONNECT_DATA_STEP_TITLE`)}),e.jsxs(c,{direction:"row",sx:{gap:2},children:[e.jsx(pe,{"data-testid":"onboarding-connect-option-built-in",selected:t===M.BuiltIn,onClick:()=>o(M.BuiltIn),title:m(`${s}.CONNECT_BUILT_IN`),description:m(`${s}.CONNECT_BUILT_IN_DESC`)}),e.jsx(pe,{"data-testid":"onboarding-connect-option-own",selected:t===M.Own,onClick:()=>o(M.Own),title:m(`${s}.CONNECT_OWN_DATABASE`),description:m(`${s}.CONNECT_OWN_DATABASE_DESC`)})]}),t===M.BuiltIn?e.jsxs(c,{direction:"row",alignItems:"flex-start",sx:{gap:2,p:3,borderRadius:j.medium,border:`1px solid ${n.border.neutral.border1}`},children:[e.jsx(c,{sx:{background:"#f0f7ff",padding:2,borderRadius:1},children:e.jsx(ut,{fill:"#0090ff"})}),e.jsxs(l,{variant:"bodySmRegular",sx:{color:n.content.neutral.neutralMedium},children:[m(`${s}.BUILT_IN_DB_INFO_BANNER_PREFIX`)," ",e.jsx(l,{component:"span",variant:"bodySmMedium",sx:{color:n.content.neutral.neutralStrong},children:m(`${s}.BUILT_IN_DB_INFO_HIGHLIGHT`)})," ",m(`${s}.BUILT_IN_DB_INFO_BANNER_SUFFIX`)]})]}):e.jsxs(c,{direction:"column",sx:{border:R,borderRadius:j.medium,p:3,gap:3},children:[e.jsx(z,{stepNumber:1,done:i,showConnector:!0,circleBorderVariant:"strong",stepNumberColor:"brand",title:m(`${s}.ADD_CONNECTION_TITLE`),tooltip:m(`${s}.ADD_CONNECTION_TOOLTIP`),status:i?e.jsx(l,{variant:"captionRegular",sx:{color:n.content.actions.success},children:e.jsx(P,{i18nKey:`${s}.CONNECTION_ACTIVATED_STATUS`,values:{connectionName:a},components:{bold:e.jsx(l,{component:"span",variant:"captionMedium",sx:{color:"inherit"}})}})}):e.jsx(K,{text:m(`${s}.CONNECTION_AWAITING_STATUS`),onRefresh:f,refreshTestId:"onboarding-refresh-connection-button"}),action:e.jsx(O,{"data-testid":"onboarding-add-connection-button",variant:"tertiary",size:"sm",endIcon:e.jsx(w,{size:"sm"}),onClick:x,children:m(`${s}.ADD_CONNECTION_BUTTON`)})}),e.jsx(z,{stepNumber:2,done:r,showConnector:!1,circleBorderVariant:"default",stepNumberColor:"neutral",title:m(`${s}.SYNC_TABLES_TITLE`),tooltip:m(`${s}.SYNC_TABLES_TOOLTIP`),status:r?e.jsx(l,{variant:"captionRegular",sx:{color:n.content.actions.success},children:e.jsx(P,{i18nKey:`${s}.DATASETS_FOUND_STATUS_DONE`,values:{count:d},components:{bold:e.jsx(l,{component:"span",variant:"captionMedium",sx:{color:"inherit"}})}})}):e.jsx(K,{text:m(`${s}.SYNC_TABLES_AWAITING_STATUS`),onRefresh:S,refreshTestId:"onboarding-refresh-sync-tables-button"}),action:e.jsx(O,{"data-testid":"onboarding-sync-tables-button",variant:"tertiary",size:"sm",endIcon:e.jsx(w,{size:"sm"}),onClick:p,children:m(`${s}.SYNC_TABLES_BUTTON`)})})]}),e.jsx(c,{direction:"row",justifyContent:"flex-end",children:e.jsx(O,{"data-testid":"onboarding-next-step-button",variant:"primary",endIcon:e.jsx(w,{size:"sm"}),onClick:C,children:m(`${s}.NEXT_STEP_CREATE_REPORT`)})})]})}function Lt({onGoToHome:t}){const{t:o}=v();return e.jsxs(c,{"data-testid":"onboarding-all-set-block",direction:"column",sx:{gap:2,p:4,borderRadius:j.medium,bgcolor:n.background.success.surface1,border:`1px solid ${n.border.success.border1}`},children:[e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:2},children:[e.jsx(c,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,flexShrink:0,borderRadius:"50%",bgcolor:n.background.success.surface1Strong},children:e.jsx(H,{size:"xs",sx:{color:n.content.neutral.onBrand}})}),e.jsx(l,{variant:"bodySmSemibold",sx:{color:n.content.actions.success},children:o(`${s}.ALL_SET_TITLE`)})]}),e.jsx(l,{variant:"bodySmRegular",sx:{color:n.content.actions.successStrong},children:o(`${s}.ALL_SET_DESCRIPTION`)}),e.jsx(c,{direction:"row",children:e.jsx(O,{"data-testid":"onboarding-go-to-home-button",variant:"primary",onClick:t,children:o(`${s}.GO_TO_HOME`)})})]})}function Mt({tablesSynced:t,dataModelCreated:o,reportCreated:i,datasetCount:r,dataModelCount:a,reportCount:d,allSet:x,onGoToHome:p,onChooseFileClick:f,onDownloadSample:S,onRefreshDataset:C,onRefreshDataModel:m,onRefreshReport:y,onManageDatasets:Q,onManageDataModels:B,onManageReports:D}){const{t:h}=v();return e.jsxs(e.Fragment,{children:[e.jsxs(c,{"data-testid":"onboarding-quick-create-panel",direction:"column",sx:{border:R,borderRadius:j.medium,p:3,gap:2},children:[e.jsx(l,{variant:"bodySemibold",sx:{color:n.content.neutral.neutralStrong},children:h(`${s}.QUICK_CREATE_TITLE`)}),e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:2},children:[e.jsx(c,{alignItems:"center",justifyContent:"center",sx:{width:40,height:40,flexShrink:0,borderRadius:j.small,bgcolor:n.background.brand.surface1},children:e.jsx(xt,{size:"sm",sx:{color:n.content.brand.brandLight}})}),e.jsx(l,{variant:"bodySmRegular",sx:{color:n.content.neutral.neutralMedium},children:h(`${s}.QUICK_CREATE_DESC`)})]}),e.jsxs(c,{direction:"row",sx:{gap:2},children:[e.jsx(O,{"data-testid":"onboarding-choose-file-button",variant:"primary",onClick:f,children:h(`${s}.CHOOSE_FILE_BUTTON`)}),e.jsx(O,{"data-testid":"onboarding-download-sample-button",variant:"tertiary",startIcon:e.jsx(mt,{size:"sm"}),onClick:S,children:h(`${s}.DOWNLOAD_FILE_SAMPLE`)})]})]}),e.jsxs(c,{"data-testid":"onboarding-standard-flow-panel",direction:"column",sx:{border:R,borderRadius:j.medium,p:3,gap:3},children:[e.jsxs(c,{direction:"column",sx:{gap:1},children:[e.jsx(l,{variant:"bodySemibold",sx:{color:n.content.neutral.neutralStrong},children:h(`${s}.STANDARD_FLOW_TITLE`)}),e.jsx(l,{variant:"bodySmRegular",sx:{color:n.content.neutral.neutralLight},children:h(`${s}.STANDARD_FLOW_SUBTITLE`)})]}),e.jsx(z,{"data-testid":"onboarding-standard-flow-step-dataset",stepNumber:1,done:t,showConnector:!0,circleBorderVariant:"strong",stepNumberColor:"brand",title:h(`${s}.CREATE_DATASET_TITLE`),tooltip:h(`${s}.CREATE_DATASET_TOOLTIP`),status:t?e.jsx(l,{variant:"captionRegular",sx:{color:n.content.actions.success},children:e.jsx(P,{i18nKey:`${s}.DATASETS_FOUND_STATUS_DONE`,values:{count:r},components:{bold:e.jsx(l,{component:"span",variant:"captionMedium",sx:{color:"inherit"}})}})}):e.jsx(K,{text:h(`${s}.DATASETS_FOUND_STATUS`,{count:r}),onRefresh:C,refreshTestId:"onboarding-refresh-dataset-button"}),action:e.jsx(O,{"data-testid":"onboarding-manage-datasets-button",variant:"tertiary",size:"sm",endIcon:e.jsx(w,{size:"sm"}),onClick:Q,children:h(`${s}.MANAGE_DATASETS_BUTTON`)})}),e.jsx(z,{"data-testid":"onboarding-standard-flow-step-data-model",stepNumber:2,done:o,showConnector:!0,circleBorderVariant:"strong",stepNumberColor:"brand",title:h(`${s}.CREATE_DATA_MODEL_TITLE`),tooltip:e.jsxs(V,{component:"ul",sx:{m:0,pl:4,"& li":{mb:1,lineHeight:1.5},"& li:last-of-type":{mb:0}},children:[e.jsx("li",{children:h(`${s}.CREATE_DATA_MODEL_TOOLTIP_ITEM_1`)}),e.jsx("li",{children:h(`${s}.CREATE_DATA_MODEL_TOOLTIP_ITEM_2`)}),e.jsx("li",{children:h(`${s}.CREATE_DATA_MODEL_TOOLTIP_ITEM_3`)}),e.jsx("li",{children:h(`${s}.CREATE_DATA_MODEL_TOOLTIP_ITEM_4`)})]}),status:o?e.jsx(l,{variant:"captionRegular",sx:{color:n.content.actions.success},children:e.jsx(P,{i18nKey:`${s}.DATA_MODEL_COUNT_FOUND_DONE`,values:{count:a},components:{bold:e.jsx(l,{component:"span",variant:"captionMedium",sx:{color:"inherit"}})}})}):e.jsx(K,{text:h(`${s}.DATA_MODEL_COUNT_FOUND`,{count:a}),onRefresh:m,refreshTestId:"onboarding-refresh-data-model-button"}),action:e.jsx(O,{"data-testid":"onboarding-manage-data-models-button",variant:"tertiary",size:"sm",endIcon:e.jsx(w,{size:"sm"}),onClick:B,children:h(`${s}.MANAGE_DATA_MODELS_BUTTON`)})}),e.jsx(z,{"data-testid":"onboarding-standard-flow-step-report",stepNumber:3,done:i,showConnector:!1,circleBorderVariant:"strong",stepNumberColor:"brand",title:h(`${s}.STEP_CREATE_REPORT`),tooltip:h(`${s}.CREATE_REPORT_SUBSTEP_TOOLTIP`),status:i?e.jsx(l,{variant:"captionRegular",sx:{color:n.content.actions.success},children:e.jsx(P,{i18nKey:`${s}.REPORT_COUNT_FOUND_DONE`,values:{count:d},components:{bold:e.jsx(l,{component:"span",variant:"captionMedium",sx:{color:"inherit"}})}})}):e.jsx(K,{text:h(`${s}.REPORT_COUNT_FOUND`,{count:d}),onRefresh:y,refreshTestId:"onboarding-refresh-report-button"}),action:e.jsx(O,{"data-testid":"onboarding-manage-reports-button",variant:"tertiary",size:"sm",endIcon:e.jsx(w,{size:"sm"}),onClick:D,children:h(`${s}.MANAGE_REPORTS_BUTTON`)})}),x&&e.jsx(Lt,{onGoToHome:p})]})]})}const xe=12,me=[n.background.success.surface1,n.background.info.surface1,n.background.brand.surface2];function Bt({enabled:t=!0}={}){const{data:o,isLoading:i,isError:r}=At({pageSize:xe,pageNumber:1,enabled:t});return{templates:b.useMemo(()=>(o?.data?.data??[]).slice(0,xe).map((d,x)=>({id:String(d.id),title:d.name,description:d.summary||d.description||d.name,category:d.categoryNames?.[0]??"",bannerColor:me[x%me.length],thumbnail:d.thumbnail,lastVersionId:d.lastVersion?.id?String(d.lastVersion.id):void 0})),[o]),isLoading:i,isError:r}}const Ut=({scrollLeft:t,scrollWidth:o,clientWidth:i})=>{const r=o-i;return{atStart:t<=1,atEnd:r<=1||t>=r-1}},$t=`1px solid ${n.border.neutral.border1}`;function Pt({template:t,onClick:o}){return e.jsxs(c,{direction:"column",onClick:()=>o?.(t),sx:{flex:"0 0 calc((100% - 24px) / 3)",minWidth:240,border:$t,borderRadius:j.large,bgcolor:n.background.white,overflow:"hidden",cursor:"pointer","&:hover":{borderColor:n.border.brand.border1Strong}},children:[e.jsx(c,{alignItems:"center",justifyContent:"center",sx:{height:140,bgcolor:t.bannerColor,flexShrink:0},children:t.thumbnail?e.jsx(V,{component:"img",src:t.thumbnail,alt:t.title,sx:{width:"100%",height:"100%",objectFit:"cover"}}):e.jsx(Et,{size:"xl",sx:{color:n.content.neutral.neutralMedium}})}),e.jsxs(c,{direction:"column",sx:{p:3,gap:1},children:[e.jsx(l,{variant:"bodySmMedium",noWrap:!0,sx:{color:n.content.neutral.neutralStrong},children:t.title}),e.jsx(l,{variant:"captionRegular",noWrap:!0,sx:{color:n.content.neutral.neutralLight},children:t.description}),e.jsx(c,{direction:"row",sx:{pt:1},children:e.jsx(Tt,{label:t.category,color:"gray",size:"small"})})]})]})}function Ft({templateListRef:t,onScrollLeft:o,onScrollRight:i,onTemplateClick:r,onExploreTemplates:a}){const{t:d}=v(),{templates:x}=Bt(),[p,f]=b.useState({atStart:!0,atEnd:!0}),S=b.useCallback(()=>{const C=t.current;C&&f(Ut(C))},[t]);return b.useEffect(()=>{const C=t.current;if(!C)return;S(),C.addEventListener("scroll",S,{passive:!0});const m=typeof ResizeObserver>"u"?null:new ResizeObserver(S);return m?.observe(C),()=>{C.removeEventListener("scroll",S),m?.disconnect()}},[t,S,x.length]),e.jsxs(e.Fragment,{children:[e.jsxs(c,{direction:"row",alignItems:"center",sx:{gap:2,my:4},children:[e.jsx(c,{sx:{flex:1,height:"1px",bgcolor:n.border.neutral.border1}}),e.jsx(l,{variant:"captionRegular",sx:{color:n.content.neutral.neutralLight},children:d(`${s}.OR_SEPARATOR`)}),e.jsx(c,{sx:{flex:1,height:"1px",bgcolor:n.border.neutral.border1}})]}),e.jsxs(c,{direction:"column",sx:{gap:3},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"column",sx:{gap:1},children:[e.jsx(l,{variant:"bodySemibold",sx:{color:n.content.neutral.neutralStrong},children:d(`${s}
1.TEMPLATE_SECTION_TITLE`)}),e.jsx(l,{variant:"bodySmRegular",sx:{color:n.content.neutral.neutralLight},children:d(`${s}.TEMPLATE_SECTION_SUBTITLE`)})]}),e.jsx(O,{"data-testid":"onboarding-explore-templates-button",variant:"tertiary",size:"sm",endIcon:e.jsx(w,{size:"sm"}),onClick:a,children:d(`${s}.EXPLORE_ALL_TEMPLATES_BUTTON`)})]}),e.jsxs(c,{sx:{position:"relative"},children:[e.jsx(c,{"data-testid":"onboarding-template-list",ref:t,direction:"row",sx:{gap:3,overflowX:"auto",scrollBehavior:"smooth","&::-webkit-scrollbar":{display:"none"}},children:x.map(C=>e.jsx(Pt,{template:C,onClick:r},C.id))}),e.jsx(O,{"data-testid":"onboarding-template-scroll-left-button",iconOnly:!0,size:"sm",variant:"neutral-flat",disabled:p.atStart,onClick:o,sx:{position:"absolute",left:-14,top:"50%",transform:"translateY(-50%)",zIndex:1,bgcolor:n.background.white,border:R,borderRadius:"50%",boxShadow:"0px 1px 2px 0px rgba(16,24,40,0.06), 0px 1px 3px 0px rgba(16,24,40,0.10)",":hover":{bgcolor:n.background.actived}},children:e.jsx(ht,{size:"sm"})}),e.jsx(O,{"data-testid":"onboarding-template-scroll-right-button",iconOnly:!0,size:"sm",variant:"neutral-flat",disabled:p.atEnd,onClick:i,sx:{position:"absolute",right:-14,top:"50%",transform:"translateY(-50%)",zIndex:1,bgcolor:n.background.white,border:R,borderRadius:"50%",boxShadow:"0px 1px 2px 0px rgba(16,24,40,0.06), 0px 1px 3px 0px rgba(16,24,40,0.10)",":hover":{bgcolor:n.background.actived}},children:e.jsx(G,{size:"sm"})})]})]})]})}const he="https://docs.datasuite.vn/",ge="https://docs.datasuite.vn/support/cac-kenh-ho-tro";function zt({onLinkClick:t}){const{t:o}=v();return e.jsxs(c,{direction:"column",sx:{gap:2,mt:10,pb:4},children:[e.jsx(l,{variant:"bodySemibold",sx:{color:n.content.neutral.neutralStrong},children:o(`${s}.QUICK_LINKS_TITLE`)}),e.jsxs(c,{direction:"row",sx:{gap:2},children:[e.jsxs(c,{"data-testid":"onboarding-quicklink-documentation",component:"a",href:he,target:"_blank",rel:"noreferrer",onClick:()=>t("documentation",he),direction:"row",alignItems:"center",sx:{gap:2,flex:1,p:3,border:R,borderRadius:j.large,textDecoration:"none",cursor:"pointer","&:hover":{borderColor:n.border.brand.border1Strong}},children:[e.jsx(nt,{size:"md",sx:{color:n.content.brand.brandLight}}),e.jsx(l,{variant:"bodySmMedium",sx:{color:n.content.neutral.neutralStrong},children:o(`${s}.QUICK_LINK_DOCUMENTATION`)}),e.jsx(G,{size:"sm",fill:n.content.neutral.neutralLight,sx:{marginLeft:"auto"}})]}),e.jsxs(c,{"data-testid":"onboarding-quicklink-support",component:"a",href:ge,target:"_blank",rel:"noreferrer",onClick:()=>t("contact-support",ge),direction:"row",alignItems:"center",sx:{gap:2,flex:1,p:3,border:R,borderRadius:j.large,textDecoration:"none",cursor:"pointer","&:hover":{borderColor:n.border.brand.border1Strong}},children:[e.jsx(Ee,{size:"md",sx:{color:n.content.brand.brandLight}}),e.jsx(l,{variant:"bodySmMedium",sx:{color:n.content.neutral.neutralStrong},children:o(`${s}.QUICK_LINK_CONTACT_SUPPORT`)}),e.jsx(G,{size:"sm",fill:n.content.neutral.neutralLight,sx:{marginLeft:"auto"}})]})]})]})}function Kt({open:t,onClose:o,onConfirm:i}){const{t:r}=v();return e.jsx(Ce,{"data-testid":"onboarding-skip-setup-modal",open:t,title:r(`${s}.SKIP_SETUP_MODAL_TITLE`),size:"md",onClose:o,actions:e.jsxs(c,{direction:"row",sx:{gap:2,justifyContent:"flex-end",width:"100%"},children:[e.jsx(O,{"data-testid":"onboarding-skip-setup-modal-cancel-button",variant:"tertiary",size:"md",onClick:o,children:r(`${s}.SKIP_SETUP_MODAL_CANCEL_BUTTON`)}),e.jsx(O,{"data-testid":"onboarding-skip-setup-modal-confirm-button",variant:"primary",size:"md",onClick:i,children:r(`${s}.SKIP_SETUP_MODAL_CONFIRM_BUTTON`)})]}),children:e.jsx(l,{variant:"bodySmRegular",sx:{color:n.content.neutral.neutralStrong},children:r(`${s}.SKIP_SETUP_MODAL_DESCRIPTION`)})})}function Gt({setupState:t,refetch:o,refetchSubstep:i,tenantId:r,projectId:a,onChangeConnectOption:d,onSkipSetup:x}){const{t:p}=v(),f=be(),[S,C]=kt(),[m,y]=b.useState(!1),[Q,B]=b.useState(!1),[D,h]=b.useState(null),Z=b.useRef(null),{isOpen:J,setIsOpen:ee,handleClickOpen:_e,isExistChartPipeline:fe,pipelineCharts:Se}=ot();b.useEffect(()=>{T({eventName:_.ONBOARDING_SETUP_VIEW,eventType:E.session,tenantId:r,workspaceId:a})},[]);const Oe=t.steps[S]===F.Done;Rt({visible:!Oe,onCheck:o});const te=b.useRef(t.substeps);b.useEffect(()=>{Object.values(A).forEach(u=>{!te.current?.[u]&&t.substeps[u]&&T({eventName:_.ONBOARDING_SUBSTEP_DONE,eventType:E["click-button"],tenantId:r,workspaceId:a,properties:{substep:u}})}),te.current=t.substeps},[t.substeps,r,a]),b.useEffect(()=>{t.steps[g.ConnectData]===F.Done&&T({eventName:_.ONBOARDING_CONNECT_DATA_COMPLETED,eventType:E["click-button"],tenantId:r,workspaceId:a,properties:{connection_type:t.connectOption}})},[t.steps,t.connectOption,r,a]);const ne=b.useRef(t.allSet);b.useEffect(()=>{!ne.current&&t.allSet&&(le({tenantId:r,workspaceId:a,flow:de.ByTheBook}),T({eventName:_.ONBOARDING_ALL_SET_SHOWN,eventType:E.session,tenantId:r,workspaceId:a})),ne.current=t.allSet},[t.allSet,r,a,f]);const{counts:W,substeps:U,steps:je,connectOption:ve}=t,Ne=lt(t.connections),Ae=u=>{u===g.CreateReport&&T({eventName:_.ONBOARDING_QUICK_CREATE_STARTED,eventType:E["click-navigator"],tenantId:r,workspaceId:a}),C(u)},re=1180,oe=u=>{Z.current?.scrollBy({left:u==="left"?-re:re,behavior:"smooth"})},De=u=>{d(u),u===M.Own&&T({eventName:_.ONBOARDING_OWN_DATABASE_ENTRY_CLICKED,eventType:E["click-button"],tenantId:r,workspaceId:a})},Re=(u,N)=>{T({eventName:_.ONBOARDING_QUICK_LINK_CLICKED,eventType:E["click-navigator"],tenantId:r,workspaceId:a,properties:{link_name:u,link_url:N}
1})},Ie=()=>{T({eventName:_.START_USE_OWN_DATA,eventType:E["click-button"],tenantId:r,workspaceId:a,properties:{source:"home-onboarding"}}),window.open(k(ze,{tenantId:String(r)}),"_blank","noopener,noreferrer")},ke=()=>{window.open(se(L.Datasets),"_blank","noopener,noreferrer")},we=u=>{T({eventName:_.ONBOARDING_TEMPLATE_SELECTED,eventType:E["click-icon"],tenantId:r,workspaceId:a,properties:{template_id:u.id,template_name:u.title}}),h(u),_e(u.id)},ye=()=>{ee(!1),h(null)},Le=(u,N,ae)=>{ee(!1);const X=u;if(ae===it.USE_OWN_DATA){const{pipelineReleaseId:I}=X?.data?.data?.pipelineRelease||{};I&&f.push(k(Ge,{projectId:N,pipelineReleaseId:I,tenantId:String(r)}))}else{const{id:I}=X?.data?.data?.reportRelease||{};I&&f.push({pathname:k(We,{projectId:N,reportTemplateId:D?.lastVersionId??D?.id??"",templateLogId:I,tenantId:String(r)}),state:{fromOnboarding:!0,trackingTemplateId:D?.id}})}h(null)},Me=()=>{T({eventName:_.ONBOARDING_SEE_ALL_TEMPLATES_CLICKED,eventType:E["click-navigator"],tenantId:r,workspaceId:a});const u=k(Ke,{tenantId:String(r),projectId:String(a)});window.open(u,"_blank","noopener,noreferrer")},se=u=>u===L.Datasets?k(He,{tenantId:r,id:a}):u===L.DataModels?k(Ve,{tenantId:r,id:a}):k(Qe,{id:a,folder:rt.reportFolder.defaultFolderId}),Y=u=>{T({eventName:_.ONBOARDING_STANDARD_FLOW_ENTRY,eventType:E["click-button"],tenantId:r,workspaceId:a,properties:{target:u}}),window.open(se(u),"_blank","noopener,noreferrer")},Be=()=>{if(T({eventName:_.ONBOARDING_EXIT,eventType:E["click-navigator"],tenantId:r,workspaceId:a,properties:{trigger:"skip-setup"}}),T({eventName:_.ONBOARDING_SETUP_SKIPPED,eventType:E["click-navigator"],tenantId:r,workspaceId:a,properties:{step_reached:S}}),B(!1),x){x();return}f.push(ie)},Ue=()=>{T({eventName:_.ONBOARDING_DOWNLOAD_SAMPLE_DATA_CLICKED,eventType:E["click-button"],tenantId:r,workspaceId:a});const u=document.createElement("a");u.href=ce,u.download=ce.split("/").pop()||"sample.xls",document.body.appendChild(u),u.click(),document.body.removeChild(u)},$e=()=>{T({eventName:_.ONBOARDING_EXIT,eventType:E["click-navigator"],tenantId:r,workspaceId:a,properties:{trigger:"all-set"}});const u=Object.values(t.steps).filter(N=>N===F.Done).length;if(T({eventName:_.ONBOARDING_EXITED_VIA_GO_TO_HOME,eventType:E["click-navigator"],tenantId:r,workspaceId:a,properties:{steps_completed:u}}),x){x();return}f.push(ie)},$=async u=>{T({eventName:_.ONBOARDING_REFRESH_CLICK,eventType:E["click-button"],tenantId:r,workspaceId:a,properties:{substep:u}});const N=i?await i(u):await o();(Array.isArray(N)?N:[N]).some(I=>I?.isError)&&at.error({title:p(`${s}.REFRESH_ERROR_TOAST`)})};return e.jsxs(e.Fragment,{children:[e.jsxs(c,{direction:"column",sx:{gap:1},children:[e.jsx(l,{variant:"bodySemibold",sx:{color:n.content.neutral.neutralStrong},children:p(`${s}.SETUP_TITLE`)}),e.jsx(l,{variant:"bodySmRegular",sx:{color:n.content.neutral.neutralLight},children:p(`${s}.SETUP_SUBTITLE`)})]}),e.jsxs(c,{direction:"row",sx:{gap:3},children:[e.jsx(wt,{activeStep:S,steps:je,onStepChange:Ae,onSkipClick:()=>B(!0)}),e.jsx(c,{"data-testid":"onboarding-step-content",direction:"column",sx:{flex:1,border:R,borderRadius:j.large,bgcolor:n.background.white,p:4,gap:3},children:S===g.ConnectData?e.jsx(yt,{dbOption:ve,onSelectOption:De,connectionActivated:U[A.Connection],tablesSynced:U[A.Dataset],connectionName:Ne?.name,datasetCount:W.datasetCount,onAddConnectionClick:Ie,onSyncTablesClick:ke,onRefreshConnection:()=>$(A.Connection),onRefreshDataset:()=>$(A.Dataset),onNextStep:()=>C(g.CreateReport)}):e.jsx(Mt,{tablesSynced:U[A.Dataset],dataModelCreated:U[A.DataModel],reportCreated:U[A.Report],datasetCount:W.datasetCount,dataModelCount:W.dataModelCount,reportCount:W.reportCount,allSet:t.allSet,onGoToHome:$e,onChooseFileClick:()=>y(!0),onDownloadSample:Ue,onRefreshDataset:()=>$(A.Dataset),onRefreshDataModel:()=>$(A.DataModel),onRefreshReport:()=>$(A.Report),onManageDatasets:()=>Y(L.Datasets),onManageDataModels:()=>Y(L.DataModels),onManageReports:()=>Y(L.Reports)})})]}),e.jsx(Ft,{templateListRef:Z,onScrollLeft:()=>oe("left"),onScrollRight:()=>oe("right"),onTemplateClick:we,onExploreTemplates:Me}),e.jsx(zt,{onLinkClick:Re}),e.jsx(ct,{open:m,onCreateReportCompleted:()=>le({tenantId:r,workspaceId:a,flow:de.OnboardingSetup}),onClose:()=>{y(!1),o()}}),e.jsx(Kt,{open:Q,onClose:()=>B(!1),onConfirm:Be}),J&&D&&e.jsx(st,{open:J,reportTemplateId:D.lastVersionId??D.id,reportTemplateName:D.title,isExistChartPipeline:fe,pipelineCharts:Se,onClose:ye,onSuccess:Le})]})}function Jn(t){const{state:o}=Ye(),i=St(),[r,a]=b.useState(Xe);return jt(i&&r),e.jsxs(V,{sx:{height:"100vh",overflowY:"auto"},children:[e.jsx(tt,{children:e.jsx("title",{children:"Home — FPT Data Suite"})}),e.jsx(V,{sx:{width:1200,maxWidth:"100%",mx:"auto",px:4,pb:6},children:e.jsxs(c,{"data-testid":"onboarding-empty-workspace-BiCreator",direction:"column",sx:{gap:4,mt:6},children:[e.jsx(Nt,{userName:Ze(o)||"",onLogout:()=>qe()}),e.jsx(Gt,{...t}),e.jsx(vt,{open:i&&!r,tenantId:t.tenantId??null,workspaceId:t.projectId??null,onContinue:()=>a(!0)})]})})]})}export{Jn 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.