{"version":3,"file":"index-COQ97rmn.js","sources":["../../node_modules/@dropbox/dig-icons/dist/mjs/assets/ui-icon/line/dropbox-replay.js","../../node_modules/@dropbox/dig-illustrations/dist/mjs/spot/traffic-road-blocked.js","../../src/pages/link_disabled_page.tsx","../../src/pages/viewer_page/share_page.tsx","../../src/lib/use_async_error_handler.ts","../../src/pages/access_denied_page.tsx","../../src/pages/viewer_page/create_video_redirect_page_without_onboarding.tsx","../../src/pages/viewer_page/create_video_redirect_page.tsx"],"sourcesContent":["import * as React from 'react';\n/**\n *\n * Original name: Dropbox Replay\n *\n * Figma URL: https://www.figma.com/file/RPY7Gy4EixfwdOtVIf2PaX/_Global---Icons?node-id=23845%3A2798\n *\n */\nexport const DropboxReplayLine = (props) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", fill: \"none\", ...props },\n React.createElement(\"path\", { d: \"M4.95 15.057V8.91L12 3.975v6.099l-2.705 1.918L12 13.893v6.132l-7.05-4.967Zm7.05 0V8.91l7.05-4.935v6.099l-2.705 1.918 2.705 1.901v6.132L12 15.058Z\", fill: \"currentColor\", vectorEffect: \"non-scaling-stroke\" })));\n","// @generated -- This file is automatically synced from dig-illustrations\n// tslint:disable\nimport * as React from 'react';\n/**\n * Render an svg illustration from the illustration library\n *\n * Be sure to include css\n *\n * Original name: traffic road blocked\n *\n * Figma URL: https://www.figma.com/file/knsTCchTBQGLcCWQCXFhTq/_Global---Illustrations?node-id=140%3A89\n *\n */\nexport const TrafficRoadBlockedSpot = ({ altText, inverse, ...rest }) => {\n const classNames = `dig-Illustration dig-Illustration-spot${inverse ? ' dig-Illustration--inverse' : ''}`;\n return (React.createElement(\"svg\", { role: \"presentation\", ...rest, className: classNames, viewBox: \"0 0 500 500\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"title\", null, altText),\n React.createElement(\"path\", { d: \"M83.7 272.2c24.4-2.3 48.5 3.9 72.8 3.4 43.4-2.6 87 0 130.4-3.1 30.9-3.1 62-.3 93-1.4 17.2-.6 34.1-5.4 51.4-1.3 2.6-12.7-.4-26.3-1.4-39.3-1-4 2.4-13.6-3.8-13.3-80.8 3.1-161.6.7-242.2 8.4-25.5 2.4-51.1-1.4-76.6-.8-13 1.5-26.1 1.7-39.2 1.1-5-.2-5.7.5-4.5 5.4 3.1 12.3 1.8 24.8 3 37.2.4 5.8 12.9 2.9 17.1 3.7Zm3.1-90.4c95.3-2.5 190.9 1.5 286.2 2.5 19.1-1.2 38.2-2.6 57.3-3.6 4.1.4 3.4-4.6 3.4-7.3-1.6-12-.7-24.1-1.8-36.1-.5-5.2-.3-5.1-5.4-5-20.9.7-41.7 2.8-62.5 3.4-102.2 2-204.2-4.1-306.4-.7.7 14.1-1.7 26.7.7 40.5.6 9.1 21.6 5.6 28.5 6.3Zm346.1 154.8c-1-8.5-4.7-16.7-2.9-26-120.6-.3-241.1 1.9-361.7 0 8 8.7-1.1 45.8 7.8 43.6 26.9-1.9 53.6 4.4 80.4 3.2 15.4-.3 30.7-2.1 46.2-1.1 75.5.8 151.2.5 226.7-1.4 9.3.9 3.2-13 3.5-18.3Z\", fill: \"#FF8C19\" }),\n React.createElement(\"g\", { fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"M79.3 275.9c9.5-1.3 18.6-1.9 28.3-1.1v.3c2.4-.3 4.8-.4 7.3-.4-8.7-16.3-26.1-26.9-38.1-40.9-4.1-2.6-7.8-12.2-13.4-8.2 4.7 14.3-7.7 54.1 15.9 50.3Zm68.7 43.9c-11.7-14.9-10.7-12-28.9-13-3.4-.3-6.9.1-9.8-1v.5c-13.4 1.6-26.8.9-41.2 3.2 14.6 15.4 31.1 26.8 46.5 41.2 6.7 6 14.3 8.3 22.7 8.6 12.5-1.1 37.1 5 46.1-2.8-11.4-12.8-23.7-24.3-35.4-36.7Zm214.9-47.5c1.4-3.8-2.2-6.5-4.7-9.1-13.5-14-27.5-27.5-41.3-41.2-9-7.4-51.5.1-66.6-1.4-2.1.1-3.8.1-4.5 2.9 15.4 18.3 35.2 32.6 51.8 51.3 18.3-.4 37.3-.1 55.8.4 3.4 0 8 1.2 9.5-2.9Zm-164.4-45.6c-6.2-5.8-23-1-31.9-2.4-12 0-24-.1-36-.1-1.2 0-2.4 1.2-3.8 2 8.7 10.9 18.4 20.6 27.8 30.9 7.1 6.1 12.9 15.6 21.7 18.8 10.6-1.4 61.2 5.3 62.5-4.1-13.6-15.2-26.8-29.9-40.3-45.1ZM93 176.8c1.7 1.9 3 3.8 3.7 6 3.2-.1 6.4.1 9.3 1.3 0-.2-.1-.4-.1-.6 9.8-1.4 47.9 5.9 50.5-1.9-14.7-16.8-29-33.1-43.3-49.4-19.2 2.6-37.6 2.2-57.3 2.8 11.9 15.3 24.4 27.6 37.2 41.8Zm181.3 136.1c-11.7-9.8-52.2-4.3-68.8-2.9-2.5 5 5.4 8.5 7.7 12.3 10.1 10.8 20.2 21.6 30.1 32.4 7.8 5.8 19.5 1.7 28.8 3.1 64.7 1.4 39.4.1 2.2-44.9Zm156.2 34.3c-9.2-13-20.7-23.8-31.5-34.4.2-.9.4-1.9.5-2.8-6.6-1.2-53.8-.6-69.9.2 11.2 15.2 29.4 35.4 43.4 47 5.9-.1 25.5-.4 31-.1 7.5-.8 40.4 4.8 26.5-9.9Zm-34.6-130.6c-6.1.2-15.4-.1-21.2.9-3 .6-6.6-1.6-9.5 1.4 20.6 17.7 40.9 35.3 61.6 53 1.1-.3 3-.9 5.2-1.6 1.8-14-.6-46.5-4-52.8-10.5-.3-21.2-.6-32.1-.9Zm-194.6-41.8c4.5 5.4 9.1 8.3 16.6 8.1 18.6-.7 37.7 2 56.2.6 1.8-4.3-.6-6.2-2.7-8.4-9.3-9.2-18.3-18.6-27.8-27.5-5.8-5.4-9.8-13.6-19.7-13.7-30.5 1.7-37.9-2.4-58.3-.3 11.5 14 24 27.2 35.7 41.2Zm77.2-38.5c15.8 12.7 27.1 30.4 43.2 43.7 5.8 6.4 13.1 3.8 20.6 3.9 6.6-1.3 37.1 3.2 37.6-2.8-49.8-52-15.2-46.2-83.8-47.6-5.7 3.5-23.7 1.9-23.7 1.9 1 1.8 1.8 3.2 2.9 5.3 1.5-1.9 2.3-3.1 3.2-4.4Zm113.8 6.2c11.3 13.1 22.5 26.3 35.5 37.9 9.8 6.5 5.6-12.3 6-17.1-.5-9.1-.9-18.1-1.6-27.2-.3-4.6-1.8-5.7-6.5-5.5-15.5 1.4-31.8-.7-46.8 3.8 3.4 1.1 11.2 3.7 13.4 8.1Z\" }),\n React.createElement(\"path\", { d: \"M395.6 211.8c-1.1-8.8-2.1-17.6-3.6-26.4-.8-4.7-1.4-4.8-7.2-5v36.3l11.1-.1c-.1-1.9-.2-3.3-.3-4.8Zm-286.2 94c2.9 1.1 6.4.7 9.8 1-1.8-11.2-2.4-21.6-4.3-32.1-2.4 0-4.8 0-7.3.4.6 10.6 1.1 20.5 1.8 30.7Zm290.1 4.2c-.3-13.9.8-27.6-2.5-41-6.2-1.7-6.9-1.4-6.8 4.1.2 10.2 1.2 27 .9 36.1l8.4.8Zm-10-178.3c-2.1-9.3 2.8-22.5-11-22.4 0 6.8.4 25.1.4 25.1l10.6-2.7ZM96.7 182.8c2.1 11.3 3.8 42.3 4.3 42.8.1-.4 8.6.1 8.9 0 0 0-1.5-26.6-3.9-41.5-3-1.1-6.1-1.4-9.3-1.3ZM235.5 92c-7.2-8.9-20.8-9.4-26.2 1.6-8.5 12.8-16.6 24.5-21.5 39.5 0 0 21.4 2.3 36.1.8 8.5-8.3 12.1-19.5 10.9-31.5-.9-5.2 3-1.9 5.4-4.4-.6-1-3.8-2.1-4.4-3.2 1.1-.9 4.7-1.8 5.7-2.7-1.9-1.8-6-.1-6-.1Zm-4 4.1c-.8 15-3.4 40.2-24.1 36.9.8-10.6 16.6-15.1 13.5-26.5-4.4 1.9-5.4 6.7-8.3 10.1-4 6.7-9.7 8.6-16 13.3 2.7-.2 4-.2 5.4-.3-2.4 4.2-2.4 4.2-8.2 2.8 5.7-9.2 7.5-20.3 15.2-28.4 2.2-2.3 3.2-5.8 5.1-8.5 4.2-8.1 17.8-12 17.4.6Zm27.7 18.1c2.4 1.6 4.1 3.5 6 .6-1.5-2-3.1-2.7-6-.6Z\" }),\n React.createElement(\"path\", { d: \"M317.9 112.8c-6.9-1.5-13.3 2.3-20.1 3.5-8.1-9.7-20.7-3.5-30.4-9.4-7.6-5.6-14.9 2.1-17.8 8.7 7.5 8.2 10.7 19 22.9 19.9 1.4.2 24.3 2.2 28-5.5 3.2-7.2 11-6 17.3-7.6 6.2-.4 6-8.8.1-9.6Zm-2.4 7c-20.8 1.6-28.1 24.9-48.9 9.5-3.3-2.6-5.9-6.1-8.6-9.5-4.6-5.6 3.2-14.8 9.4-9.2 2.6 2 5.1 2.3 8.2 2.2 5.9.8 16.3-1.2 17.4 7.1-9.3 5.5-14.3 2.8-21.6-4.3-2.8 10.8 18.5 12.7 24.8 7.7 4.9-2 16.6-10.2 21.2-7.1 1.3 1.7 0 3-1.9 3.6Zm126.8 288.4c-12-.3-23.5 2-34.6-.3-1.2-17-2.5-33.5-3.7-50.9l-8.1-.2s3.6 34.4 1.5 51.4c-15.5-3.1-30.3-.1-45.3 1.2 2.6 5.1 3.1 5.9 8.4 4.6 10.9-3.1 21.5-2 32.5-.3 17.4.4 33.6 1.4 51.2.5-.7-2-1.3-3.9-1.9-6Zm-315.4-1c-2.2 0-4.5-.1-6.9-.2-3.4-17.6 0-34.6-3.1-51.7-1.5-.2-3.1-.4-5.3-.7.1 18.2-.4 34.4 1.2 52.6-15.9 1-31.1 1.9-46.2 2.8 0 .4-.1.9-.1 1.3 14 5.9 30.4.1 45.3 1.1 18.6-.5 35.9.3 54.6-.6-12.4-8.8-25.8-3.2-39.5-4.6ZM224.5 92c-1.3 2 0 3.5 3.6 2.1.7-2-2.4-4.1-3.6-2.1ZM89.8 134.2c4.5.1 8.9-.1 13.4-1.1h-.2c-4.5-7.9 1.8-22.6-11.9-20.3-3 6.6-.9 13.9-.7 21.3-.1.1-.3.1-.6.1Z\" }))));\n};\n","import {useIntl} from 'react-intl';\nimport styled from 'styled-components';\n\nimport {Text, Title} from '@dropbox/dig-components/typography';\nimport {TrafficRoadBlockedSpot} from '@dropbox/dig-illustrations/spot/traffic-road-blocked';\n\nimport {Page} from './components/page';\n\nconst Wrapper = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n left: 0;\n bottom: 10%;\n top: 0;\n right: 0;\n`;\n\nconst ImageWrapper = styled.div`\n width: 350px;\n height: 250px;\n`;\n\nconst DescriptionWrapper = styled.div`\n width: 350px;\n text-align: center;\n`;\n\nexport const LinkDisabledPage = () => {\n const intl = useIntl();\n\n const title = intl.formatMessage({\n defaultMessage: 'This link can no longer be accessed',\n id: 'i8Fy5F',\n description:\n 'Title that shows under the illustration on the link disabled page when there the share link as been disabled.',\n });\n\n return (\n <Page title={title}>\n <Wrapper>\n <ImageWrapper>\n <TrafficRoadBlockedSpot inverse />\n </ImageWrapper>\n <DescriptionWrapper>\n <Title size=\"large\">{title}</Title>\n <Text size=\"large\" tagName=\"p\" variant=\"paragraph\">\n {intl.formatMessage({\n defaultMessage: 'Try requesting access from the owner.',\n id: 'ZN9a5g',\n description:\n 'Subtitle for the illustration on the link disabled page prompting the user to request access again.',\n })}{' '}\n </Text>\n </DescriptionWrapper>\n </Wrapper>\n </Page>\n );\n};\n","import React from 'react';\n\nimport {useSetAtom} from 'jotai';\nimport {Navigate, useNavigate, useParams} from 'react-router';\nimport styled from 'styled-components';\n\nimport {Spinner} from '@dropbox/dig-components/progress_indicators';\n\nimport {useGrantBook} from '~/components/password_cache_provider';\nimport {CopyLinkSnackbar} from '~/components/share_modal/copy_link_snackbar';\nimport {viewPreviousCommentsDisabledAtom} from '~/components/share_modal/share_state';\nimport {\n logView,\n MediaType,\n ShareLinkDisabledError,\n ShareLinkLoggedOutAccessDisabledError,\n ShareLinkNotAuthedError,\n} from '~/lib/api';\nimport {queryGetVideoFromShortLinkData, useGetVideoFromShortLinkQuery} from '~/lib/api_queries';\nimport {getCurrentUser} from '~/lib/client';\nimport {useMatchesTutorialsRoute} from '~/lib/onboarding_v2/use_matches_tutorials_route';\nimport {queryClient} from '~/lib/query_client';\nimport {getInitialVersionId, VERSION_ID_QUERY_STRING_KEY} from '~/lib/url_utils';\nimport {getCurrentUserPermissions} from '~/lib/utils';\nimport type {SharePageRouteParams} from '~/route_path_matches';\nimport {isInExtension} from '~/use_extensions';\n\nimport {PageContentContainer} from './components/page_content_container';\nimport {ViewerPageHeader} from './viewer_page_header';\nimport {ViewerPageLoggingProvider} from './viewer_page_logging_context';\nimport {Page} from '../components/page';\nimport {ErrorPage} from '../error_page';\nimport {SigninPage} from '../landing_page/landing_page';\nimport {LoadingViewerPageHeader} from '../layout/components/common_header';\nimport {LinkDisabledPage} from '../link_disabled_page';\nimport {SyncCollabProvider} from '../viewer_page/components/sync_collab/shared_state';\nimport {VersionsAwareSharePageProvider} from '../viewer_page/components/versions_context';\nimport {VersionsAwareViewerPageContent} from '../viewer_page/viewer_page_content';\n\nconst Centered = styled.div`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n width: 100%;\n`;\n\nexport const SharePage = () => {\n const {shareToken, videoId} = useParams() as SharePageRouteParams;\n const {hasLoggedOutError} = useMatchesTutorialsRoute();\n const setViewPreviousCommentsDisabled = useSetAtom(viewPreviousCommentsDisabledAtom);\n\n const grantBook = useGrantBook(shareToken);\n const initialVersionId = getInitialVersionId();\n const sharedVideoInfoQuery = useGetVideoFromShortLinkQuery({\n grantBook,\n shareToken,\n videoId,\n videoVersionId: initialVersionId,\n });\n\n const navigate = useNavigate();\n\n const videoFetcher = React.useCallback(\n async (videoVersionId: string) => {\n const result = await queryGetVideoFromShortLinkData(queryClient, {\n grantBook,\n shareToken,\n videoId,\n videoVersionId,\n });\n return result.video;\n },\n [grantBook, shareToken, videoId],\n );\n\n const projectNavigator = React.useCallback(\n async (mediaId: string, versionId?: string): Promise<null> => {\n if (mediaId != videoId) {\n const params = new URLSearchParams(window.location.search);\n if (versionId) {\n params.set(VERSION_ID_QUERY_STRING_KEY, versionId);\n } else {\n params.delete(VERSION_ID_QUERY_STRING_KEY);\n }\n // Use history.replace to update the URL without adding a new entry to the history stack\n navigate(`/share-folder/${shareToken}/video/${mediaId}?${params.toString()}`);\n }\n return null;\n },\n [navigate, shareToken, videoId],\n );\n\n React.useEffect(() => {\n const result = sharedVideoInfoQuery.data;\n if (result) {\n setViewPreviousCommentsDisabled(result.viewPreviousCommentsDisabled);\n logView(result.video.videoId);\n }\n }, [setViewPreviousCommentsDisabled, sharedVideoInfoQuery.data]);\n\n if (sharedVideoInfoQuery.error instanceof ShareLinkNotAuthedError) {\n return (\n <Navigate\n to={{\n pathname: '/pw',\n search: `?for=${encodeURIComponent(\n window.location.href.replace(window.location.origin, ''),\n )}`,\n }}\n />\n );\n }\n\n const sharedVideoInfo = sharedVideoInfoQuery.data;\n if (sharedVideoInfo) {\n if (\n ['owner', 'admin', 'reviewer', 'super_admin'].includes(\n sharedVideoInfo.video.accessLevel || '',\n )\n ) {\n const newUrl = `/project/${sharedVideoInfo.video.projectId}/video/${sharedVideoInfo.video.videoId}`;\n return <Navigate to={newUrl} />;\n }\n\n const areCommentsEnabled = sharedVideoInfo.showComments;\n const areDownloadsEnabled = sharedVideoInfo.downloadsEnabled;\n const isWatermarked =\n sharedVideoInfo.video.mediaType === 'video' && sharedVideoInfo.video.isWatermarked;\n\n const {isOwner, canEdit} = getCurrentUserPermissions(\n sharedVideoInfo.video.accessLevel || 'none',\n sharedVideoInfo.video.ownerUid,\n );\n\n const routeName = videoId && shareToken ? 'share-folder' : 'share-video';\n const backToUrl =\n routeName === 'share-folder'\n ? `/share-folder/${shareToken}/folder/${sharedVideoInfo.video.folderId}`\n : !getCurrentUser() && routeName === 'share-video' // Logged out users viewing a video link have nowhere to go back to\n ? null\n : `/shared`;\n const videoIdentifier = videoId\n ? {\n type: 'video_id' as const,\n shareToken,\n videoId,\n }\n : {\n type: 'video_token' as const,\n videoToken: shareToken,\n };\n\n const webContent = (\n <Page title={sharedVideoInfo.video.projectName}>\n <ViewerPageHeader\n areCommentsEnabled={areCommentsEnabled}\n backToUrl={backToUrl}\n hasEditAccess={canEdit}\n showDownloadsInHeader={areDownloadsEnabled}\n viewOnlyProjectMember={sharedVideoInfo.video.accessLevel === 'reviewer'}\n />\n <PageContentContainer sidebarOpen={false}>\n <VersionsAwareViewerPageContent areCommentsEnabled={areCommentsEnabled} />\n </PageContentContainer>\n </Page>\n );\n\n const integrationContent = (\n <VersionsAwareViewerPageContent areCommentsEnabled={areCommentsEnabled} />\n );\n\n const showContextMenu = isOwner || sharedVideoInfo.video.accessLevel === 'admin';\n const showDownloadButton =\n sharedVideoInfo.downloadsEnabled ||\n isOwner ||\n sharedVideoInfo.video.accessLevel === 'reviewer';\n\n return (\n <ViewerPageLoggingProvider\n accessType=\"other\"\n isCurrentUserOwner={isOwner}\n isWatermarkSharePage={isWatermarked}\n mediaType={sharedVideoInfo.video.mediaType || MediaType.Video}\n pageSource={routeName === 'share-video' ? 'share_page' : 'share_folder_video_page'}\n videoId={sharedVideoInfo.video.videoIdForAmplitude}\n >\n <VersionsAwareSharePageProvider\n areVersionsEnabled={areCommentsEnabled}\n downloadsEnabled={showDownloadButton}\n grantBook={grantBook}\n initialVersionInfo={sharedVideoInfo.video}\n projectId={sharedVideoInfo.video.projectId}\n projectNavigator={projectNavigator}\n shareToken={shareToken}\n showContextMenu={showContextMenu}\n videoIdentifier={videoIdentifier}\n videoVersionFetcher={videoFetcher}\n >\n <SyncCollabProvider>\n {isInExtension() ? integrationContent : webContent}\n </SyncCollabProvider>\n <CopyLinkSnackbar />\n </VersionsAwareSharePageProvider>\n </ViewerPageLoggingProvider>\n );\n }\n\n if (sharedVideoInfoQuery.error instanceof ShareLinkDisabledError) {\n return <LinkDisabledPage />;\n }\n\n if (\n sharedVideoInfoQuery.error instanceof ShareLinkLoggedOutAccessDisabledError ||\n hasLoggedOutError\n ) {\n return <SigninPage />;\n }\n\n if (sharedVideoInfoQuery.error) {\n return (\n <ErrorPage\n errorToReport={\n new Error(`Failed to fetch shared video info: ${sharedVideoInfoQuery.error}`)\n }\n />\n );\n }\n\n // Before the video loads, show only the header with skeleton components\n // where text would be and help link\n const backButtonStyle = Boolean(getCurrentUser()) ? 'chevron' : 'logo';\n return (\n <>\n <LoadingViewerPageHeader backButtonStyle={backButtonStyle} />\n <Centered>\n <Spinner monochromatic />\n </Centered>\n </>\n );\n};\n","import React from 'react';\n\n// h/t https://medium.com/trabe/catching-asynchronous-errors-in-react-using-error-boundaries-5e8a5fd7b971\nexport const useAsyncErrorHandler = () => {\n const [_, setError] = React.useState();\n return React.useCallback((e: Error) => {\n setError(() => {\n throw e;\n });\n }, []);\n};\n","import React from 'react';\n\nimport {useIntl} from 'react-intl';\n\nimport {TrafficRoadBlockedSpot} from '@dropbox/dig-illustrations/spot/traffic-road-blocked';\n\nimport {Button} from '~/components/button';\nimport {ErrorPageLayout} from '~/pages/components/error_page_layout';\n\nimport {Page} from './components/page';\n\nexport const AccessDeniedPage = () => {\n const home = React.useCallback(() => {\n window.location.assign('/');\n }, []);\n\n const intl = useIntl();\n\n const title = intl.formatMessage({\n defaultMessage: 'Error (400)',\n id: 'KcEBKr',\n description:\n 'Title that shows under the illustration on the error page when the user tries to import a file that doesnʼt exist or one they donʼt have access to',\n });\n\n const summary = intl.formatMessage(\n {\n defaultMessage:\n 'We canʼt find the file youʼre looking for. {br}Try logging in to a different account or getting permission to view the file.',\n id: 'AB1ESY',\n description:\n 'Summary text that shows under the illustration on the error page when the user tries to import a file that doesnʼt exist or one they donʼt have access to',\n },\n {\n br: <br />,\n },\n );\n\n return (\n <Page title={title}>\n <ErrorPageLayout\n actionButton={\n <Button onClick={home} variant=\"primary\">\n {intl.formatMessage({\n defaultMessage: 'Back',\n id: 'j2dg3m',\n description:\n 'Text for button prompting user to go back when they try to import a file that doesnʼt exist or one they donʼt have access to.',\n })}\n </Button>\n }\n illustration={<TrafficRoadBlockedSpot />}\n summaryText={summary}\n titleText={title}\n />\n </Page>\n );\n};\n","import React from 'react';\n\nimport {useIntl} from 'react-intl';\nimport {useLocation, useNavigate, useParams} from 'react-router';\nimport styled from 'styled-components';\n\nimport type {reel} from '@dropbox/api-v2-client';\nimport {Spinner} from '@dropbox/dig-components/progress_indicators';\nimport {UIIcon} from '@dropbox/dig-icons';\nimport {DropboxReplayLine} from '@dropbox/dig-icons/assets';\n\nimport {createProject} from '~/lib/api';\nimport {SurfaceType} from '~/lib/logging/logger_types';\nimport {useExceededFileQuota} from '~/lib/provisions';\nimport {static_url} from '~/lib/static_urls';\nimport {useAsyncErrorHandler} from '~/lib/use_async_error_handler';\nimport {useLoggingClient} from '~/lib/use_logging_client';\nimport {useReelProvisioningEnabled} from '~/lib/utils';\n\nimport {AccessDeniedPage} from '../access_denied_page';\n\nconst PageContainer = styled.div`\n display: flex;\n height: 100%;\n width: 100%;\n overflow: hidden;\n @media screen and (max-width: 1024px) {\n height: auto;\n flex-direction: column;\n overflow: visible;\n }\n`;\n\nconst MainContent = styled.div`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n @media screen and (max-width: 1024px) {\n flex-direction: column;\n }\n`;\n\nconst LoadingWrapper = styled.div`\n align-items: left;\n display: flex;\n flex-direction: column;\n margin-right: var(--dig-spacing__dimension__76);\n @media screen and (max-width: 1024px) {\n margin-bottom: var(--dig-spacing__micro__small);\n }\n`;\n\nconst LogoLine = styled.p`\n font-family: var(--type__title__small--fontfamily);\n font-size: var(--type__title__small--fontsize);\n color: var(--dig-color__text__subtle);\n align-items: center;\n display: flex;\n margin-bottom: var(--dig-spacing__macro__small);\n margin-top: 0;\n`;\n\nconst LogoStrong = styled.strong`\n margin-right: var(--dig-spacing__micro__xsmall);\n background: var(--dig-color__background__base);\n`;\n\nconst H1Line = styled.p`\n font-family: var(--type__title__standard--fontfamily);\n font-size: var(--type__title__standard--fontsize);\n color: var(--dig-color__text__base);\n margin: 0;\n`;\n\nconst LowerLine = styled.p`\n font-family: var(--type__body__standard--fontfamily);\n font-size: var(--type__body__standard--fontsize);\n color: var(--dig-color__text__subtle);\n margin-top: var(--dig-spacing__micro__small);\n margin-bottom: var(--dig-spacing__macro__small);\n`;\n\ntype CreateVideoRouteWithoutOnboardingParams = {\n fileId: string;\n};\n\nlet createdPage = false;\n\nexport const CreateVideoRedirectPageWithoutOnboarding = () => {\n const {fileId: encodedFileId} = useParams() as CreateVideoRouteWithoutOnboardingParams;\n const fileId = decodeURIComponent(encodedFileId);\n const navigate = useNavigate();\n const location = useLocation();\n const params = new URLSearchParams(location.search);\n const creationSource = params.get('creationSource') ?? 'dropbox_web';\n const variant = params.get('variant');\n const mediaType = params.get('media_type');\n const fileQuotaExceeded = useExceededFileQuota();\n const provisionsEnabled = useReelProvisioningEnabled();\n const [permissionsError, setPermissionsError] = React.useState<Error | undefined>();\n\n const loggingClient = useLoggingClient({surface: SurfaceType.CreateVideo});\n\n const src = `/static/images/reel/create_video_no_onboarding.png`;\n\n const intl = useIntl();\n\n // // TODO(mattpletcher): add PAP logging\n // React.useEffect(() => {\n // loggingClient.logEvent('shown_reel_page', {\n // reel_page_source: 'create_video_redirect_page_without_onboarding',\n // access_type: 'owner',\n // email_campaign_id: 0,\n // referrer: getReferrer() || '',\n // red_carpet_mode: redCarpet.mode,\n // });\n // }, [loggingClient, redCarpet.mode]);\n\n const throwAsyncError = useAsyncErrorHandler();\n\n React.useEffect(() => {\n if (!createdPage) {\n createdPage = true;\n if (provisionsEnabled && fileQuotaExceeded) {\n // Browse page has a banner that shows that the user has exceeded their file quota.\n navigate('/');\n return;\n }\n (async () => {\n let result: reel.CreateProjectResult | undefined = undefined;\n\n try {\n result = await createProject({\n id: fileId,\n name: '',\n creationSource,\n excludeXmp: false,\n });\n } catch (e) {\n // Continue\n }\n\n try {\n if (!result) {\n // Retry without xmp metadata\n result = await createProject({\n id: fileId,\n name: '',\n creationSource,\n excludeXmp: true,\n });\n }\n } catch (e) {\n if (e.status === 400) {\n setPermissionsError(e);\n return;\n }\n }\n\n if (result) {\n const projectId = result.project_id;\n const videoId = result.video_id;\n\n const experimentParams =\n variant === 'v1' && mediaType !== '' ? `&variant=v1&media_type=${mediaType}` : '';\n\n setTimeout(function () {\n navigate(\n `/project/${projectId}/video/${videoId}?bypass_onboarding=true&plg_exp_1=true${experimentParams}`,\n );\n }, 2000);\n } else {\n throwAsyncError(new Error('Creating video failed'));\n }\n })();\n }\n }, [\n creationSource,\n fileId,\n fileQuotaExceeded,\n navigate,\n loggingClient,\n mediaType,\n provisionsEnabled,\n throwAsyncError,\n variant,\n ]);\n\n if (permissionsError) {\n return <AccessDeniedPage />;\n }\n\n return (\n <PageContainer>\n <MainContent>\n <LoadingWrapper>\n <LogoLine>\n <UIIcon src={DropboxReplayLine} />\n <LogoStrong>\n {intl.formatMessage({\n defaultMessage: 'Dropbox',\n id: '0RaDat',\n description: 'The name Dropbox, used as a part of a logo with Replay',\n })}\n </LogoStrong>\n {intl.formatMessage({\n defaultMessage: 'Replay',\n id: '5HeGu/',\n description: 'The name Replay, used as a part of a logo with Dropbox',\n })}\n </LogoLine>\n <H1Line>\n {intl.formatMessage({\n defaultMessage: 'Adding file to Replay...',\n id: 'CSg6bS',\n description:\n 'Text shown to a user while their file is being added to a project in Dropbox Replay',\n })}\n </H1Line>\n <LowerLine>\n {intl.formatMessage({\n defaultMessage: \"This won't count towards your storage cap\",\n id: 'teRNN+',\n description:\n \"Informs the user that this Replay project won't use additional storage quota from their Dropbox account.\",\n })}\n </LowerLine>\n <Spinner />\n </LoadingWrapper>\n <img\n alt=\"\"\n height=\"358\"\n src={static_url(src)}\n style={{maxWidth: '100%', height: 'auto'}}\n width=\"572\"\n />\n </MainContent>\n </PageContainer>\n );\n};\n","import React, {useState} from 'react';\n\nimport {useLocation, useNavigate, useParams} from 'react-router';\nimport styled from 'styled-components';\n\nimport type {reel} from '@dropbox/api-v2-client';\nimport {Spinner} from '@dropbox/dig-components/progress_indicators';\nimport {Text} from '@dropbox/dig-components/typography';\n\nimport {useExtensionContext} from '~/components/extension_context';\nimport {\n useOnboardingContext,\n useShouldBypassOnboarding,\n} from '~/components/onboarding_v2/onboarding_provider';\nimport type {AddMediaClickSourceType} from '~/lib/logging/logger_types';\nimport {mapMediaTypeToLoggingType, SurfaceType} from '~/lib/logging/logger_types';\nimport {useOnboardingChecklist} from '~/lib/onboarding_v2/use_onboarding_checklist';\nimport {hasCompletedAnyPreviousOnboardingActions} from '~/lib/onboarding_v2/utils';\nimport {getReferrer, useReelProvisioningEnabled} from '~/lib/utils';\n\nimport {CreateVideoRedirectPageWithoutOnboarding} from './create_video_redirect_page_without_onboarding';\nimport type {MediaType} from '../../lib/api';\nimport {convertReelMediaTypeToMediaType, createProject} from '../../lib/api';\nimport {useExceededFileQuota} from '../../lib/provisions';\nimport {useAsyncErrorHandler} from '../../lib/use_async_error_handler';\nimport {useLoggingClient} from '../../lib/use_logging_client';\nimport {AccessDeniedPage} from '../../pages/access_denied_page';\n\nconst PageContainer = styled.div`\n display: flex;\n height: 100%;\n width: 100%;\n overflow: hidden;\n @media screen and (max-width: 1024px) {\n height: auto;\n flex-direction: column;\n overflow: visible;\n }\n`;\n\nconst MainContent = styled.div`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n`;\n\nconst LoadingWrapper = styled.div`\n align-items: center;\n display: flex;\n flex-direction: column;\n`;\n\ntype CreateVideoRouteParams = {\n fileId: string;\n};\n\nexport const CreateVideoRedirectPage = () => {\n const shouldBypassOnboarding = useShouldBypassOnboarding();\n if (shouldBypassOnboarding) {\n return CreateVideoRedirectPageWithoutOnboarding();\n }\n return CreateVideoRedirectPageComponent();\n};\n\nconst CreateVideoRedirectPageComponent = () => {\n const {fileId: encodedFileId} = useParams() as CreateVideoRouteParams;\n const fileId = decodeURIComponent(encodedFileId);\n const navigate = useNavigate();\n const location = useLocation();\n const params = new URLSearchParams(location.search);\n const creationSource = params.get('creationSource') ?? 'dropbox_web';\n const fileQuotaExceeded = useExceededFileQuota();\n const provisionsEnabled = useReelProvisioningEnabled();\n const {redCarpet} = useExtensionContext();\n const [permissionsError, setPermissionsError] = React.useState<Error | undefined>();\n\n const {onboardingActions} = useOnboardingContext();\n const [projectResult, setProjectResult] = useState<reel.CreateProjectResult>();\n\n const loggingClient = useLoggingClient({surface: SurfaceType.CreateVideo});\n const {handleSetOnboardingTypeByMediaType} = useOnboardingChecklist({\n // eslint-disable-next-line deprecation/deprecation\n logEvent: loggingClient.logEvent.bind(loggingClient),\n });\n\n React.useEffect(() => {\n // eslint-disable-next-line deprecation/deprecation\n loggingClient.logEvent('shown_reel_page', {\n reel_page_source: 'create_video_redirect_page',\n access_type: 'owner',\n email_campaign_id: 0,\n referrer: getReferrer() || '',\n red_carpet_mode: redCarpet.mode,\n });\n }, [loggingClient, redCarpet.mode]);\n\n const throwAsyncError = useAsyncErrorHandler();\n\n React.useEffect(() => {\n if (provisionsEnabled && fileQuotaExceeded) {\n // Browse page has a banner that shows that the user has exceeded their file quota.\n // Ideally we would want to show an error page, but that would introduce new strings that need localization.\n navigate('/');\n return;\n }\n (async () => {\n let result: reel.CreateProjectResult | undefined = undefined;\n\n try {\n result = await createProject({\n id: fileId,\n name: '',\n creationSource,\n excludeXmp: false,\n });\n } catch (e) {\n // Continue\n }\n\n try {\n if (!result) {\n // Retry without xmp metadata\n result = await createProject({\n id: fileId,\n name: '',\n creationSource,\n excludeXmp: true,\n });\n }\n } catch (e) {\n if (e.status === 400) {\n setPermissionsError(e);\n return;\n }\n }\n\n if (result) {\n setProjectResult(result);\n const clickSource = creationSource as AddMediaClickSourceType;\n // eslint-disable-next-line deprecation/deprecation\n loggingClient.logEvent('create_reel_media', {\n click_source: clickSource,\n media_source: 'dropbox',\n folder_level: 1,\n media_type: result.media_type\n ? mapMediaTypeToLoggingType(convertReelMediaTypeToMediaType(result.media_type))\n : 'unknown',\n is_multiple: 'false',\n is_onboarding_upload_step: 'false',\n });\n\n const projectId = result.project_id;\n const videoId = result.video_id;\n if (clickSource === 'dropbox_share_action') {\n navigate(`/project/${projectId}/video/${videoId}?open_share=true`);\n } else {\n navigate(`/project/${projectId}/video/${videoId}`);\n }\n } else {\n throwAsyncError(new Error('Creating video failed'));\n }\n })();\n }, [\n creationSource,\n fileId,\n fileQuotaExceeded,\n navigate,\n loggingClient,\n provisionsEnabled,\n throwAsyncError,\n ]);\n\n // pulling this out so we don't call `createProject` more than we need to\n React.useEffect(() => {\n if (projectResult && onboardingActions) {\n const {has_completed_onboarding_v2, onboarding_v2_type} = onboardingActions;\n const onboardingType = onboarding_v2_type && onboarding_v2_type['.tag'];\n const media_type =\n projectResult.media_type && projectResult.media_type?.['.tag'] !== 'other'\n ? projectResult.media_type?.['.tag']\n : 'unknown';\n\n if (\n media_type !== 'unknown' &&\n !has_completed_onboarding_v2 &&\n onboardingType === 'not_set' &&\n !hasCompletedAnyPreviousOnboardingActions(onboardingActions)\n ) {\n handleSetOnboardingTypeByMediaType(media_type as MediaType);\n }\n }\n }, [handleSetOnboardingTypeByMediaType, projectResult, onboardingActions]);\n\n if (permissionsError) {\n return <AccessDeniedPage />;\n }\n\n return (\n <PageContainer>\n <MainContent>\n <LoadingWrapper>\n <Spinner />\n <p>\n <Text>{'Adding your media file to Replay'}</Text>\n </p>\n </LoadingWrapper>\n </MainContent>\n </PageContainer>\n );\n};\n"],"names":["DropboxReplayLine","props","React.createElement","TrafficRoadBlockedSpot","altText","inverse","rest","classNames","Wrapper","styled","ImageWrapper","DescriptionWrapper","LinkDisabledPage","intl","useIntl","title","jsx","Page","jsxs","Title","Text","Centered","SharePage","shareToken","videoId","useParams","hasLoggedOutError","useMatchesTutorialsRoute","setViewPreviousCommentsDisabled","useSetAtom","viewPreviousCommentsDisabledAtom","grantBook","useGrantBook","initialVersionId","getInitialVersionId","sharedVideoInfoQuery","useGetVideoFromShortLinkQuery","navigate","useNavigate","videoFetcher","React","videoVersionId","queryGetVideoFromShortLinkData","queryClient","projectNavigator","mediaId","versionId","params","VERSION_ID_QUERY_STRING_KEY","result","logView","ShareLinkNotAuthedError","Navigate","sharedVideoInfo","newUrl","areCommentsEnabled","areDownloadsEnabled","isWatermarked","isOwner","canEdit","getCurrentUserPermissions","routeName","backToUrl","getCurrentUser","videoIdentifier","webContent","ViewerPageHeader","PageContentContainer","VersionsAwareViewerPageContent","integrationContent","showContextMenu","showDownloadButton","ViewerPageLoggingProvider","MediaType","VersionsAwareSharePageProvider","SyncCollabProvider","isInExtension","CopyLinkSnackbar","ShareLinkDisabledError","ShareLinkLoggedOutAccessDisabledError","SigninPage","ErrorPage","backButtonStyle","Fragment","LoadingViewerPageHeader","Spinner","useAsyncErrorHandler","_","setError","e","AccessDeniedPage","home","summary","ErrorPageLayout","Button","PageContainer","MainContent","LoadingWrapper","LogoLine","LogoStrong","H1Line","LowerLine","createdPage","CreateVideoRedirectPageWithoutOnboarding","encodedFileId","fileId","location","useLocation","creationSource","variant","mediaType","fileQuotaExceeded","useExceededFileQuota","provisionsEnabled","useReelProvisioningEnabled","permissionsError","setPermissionsError","loggingClient","useLoggingClient","SurfaceType","src","throwAsyncError","createProject","projectId","experimentParams","UIIcon","static_url","CreateVideoRedirectPage","useShouldBypassOnboarding","CreateVideoRedirectPageComponent","redCarpet","useExtensionContext","onboardingActions","useOnboardingContext","projectResult","setProjectResult","useState","handleSetOnboardingTypeByMediaType","useOnboardingChecklist","getReferrer","clickSource","mapMediaTypeToLoggingType","convertReelMediaTypeToMediaType","has_completed_onboarding_v2","onboarding_v2_type","onboardingType","media_type","_a","_b","hasCompletedAnyPreviousOnboardingActions"],"mappings":"iqCAQO,MAAMA,GAAqBC,GAAWC,EAAmB,cAAC,MAAO,CAAE,QAAS,YAAa,KAAM,OAAQ,GAAGD,CAAO,EACpHC,gBAAoB,OAAQ,CAAE,EAAG,oJAAqJ,KAAM,eAAgB,aAAc,oBAAsB,CAAA,CAAC,ECIxOC,EAAyB,CAAC,CAAE,QAAAC,EAAS,QAAAC,EAA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