@golemio/pid 3.4.0 → 3.4.1-dev.1622739356
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
- package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
- package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
- package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
- package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +8 -17
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +11 -21
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +2 -4
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +32 -39
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +153 -172
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
- package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
- package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
- package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,4EAA2G;AAC3G,oEAA4D;AAC5D,yCAA8C;AAC9C,0EAAqE;AACrE,sEAAwD;AACxD,0BAAuF;AACvF,kFAA+E;AAE/E,MAAqB,oBAAoB;IAC9B,MAAM,CAAC,aAAa,CAAC,IAAS,EAAE,iBAAyB,EAAE,IAAY;QAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;QAEjH,OAAO,MAAM,CAAC;IAClB,CAAC;IAyEO,MAAM,CAAC,yBAAyB,CAAC,SAAsB;QAC3D,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC5B,IAAI,CAAC,CAAC,SAAS,YAAY,IAAI,CAAC,EAAE;YAC9B,oBAAG,CAAC,IAAI,CAAC,mCAAmC,SAAS,EAAE,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC;SACf;QAED,MAAM,iBAAiB,GAAG,yCAAmB,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC7E,IAAI,iBAAiB,GAAG,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC;SACf;QAED,OAAO,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;;;AApFD;;GAEG;AACY,0CAAqB,GAAG,CAAC,CAAgB,EAAE,iBAAyB,EAAE,IAAa,EAAuB,EAAE
|
|
1
|
+
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,4EAA2G;AAC3G,oEAA4D;AAC5D,yCAA8C;AAC9C,0EAAqE;AACrE,sEAAwD;AACxD,0BAAuF;AACvF,kFAA+E;AAE/E,MAAqB,oBAAoB;IAC9B,MAAM,CAAC,aAAa,CAAC,IAAS,EAAE,iBAAyB,EAAE,IAAY;QAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;QAEjH,OAAO,MAAM,CAAC;IAClB,CAAC;IAyEO,MAAM,CAAC,yBAAyB,CAAC,SAAsB;QAC3D,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC5B,IAAI,CAAC,CAAC,SAAS,YAAY,IAAI,CAAC,EAAE;YAC9B,oBAAG,CAAC,IAAI,CAAC,mCAAmC,SAAS,EAAE,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC;SACf;QAED,MAAM,iBAAiB,GAAG,yCAAmB,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC7E,IAAI,iBAAiB,GAAG,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC;SACf;QAED,OAAO,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;;;AApFD;;GAEG;AACY,0CA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AC;AACN,CAAC,AAlEmC,CAkElC;AAiBa,qDAAgC,GAAG,CAAC,SAAwB,EAAW,EAAE;IACpF,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GAAG,SAAS,CAAC;IAE7F,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,kCAAiB,CAAC,KAAK,EAAE;QACrD,QAAQ,mBAAmB,EAAE;YACzB,KAAK,mDAA8B,CAAC,iBAAiB;gBACjD,OAAO,IAAI,CAAC;YAChB,KAAK,mDAA8B,CAAC,mBAAmB,CAAC;YACxD,KAAK,mDAA8B,CAAC,aAAa,CAAC;YAClD;gBACI,OAAO,KAAK,CAAC;SACpB;KACJ;SAAM;QACH,OAAO,OAAO,0BAA0B,KAAK,SAAS;YAClD,CAAC,CAAC,0BAA0B;YAC5B,CAAC,CAAC,qBAAqB,KAAK,iDAA4B,CAAC,iBAAiB,CAAC;KAClF;AACL,CAAC,AAjB8C,CAiB7C;kBA9Ge,oBAAoB"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -21,7 +12,7 @@ exports.ParamValidatorManager = ParamValidatorManager;
|
|
|
21
12
|
_a = ParamValidatorManager;
|
|
22
13
|
ParamValidatorManager.ASW_ID_FORMAT_REGEXP = /^[0-9]+[_\/]?[0-9]*[_\/]?$/;
|
|
23
14
|
ParamValidatorManager.getAswIdsValidator = () => {
|
|
24
|
-
return (value) =>
|
|
15
|
+
return async (value) => {
|
|
25
16
|
if (!value) {
|
|
26
17
|
return Promise.reject("aswIds must be defined");
|
|
27
18
|
}
|
|
@@ -32,10 +23,10 @@ ParamValidatorManager.getAswIdsValidator = () => {
|
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
return true;
|
|
35
|
-
}
|
|
26
|
+
};
|
|
36
27
|
};
|
|
37
28
|
ParamValidatorManager.getDateValidator = () => {
|
|
38
|
-
return (date) =>
|
|
29
|
+
return async (date) => {
|
|
39
30
|
if (!date) {
|
|
40
31
|
return Promise.reject("Date must be defined");
|
|
41
32
|
}
|
|
@@ -44,14 +35,14 @@ ParamValidatorManager.getDateValidator = () => {
|
|
|
44
35
|
return Promise.reject("Value is out of range");
|
|
45
36
|
}
|
|
46
37
|
return true;
|
|
47
|
-
}
|
|
38
|
+
};
|
|
48
39
|
};
|
|
49
40
|
ParamValidatorManager.getTimeFromValidator = () => {
|
|
50
41
|
const defaultTimeQueryParams = {
|
|
51
42
|
hoursBefore: 6,
|
|
52
43
|
hoursAfter: 2 * 24,
|
|
53
44
|
};
|
|
54
|
-
return (date) =>
|
|
45
|
+
return async (date) => {
|
|
55
46
|
if (!date) {
|
|
56
47
|
return Promise.reject("Date must be defined");
|
|
57
48
|
}
|
|
@@ -61,6 +52,6 @@ ParamValidatorManager.getTimeFromValidator = () => {
|
|
|
61
52
|
!timeFrom.isBetween(currentMoment.clone().subtract(defaultTimeQueryParams.hoursBefore, "hours"), currentMoment.clone().add(defaultTimeQueryParams.hoursAfter, "hours"), undefined, "[]")) {
|
|
62
53
|
return Promise.reject("Parameter timeFrom must be in interval [-6h; +2d]");
|
|
63
54
|
}
|
|
64
|
-
}
|
|
55
|
+
};
|
|
65
56
|
};
|
|
66
57
|
//# sourceMappingURL=ParamValidatorManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParamValidatorManager.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/ParamValidatorManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParamValidatorManager.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/ParamValidatorManager.ts"],"names":[],"mappings":";;;;;;;AACA,gGAA+D;AAE/D,MAAa,qBAAqB;;AAAlC,sDA+DC;;AA9DkB,0CAAoB,GAAG,4BAA4B,AAA/B,CAAgC;AAErD,wCAAkB,GAAG,GAAoB,EAAE;IACrD,OAAO,KAAK,EAAE,KAAK,EAAE,EAAE;QACnB,IAAI,CAAC,KAAK,EAAE;YACR,OAAO,OAAO,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;SACnD;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACtD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,EAAE;gBACvF,OAAO,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;aAClD;SACJ;QAED,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC,AAf+B,CAe9B;AAEY,sCAAgB,GAAG,GAAoB,EAAE;IACnD,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QAClB,IAAI,CAAC,IAAI,EAAE;YACP,OAAO,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;SACjD;QAED,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAEpC,IAAI,EAAE,GAAG,CAAC,EAAE;YACR,OAAO,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;SAClD;QAED,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC,AAd6B,CAc5B;AAEY,0CAAoB,GAAG,GAAoB,EAAE;IACvD,MAAM,sBAAsB,GAAG;QAC3B,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC,GAAG,EAAE;KACrB,CAAC;IAEF,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QAClB,IAAI,CAAC,IAAI,EAAE;YACP,OAAO,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;SACjD;QAED,MAAM,QAAQ,GAAG,IAAA,yBAAM,EAAC,IAAI,CAAC,CAAC;QAC9B,MAAM,aAAa,GAAG,IAAA,yBAAM,GAAE,CAAC;QAE/B,IACI,QAAQ;YACR,CAAC,QAAQ,CAAC,SAAS,CACf,aAAa,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,WAAW,EAAE,OAAO,CAAC,EAC3E,aAAa,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,CAAC,EACrE,SAAS,EACT,IAAI,CACP,EACH;YACE,OAAO,OAAO,CAAC,MAAM,CAAC,mDAAmD,CAAC,CAAC;SAC9E;IACL,CAAC,CAAC;AACN,CAAC,AA1BiC,CA0BhC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -31,13 +22,12 @@ class PIDDepartureBoardsModel {
|
|
|
31
22
|
* @param {string} id Id of the stop
|
|
32
23
|
* @returns Object of the retrieved record or null
|
|
33
24
|
*/
|
|
34
|
-
this.GetAll = (options) =>
|
|
35
|
-
var _a, _b;
|
|
25
|
+
this.GetAll = async (options) => {
|
|
36
26
|
const currentMoment = (0, moment_timezone_1.default)();
|
|
37
27
|
const minutesOffset = options.timeFrom ? options.timeFrom.diff(currentMoment, "minutes") : 0;
|
|
38
28
|
const spanStops = (0, trace_provider_1.createChildSpan)("V2PIDRouter.DB.stops");
|
|
39
|
-
spanStops
|
|
40
|
-
const stopsToInclude =
|
|
29
|
+
spanStops?.setAttributes({ ...options, timeFrom: options.timeFrom?.toString() });
|
|
30
|
+
const stopsToInclude = await models_1.models.GTFSStopModel.GetAll({
|
|
41
31
|
includeMetroTrains: options.includeMetroTrains,
|
|
42
32
|
appendAswId: true,
|
|
43
33
|
aswIds: options.aswIds,
|
|
@@ -55,11 +45,11 @@ class PIDDepartureBoardsModel {
|
|
|
55
45
|
throw new golemio_errors_1.GeneralError(`Too many stops, try lower number or split requests. The maximum is ${this.stopsMaxCount} stops.`, "DepartureBoardsRouter", undefined, 413);
|
|
56
46
|
}
|
|
57
47
|
const stopsIds = stopsToInclude.map((e) => e.stop_id);
|
|
58
|
-
spanStops
|
|
48
|
+
spanStops?.end();
|
|
59
49
|
const spanInfotexts = (0, trace_provider_1.createChildSpan)("V2PIDRouter.DB.infotexts");
|
|
60
50
|
let infotextsToInclude;
|
|
61
51
|
try {
|
|
62
|
-
const infotexts =
|
|
52
|
+
const infotexts = await this.infotextRepository.findAllForDepartureBoard(stopsIds, (options.timeFrom ?? currentMoment).toDate());
|
|
63
53
|
infotextsToInclude = this.infotextTransformation.transformArray(infotexts.map((infotext) => ({
|
|
64
54
|
data: infotext,
|
|
65
55
|
timeZone: options.timezone,
|
|
@@ -71,18 +61,18 @@ class PIDDepartureBoardsModel {
|
|
|
71
61
|
}
|
|
72
62
|
throw new golemio_errors_1.GeneralError("Database error", "DepartureBoardsModel", err, 500);
|
|
73
63
|
}
|
|
74
|
-
spanInfotexts
|
|
64
|
+
spanInfotexts?.end();
|
|
75
65
|
const spanDirections = (0, trace_provider_1.createChildSpan)("V2PIDRouter.DB.directions");
|
|
76
66
|
let departuresDirections;
|
|
77
67
|
try {
|
|
78
|
-
departuresDirections =
|
|
68
|
+
departuresDirections = await this.ropidDeparturesDirectionsModel.GetAll(stopsIds);
|
|
79
69
|
}
|
|
80
70
|
catch (err) {
|
|
81
71
|
throw new golemio_errors_1.GeneralError("Database error", "DepartureBoardsModel", err, 500);
|
|
82
72
|
}
|
|
83
|
-
spanDirections
|
|
73
|
+
spanDirections?.end();
|
|
84
74
|
try {
|
|
85
|
-
const results =
|
|
75
|
+
const results = await this.departuresRepository.GetAll({
|
|
86
76
|
currentMoment,
|
|
87
77
|
minutesAfter: options.minutesAfter,
|
|
88
78
|
minutesBefore: options.minutesBefore,
|
|
@@ -107,13 +97,13 @@ class PIDDepartureBoardsModel {
|
|
|
107
97
|
infotexts: infotextsToInclude,
|
|
108
98
|
stops: stopsToInclude,
|
|
109
99
|
};
|
|
110
|
-
spanDepartures
|
|
100
|
+
spanDepartures?.end();
|
|
111
101
|
return res;
|
|
112
102
|
}
|
|
113
103
|
catch (err) {
|
|
114
104
|
throw new golemio_errors_1.GeneralError("Database error", "DepartureBoardsModel", err, 500);
|
|
115
105
|
}
|
|
116
|
-
}
|
|
106
|
+
};
|
|
117
107
|
this.ropidDeparturesDirectionsModel = new _1.RopidDeparturesDirectionsModel();
|
|
118
108
|
this.departuresRepository = new data_access_1.DeparturesRepository(Di_1.OgPidContainer.resolve(CoreToken_1.CoreToken.PostgresConnector), Di_1.OgPidContainer.resolve(CoreToken_1.CoreToken.SimpleConfig));
|
|
119
109
|
this.infotextRepository = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.JISInfotextRepository);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA0D;AAC1D,gDAA2D;AAC3D,oDAA+C;AAI/C,wEAAqE;AACrE,+FAA6F;AAC7F,6EAA8F;AAC9F,gGAA2E;AAE3E,wBAAmD;AAInD,kCAA2C;AAC3C,kDAA+C;AAE/C,oFAA6D;AAE7D,MAAM,uBAAuB;IAOzB;QANQ,kBAAa,GAAG,GAAG,CAAC;QAkB5B;;;WAGG;QACI,WAAM,GAAG,KAAK,EAAE,OAkBtB,EAAgB,EAAE;YACf,MAAM,aAAa,GAAG,IAAA,yBAAM,GAAE,CAAC;YAC/B,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAE7F,MAAM,SAAS,GAAG,IAAA,gCAAe,EAAC,sBAAsB,CAAC,CAAC;YAC1D,SAAS,EAAE,aAAa,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAoB,CAAC,CAAC;YACnG,MAAM,cAAc,GAAG,MAAM,eAAM,CAAC,aAAa,CAAC,MAAM,CAAC;gBACrD,kBAAkB,EAAE,OAAO,CAAC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CAAC,KAAK;wBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,IAAI,EAAE,OAAO,CAAC,IAAI;wBAClB,oBAAoB;wBACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;qBAC7B,CAAC,CAAC,OAAO,EAAE;oBACZ,SAAS,EAAE,kBAAkB;oBAC7B,KAAK,EAAE,cAAc;iBACxB,CAAC;gBACF,cAAc,EAAE,GAAG,EAAE,CAAC;gBACtB,OAAO,GAAG,CAAC;aACd;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC9E;QACL,CAAC,CAAC;QAjIE,IAAI,CAAC,8BAA8B,GAAG,IAAI,iCAA8B,EAAE,CAAC;QAC3E,IAAI,CAAC,oBAAoB,GAAG,IAAI,kCAAoB,CAChD,mBAAc,CAAC,OAAO,CAAqB,qBAAS,CAAC,iBAAiB,CAAC,EACvE,mBAAc,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAChE,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,mBAAc,CAAC,OAAO,CAAwB,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QAC1G,IAAI,CAAC,sBAAsB,GAAG,mBAAc,CAAC,OAAO,CAChD,uBAAU,CAAC,kCAAkC,CAChD,CAAC;IACN,CAAC;CAyHJ;AAEQ,0DAAuB"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -25,7 +16,11 @@ class RopidDeparturesDirectionsModel extends output_gateway_1.SequelizeModel {
|
|
|
25
16
|
super(ropid_departures_directions_1.RopidDeparturesDirections.departureDirections.name + "Model", ropid_departures_directions_1.RopidDeparturesDirections.departureDirections.pgTableName, ropid_departures_directions_1.RopidDeparturesDirections.departureDirections.outputSequelizeAttributes, { schema: const_1.PG_SCHEMA });
|
|
26
17
|
this.convertItem = (item) => {
|
|
27
18
|
// converting types
|
|
28
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
...item,
|
|
21
|
+
next_stop_id_regexp: new RegExp(item.next_stop_id_regexp),
|
|
22
|
+
direction: item.direction,
|
|
23
|
+
};
|
|
29
24
|
};
|
|
30
25
|
this.convertItems = (items) => {
|
|
31
26
|
return items.map((item) => this.convertItem(item));
|
|
@@ -34,24 +29,22 @@ class RopidDeparturesDirectionsModel extends output_gateway_1.SequelizeModel {
|
|
|
34
29
|
GetOne(id) {
|
|
35
30
|
throw new Error("Method not implemented.");
|
|
36
31
|
}
|
|
37
|
-
GetAll(stopsIds) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[sequelize_1.default.Op.in]: stopsIds,
|
|
46
|
-
},
|
|
32
|
+
async GetAll(stopsIds) {
|
|
33
|
+
if (!stopsIds || stopsIds.length === 0) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
return this.convertItems((await this.sequelizeModel.findAll({
|
|
37
|
+
where: {
|
|
38
|
+
departure_stop_id: {
|
|
39
|
+
[sequelize_1.default.Op.in]: stopsIds,
|
|
47
40
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
});
|
|
41
|
+
},
|
|
42
|
+
order: [
|
|
43
|
+
["departure_stop_id", "asc"],
|
|
44
|
+
["rule_order", "asc"],
|
|
45
|
+
],
|
|
46
|
+
raw: true,
|
|
47
|
+
})));
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
50
|
exports.RopidDeparturesDirectionsModel = RopidDeparturesDirectionsModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesDirectionsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidDeparturesDirectionsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidDeparturesDirectionsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidDeparturesDirectionsModel.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAuC;AACvC,yGAK0C;AAC1C,sEAAmE;AACnE,oFAA4D;AAE5D;;GAEG;AACH,MAAa,8BAA+B,SAAQ,+BAAc;IAC9D;QACI,KAAK,CACD,uDAAyB,CAAC,mBAAmB,CAAC,IAAI,GAAG,OAAO,EAC5D,uDAAyB,CAAC,mBAAmB,CAAC,WAAW,EACzD,uDAAyB,CAAC,mBAAmB,CAAC,yBAAyB,EACvE,EAAE,MAAM,EAAE,iBAAS,EAAE,CACxB,CAAC;QAOE,gBAAW,GAAG,CAAC,IAA0C,EAAoC,EAAE;YACnG,mBAAmB;YACnB,OAAO;gBACH,GAAG,IAAI;gBACP,mBAAmB,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC;gBACzD,SAAS,EAAE,IAAI,CAAC,SAAqC;aACpB,CAAC;QAC1C,CAAC,CAAC;QAEM,iBAAY,GAAG,CAAC,KAA6C,EAAsC,EAAE;YACzG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC;IAjBF,CAAC;IAED,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAeD,KAAK,CAAC,MAAM,CAAC,QAAkB;QAC3B,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACpC,OAAO,EAAwC,CAAC;SACnD;QACD,OAAO,IAAI,CAAC,YAAY,CACpB,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YAC/B,KAAK,EAAE;gBACH,iBAAiB,EAAE;oBACf,CAAC,mBAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ;iBAC9B;aACJ;YACD,KAAK,EAAE;gBACH,CAAC,mBAAmB,EAAE,KAAK,CAAC;gBAC5B,CAAC,YAAY,EAAE,KAAK,CAAC;aACxB;YACD,GAAG,EAAE,IAAI;SACZ,CAAC,CAA2C,CAChD,CAAC;IACN,CAAC;CACJ;AA9CD,wEA8CC"}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
@@ -49,9 +29,9 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
49
29
|
/**
|
|
50
30
|
* Retrieve all infotexts with routes
|
|
51
31
|
*/
|
|
52
|
-
this.GetAllWithRoutes = (timezone) =>
|
|
32
|
+
this.GetAllWithRoutes = async (timezone) => {
|
|
53
33
|
const currentDateISO = new Date().toISOString();
|
|
54
|
-
const data =
|
|
34
|
+
const data = await this.sequelizeModel.findAll({
|
|
55
35
|
attributes: [
|
|
56
36
|
"valid_from",
|
|
57
37
|
"valid_to",
|
|
@@ -110,11 +90,22 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
110
90
|
raw: true,
|
|
111
91
|
});
|
|
112
92
|
return this.mapDataWithRoutes(data, timezone);
|
|
113
|
-
}
|
|
93
|
+
};
|
|
114
94
|
this.mapDataWithRoutes = (items, timezone) => {
|
|
115
95
|
return items.map((item) => {
|
|
116
|
-
const { vymi_id, vymi_id_dtb, stop_type: stopType, expiration_date, last_updated, valid_from, valid_to, last_updated_user
|
|
117
|
-
return
|
|
96
|
+
const { vymi_id, vymi_id_dtb, stop_type: stopType, expiration_date, last_updated, valid_from, valid_to, last_updated_user, ...infotextsStopModel } = item;
|
|
97
|
+
return {
|
|
98
|
+
vymi_id: vymi_id,
|
|
99
|
+
vymi_id_dtb: vymi_id_dtb,
|
|
100
|
+
display_type: this.mapStopTypeToDisplayType(stopType),
|
|
101
|
+
text_en: null,
|
|
102
|
+
...infotextsStopModel,
|
|
103
|
+
expiration_date: shared_1.RopidRouterUtils.formatTimestamp(expiration_date, timezone),
|
|
104
|
+
last_updated: shared_1.RopidRouterUtils.formatTimestamp(last_updated, timezone),
|
|
105
|
+
last_updated_user: last_updated_user,
|
|
106
|
+
valid_from: shared_1.RopidRouterUtils.formatTimestamp(valid_from, timezone),
|
|
107
|
+
valid_to: shared_1.RopidRouterUtils.formatTimestamp(valid_to, timezone),
|
|
108
|
+
};
|
|
118
109
|
});
|
|
119
110
|
};
|
|
120
111
|
this.mapStopTypeToDisplayType = (stopType) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAkF;AAClF,yEAAoE;AACpE,yCAA8C;AAC9C,6DAAuC;AACvC,uEAA4C;AAC5C,uEAA4C;AAE5C,sEAAmE;AACnE,gEAAgG;AAChG,oFAA4D;AAC5D,+EAAwE;AA6BxE;;GAEG;AACH,MAAa,yBAA0B,SAAQ,+BAAc;IAMzD,MAAM,CAAC,OAAa;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;QACI,KAAK,CACD,sBAAS,CAAC,WAAW,CAAC,IAAI,GAAG,OAAO,EACpC,sBAAS,CAAC,WAAW,CAAC,WAA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AAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE;YAC/D,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,UAAU;YACtB,SAAS,EAAE,UAAU;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE;YAC3D,EAAE,EAAE,WAAW;YACf,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,cAAc;SAC5B,CAAC,CAAC;IACP,CAAC;CAyGJ;AArJD,8DAqJC"}
|
|
@@ -42,7 +42,6 @@ class PIDDeparturesModel {
|
|
|
42
42
|
*/
|
|
43
43
|
this.skip = () => {
|
|
44
44
|
this.departures = this.departures.filter((departure) => {
|
|
45
|
-
var _a, _b;
|
|
46
45
|
let isAtStop = false;
|
|
47
46
|
let isPassStop = false;
|
|
48
47
|
let isCurrentTrip = false;
|
|
@@ -54,7 +53,7 @@ class PIDDeparturesModel {
|
|
|
54
53
|
}
|
|
55
54
|
else if (this.options.tripNumber) {
|
|
56
55
|
// Skip transfers of current trip (in the vehicle in which the transfer board is located)
|
|
57
|
-
isCurrentTrip =
|
|
56
|
+
isCurrentTrip = departure.trip_short_name?.endsWith(this.options.tripNumber) ?? false;
|
|
58
57
|
}
|
|
59
58
|
return !(isCurrentTrip ||
|
|
60
59
|
(this.options.skip.includes(pid_1.DepartureSkip.UNTRACKED) && !departure.is_delay_available) ||
|
|
@@ -78,7 +77,6 @@ class PIDDeparturesModel {
|
|
|
78
77
|
*/
|
|
79
78
|
this.addDirections = () => {
|
|
80
79
|
this.departures.forEach((departure) => {
|
|
81
|
-
var _a;
|
|
82
80
|
if (!("arrival_datetime" in departure)) {
|
|
83
81
|
return;
|
|
84
82
|
}
|
|
@@ -87,7 +85,7 @@ class PIDDeparturesModel {
|
|
|
87
85
|
if (thisStopDeparturesDirections.length > 0) {
|
|
88
86
|
for (const thisStopDeparturesDirection of thisStopDeparturesDirections) {
|
|
89
87
|
if (departure.stop_id === thisStopDeparturesDirection.departure_stop_id &&
|
|
90
|
-
|
|
88
|
+
departure.next_stop_id?.match(thisStopDeparturesDirection.next_stop_id_regexp)) {
|
|
91
89
|
departure.direction = thisStopDeparturesDirection.direction;
|
|
92
90
|
}
|
|
93
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PIDDepartureModel.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/PIDDepartureModel.ts"],"names":[],"mappings":";;;;;AAAA,+BAQiB;AACjB,8FAAwE;AACxE,iDAAoE;AAGpE,MAAqB,kBAAkB;IAcnC,YAAY,UAA4B,EAAE,OAAkC;QAKrE,YAAO,GAAG,GAAoB,EAAE;YACnC,IAAI,CAAC,eAAe,EAAE,CAAC;YAEvB,OAAO,8BAAoB,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9F,CAAC,CAAC;QASM,oBAAe,GAAG,CAAC,uBAAuB,GAAG,IAAI,EAAE,EAAE;YACzD,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,EAAE,CAAC;YAEZ,IAAI,uBAAuB,EAAE;gBACzB,IAAI,CAAC,aAAa,EAAE,CAAC;aACxB;QACL,CAAC,CAAC;QAEF;WACG;QACK,mBAAc,GAAG,GAAS,EAAE;YAChC,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAEhD,IAAI,2BAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACpD,wEAAwE;gBACxE,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,IAAI;qBACjC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,OAA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AAC,8BAA8B;IAClE,yBAAyB,EAAE,2BAAY,CAAC,8BAA8B;IACtE,IAAI,EAAE,SAAS;CAClB,AARgC,CAQ/B;kBAZe,kBAAkB"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.InfotextFacade = void 0;
|
|
25
16
|
const JISInfotextRepository_1 = require("../../data-access/JISInfotextRepository");
|
|
@@ -35,21 +26,19 @@ let InfotextFacade = exports.InfotextFacade = class InfotextFacade {
|
|
|
35
26
|
/**
|
|
36
27
|
* Retrieves active infotexts for given GTFS stop IDs
|
|
37
28
|
*/
|
|
38
|
-
getInfotextsForTransferBoards(stopIds, currentMoment, timeFrom) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts", this.constructor.name, error, 500);
|
|
29
|
+
async getInfotextsForTransferBoards(stopIds, currentMoment, timeFrom) {
|
|
30
|
+
let infotexts = [];
|
|
31
|
+
try {
|
|
32
|
+
const infotextEntities = await this.infotextRepository.findAllForDepartureBoard(stopIds, timeFrom ? timeFrom.toDate() : currentMoment.toDate());
|
|
33
|
+
infotexts = this.infotextTransformation.transformArray(infotextEntities);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
37
|
+
throw error;
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
}
|
|
39
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts", this.constructor.name, error, 500);
|
|
40
|
+
}
|
|
41
|
+
return infotexts;
|
|
53
42
|
}
|
|
54
43
|
};
|
|
55
44
|
exports.InfotextFacade = InfotextFacade = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfotextFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/InfotextFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InfotextFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/InfotextFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mFAAkF;AAElF,qDAAoD;AACpD,6EAA8F;AAE9F,iEAAwE;AACxE,4GAAyG;AAGlG,IAAM,cAAc,4BAApB,MAAM,cAAc;IACvB,YACsD,kBAAyC,EAC7B,sBAAyD;QADrE,uBAAkB,GAAlB,kBAAkB,CAAuB;QAC7B,2BAAsB,GAAtB,sBAAsB,CAAmC;IACxH,CAAC;IAEJ;;OAEG;IACI,KAAK,CAAC,6BAA6B,CACtC,OAAiB,EACjB,aAAqB,EACrB,QAAuB;QAEvB,IAAI,SAAS,GAAiC,EAAE,CAAC;QACjD,IAAI;YACA,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CAC3E,OAAO,EACP,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,CACxD,CAAC;YAEF,SAAS,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;SAC5E;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB,EAAE;gBACvC,MAAM,KAAK,CAAC;aACf;YAED,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SAC7F;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;yBAhCY,cAAc;IAD1B,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,qBAAqB,CAAC,CAAA;IACxC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iCAAiC,CAAC,CAAA;qCADiB,6CAAqB;QACL,qEAAiC;GAHlH,cAAc,CAgC1B"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.StopFacade = void 0;
|
|
25
16
|
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
@@ -34,38 +25,36 @@ let StopFacade = exports.StopFacade = class StopFacade {
|
|
|
34
25
|
/**
|
|
35
26
|
* Retrieves ASW node ID for given CIS ID and then returns GTFS stop IDs for this ASW node
|
|
36
27
|
*/
|
|
37
|
-
getStopIdsForTransferBoards(cisId) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
aswNode = cisStopNode;
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
50
|
-
throw error;
|
|
51
|
-
}
|
|
52
|
-
throw new golemio_errors_1.GeneralError("Failed to retrieve CIS stop node", this.constructor.name, error, 500);
|
|
28
|
+
async getStopIdsForTransferBoards(cisId) {
|
|
29
|
+
//#region CIS stop node
|
|
30
|
+
let aswNode;
|
|
31
|
+
try {
|
|
32
|
+
const cisStopNode = await this.cisStopGroupsRepository.getNodeByCisId(cisId);
|
|
33
|
+
if (cisStopNode === null) {
|
|
34
|
+
return [];
|
|
53
35
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
36
|
+
aswNode = cisStopNode;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
40
|
+
throw error;
|
|
59
41
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
42
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve CIS stop node", this.constructor.name, error, 500);
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region GTFS stop IDs
|
|
46
|
+
let stopIds = [];
|
|
47
|
+
try {
|
|
48
|
+
stopIds = await models_1.models.GTFSStopModel.getMultipleIdsByAswNode(aswNode);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
52
|
+
throw error;
|
|
65
53
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
54
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve GTFS stops", this.constructor.name, error, 500);
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
return stopIds;
|
|
69
58
|
}
|
|
70
59
|
};
|
|
71
60
|
exports.StopFacade = StopFacade = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StopFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/StopFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StopFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/StopFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAAoD;AACpD,mGAA2F;AAC3F,uDAA+C;AAC/C,6EAA8F;AAC9F,iEAAwE;AAGjE,IAAM,UAAU,wBAAhB,MAAM,UAAU;IACnB,YAA+D,uBAA+C;QAA/C,4BAAuB,GAAvB,uBAAuB,CAAwB;IAAG,CAAC;IAElH;;OAEG;IACI,KAAK,CAAC,2BAA2B,CAAC,KAAa;QAClD,uBAAuB;QACvB,IAAI,OAAe,CAAC;QACpB,IAAI;YACA,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAC7E,IAAI,WAAW,KAAK,IAAI,EAAE;gBACtB,OAAO,EAAE,CAAC;aACb;YAED,OAAO,GAAG,WAAW,CAAC;SACzB;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB,EAAE;gBACvC,MAAM,KAAK,CAAC;aACf;YAED,MAAM,IAAI,6BAAY,CAAC,kCAAkC,EAAE,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