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ACvDG,EAAAA,EAAAA,GAAA,wBACmB,CAAC,iBAEpBA,EAAAA,EAAAA,GAAA,mBACc,CACVwJ,cAAe,CAAEC,SAAS,GAC1BC,SAAU,CAAED,SAAS,GACrBE,MAAO,CAAEF,SAAS,GAClBG,UAAW,CAAEH,SAAS,GACtBI,wBAAyB,CAAEJ,SAAS,GACpCK,aAAc,CAAEL,SAAS,EAAMM,KAAM,aAGzC/J,EAAAA,EAAAA,GAAA,eACUgK,EAAAA,cAEVhK,EAAAA,EAAAA,GAAA,mBACc,iCAEdA,EAAAA,EAAAA,GAAA,4BACqC,yBAAwB,CAG7D,6BAAMiK,CACFC,GAEA,MAAMvJ,EAAUH,KAAK2J,MAAMC,QAAQ5J,KAAK2D,aACpCkG,EAAsC,GACtCC,EAAkBJ,EAA4BK,UAE5CC,QAA0BzF,QAAQ0F,IAAIH,EAAgBI,KAAKC,GAAUA,EAAMhK,WAEjF,IAAK,IAAIiK,EAAI,EAAGA,EAAIN,EAAgBlG,OAAQwG,IAAK,CAC7C,MAAMC,EAAcP,EAAgBM,GAChCE,EAAeN,EAAkBI,GACjCG,EAAoBD,EAAa1G,OACjC4G,EAAuC,GAE3C,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAmBE,IAAK,CACxC,MAAMvK,EAASoK,EAAaI,SAASD,GACjCE,EAAuBxK,EAAQC,OAAO,KAAMF,aAAM,EAANA,EAAQ0K,IAEpDD,GACAH,EAAuBK,WAAWF,EAE1C,CAKAN,EAAYlK,QAAUqK,EAAuBM,SAAS9K,KAAK+K,sBAEvDV,EAAYlK,QAAQyD,QACpBiG,EAAqB9B,KAAKsC,EAElC,CAEA,OAAOR,CACX,E","sources":["./components/modals/video/download-clip/base-sd-card.ts","./components/modals/video/download-clip/sd-card-clip/index.hbs","./components/modals/video/download-clip/sd-card-clip/index.ts","./components/modals/video/download-clip/sd-card-thumbnails/index.hbs","./components/modals/video/download-clip/sd-card-thumbnails/index.ts","./components/video/video-player/playback-features/sd-playback-features/index.ts","./video/onboard/controller.ts","./video/onboard/route.ts"],"sourcesContent":["import { action } from '@ember/object';\nimport { reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { SDCard } from 'customer-site/enums/ClipExportType';\nimport BaseVideoClipExportModal from './base-export';\n\nimport type SdCardCamera from 'customer-site/models/video/devices/sd-card-camera';\nimport type AjaxService from 'customer-site/services/ajax';\nimport type { ClipExportModel, BaseVideoClipExportModalArgs } from './base-export';\n\nexport interface BaseSdCardDownloadModalArgs extends BaseVideoClipExportModalArgs {\n model: ClipExportModel;\n}\n\n/**\n * @classdesc\n * Displays a modal date time picker object with options for SD card download.\n */\nexport default abstract class BaseSdCardDownloadModal extends BaseVideoClipExportModal {\n @service declare ajax: AjaxService;\n\n clipExportType = SDCard;\n\n /**\n * Get download URL for this modal to handle.\n */\n abstract getDownloadUrl(\n camera: SdCardCamera,\n ajax: AjaxService,\n selectedDate: Date,\n duration: number,\n includeAudio: boolean\n ): Promise<{ value: string }>;\n\n @reads('clipDownloader.sdCardDownloadTaskInfo.isRunning')\n declare isDownloadTaskRunning: boolean;\n\n @reads('clipUploader.sdUploadTaskInfo.isRunning')\n declare isUploadClipTaskRunning: boolean;\n\n @action requestDownloadUrls(): Promise<{ value: string }> {\n return (async () => {\n const { model } = this.args,\n camera = model.cameras.findBy('id', this.selectedCameraId);\n\n return camera\n ? await this.getDownloadUrl(\n camera,\n this.ajax,\n this.selectedDateTime ?? model.defaultDate ?? new Date(),\n this.duration,\n this.includeAudio\n )\n : { value: '' };\n })();\n }\n\n @action uploadVideoClips(): Promise<{ metaData: { UploadClipStatus: boolean } }> {\n throw 'uploadVideoClips is not implemented.';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: We have to stop using this date picker, it stinks. }}\\n\\n <:warning>\\n \\n \\n\\n <:options-above>\\n \\n \\n\\n <:options-below>\\n \\n\\n {{#if this.isClipDownload}}\\n \\n {{/if}}\\n\\n {{#if this.supportsAudioDownload}}\\n \\n {{/if}}\\n \\n\",{ moduleName: \"customer-site/components/modals/video/download-clip/sd-card-clip/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { intlPath } from '@adc/i18n/path';\nimport BaseSdCardDownload from '../base-sd-card';\n\nimport type SdCardCamera from 'customer-site/models/video/devices/sd-card-camera';\nimport type AjaxService from 'customer-site/services/ajax';\n\n/**\n * @classdesc\n * Displays a modal date time picker object with options for SD card clip download.\n */\n@intlPath({ path: 'modals/video/download-clip/sd-card-clip' })\nexport default class SdCardClipDownload extends BaseSdCardDownload {\n getDownloadUrl(\n camera: SdCardCamera,\n ajax: AjaxService,\n selectedDate: Date,\n duration: number,\n includeAudio: boolean\n ): Promise<{ value: string }> {\n return camera.getClipDownloadUrl(ajax, selectedDate, duration, includeAudio);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: We have to stop using this date picker, it stinks. }}\\n\\n <:warning>\\n \\n \\n\\n <:options-above>\\n \\n \\n\\n <:options-below>\\n \\n \\n\",{ moduleName: \"customer-site/components/modals/video/download-clip/sd-card-thumbnails/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { action } from '@ember/object';\nimport { intlPath } from '@adc/i18n/path';\nimport BaseSdCardDownload from '../base-sd-card';\n\nimport type SdCardCamera from 'customer-site/models/video/devices/sd-card-camera';\nimport type AjaxService from 'customer-site/services/ajax';\n\n/**\n * @classdesc\n * Displays a modal date time picker object with options for SD card thumbnails download.\n */\n@intlPath({ path: 'modals/video/download-clip/sd-card-thumbnails' })\nexport default class SdCardThumbnailsDownload extends BaseSdCardDownload {\n /** @override */\n protected getTranslation(key: string): string {\n return this.intl.tc(this, key);\n }\n\n @action getDownloadUrl(\n camera: SdCardCamera,\n ajax: AjaxService,\n selectedDate: Date,\n duration: number\n ): Promise<{ value: string }> {\n return camera.getThumbnailsDownloadUrl(ajax, selectedDate, duration);\n }\n}\n","import { computed, setProperties, set } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport SdCardClipDownload from 'customer-site/components/modals/video/download-clip/sd-card-clip/index';\nimport SdCardThumbnailsDownload from 'customer-site/components/modals/video/download-clip/sd-card-thumbnails/index';\nimport { getOrCreateOespControllerWithUpdate } from 'customer-site/components/video/video-streaming/video-streaming-features/index';\nimport { StreamUsage } from 'customer-site/enums/StreamUsage';\nimport { OESP, WebRTC } from 'customer-site/enums/WebStreamingPlayer';\nimport WebRtcProxyPlaybackStateController from '@adc/video-player/classes/state-controllers/webrtc-proxy-playback-state-controller';\nimport { format, utcToZonedTime } from 'date-fns-tz';\nimport PlaybackFeatures from '../index';\n\nimport type BaseStateController from '@adc/video-player/classes/state-controllers/base-state-controller';\nimport type Owner from '@ember/owner';\nimport type SdCardCamera from 'customer-site/models/video/devices/sd-card-camera';\nimport type { PlayerInfo } from '../../../video-streaming/video-streaming-features/types';\n\n/**\n * @classdesc\n *\n * Playback features for SD players\n */\nexport default class SdPlaybackFeatures extends PlaybackFeatures {\n /** @override */\n playerType = StreamUsage.SDCard;\n\n /** @override */\n playerTypeString = 'SD';\n\n /** @override */\n baseResourcePath = 'components.video.video-player.playback-features.sd-playback-features.';\n\n /** @override */\n clipDownloadModalComponent = SdCardClipDownload;\n\n /** @override */\n scrubberThumbnailEndpoint = 'scrubberThumbnailEndpoint';\n\n /** @override */\n videoSourceEndpoint = 'videoSource';\n\n /** @override */\n videoSourceModelPath = 'video/videoSources/sdCardVideoSource';\n\n /** @override */\n thumbnailsDownloadModalComponent = SdCardThumbnailsDownload;\n\n /** @override */\n timelineChangeDebounceTimeMs = 2000;\n\n /** @override */\n supportsDownloadingThumbnailsProperty = 'supportsDownloadingThumbnails';\n\n /**\n * Used in tests for passing in the playbackStateControllers to be used on the page\n */\n exposeControllers?: (controllers: BaseStateController[]) => void;\n\n /** @override */\n @computed('cameraItems', 'cameraItems.length')\n get availableSpeeds(): number[] {\n const { cameraItems } = this,\n cameraModel = cameraItems[0]?.model as SdCardCamera | undefined;\n\n // This check is so that the integration test passes.\n if (!cameraModel || !cameraItems?.length) {\n return [1, 2, 4];\n }\n\n return cameraModel.supportedSpeeds;\n }\n\n /** @override */\n get allPossibleClipDownloadDurations(): number[] {\n // The durations are in seconds.\n // 10s, 30s, 1m, 5m, 10m, 15m, 30m, 1h.\n return [10, 30, 60, 300, 600, 900, 1800, 3600];\n }\n\n /** @override */\n get allPossibleClipUploadDurations(): number[] {\n // The durations are in seconds.\n // 10s, 30s, 1m, 5m, 10m, 15m, 30m.\n return [10, 30, 60, 300, 600, 900, 1800];\n }\n\n /** @override */\n setPlayerUrls(player: PlayerInfo, deviceId: string): Promise {\n const videoSource = this.playbackInfoCacheManager.getVideoSourceFromCache(deviceId, this.playerType);\n if (!videoSource) {\n return Promise.reject();\n }\n\n const { errorEnum } = videoSource;\n if (errorEnum) {\n return Promise.reject({\n errorEnum,\n errorText: `errorEnum ${errorEnum} was triggered for deviceId ${deviceId}`\n });\n }\n\n const sdCamera = this.getCamera(deviceId) as unknown as SdCardCamera;\n if (!sdCamera) {\n return Promise.resolve();\n }\n\n const { envSettings, playbackControl } = this,\n {\n proxyUrl,\n urlEncoded,\n janusGatewayUrl,\n janusToken,\n iceServers,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n proxyStreamTimeoutTime,\n supportsAudioForProxyStream,\n proxyWebrtcConnectionInfo\n } = videoSource,\n { currentTime, speed } = playbackControl;\n\n if (!currentTime) {\n return Promise.resolve();\n }\n\n // SD card must restart the stream with new parameters if a timeline action occurs (such as seek or speed change).\n const formattedStartTime = format(utcToZonedTime(currentTime, 'UTC'), sdCamera.playbackUrlDateFormat),\n urlQueryParams = sdCamera.isVirtualCamera\n ? // Don't pass in any query params if it's a virtual camera.\n ''\n : `start=${formattedStartTime}&speed=${speed}`;\n\n // If this is an automated test, set the start and speed properties on window\n // because they do not get set on the player since a virtual camera is used in the test.\n if (envSettings.isTestEnvironment()) {\n window.start = currentTime.toISOString();\n window.speed = speed;\n }\n\n setProperties(player, {\n proxyUrl,\n // Because SD card URLs are encoded (as of VID-21408), we must pass query params\n // into the WebRTC player to append after base URL decryption.\n urlEncoded,\n urlQueryParams\n });\n\n set(this, 'playbackStateControllers', this.playbackStateControllers || []);\n const { playbackStateControllers } = this;\n\n const apexConnectionRelationship = videoSource.apexConnectionInfo.get('content') as any;\n\n if (sdCamera.usageProtocolMapping[StreamUsage.SDCard] === OESP && apexConnectionRelationship) {\n const oespControllerUpdateResult = getOrCreateOespControllerWithUpdate(\n getOwner(this) as Owner,\n this.playbackStateControllers || [],\n apexConnectionRelationship,\n false,\n this.forcedStreamingMethod\n );\n this.playbackStateControllers = oespControllerUpdateResult.playbackStateControllers;\n const controller = oespControllerUpdateResult.controller;\n\n setProperties(player, {\n svrId: deviceId,\n index: controller.playerCount++,\n apexChannelGuid: sdCamera.macAddress,\n playbackStateController: controller,\n playerType: OESP,\n attemptedDirectAndProxy: true\n });\n\n // Expose the controller for testing.\n if (this.exposeControllers && playbackStateControllers) {\n this.exposeControllers(playbackStateControllers);\n }\n\n return Promise.resolve();\n }\n\n let controller = playbackStateControllers?.find(\n (controller) => controller instanceof WebRtcProxyPlaybackStateController\n );\n\n // All WebRTC players can use the same controller.\n if (!controller) {\n controller = new WebRtcProxyPlaybackStateController();\n\n playbackStateControllers?.push(controller);\n }\n\n setProperties(player, {\n attemptedDirectAndProxy: true,\n janusGatewayUrl,\n janusToken,\n iceServers,\n playerUrl: proxyUrl,\n proxyStreamTimeoutTime,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n playbackStateController: controller,\n playerType: WebRTC,\n supportsAudioForProxyStream,\n proxyWebrtcConnectionInfo\n });\n\n // Expose the controller for testing.\n if (this.exposeControllers && playbackStateControllers) {\n this.exposeControllers(playbackStateControllers);\n }\n\n return Promise.resolve();\n }\n\n /** @override */\n loadMotionIntervals() {\n // Motion intervals aren't relevant for SD-card-player at the moment\n return false;\n }\n\n /** @override */\n getClipDownloadDurations(deviceId: string): number[] {\n const sdCamera = this.getCamera(deviceId) as unknown as SdCardCamera;\n if (!sdCamera) {\n return [];\n }\n\n // Filter to the durations the camera supports.\n return this.allPossibleClipDownloadDurations.filter(\n (duration) => duration <= sdCamera.maxSdCardClipDownloadDurationSec\n );\n }\n\n /** @override */\n getClipUploadDurations(/* deviceId */) {\n return this.allPossibleClipUploadDurations;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Video::VideoPlayer::PlaybackFeatures::SdPlaybackFeatures': typeof SdPlaybackFeatures;\n }\n}\n","import { action } from '@ember/object';\nimport { EmberVideoSdCardSchedule } from 'customer-site/enums/CustomerPageUrl';\nimport { StreamUsage } from 'customer-site/enums/StreamUsage';\nimport BasePlaybackController from '../base-playback-controller';\n\nimport type Transition from '@ember/routing/transition';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from './route';\n\nexport default class OnboardController extends BasePlaybackController {\n declare model: ModelFrom;\n\n /**\n * Query params for onboard page.\n * @override\n */\n queryParams = ['individualThumbnailMode'];\n\n /** @override */\n hideSidebar = false;\n\n /** @override */\n playbackType = StreamUsage.SDCard;\n\n @action\n goToAddSchedulesRoute(): Promise> {\n return this.contextManager.transitionToRouteWithIdentityReloadIfNeeded(\n true,\n EmberVideoSdCardSchedule,\n undefined,\n undefined,\n 'new'\n );\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'video/onboard': OnboardController;\n }\n}\n","import { EmberSDCard } from '../../enums/CustomerPageUrl';\nimport BasePlaybackRoute from '../base-playback-route';\n\nimport type BaseCamera from 'customer-site/models/video/devices/base-camera';\nimport type CameraGroup from '../../models/video/camera-group';\nimport type { CameraFilter } from '../base-playback-route';\n\n/**\n * @classdesc\n * Route for SD card playback page.\n */\nexport default class SdCardRoute extends BasePlaybackRoute {\n /** Ensure queryParams inherits superclass attributes */\n mergedProperties = ['queryParams'];\n\n /** @override */\n queryParams = {\n cameraGroupId: { replace: true },\n cameraId: { replace: true },\n relay: { replace: true },\n startTime: { replace: true },\n individualThumbnailMode: { replace: true },\n timeInterval: { replace: true, type: 'number' }\n };\n\n /** @override */\n routeId = EmberSDCard;\n\n /** @override */\n cameraModel = 'video/devices/sd-card-camera';\n\n /** @override */\n cameraFilterProperty: CameraFilter = 'hasSdRecordingSchedule';\n\n /** @override */\n async getFilteredCameraGroups(\n allCameraGroupsPromiseArray: ADCAsyncStoreFindAll\n ): Promise {\n const cameras = this.store.peekAll(this.cameraModel),\n filteredCameraGroups: CameraGroup[] = [],\n allCameraGroups = allCameraGroupsPromiseArray.toArray();\n\n const allCamerasByGroup = await Promise.all(allCameraGroups.map((group) => group.cameras));\n\n for (let i = 0; i < allCameraGroups.length; i++) {\n const cameraGroup = allCameraGroups[i],\n groupCameras = allCamerasByGroup[i],\n cameraGroupLength = groupCameras.length,\n sdCamerasInCameraGroup: BaseCamera[] = [];\n\n for (let j = 0; j < cameraGroupLength; j++) {\n const camera = groupCameras.objectAt(j),\n matchingSDCardCamera = cameras.findBy('id', camera?.id);\n\n if (matchingSDCardCamera) {\n sdCamerasInCameraGroup.pushObject(matchingSDCardCamera);\n }\n }\n\n // removing the base-cameras that were initially populated in here and only having the sd cameras added above\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error This code should be replace with: `cameraGroup.cameras.setObjects(sdCamerasInCameraGroup.filterBy(this.cameraFilterProperty));`.\n cameraGroup.cameras = sdCamerasInCameraGroup.filterBy(this.cameraFilterProperty);\n\n if (cameraGroup.cameras.length) {\n filteredCameraGroups.push(cameraGroup);\n }\n }\n\n return filteredCameraGroups;\n }\n}\n"],"names":["BaseSdCardDownloadModal","_dec","reads","_dec2","_class","BaseVideoClipExportModal","constructor","arguments","_initializerDefineProperty","_descriptor","_defineProperty","SDCard","_descriptor2","_descriptor3","requestDownloadUrls","_ref","_this$selectedDateTim","model","this","args","camera","cameras","findBy","selectedCameraId","getDownloadUrl","ajax","selectedDateTime","defaultDate","Date","duration","includeAudio","value","uploadVideoClips","_applyDecoratedDescriptor","prototype","service","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","createTemplateFactory","scope","modalsDateDatePicker_","modalsVideoDownloadClipWarning_","modalsVideoDownloadClipCameraSelector_","fn","modalsVideoDownloadClipDuration_","modalsVideoDownloadClipExportOptions_","simpleBinary_","t_","on","handleBinaryChange_","SdCardClipDownload","intlPath","path","BaseSdCardDownload","selectedDate","getClipDownloadUrl","setComponentTemplate","TEMPLATE","SdCardThumbnailsDownload","_class2","getTranslation","key","intl","tc","getThumbnailsDownloadUrl","SdPlaybackFeatures","computed","PlaybackFeatures","StreamUsage","availableSpeeds","_cameraItems$","cameraItems","cameraModel","length","supportedSpeeds","allPossibleClipDownloadDurations","allPossibleClipUploadDurations","setPlayerUrls","player","deviceId","videoSource","playbackInfoCacheManager","getVideoSourceFromCache","playerType","Promise","reject","errorEnum","errorText","concat","sdCamera","getCamera","resolve","envSettings","playbackControl","proxyUrl","urlEncoded","janusGatewayUrl","janusToken","iceServers","spsAndPpsRequired","visualVerificationRecord","coturnAddressesTuplets","proxyStreamTimeoutTime","supportsAudioForProxyStream","proxyWebrtcConnectionInfo","currentTime","speed","formattedStartTime","format","utcToZonedTime","playbackUrlDateFormat","urlQueryParams","isVirtualCamera","isTestEnvironment","window","start","toISOString","setProperties","set","playbackStateControllers","apexConnectionRelationship","apexConnectionInfo","get","usageProtocolMapping","OESP","oespControllerUpdateResult","getOrCreateOespControllerWithUpdate","getOwner","forcedStreamingMethod","controller","svrId","index","playerCount","apexChannelGuid","macAddress","playbackStateController","attemptedDirectAndProxy","exposeControllers","find","WebRtcProxyPlaybackStateController","push","playerUrl","WebRTC","loadMotionIntervals","getClipDownloadDurations","filter","maxSdCardClipDownloadDurationSec","getClipUploadDurations","OnboardController","BasePlaybackController","goToAddSchedulesRoute","contextManager","transitionToRouteWithIdentityReloadIfNeeded","EmberVideoSdCardSchedule","undefined","SdCardRoute","BasePlaybackRoute","cameraGroupId","replace","cameraId","relay","startTime","individualThumbnailMode","timeInterval","type","EmberSDCard","getFilteredCameraGroups","allCameraGroupsPromiseArray","store","peekAll","filteredCameraGroups","allCameraGroups","toArray","allCamerasByGroup","all","map","group","i","cameraGroup","groupCameras","cameraGroupLength","sdCamerasInCameraGroup","j","objectAt","matchingSDCardCamera","id","pushObject","filterBy","cameraFilterProperty"],"sourceRoot":""}