PageSourceSearch

https://datasuite.fptcloud.com/assets/HomePage-NCELgvtB.js

js fptcloud.com collected 2026-09-24 10:11:52 UTC 20,868 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GettingStartedScreen-BKHYlD-f.js","assets/react-DJo-hRcj.js","assets/index-HmRGQEHV.js","assets/vendors-D9FTVJXp.js","assets/lodash-5mjDUwsr.js","assets/vendors-DrQ26gQT.css","assets/mui-core-CIySj9_k.js","assets/mui-x-BIGgJFSO.js","assets/index-BnKm7cSP.css","assets/ModalV2-B3Lw--tU.js","assets/constants-DTTKNgRs.js","assets/Search-DN2UMn43.js","assets/index-BXXaGjYJ.js","assets/index-d7XnxQEx.js","assets/Search-B65Y6qYp.js","assets/Plus-C9bmOFUl.js","assets/index-BPehDz-n.js","assets/index-CcFATZH7.js","assets/IconMenu-q4g7Ob_k.js","assets/UseTemplateDialog-Bn4svkyE.js","assets/queryKeys-D0rvkMjb.js","assets/pipelineType-DVVfCPWU.js","assets/index-DiAcH7Dv.js","assets/ControlledInput-CyLjPzwd.js","assets/templateTypeData-IrSi91a2.js","assets/index-DGNfijCx.js","assets/toastifyV2-ajHTjSAj.js","assets/type-DaA-6JV9.js","assets/index-H0zTe0Th.js","assets/index-5m9SxA6J.js","assets/Check-CB4u6cLS.js","assets/SheetSelectionPanel-DKtSXx8x.js","assets/Info-D-h6kMc2.js","assets/Trash-B-gRzLJO.js","assets/SharePoint-D6SyAjUt.js","assets/index-CFSyW3hy.js","assets/confirmLeaveIfNeeded-LxAE-7ur.js","assets/getNextStep-JGPpQ-7F.js","assets/LocalStorageManager-DIHYtoBS.js","assets/CheckCircle-OoYQIX8F.js","assets/WarningCircle-D3Rjl1sZ.js","assets/selectFieldV2-D7q2bZLc.js","assets/useWorkspaceSetupState-DQZPifCr.js","assets/useCheckPermissionSidebar-D3ccSZS-.js","assets/Project-DlhDQHoA.js","assets/index-QNzS2lw3.js","assets/useUrlParams-BXmEcjdH.js","assets/org-switch-rules-CALv74Cz.js","assets/DashboardQueryRepository-rzvXeoKZ.js","assets/Building-D1EpsYc0.js","assets/languageManager-kFJuVfzY.js","assets/SharedComponents-R9XUbcB5.js","assets/LocalStorageManager-Cf9EMmua.js","assets/constants-BhQb0AAi.js","assets/getHttpStatusCode-D6Fy-dO9.js","assets/useOrgConnections-BL2mri-d.js","assets/trackCreateReportCompleted-CeAz8aIH.js","assets/ChevronRight-B4jHwrD4.js","assets/Data-cXM3VPY1.js","assets/Refresh-P3KD5HLW.js","assets/Upload-BzAO9vUU.js","assets/ChevronLeft-DyTHL0o8.js","assets/SearchReportTemplates-OWMnp8q0.js","assets/index-OQb-2fnI.js","assets/Chart-DcaVfKdS.js","assets/RequestAccessEmptyState-BMlp-aR1.js","assets/index-dXfqfi4h.js","assets/EmptyTray-CG9bRkIl.js","assets/RequestPermissionModal-BPIyZzNm.js","assets/textValidation-DlTb7Vus.js"])))=>i.map(i=>d[i]);
2import{I as z,bd as Ne,c0 as Fe,b_ as Pe,c1 as Ue,bq as oe,bc as U,be as Ge,ag as Ve}from"./vendors-D9FTVJXp.js";import{j as e,r as n,R as G}from"./react-DJo-hRcj.js";import{_ as re,az as ze}from"./lodash-5mjDUwsr.js";import{d as R,f as be,c as we,j as Ce,M as Ke,i as he,N as Qe,B as T,O as Ze,T as V,t as A,Q as Ye,k as Xe,m as Je,U as et,g as F,V as Se,P as _e,b as Te,W as ke,h as tt,X as st,Y as ot,Z as rt}from"./index-HmRGQEHV.js";import{D as at}from"./index-BjHpFxRc.js";import{C as nt}from"./index-CJxaahUi.js";import{Q as it}from"./index-H0zTe0Th.js";import{L as E}from"./LocalStorageManager-DIHYtoBS.js";import{L as te}from"./Layout-lHkxg3IM.js";import{G as ct}from"./Grid-CK3CrgEm.js";import{ap as lt,an as je,T as H,b0 as dt,aV as ve,a3 as pt,b1 as mt}from"./mui-core-CIySj9_k.js";import{E as Ie,m as Oe,R as ut,u as Ee,A as ht}from"./useCheckPermissionSidebar-D3ccSZS-.js";import{u as gt,R as ft,a as De,S as xt,T as bt}from"./TemplateReportListDialog-BLwCRHvY.js";import Ct from"./ConfirmDelete-F9U9PgyH.js";import"./SharedComponents-R9XUbcB5.js";import{R as jt}from"./index-DVGZnwX7.js";import{M as ae}from"./index-CwKUy3Cw.js";import{S as It}from"./Share-Q_p-io_U.js";import{R as yt,S as Rt,s as Me,g as wt}from"./onboardingDecisionCache-UHr3oWvd.js";import{P as St}from"./Pen-OBDGZ1yV.js";import{D as _t}from"./Delete-CbAEfyPJ.js";import{D as Tt}from"./DashboardQueryRepository-rzvXeoKZ.js";import{u as kt}from"./useDashboardInit-CjPj5AX-.js";import{a as se}from"./toastifyV2-ajHTjSAj.js";import{w as vt}from"./withAuth-gm5TvnaD.js";import{u as Ot,a as Et}from"./useWorkspaceSetupState-DQZPifCr.js";import{u as Dt,C as Mt}from"./useCreateButton-DnAlytwI.js";import{T as Lt}from"./templateTypeData-IrSi91a2.js";import"./mui-x-BIGgJFSO.js";import"./ModalV2-B3Lw--tU.js";import"./ControlledInput-CyLjPzwd.js";import"./index-d7XnxQEx.js";import"./index-DCp9VymZ.js";import"./selectFieldV2-D7q2bZLc.js";import"./Search-B65Y6qYp.js";import"./index-Dpb_-CSh.js";import"./constants-BhQb0AAi.js";import"./Search-DN2UMn43.js";import"./index-5m9SxA6J.js";import"./Check-CB4u6cLS.js";import"./SheetSelectionPanel-DKtSXx8x.js";import"./Info-D-h6kMc2.js";import"./Trash-B-gRzLJO.js";import"./SharePoint-D6SyAjUt.js";import"./index-CFSyW3hy.js";import"./confirmLeaveIfNeeded-LxAE-7ur.js";import"./getNextStep-JGPpQ-7F.js";import"./CheckCircle-OoYQIX8F.js";import"./WarningCircle-D3Rjl1sZ.js";import"./getTenantId-BCRwxyc4.js";import"./languageManager-kFJuVfzY.js";import"./useUrlParams-BXmEcjdH.js";import"./org-switch-rules-CALv74Cz.js";import"./Project-DlhDQHoA.js";import"./index-QNzS2lw3.js";import"./Building-D1EpsYc0.js";import"./LocalStorageManager-Cf9EMmua.js";import"./getHttpStatusCode-D6Fy-dO9.js";import"./IconMenu-q4g7Ob_k.js";import"./DotVertical-pQksgbXA.js";import"./Folder-EUEsHvd1.js";import"./Link-CsLQZn-K.js";import"./sharePermission-Ca2XsYRj.js";import"./index-BcOAkTcY.js";import"./OUQueryRepository-5Mm0PDx-.js";import"./casbinEnums-C5_ddolX.js";import"./UserInvitationQueryRepository-DksCvAMC.js";import"./Delete-DIg5qwZg.js";import"./ReportFolderQueryRepository-BpuXzaXm.js";import"./ReportTemplateQueryRepository-CjR4Uth5.js";import"./index-DiAcH7Dv.js";import"./LogoLoading-BU7vlAsz.js";import"./LogoSkeleton-xtVwDN2G.js";import"./surveyGatingRules-Z5UPFuIg.js";import"./useOrgConnections-BL2mri-d.js";import"./index-DGNfijCx.js";import"./OriginalDataSourceType-D1zudQVo.js";import"./type-DaA-6JV9.js";import"./pipelineType-DVVfCPWU.js";const Nt=({size:t="sm",fill:s="currentColor",width:o,height:d,sx:p,...m})=>{const a=()=>{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}},i=o!==void 0?o:a(),g=d!==void 0?d:a();return e.jsx(lt,{...m,sx:{width:i,height:g,...p},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:"M8 12C8 11.4477 8.44772 11 9 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H9C8.44772 13 8 12.5523 8 12Z",fill:s}),e.jsx("path",{d:"M8 19C8 18.4477 8.44772 18 9 18H20C20.5523 18 21 18.4477 21 19C21 19.5523 20.5523 20 20 20H9C8.44772 20 8 19.5523 8 19Z",fill:s}),e.jsx("path",{d:"M8 5C8 4.44772 8.44772 4 9 4H20C20.5523 4 21 4.44772 21 5C21 5.55228 20.5523 6 20 6H9C8.44772 6 8 5.55228 8 5Z",fill:s}),e.jsx("path",{d:"M3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5C3.67157 13.5 3 12.8284 3 12Z",fill:s}),e.jsx("path",{d:"M3 19C3 18.1716 3.67157 17.5 4.5 17.5C5.32843 17.5 6 18.1716 6 19C6 19.8284 5.32843 20.5 4.5 20.5C3.67157 20.5 3 19.8284 3 19Z",fill:s}),e.jsx("path",{d:"M3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5C3.67157 6.5 3 5.82843 3 5Z",fill:s})]})})};function Pt(){const{t}=z();return e.jsxs(je,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:[e.jsx(Ie,{sx:{width:32,height:32,color:R.ic.normal.disabled,marginBottom:be.spacing(3)}}),e.jsx(H,{component:"p",variant:"h4SMedium",color:R.txt.normal.secondary,children:t("quick_access.empty")}),e.jsx(H,{component:"p",variant:"bodySMedium",color:R.txt.normal.tertiary,children:t("quick_access.empty_description")})]})}function Vt(){const{t}=z();return e.jsxs(je,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:[e.jsx(Ie,{sx:{width:32,height:32,color:R.ic.normal.disabled,marginBottom:be.spacing(3)}}),e.jsx(H,{component:"p",variant:"h4SMedium",color:R.txt.normal.secondary,children:t("recent.empty")}),e.jsx(H,{component:"p",variant:"bodySMedium",color:R.txt.normal.tertiary,children:t("recent.empty_description")})]})}function At({title:t,description:s}){return e.jsxs(je,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:[e.jsx(Ie,{sx:{width:32,height:32,color:R.ic.normal.disabled,marginBottom:be.spacing(3)}}),e.jsx(H,{component:"p",variant:"h4SMedium",color:R.txt.normal.secondary,children:t}),e.jsx(H,{component:"p",variant:"bodySMedium",color:R.txt.normal.tertiary,children:s})]})}function Le({highlight:t,onAction:s}){const{t:o}=z();return e.jsxs(e.Fragment,{children:[e.jsx(ae,{icon:t?e.jsx(yt,{}):e.jsx(Rt,{}),text:o(t?"menu.remove_from_quick_access":"menu.add_to_quick_access"),onClick:()=>s("highlight")}),e.jsx(ae,{icon:e.jsx(St,{}),text:o("settings"),onClick:()=>s("setting")}),e.jsx(ae,{icon:e.jsx(_t,{}),text:o("button.delete"),isDelete:!0,onClick:()=>s("delete"),iconColor:we.content.actions.error,textColor:we.content.actions.error})]})}function Ht(t){return t.map(s=>({id:s.id,name:s.name,description:s.description,logoUrl:s.logoUrl,themeColor:s.themeColor,projectId:s.projectId,projectName:s.projectName,updatedAt:s.updatedAt,firstViewableItemId:s.first
2ViewableItemId,firstViewablePageId:s.firstViewablePageId,firstViewableDashboardId:s.firstViewableDashboardId}))}function ge(t){const{children:s,currentTab:o,index:d,...p}=t;return e.jsx(T,{role:"tabpanel",hidden:o!==d,id:`highlight-tabpanel-${d}`,"aria-labelledby":`highlight-tab-${d}`,...p,children:o===d&&e.jsx(T,{sx:{position:{xs:"relative",md:"absolute"},top:{xs:0,md:"60px"},"&::-webkit-scrollbar":{display:"none"}},p:0,bottom:0,left:0,right:0,overflow:"auto",children:s})})}function fe(t){return{id:`highlight-tab-${t}`,"aria-controls":`highlight-tabpanel-${t}`}}const xe=pt(mt,{shouldForwardProp(t){return!["currentTab","index"].includes(String(t))}})(({currentTab:t,index:s})=>({position:"relative",overflow:"visible",minHeight:"auto",textTransform:"none",borderRadius:0,minWidth:"auto",color:t===s?F.txt.normal.primary:F.txt.normal.tertiary,"&.Mui-selected":{color:F.txt.normal.primary},...s!==2&&{"&:after":{content:'""',position:"absolute",top:"50%",right:"-16px",width:"1px",height:"16px",transform:"translateY(-50%)",backgroundColor:F.bd.surface.sf2}}}));function Wt({gridView:t,setGridView:s}){return e.jsx(T,{position:"absolute",right:0,top:16,display:"flex",zIndex:3,children:e.jsx(xt,{active:t,icons:[{id:0,icon:ct},{id:1,icon:Nt}],onClick:o=>{s(o)}})})}function $t(){const{t,i18n:s}=z(),{state:o}=Ce(),{currentTenant:d}=o,p=Ne(),m=Fe.parse(p.location.search),[a,i]=n.useState(0),[g,j]=n.useState(0),[b,c]=n.useState(!1),[k,v]=n.useState(!1),O=Number(Ke()),w=Pe(),f=Number(he())||d?.id||o?.tenants[0].id,K=Qe(),[,ne]=Ue(),D=new Tt({projectId:O,queryClient:w,tenantId:f}),{isLoading:ie,isFetching:M,data:S,refetch:L}=oe({...D.getRecents(),enabled:!!f}),{isLoading:ce,isFetching:Q,data:le,refetch:Z}=oe({...D.getHighlights(),enabled:!!f}),{isLoading:de,isFetching:pe,data:W}=oe({...D.getReportBooks(),enabled:!!f&&a===2}),N=ie||ce||de,$=M||Q||pe,x=n.useMemo(()=>Oe(re(S,"data.data.data",[])),[M,s.language]),_=n.useMemo(()=>Oe(re(le,"data.data.data",[])),[Q,s.language]),I=n.useMemo(()=>Ht(re(W,"data.data",[])),[W,s.language]),u=n.useMemo(()=>!$&&a===0&&!_.length,[$,a,_.length]),Y=n.useMemo(()=>a===1&&!M&&!x.length,[a,M,x.length]),{openDelete:X,progressing:J,setOpenDelete:me,handleAction:ee,removeReport:ue,openSetting:P,setOpenSetting:l,currentItem:y}=gt({refetch(){L()},refetchHighLight(){Z()}}),{prefetchOnHover:q,cancelPrefetch:C}=kt(),ye=(r,h)=>
2{if(r===2){p.replace({search:"?tab=report-book&view=grid"});return}p.replace({search:`?tab=${r===0?"quick-access":"recent"}&view=${h===0?"grid":"list"}`})},B=(r,h)=>{i(h),ye(h,g)},He=r=>{j(r),ye(a,r)},We=r=>{if(!r.firstViewableItemId){se.info({title:t("REPORT_BOOK.NO_VIEWABLE_CONTENT_FOUND"),description:t("REPORT_BOOK.NO_VIEWABLE_CONTENT_DESCRIPTION")});return}const h=U(Se,{id:r.projectId,reportBookId:r.id.toString(),itemId:r.firstViewableItemId.toString(),tenantId:f});p.push(h)},$e=async r=>{if(!r.firstViewableItemId){se.info({title:t("REPORT_BOOK.NO_VIEWABLE_CONTENT")});return}const h=U(Se,{tenantId:f,id:r.projectId,reportBookId:r.id.toString(),itemId:r.firstViewableItemId.toString()});await ne(`${window.location.origin}${h}`)?se.success({title:t("REPORT_BOOK.LINK_COPIED")}):se.error({title:t("REPORT_BOOK.FAILED_TO_COPY_LINK")})},qe=()=>I.length?e.jsx(ve,{container:!0,spacing:4,children:I.map(r=>e.jsx(jt,{reportBook:r,onClick:()=>We(r),onMouseEnter:()=>{r.firstViewableDashboardId&&q({dashboardId:r.firstViewableDashboardId,projectId:Number(r.projectId),tenantId:Number(f)})},onMouseLeave:C,MenuItems:e.jsx(ae,{icon:e.jsx(It,{size:16}),text:t("Share"),onClick:()=>$e(r)})},r.id))}):e.jsx(At,{title:t("report_book.empty"),description:t("report_book.empty_description")}),Re=()=>u?e.jsx(Pt,{}):a===1&&!x.length?e.jsx(Vt,{}):g?e.jsx(ft,{data:a?x:_,MenuItems:Le,gridType:"home",onMenuAction:ee},a):e.jsx(ve,{container:!0,spacing:4,sx:{flexGrow:1,overflow:"auto",minHeight:0,pb:A.spacing(1)},children:N?Ye(9).map((r,h)=>e.jsx(De,{loading:!0},h)):(a?x:_).map(r=>e.jsx(De,{...r,onMouseEnter:()=>{r.id&&r.original?.project?.id&&q({dashboardId:Number(r.id),projectId:Number(r.original.project.id),tenantId:Number(he())})},onMouseLeave:C,onClick:()=>{E.set("detailReportSource","home"),Xe({eventType:Je["click-navigator"],eventName:"view-page",tenantId:f,workspaceId:O,properties:{dashboardId:r.id,pageId:r.original?.defaultPageId}}),p.push(U(et,{id:r.original?.project?.id,tenantId:he(),dashboardId:r.id??"",pageId:r.original?.defaultPageId}))},MenuItems:e.jsx(Le,{highlight:!!r.highlight,onAction:h=>ee(h,r)})},`${r.id}-${r.type}`))},a);n.useEffect(()=>{K.setHighlights({key:K.dashboardHighlightKey,data:_})},[_]),n.useEffect(()=>{m.tab==="recent"?(i(1),c(!0)):m.tab==="report-book"&&(i(2),c(!0),j(Number(m.view))),m.view==="list"&&j(1)},[]),n.useEffect(()=>{!u||b||(c(!0),x.length>0?B(null,1):I.length>0?B(null,2):B(null,1))},[u,b,I.length,x.length]),n.useEffect(()=>{!Y||k||!I.length||(v(!0),B(null,2))},[Y,k,I.length]);const Be=a!==2;return e.jsxs(T,{width:"100%",position:"relative",display:"flex",flexDirection:"column",children:[N&&e.jsx(Ze,{width:"20%",sx:{my:A.spacing(4)},children:e.jsx(V,{variant:"h3MBaseMedium",children:t("quick_access")})}),!N&&e.jsxs(e.Fragment,{children:[Be&&e.jsx(Wt,{gridView:g,setGridView:He}),e.jsxs(dt,{TabIndicatorProps:{style:{backgroundColor:"transparent"}},variant:"scrollable",scrollButtons:"auto",value:a,onChange:B,"aria-label":"highlight recent",sx:{py:A.spacing(4),".MuiTabs-flexContainer":{gap:8}},children:[e.jsx(xe,{disableRipple:!0,label:e.jsx(V,{variant:"h3MBaseSemibold",children:t("quick_access")}),currentTab:a,index:0,...fe(0)}),e.jsx(xe,{disableRipple:!0,label:e.jsx(V,{variant:"h3MBaseSemibold",children:t("recent")}),currentTab:a,index:1,...fe(1)}),e.jsx(xe,{disableRipple:!0,label:e.jsx(V,{variant:"h3MBaseSemibold",children:t("REPORT_BOOK.TITLE")}),currentTab:a,index:2,...fe(2)})]})]}),e.jsx(ge,{currentTab:a,index:0,children:Re()}),e.jsx(ge,{currentTab:a,index:1,children:Re()}),e.jsx(ge,{currentTab:a,index:2,children:qe()}),X&&e.jsx(Ct,{open:X,title:t("delete_report"),content:t("delete_report_message"),isDeleting:J,onClose:()=>me(!1),onDelete:ue}),P&&e.jsx(ut,{open:P,item:y,onSuccess:()=>{L(),Z()},onClose:()=>l(!1)})]})}const qt="ds100.restricted",Ae=t=>`${qt}.${t}`,Bt=t=>{if(!t)return;const s=E.get(Ae(t));return typeof s=="boolean"?s:void 0},Ft=(t,s)=>{t&&E.set(Ae(t),s)},Ut=()=>{const{state:t}=Ce(),s=E.get("defaultTenantId"),o=E.get("defaultWorkspaceId"),p=(t?.currentWorkspaces||[]).length>0||!!o,m=ze(t?.tenants,{tenant_owner:t?.email,id:Number(s)}),a=m&&p&&!!o,{reportCount:i,isLoading:g}=Ot({tenantId:s,workspaceId:o,enabled:a}),[j,b]=n.useState(null),c=j?.workspaceId===o;n.useEffect(()=>{if(!a||g||c)return;const w=i===0;b({workspaceId:o,active:w}),Me(o,w)}
2,[a,g,c,i,o]);const k=n.useCallback(()=>{b({workspaceId:o,active:!1}),Me(o,!1)},[o]),v=!!(c&&j?.active),O=wt(o);return{isTenantOwner:m,hasWorkspace:p,canBeInOnboarding:a,tenantId:s,workspaceId:o,reportCount:i,enabled:v,likelyOnboarding:c?v:a&&O===!0,isDecisionPending:a&&!c&&O===void 0,dismiss:k}},Gt=G.lazy(()=>Ve(()=>import("./GettingStartedScreen-BKHYlD-f.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64]))),zt=G.lazy(()=>Ve(()=>import("./RequestAccessEmptyState-BMlp-aR1.js"),__vite__mapDeps([65,1,3,4,5,2,6,7,8,66,26,67,38,43,44,45,46,13,9,14,47,48,11,49,30,50,51,52,53,54,68,69])));function Kt(){const t=Ne(),{t:s}=z(),o=E.get("defaultTenantId"),{state:d,setState:p}=Ce(),m=d?.currentWorkspaces||[],a=m.length>0,i=E.get("defaultWorkspaceId"),g=[_e.workspace["read-workspace"],_e.dashboard["read-dashboard"]],{actionAccessableMap:j,loading:b}=Ee({actions:g,subject:{name:Te.tenant,id:Number(o)},opts:{enabled:!!o}}),c=j["read-workspace"]===!0&&j["read-dashboard"]===!1,{actionAccessableMap:k,loading:v}=Ee({actions:g,subject:{name:Te.workspace,id:Number(i)},opts:{enabled:!!i&&a&&c}}),O=Bt(o)===!0,w=k["read-workspace"]===!0&&k["read-dashboard"]===!1,f=Pe(),K=n.useMemo(()=>new ht({tenantId:o,queryClient:f}),[o,f]),{data:ne,isLoading:D}=oe({...K.getMyReportAccess({workspaceId:i}),enabled:c&&a&&w&&!!i}),ie=re(ne,"data.data.count",0),M=!b&&c&&(!a||!v&&w&&!D&&ie===0),S=Ut(),{setupState:L,refetch:ce,refetchSubstep:Q,setConnectOption:le}=Et({tenantId:o,projectId:i,enabled:S.enabled}),Z=S.enabled&&!!L,de=(S.likelyOnboarding||S.isDecisionPending)&&!L,pe=O&&b||c&&a&&(v||w&&!!i&&D),[W,N]=n.useState(!1),[$,x]=G.useState(!1),[_,I]=n.useState(!1),[u,Y]=n.useState(null),{handleClickOpen:X,isOpen:J,setIsOpen:me,isExistChartPipeline:ee,pipelineCharts:ue}=Dt();n.useEffect(()=>{b||!o||Ft(o,c)},[b,o,c]),n.useEffect(()=>{p(y=>{const{impersonateUser:q,...C}=y;return{...C}});const l=localStorage.getItem("utm_params");if(l){const y=new URL(window.location.href);y.search||window.history.replaceState(null,"",`${y.pathname}${l}`),localStorage.removeItem("utm_params"),localStorage.removeItem("utm_source"),localStorage.removeItem("utm_medium"),localStorage.removeItem("utm_campaign")}},[]);const P=(l=!1)=>e.jsx(te,{kioskMode:l,children:e.jsx(T,{display:"flex",alignItems:"center",justifyContent:"center",sx:{height:"100%",flex:1},children:e.jsx(rt,{})})});if(pe||de)return P(S.likelyOnboarding);if(M){const l=e.jsx(zt,{tenantId:o});return e.jsx(G.Suspense,{fallback:P(),children:e.jsx(te,{emptyWorkspaceFallback:l,children:l})})}return Z?e.jsx(G.Suspense,{fallback:P(!0),children:e.jsx(te,{kioskMode:!0,disableInnerPadding:!0,children:e.jsx(Gt,{setupState:L,refetch:ce,refetchSubstep:Q,tenantId:o,projectId:i,onChangeConnectOption:le,onSkipSetup:S.dismiss})})}):e.jsxs(te,{children:[e.jsxs(Ge,{children:[e.jsxs("title",{children:[s("welcome")," ",ke(d)," - FPT Data Suite"]}),e.jsx("meta",{name:"description",content:"Your personalized dashboard with reports"}),e.jsx("meta",{name:"keywords",content:"dashboard, reports, workspace, analytics"})]}),e.jsxs(T,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(T,{children:[e.jsx(V,{variant:"bodySMedium",component:"p",color:"tertiary",children:s("Welcome")}),e.jsxs(V,{"aria-description":"user profile name",variant:"h3MBaseSemibold",component:"p",color:"primary",children:[ke(d)," 👋🏻"]})]}),m?.length>0&&e.jsx(at,{buttonLabel:s("button.create_report"),options:[{label:s("button.create_report_use_existing_data_model"),onClick:()=>N(!0)},{label:s("button.create_report_use_template"),onClick:()=>x(!0)},{label:s("button.create_report_quick_create_from_file"),onClick:()=>I(!0)}]})]}),e.jsx(T,{flex:1,sx:{backgroundColor:F.bg.surface.sf1,height:"100%",display:"flex",borderRadius:tt.large,mt:A.spacing(4),px:A.spacing(4),pb:A.spacing(4)},children:e.jsx($t,{})}),W&&e.jsx(nt,{open:W,tenantId:o,workspaces:m,allowChangeWorkspace:!0,onClose:()=>N(!1)}),e.jsx(it,{open:_,onClose:()=>I(!1),source:"home-quick-create"}),$&&e.jsx(bt,{open:$,onClose:()=>x(!1),onUseTemplate:async l=>{Y(l),await X(l.id),x(!1)}}),J&&u&&e.jsx(Mt,{open:J,reportTemplateId:u.lastVersion?.id??u.id,reportTemplateName:u.name,isExistChartPipeline:ee,pipelineCharts:ue,onSuccess:(l,y,q)=>
2{if(q===Lt.USE_OWN_DATA){const{pipelineReleaseId:C}=l?.data?.data?.pipelineRelease||{};if(!C)return;t.push({pathname:U(st,{projectId:y,pipelineReleaseId:C,tenantId:o}),state:{fromTemplateDetail:!0,templateName:u.name}})}else{const{id:C}=l?.data?.data?.reportRelease||{};if(!C)return;t.push({pathname:U(ot,{projectId:y,reportTemplateId:u.lastVersion?.id??u.id,templateLogId:C,tenantId:o}),state:{fromTemplateDetail:!0,templateName:u.name}})}},onClose:()=>me(!1)})]})}const yo=vt()(Kt);export{yo 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.