@tak-ps/cloudtak 12.54.0
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/README.md +34 -0
- package/dist/types/plugin.d.ts +99 -0
- package/dist/types/src/App.vue.d.ts +5 -0
- package/dist/types/src/base/chatroom-chats.d.ts +17 -0
- package/dist/types/src/base/chatroom.d.ts +47 -0
- package/dist/types/src/base/cot.d.ts +94 -0
- package/dist/types/src/base/database.d.ts +115 -0
- package/dist/types/src/base/events.d.ts +30 -0
- package/dist/types/src/base/filter.d.ts +41 -0
- package/dist/types/src/base/handler.d.ts +11 -0
- package/dist/types/src/base/icon.d.ts +4 -0
- package/dist/types/src/base/notification.d.ts +37 -0
- package/dist/types/src/base/overlay.d.ts +94 -0
- package/dist/types/src/base/subscription-feature.d.ts +49 -0
- package/dist/types/src/base/subscription-log.d.ts +32 -0
- package/dist/types/src/base/subscription.d.ts +115 -0
- package/dist/types/src/base/utils/styles.d.ts +11 -0
- package/dist/types/src/base/validators.d.ts +9 -0
- package/dist/types/src/components/Admin/AdminImports.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminLayers.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplate.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplateLog.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplates.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPalette.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPaletteFeature.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPalettes.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminServer.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminTasks.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminUser.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminUsers.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminVideos.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerConnection.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerInjectorModal.vue.d.ts +11 -0
- package/dist/types/src/components/Admin/Server/ServerInjectors.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerPackages.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerRepeaters.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerVideos.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Tasks/AdminRawTasks.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/AdminVideoLeases.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/AdminVideoService.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/VideoConfig.vue.d.ts +7 -0
- package/dist/types/src/components/Admin/Videos/VideoConfigPort.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/CoordInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/FeatView.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/GeoJSONInput.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Map.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +101 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/RangeInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/RangeRingsInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +67 -0
- package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +122 -0
- package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +81 -0
- package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +71 -0
- package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +58 -0
- package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +54 -0
- package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +25 -0
- package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +37 -0
- package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +28 -0
- package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +53 -0
- package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +62 -0
- package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +41 -0
- package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +7 -0
- package/dist/types/src/components/Configure.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +8 -0
- package/dist/types/src/components/ETL/Connection/ConnectionFiles.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/ConnectionTokens.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/ConnectionVideos.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Connection/TokenModal.vue.d.ts +16 -0
- package/dist/types/src/components/ETL/Connection.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/ConnectionCard.vue.d.ts +16 -0
- package/dist/types/src/components/ETL/Connections.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Data.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Layer/LayerIncomingConfig.vue.d.ts +27 -0
- package/dist/types/src/components/ETL/Layer/LayerOutgoingConfig.vue.d.ts +27 -0
- package/dist/types/src/components/ETL/Layer/utils/QueryInput.vue.d.ts +56 -0
- package/dist/types/src/components/ETL/Layer/utils/StatusDot.vue.d.ts +7 -0
- package/dist/types/src/components/ETL/Layer.vue.d.ts +3 -0
- package/dist/types/src/components/Home.vue.d.ts +13 -0
- package/dist/types/src/components/Loading.vue.d.ts +3 -0
- package/dist/types/src/components/Login.vue.d.ts +7 -0
- package/dist/types/src/components/LostUser.vue.d.ts +3 -0
- package/dist/types/src/components/PageFooter.vue.d.ts +3 -0
- package/dist/types/src/components/ServerAdmin.vue.d.ts +3 -0
- package/dist/types/src/components/VideoWall/Main.vue.d.ts +3 -0
- package/dist/types/src/components/VideoWall.vue.d.ts +13 -0
- package/dist/types/src/components/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/util/InitialAuthor.vue.d.ts +6 -0
- package/dist/types/src/components/util/StatusDot.vue.d.ts +8 -0
- package/dist/types/src/components/util/Upload.vue.d.ts +46 -0
- package/dist/types/src/components/util/UploadLogo.vue.d.ts +14 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/pages/admin/main.d.ts +1 -0
- package/dist/types/src/pages/connection/main.d.ts +1 -0
- package/dist/types/src/pages/docs/App.vue.d.ts +4 -0
- package/dist/types/src/pages/docs/main.d.ts +1 -0
- package/dist/types/src/pages/video/main.d.ts +1 -0
- package/dist/types/src/std.d.ts +19 -0
- package/dist/types/src/stores/brand.d.ts +7 -0
- package/dist/types/src/stores/float.d.ts +42 -0
- package/dist/types/src/stores/map.d.ts +115 -0
- package/dist/types/src/stores/modules/draw.d.ts +35 -0
- package/dist/types/src/stores/modules/icons.d.ts +38 -0
- package/dist/types/src/stores/modules/menu.d.ts +34 -0
- package/dist/types/src/test/setup.d.ts +1 -0
- package/dist/types/src/timediff.d.ts +1 -0
- package/dist/types/src/types.d.ts +158 -0
- package/dist/types/src/video.d.ts +1 -0
- package/dist/types/src/workers/atlas-connection.d.ts +12 -0
- package/dist/types/src/workers/atlas-database.d.ts +134 -0
- package/dist/types/src/workers/atlas-profile.d.ts +39 -0
- package/dist/types/src/workers/atlas-team.d.ts +13 -0
- package/dist/types/src/workers/atlas.d.ts +19 -0
- package/package.json +97 -0
- package/src/App.vue +341 -0
- package/src/base/chatroom-chats.ts +124 -0
- package/src/base/chatroom.ts +202 -0
- package/src/base/cot.ts +625 -0
- package/src/base/database.ts +150 -0
- package/src/base/events.ts +43 -0
- package/src/base/filter.ts +163 -0
- package/src/base/handler.ts +67 -0
- package/src/base/icon.ts +16 -0
- package/src/base/notification.ts +163 -0
- package/src/base/overlay.ts +558 -0
- package/src/base/subscription-feature.ts +224 -0
- package/src/base/subscription-log.ts +174 -0
- package/src/base/subscription.ts +489 -0
- package/src/base/utils/styles.ts +430 -0
- package/src/base/validators.ts +66 -0
- package/src/components/Admin/AdminConfig.vue +487 -0
- package/src/components/Admin/AdminConnections.vue +195 -0
- package/src/components/Admin/AdminDatas.vue +165 -0
- package/src/components/Admin/AdminExport.vue +121 -0
- package/src/components/Admin/AdminImports.vue +222 -0
- package/src/components/Admin/AdminLayerTemplate.vue +91 -0
- package/src/components/Admin/AdminLayers.vue +301 -0
- package/src/components/Admin/AdminMissionTemplate.vue +259 -0
- package/src/components/Admin/AdminMissionTemplateLog.vue +273 -0
- package/src/components/Admin/AdminMissionTemplates.vue +189 -0
- package/src/components/Admin/AdminOverlays.vue +232 -0
- package/src/components/Admin/AdminOverlaysEdit.vue +355 -0
- package/src/components/Admin/AdminPalette.vue +214 -0
- package/src/components/Admin/AdminPaletteFeature.vue +208 -0
- package/src/components/Admin/AdminPalettes.vue +189 -0
- package/src/components/Admin/AdminServer.vue +143 -0
- package/src/components/Admin/AdminTasks.vue +60 -0
- package/src/components/Admin/AdminUser.vue +263 -0
- package/src/components/Admin/AdminUsers.vue +183 -0
- package/src/components/Admin/AdminVideos.vue +60 -0
- package/src/components/Admin/Server/ServerConnection.vue +322 -0
- package/src/components/Admin/Server/ServerInjectorModal.vue +125 -0
- package/src/components/Admin/Server/ServerInjectors.vue +104 -0
- package/src/components/Admin/Server/ServerPackages.vue +159 -0
- package/src/components/Admin/Server/ServerRepeaters.vue +105 -0
- package/src/components/Admin/Server/ServerVideos.vue +83 -0
- package/src/components/Admin/Tasks/AdminRawTasks.vue +148 -0
- package/src/components/Admin/Tasks/AdminTasks.vue +286 -0
- package/src/components/Admin/Videos/AdminVideoLeases.vue +198 -0
- package/src/components/Admin/Videos/AdminVideoService.vue +67 -0
- package/src/components/Admin/Videos/VideoConfig.vue +132 -0
- package/src/components/Admin/Videos/VideoConfigPath.vue +58 -0
- package/src/components/Admin/Videos/VideoConfigPort.vue +40 -0
- package/src/components/CloudTAK/CoTView.vue +915 -0
- package/src/components/CloudTAK/CoordInput.vue +110 -0
- package/src/components/CloudTAK/DrawTools.vue +200 -0
- package/src/components/CloudTAK/FeatView.vue +242 -0
- package/src/components/CloudTAK/GeoJSONInput.vue +226 -0
- package/src/components/CloudTAK/MainMenu.vue +190 -0
- package/src/components/CloudTAK/MainMenuContents.vue +360 -0
- package/src/components/CloudTAK/Map.vue +972 -0
- package/src/components/CloudTAK/MapLoading.vue +31 -0
- package/src/components/CloudTAK/Menu/Basemaps/EditModal.vue +427 -0
- package/src/components/CloudTAK/Menu/Debugger.vue +118 -0
- package/src/components/CloudTAK/Menu/Iconset/EditModal.vue +118 -0
- package/src/components/CloudTAK/Menu/MenuBasemaps.vue +410 -0
- package/src/components/CloudTAK/Menu/MenuChannels.vue +206 -0
- package/src/components/CloudTAK/Menu/MenuChat.vue +222 -0
- package/src/components/CloudTAK/Menu/MenuChats.vue +167 -0
- package/src/components/CloudTAK/Menu/MenuConnections.vue +166 -0
- package/src/components/CloudTAK/Menu/MenuContacts.vue +245 -0
- package/src/components/CloudTAK/Menu/MenuFeatures.vue +718 -0
- package/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue +217 -0
- package/src/components/CloudTAK/Menu/MenuFiles.vue +433 -0
- package/src/components/CloudTAK/Menu/MenuIcon.vue +236 -0
- package/src/components/CloudTAK/Menu/MenuIconset.vue +128 -0
- package/src/components/CloudTAK/Menu/MenuIconsets.vue +266 -0
- package/src/components/CloudTAK/Menu/MenuImport.vue +198 -0
- package/src/components/CloudTAK/Menu/MenuImports.vue +199 -0
- package/src/components/CloudTAK/Menu/MenuItemCard.vue +240 -0
- package/src/components/CloudTAK/Menu/MenuMission.vue +324 -0
- package/src/components/CloudTAK/Menu/MenuMissions.vue +334 -0
- package/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue +434 -0
- package/src/components/CloudTAK/Menu/MenuOverlays.vue +560 -0
- package/src/components/CloudTAK/Menu/MenuPackage.vue +340 -0
- package/src/components/CloudTAK/Menu/MenuPackages.vue +193 -0
- package/src/components/CloudTAK/Menu/MenuRoutes.vue +186 -0
- package/src/components/CloudTAK/Menu/MenuRoutesNew.vue +193 -0
- package/src/components/CloudTAK/Menu/MenuSettings.vue +95 -0
- package/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue +12 -0
- package/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue +144 -0
- package/src/components/CloudTAK/Menu/MenuSettingsTokens.vue +83 -0
- package/src/components/CloudTAK/Menu/MenuVideos.vue +436 -0
- package/src/components/CloudTAK/Menu/MenuVideosRemote.vue +203 -0
- package/src/components/CloudTAK/Menu/Mission/MissionContents.vue +211 -0
- package/src/components/CloudTAK/Menu/Mission/MissionCreate.vue +372 -0
- package/src/components/CloudTAK/Menu/Mission/MissionInfo.vue +331 -0
- package/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue +107 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue +77 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue +77 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue +194 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +157 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLog.vue +170 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLogs.vue +194 -0
- package/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue +142 -0
- package/src/components/CloudTAK/Menu/Mission/MissionUsers.vue +74 -0
- package/src/components/CloudTAK/Menu/Mission/PendingInvites.vue +130 -0
- package/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue +57 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeCots.vue +497 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +32 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeVector.vue +113 -0
- package/src/components/CloudTAK/Menu/Settings/TokenModal.vue +110 -0
- package/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue +753 -0
- package/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue +75 -0
- package/src/components/CloudTAK/Notifications.vue +195 -0
- package/src/components/CloudTAK/Query/Magnetic.vue +80 -0
- package/src/components/CloudTAK/Query/Reverse.vue +65 -0
- package/src/components/CloudTAK/Query/Sun.vue +178 -0
- package/src/components/CloudTAK/Query/Weather.vue +195 -0
- package/src/components/CloudTAK/QueryView.vue +134 -0
- package/src/components/CloudTAK/RadialMenu/LICENSE +21 -0
- package/src/components/CloudTAK/RadialMenu/README.md +63 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.css +85 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.js +534 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.vue +257 -0
- package/src/components/CloudTAK/RangeInput.vue +155 -0
- package/src/components/CloudTAK/RangeRingsInput.vue +269 -0
- package/src/components/CloudTAK/util/Breadcrumb.vue +85 -0
- package/src/components/CloudTAK/util/ChannelInfo.vue +25 -0
- package/src/components/CloudTAK/util/Contact.vue +131 -0
- package/src/components/CloudTAK/util/ContactPuck.vue +40 -0
- package/src/components/CloudTAK/util/Coordinate.vue +313 -0
- package/src/components/CloudTAK/util/CoordinateType.vue +134 -0
- package/src/components/CloudTAK/util/CopyButton.vue +67 -0
- package/src/components/CloudTAK/util/CopyField.vue +286 -0
- package/src/components/CloudTAK/util/DrawOverlay.vue +254 -0
- package/src/components/CloudTAK/util/EmptyInfo.vue +71 -0
- package/src/components/CloudTAK/util/FeatureIcon.vue +134 -0
- package/src/components/CloudTAK/util/FeatureRow.vue +206 -0
- package/src/components/CloudTAK/util/FloatingAttachment.vue +191 -0
- package/src/components/CloudTAK/util/FloatingVideo.vue +654 -0
- package/src/components/CloudTAK/util/GenericSelect.vue +125 -0
- package/src/components/CloudTAK/util/GroupSelect.vue +129 -0
- package/src/components/CloudTAK/util/Icons.vue +146 -0
- package/src/components/CloudTAK/util/JSONModal.vue +57 -0
- package/src/components/CloudTAK/util/Keywords.vue +31 -0
- package/src/components/CloudTAK/util/LineLength.vue +121 -0
- package/src/components/CloudTAK/util/MenuItem.vue +21 -0
- package/src/components/CloudTAK/util/MenuTemplate.vue +137 -0
- package/src/components/CloudTAK/util/MultipleSelect.vue +103 -0
- package/src/components/CloudTAK/util/NotificationIcon.vue +50 -0
- package/src/components/CloudTAK/util/NotificationToast.vue +125 -0
- package/src/components/CloudTAK/util/PolygonArea.vue +109 -0
- package/src/components/CloudTAK/util/PropertyAttachments.vue +224 -0
- package/src/components/CloudTAK/util/PropertyBattery.vue +44 -0
- package/src/components/CloudTAK/util/PropertyBearing.vue +148 -0
- package/src/components/CloudTAK/util/PropertyCreator.vue +61 -0
- package/src/components/CloudTAK/util/PropertyDistance.vue +182 -0
- package/src/components/CloudTAK/util/PropertyElevation.vue +84 -0
- package/src/components/CloudTAK/util/PropertyEmail.vue +44 -0
- package/src/components/CloudTAK/util/PropertyLinks.vue +148 -0
- package/src/components/CloudTAK/util/PropertyMetadata.vue +53 -0
- package/src/components/CloudTAK/util/PropertyMilSym.vue +62 -0
- package/src/components/CloudTAK/util/PropertyPhone.vue +61 -0
- package/src/components/CloudTAK/util/PropertySensor.vue +129 -0
- package/src/components/CloudTAK/util/PropertySpeed.vue +91 -0
- package/src/components/CloudTAK/util/PropertyStyle.vue +202 -0
- package/src/components/CloudTAK/util/PropertyTimes.vue +95 -0
- package/src/components/CloudTAK/util/PropertyType.vue +274 -0
- package/src/components/CloudTAK/util/SearchBox.vue +314 -0
- package/src/components/CloudTAK/util/SelectFeats.vue +190 -0
- package/src/components/CloudTAK/util/SettingsCallsign.vue +151 -0
- package/src/components/CloudTAK/util/Share.vue +496 -0
- package/src/components/CloudTAK/util/ShareToMission.vue +223 -0
- package/src/components/CloudTAK/util/ShareToPackage.vue +250 -0
- package/src/components/CloudTAK/util/SlideDownHeader.vue +92 -0
- package/src/components/CloudTAK/util/StandardItem.vue +42 -0
- package/src/components/CloudTAK/util/Subscriptions.vue +151 -0
- package/src/components/CloudTAK/util/TagEntry.vue +301 -0
- package/src/components/CloudTAK/util/UploadImport.vue +195 -0
- package/src/components/CloudTAK/util/VideoLeaseSourceType.vue +66 -0
- package/src/components/CloudTAK/util/WarnChannels.vue +56 -0
- package/src/components/CloudTAK/util/WarnConfiguration.vue +34 -0
- package/src/components/Configure.vue +259 -0
- package/src/components/ETL/Connection/AgencyBadge.vue +102 -0
- package/src/components/ETL/Connection/AgencySelect.vue +185 -0
- package/src/components/ETL/Connection/CertificateLogin.vue +75 -0
- package/src/components/ETL/Connection/CertificateMachineUser.vue +228 -0
- package/src/components/ETL/Connection/CertificateP12.vue +104 -0
- package/src/components/ETL/Connection/CertificateRaw.vue +50 -0
- package/src/components/ETL/Connection/ConnectionData.vue +174 -0
- package/src/components/ETL/Connection/ConnectionFiles.vue +182 -0
- package/src/components/ETL/Connection/ConnectionGroups.vue +181 -0
- package/src/components/ETL/Connection/ConnectionLayer.vue +180 -0
- package/src/components/ETL/Connection/ConnectionTokens.vue +147 -0
- package/src/components/ETL/Connection/ConnectionVideos.vue +151 -0
- package/src/components/ETL/Connection/Events.vue +88 -0
- package/src/components/ETL/Connection/StatusDot.vue +48 -0
- package/src/components/ETL/Connection/TokenModal.vue +136 -0
- package/src/components/ETL/Connection.vue +194 -0
- package/src/components/ETL/ConnectionCard.vue +265 -0
- package/src/components/ETL/ConnectionEdit.vue +448 -0
- package/src/components/ETL/Connections.vue +148 -0
- package/src/components/ETL/Data/DataFiles.vue +245 -0
- package/src/components/ETL/Data/DataGroups.vue +45 -0
- package/src/components/ETL/Data/DataLayer.vue +144 -0
- package/src/components/ETL/Data/Location.vue +238 -0
- package/src/components/ETL/Data.vue +259 -0
- package/src/components/ETL/DataEdit.vue +212 -0
- package/src/components/ETL/Layer/LayerAlarm.vue +307 -0
- package/src/components/ETL/Layer/LayerDeployment.vue +388 -0
- package/src/components/ETL/Layer/LayerEnvironment.vue +259 -0
- package/src/components/ETL/Layer/LayerIncomingConfig.vue +401 -0
- package/src/components/ETL/Layer/LayerIncomingEnvironmentArcGIS.vue +354 -0
- package/src/components/ETL/Layer/LayerIncomingSchema.vue +138 -0
- package/src/components/ETL/Layer/LayerIncomingStyles.vue +349 -0
- package/src/components/ETL/Layer/LayerOutgoingConfig.vue +204 -0
- package/src/components/ETL/Layer/LayerOutgoingEnvironmentArcGIS.vue +279 -0
- package/src/components/ETL/Layer/utils/QueryInput.vue +52 -0
- package/src/components/ETL/Layer/utils/Schema.vue +322 -0
- package/src/components/ETL/Layer/utils/SchemaModal.vue +77 -0
- package/src/components/ETL/Layer/utils/StatusDot.vue +38 -0
- package/src/components/ETL/Layer/utils/StyleLinkModal.vue +83 -0
- package/src/components/ETL/Layer/utils/StyleLinks.vue +139 -0
- package/src/components/ETL/Layer/utils/StyleSingle.vue +885 -0
- package/src/components/ETL/Layer/utils/StyleTemplate.vue +97 -0
- package/src/components/ETL/Layer/utils/TaskModal.vue +217 -0
- package/src/components/ETL/Layer.vue +560 -0
- package/src/components/ETL/LayerEdit.vue +276 -0
- package/src/components/ETL/Styling/Layer.vue +311 -0
- package/src/components/ETL/Styling/ObjectInput.vue +46 -0
- package/src/components/ETL/Styling/Style.vue +233 -0
- package/src/components/Home.vue +17 -0
- package/src/components/Loading.vue +42 -0
- package/src/components/Login.vue +198 -0
- package/src/components/LostUser.vue +31 -0
- package/src/components/PageFooter.vue +41 -0
- package/src/components/ServerAdmin.vue +408 -0
- package/src/components/VideoWall/Main.vue +79 -0
- package/src/components/VideoWall.vue +17 -0
- package/src/components/util/DataSelect.vue +148 -0
- package/src/components/util/EsriFilter.vue +140 -0
- package/src/components/util/EsriPortal.vue +422 -0
- package/src/components/util/EsriPortalCreate.vue +72 -0
- package/src/components/util/EsriServer.vue +368 -0
- package/src/components/util/GroupSelect.vue +166 -0
- package/src/components/util/IconSelect.vue +302 -0
- package/src/components/util/InitialAuthor.vue +28 -0
- package/src/components/util/LayerSelect.vue +162 -0
- package/src/components/util/LayerTaskSelect.vue +311 -0
- package/src/components/util/LayerTemplateSelect.vue +173 -0
- package/src/components/util/LoginModal.vue +110 -0
- package/src/components/util/PublicTilesSelect.vue +171 -0
- package/src/components/util/StatusDot.vue +31 -0
- package/src/components/util/TableFooter.vue +64 -0
- package/src/components/util/TableHeader.vue +127 -0
- package/src/components/util/Upload.vue +220 -0
- package/src/components/util/UploadCSV.vue +46 -0
- package/src/components/util/UploadLogo.vue +83 -0
- package/src/components/util/UploadP12.vue +93 -0
- package/src/components/util/UserSelect.vue +151 -0
- package/src/derived-types.d.ts +35243 -0
- package/src/main.ts +264 -0
- package/src/pages/admin/main.ts +208 -0
- package/src/pages/connection/main.ts +158 -0
- package/src/pages/docs/App.vue +19 -0
- package/src/pages/docs/main.ts +6 -0
- package/src/pages/video/main.ts +27 -0
- package/src/std.ts +152 -0
- package/src/stores/brand.ts +28 -0
- package/src/stores/float.ts +113 -0
- package/src/stores/map.ts +931 -0
- package/src/stores/modules/draw.ts +413 -0
- package/src/stores/modules/icons.ts +185 -0
- package/src/stores/modules/menu.ts +281 -0
- package/src/test/setup.ts +43 -0
- package/src/timediff.ts +33 -0
- package/src/types.ts +226 -0
- package/src/video.ts +27 -0
- package/src/vite-env.d.ts +9 -0
- package/src/workers/atlas-connection.ts +236 -0
- package/src/workers/atlas-database.ts +764 -0
- package/src/workers/atlas-profile.ts +374 -0
- package/src/workers/atlas-team.ts +90 -0
- package/src/workers/atlas.ts +81 -0
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* AtlasConnection - Maintain the WebSocket connection with CloudTAK Server
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { std } from '../std.ts';
|
|
6
|
+
import { LngLatBounds } from 'maplibre-gl'
|
|
7
|
+
import jsonata from 'jsonata';
|
|
8
|
+
import type Atlas from './atlas.ts';
|
|
9
|
+
import Subscription from '../base/subscription.ts';
|
|
10
|
+
import { coordEach } from '@turf/meta'
|
|
11
|
+
import COT, { OriginMode } from '../base/cot.ts';
|
|
12
|
+
import { WorkerMessageType } from '../base/events.ts';
|
|
13
|
+
import type { GeoJSONSourceDiff, LngLatLike } from 'maplibre-gl';
|
|
14
|
+
import { booleanWithin } from '@turf/boolean-within';
|
|
15
|
+
import type { Polygon } from 'geojson';
|
|
16
|
+
import type { InputFeature, Feature, APIList } from '../types.ts';
|
|
17
|
+
|
|
18
|
+
type NestedArray = {
|
|
19
|
+
path: string;
|
|
20
|
+
count: number;
|
|
21
|
+
paths: Array<NestedArray>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default class AtlasDatabase {
|
|
25
|
+
atlas: Atlas;
|
|
26
|
+
|
|
27
|
+
cots: Map<string, COT>;
|
|
28
|
+
|
|
29
|
+
// Stores Active Mission if present
|
|
30
|
+
mission?: string;
|
|
31
|
+
|
|
32
|
+
pendingCreate: Map<string, COT>;
|
|
33
|
+
pendingUpdate: Map<string, COT>;
|
|
34
|
+
pendingHidden: Set<string>;
|
|
35
|
+
pendingUnhide: Set<string>;
|
|
36
|
+
pendingDelete: Set<string>;
|
|
37
|
+
|
|
38
|
+
subscriptionPending: Map<string, string>;
|
|
39
|
+
|
|
40
|
+
constructor(atlas: Atlas) {
|
|
41
|
+
this.atlas = atlas;
|
|
42
|
+
|
|
43
|
+
this.cots = new Map();
|
|
44
|
+
|
|
45
|
+
this.pendingCreate = new Map();
|
|
46
|
+
this.pendingUpdate = new Map();
|
|
47
|
+
this.pendingUnhide = new Set();
|
|
48
|
+
this.pendingHidden = new Set();
|
|
49
|
+
this.pendingDelete = new Set();
|
|
50
|
+
|
|
51
|
+
this.subscriptionPending = new Map(); // UID, Mission Guid
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async makeActiveMission(guid? : string): Promise<void> {
|
|
55
|
+
if (guid) {
|
|
56
|
+
this.mission = guid;
|
|
57
|
+
} else {
|
|
58
|
+
this.mission = undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Only Called by non-Mission CoTs, caller is responsible for creating Filters
|
|
64
|
+
*/
|
|
65
|
+
async hide(id: string): Promise<void> {
|
|
66
|
+
this.pendingHidden.add(id);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Only Called by non-Mission CoTs, caller is responsible for removing Filters
|
|
71
|
+
*/
|
|
72
|
+
async unhide(id: string): Promise<void> {
|
|
73
|
+
this.pendingUnhide.add(id);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async init(): Promise<void> {
|
|
77
|
+
await this.loadArchive()
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Return a Set of coordinates within the given Map bounds
|
|
82
|
+
* so that vertex snapping can take place when editing
|
|
83
|
+
*/
|
|
84
|
+
async snapping(bboxarr: [number, number][]): Promise<Set<[number, number]>> {
|
|
85
|
+
const bounds = new LngLatBounds(bboxarr as [LngLatLike, LngLatLike]);
|
|
86
|
+
const coords = new Set<[number, number]>();
|
|
87
|
+
|
|
88
|
+
for (const cot of this.cots.values()) {
|
|
89
|
+
coordEach(cot.geometry, (coord) => {
|
|
90
|
+
const min = coord.slice(0, 2) as [number, number];
|
|
91
|
+
|
|
92
|
+
// Don't Send Invalid Coords
|
|
93
|
+
if (min[0] < -180 || min[0] > 180 || min[1] < -90 || min[1] > 90) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (bounds.contains({ lng: min[0], lat: min[1] })) {
|
|
98
|
+
coords.add(min);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return coords;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Generate a GeoJSONDiff on existing COT Features
|
|
108
|
+
*/
|
|
109
|
+
async diff(): Promise<GeoJSONSourceDiff> {
|
|
110
|
+
const now = +new Date();
|
|
111
|
+
const diff: GeoJSONSourceDiff = {};
|
|
112
|
+
diff.add = [];
|
|
113
|
+
diff.remove = [];
|
|
114
|
+
diff.update = [];
|
|
115
|
+
|
|
116
|
+
const profile = await this.atlas.profile.load();
|
|
117
|
+
const display_stale = profile.display_stale || 'Immediate';
|
|
118
|
+
|
|
119
|
+
for (const cot of this.cots.values()) {
|
|
120
|
+
const render = cot.as_rendered();
|
|
121
|
+
const stale = new Date(cot.properties.stale).getTime();
|
|
122
|
+
|
|
123
|
+
if (this.pendingHidden.has(String(cot.id))) {
|
|
124
|
+
diff.remove.push(cot.vectorId())
|
|
125
|
+
this.pendingHidden.delete(cot.id);
|
|
126
|
+
} else if (
|
|
127
|
+
!['Never'].includes(display_stale)
|
|
128
|
+
&& !cot.properties.archived
|
|
129
|
+
&& (
|
|
130
|
+
display_stale === 'Immediate' && now > stale
|
|
131
|
+
|| display_stale === '10 Minutes' && now > stale + 600000
|
|
132
|
+
|| display_stale === '30 Minutes' && now > stale + 600000 * 3
|
|
133
|
+
|| display_stale === '1 Hour' && now > stale + 600000 * 6
|
|
134
|
+
)
|
|
135
|
+
) {
|
|
136
|
+
diff.remove.push(cot.vectorId())
|
|
137
|
+
} else if (!cot.properties.archived) {
|
|
138
|
+
if (now < stale && (cot.properties['icon-opacity'] !== 1 || cot.properties['marker-opacity'] !== 1)) {
|
|
139
|
+
cot.properties['icon-opacity'] = 1;
|
|
140
|
+
cot.properties['marker-opacity'] = 1;
|
|
141
|
+
|
|
142
|
+
if (!['Point', 'Polygon', 'LineString'].includes(cot.geometry.type)) continue;
|
|
143
|
+
|
|
144
|
+
diff.update.push({
|
|
145
|
+
id: Number(render.id),
|
|
146
|
+
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
|
|
147
|
+
return { key, value: render.properties ? render.properties[key] : '' }
|
|
148
|
+
}),
|
|
149
|
+
newGeometry: render.geometry
|
|
150
|
+
})
|
|
151
|
+
} else if (now > stale && (cot.properties['icon-opacity'] !== 0.5 || cot.properties['marker-opacity'] !== 127)) {
|
|
152
|
+
render.properties['icon-opacity'] = 0.5;
|
|
153
|
+
render.properties['marker-opacity'] = 0.5;
|
|
154
|
+
|
|
155
|
+
if (!['Point', 'Polygon', 'LineString'].includes(render.geometry.type)) continue;
|
|
156
|
+
|
|
157
|
+
diff.update.push({
|
|
158
|
+
id: Number(render.id),
|
|
159
|
+
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
|
|
160
|
+
return { key, value: cot.properties ? render.properties[key] : '' }
|
|
161
|
+
}),
|
|
162
|
+
newGeometry: render.geometry
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
for (const id of this.pendingUnhide.values()) {
|
|
169
|
+
const cot = this.cots.get(id);
|
|
170
|
+
if (!cot) continue;
|
|
171
|
+
|
|
172
|
+
const render = cot.as_rendered();
|
|
173
|
+
diff.add.push(render);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
this.pendingUnhide.clear();
|
|
177
|
+
|
|
178
|
+
for (const cot of this.pendingCreate.values()) {
|
|
179
|
+
const render = cot.as_rendered();
|
|
180
|
+
diff.add.push(render);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this.pendingCreate.clear();
|
|
184
|
+
|
|
185
|
+
for (const cot of this.pendingUpdate.values()) {
|
|
186
|
+
const render = cot.as_rendered();
|
|
187
|
+
|
|
188
|
+
diff.update.push({
|
|
189
|
+
id: Number(render.id),
|
|
190
|
+
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
|
|
191
|
+
return { key, value: render.properties[key] }
|
|
192
|
+
}),
|
|
193
|
+
newGeometry: render.geometry
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
this.pendingCreate.clear();
|
|
198
|
+
|
|
199
|
+
for (const id of this.pendingDelete) {
|
|
200
|
+
const cot = await this.get(id);
|
|
201
|
+
if (!cot) continue;
|
|
202
|
+
|
|
203
|
+
diff.remove.push(cot.vectorId());
|
|
204
|
+
|
|
205
|
+
this.cots.delete(id);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
this.pendingDelete.clear();
|
|
209
|
+
|
|
210
|
+
return diff;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Iterate over all CoTs and delete toTs that match the filter pattern
|
|
215
|
+
* @param filter - JSONata filter expression to match CoTs against
|
|
216
|
+
*/
|
|
217
|
+
async filterRemove(
|
|
218
|
+
filter: string,
|
|
219
|
+
opts: {
|
|
220
|
+
mission?: boolean,
|
|
221
|
+
skipNetwork?: boolean
|
|
222
|
+
} = {}
|
|
223
|
+
): Promise<void> {
|
|
224
|
+
const cots = await this.filter(filter, opts);
|
|
225
|
+
|
|
226
|
+
const all = [];
|
|
227
|
+
for (const cot of cots.values()) {
|
|
228
|
+
all.push(this.remove(cot.id, {
|
|
229
|
+
mission: opts.mission || false,
|
|
230
|
+
skipNetwork: opts.skipNetwork
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
await Promise.allSettled(all);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Iterate over cot messages and return list of CoTs that match filter pattern
|
|
239
|
+
*/
|
|
240
|
+
async filter(
|
|
241
|
+
filter: string,
|
|
242
|
+
opts: {
|
|
243
|
+
limit?: number;
|
|
244
|
+
mission?: boolean,
|
|
245
|
+
} = {}
|
|
246
|
+
): Promise<Set<COT>> {
|
|
247
|
+
const cots: Set<COT> = new Set();
|
|
248
|
+
|
|
249
|
+
const expression = jsonata(filter);
|
|
250
|
+
|
|
251
|
+
for (const cot of this.cots.values()) {
|
|
252
|
+
if (await expression.evaluate(cot.as_feature()) === true) {
|
|
253
|
+
cots.add(cot);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (opts.mission) {
|
|
258
|
+
for (const sub of await Subscription.localList({
|
|
259
|
+
subscribed: true
|
|
260
|
+
})) {
|
|
261
|
+
const store = await Subscription.from(sub.guid, this.atlas.token, {
|
|
262
|
+
subscribed: true
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
if (!store) continue;
|
|
266
|
+
|
|
267
|
+
for (const feat of await store.feature.list()) {
|
|
268
|
+
if (await expression.evaluate(feat) === true) {
|
|
269
|
+
cots.add(await COT.load(this.atlas, feat, {
|
|
270
|
+
mode: OriginMode.MISSION,
|
|
271
|
+
mode_id: sub.guid
|
|
272
|
+
}));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (opts.limit !== undefined) {
|
|
279
|
+
const subset: Set<COT> = new Set();
|
|
280
|
+
for (const cot of cots.values()) {
|
|
281
|
+
if (subset.size === opts.limit) break;
|
|
282
|
+
subset.add(cot);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return subset;
|
|
286
|
+
} else {
|
|
287
|
+
return cots;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async filterDelete(
|
|
292
|
+
filter: string,
|
|
293
|
+
opts: {
|
|
294
|
+
mission?: boolean,
|
|
295
|
+
} = {}
|
|
296
|
+
): Promise<void> {
|
|
297
|
+
const cots = await this.filter(filter, opts);
|
|
298
|
+
|
|
299
|
+
const all = [];
|
|
300
|
+
for (const cot of cots.values()) {
|
|
301
|
+
all.push(this.remove(cot.id, {
|
|
302
|
+
mission: opts.mission || false
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
await Promise.allSettled(all);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
async paths(store?: Map<string, COT>): Promise<Array<NestedArray>> {
|
|
310
|
+
if (!store) store = this.cots;
|
|
311
|
+
|
|
312
|
+
const paths = new Map<string, number>();
|
|
313
|
+
for (const value of store.values()) {
|
|
314
|
+
if (value.path && value.path !== '/' && value.properties.archived) {
|
|
315
|
+
paths.set(value.path, (paths.get(value.path) || 0) + 1);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return Array.from(paths.keys()).map((path) => {
|
|
320
|
+
return {
|
|
321
|
+
path: path,
|
|
322
|
+
count: paths.get(path) || 0,
|
|
323
|
+
paths: []
|
|
324
|
+
} as NestedArray
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Return CoTs touching a given polygon
|
|
330
|
+
*
|
|
331
|
+
* @param poly - GeoJSON Polygon to test CoTs against
|
|
332
|
+
*/
|
|
333
|
+
async touching(poly: Polygon): Promise<Set<COT>> {
|
|
334
|
+
const within: Set<COT> = new Set();
|
|
335
|
+
|
|
336
|
+
for (const cot of this.cots.values()) {
|
|
337
|
+
if (booleanWithin(cot.as_feature(), poly)) {
|
|
338
|
+
within.add(cot)
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return within;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Load Archived CoTs
|
|
347
|
+
*/
|
|
348
|
+
async loadArchive(): Promise<void> {
|
|
349
|
+
const archive = await std('/api/profile/feature', {
|
|
350
|
+
token: this.atlas.token
|
|
351
|
+
}) as APIList<Feature>;
|
|
352
|
+
|
|
353
|
+
for (const a of archive.items) {
|
|
354
|
+
this.add(a, {
|
|
355
|
+
skipSave: true,
|
|
356
|
+
skipBroadcast: true
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
this.atlas.postMessage({
|
|
361
|
+
type: WorkerMessageType.Feature_Archived_Added,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Remove a given CoT from the store
|
|
367
|
+
*
|
|
368
|
+
* @param id - UID of the CoT to remove
|
|
369
|
+
* @param opts - Options
|
|
370
|
+
* @param opts.mission - If true, search Mission Stores for the CoT
|
|
371
|
+
* @param opts.skipNetwork - If an archived CoT, don't delete from the server
|
|
372
|
+
*/
|
|
373
|
+
async remove(
|
|
374
|
+
id: string,
|
|
375
|
+
opts: {
|
|
376
|
+
mission?: boolean,
|
|
377
|
+
skipNetwork?: boolean
|
|
378
|
+
} = {
|
|
379
|
+
mission: false,
|
|
380
|
+
skipNetwork: false
|
|
381
|
+
}
|
|
382
|
+
): Promise<void> {
|
|
383
|
+
const cot = await this.get(id, {
|
|
384
|
+
mission: opts.mission
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
// TODO Throw an error?
|
|
388
|
+
if (!cot) {
|
|
389
|
+
console.warn(`Cannot remove CoT ${id} as it does not exist in the store`);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (cot.origin.mode === OriginMode.CONNECTION) {
|
|
394
|
+
this.pendingDelete.add(id);
|
|
395
|
+
|
|
396
|
+
if (cot.properties.archived) {
|
|
397
|
+
this.atlas.postMessage({
|
|
398
|
+
type: WorkerMessageType.Feature_Archived_Removed
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
if (!opts.skipNetwork) {
|
|
402
|
+
await std(`/api/profile/feature/${id}`, {
|
|
403
|
+
token: this.atlas.token,
|
|
404
|
+
method: 'DELETE'
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
} else if (cot.origin.mode === OriginMode.MISSION && cot.origin.mode_id) {
|
|
409
|
+
const subscription = await Subscription.from(cot.origin.mode_id, this.atlas.token, {
|
|
410
|
+
subscribed: true
|
|
411
|
+
});
|
|
412
|
+
if (!subscription) throw new Error('Could not delete as Mission Subscription does not exist');
|
|
413
|
+
|
|
414
|
+
await subscription.feature.delete(this.atlas, cot.id, {
|
|
415
|
+
skipNetwork: opts.skipNetwork
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Empty the store
|
|
422
|
+
*
|
|
423
|
+
* @param opts - Options
|
|
424
|
+
* @param opts.ignoreArchived - Don't delete archived features
|
|
425
|
+
* @param opts.skipNetwork - Don't delete archived features from the server
|
|
426
|
+
*/
|
|
427
|
+
async clear(opts = {
|
|
428
|
+
ignoreArchived: false,
|
|
429
|
+
skipNetwork: false
|
|
430
|
+
}): Promise<void> {
|
|
431
|
+
for (const feat of this.cots.values()) {
|
|
432
|
+
if (opts.ignoreArchived && feat.properties.archived) {
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
this.remove(feat.id, {
|
|
437
|
+
skipNetwork: opts.skipNetwork
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Called everytime a Mission Task message is received
|
|
444
|
+
*
|
|
445
|
+
* @param task - GeoJSON Feature representing the Mission Task
|
|
446
|
+
*/
|
|
447
|
+
async subChange(task: Feature): Promise<void> {
|
|
448
|
+
if (task.properties.type === 't-x-m-c' && task.properties.mission && task.properties.mission.missionChanges) {
|
|
449
|
+
let updateGuid;
|
|
450
|
+
|
|
451
|
+
for (const change of task.properties.mission.missionChanges) {
|
|
452
|
+
if (!task.properties.mission.guid) {
|
|
453
|
+
console.error(`Cannot add ${change.contentUid} to ${JSON.stringify(task.properties.mission)} as no guid was included`);
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
if (change.type === 'ADD_CONTENT') {
|
|
458
|
+
this.subscriptionPending.set(change.contentUid, task.properties.mission.guid);
|
|
459
|
+
} else if (change.type === 'REMOVE_CONTENT') {
|
|
460
|
+
const sub = await Subscription.from(task.properties.mission.guid, this.atlas.token, {
|
|
461
|
+
subscribed: true
|
|
462
|
+
});
|
|
463
|
+
if (!sub) {
|
|
464
|
+
console.error(`Cannot remove ${change.contentUid} from ${task.properties.mission.guid} as it's not in memory`);
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
await sub.feature.delete(this.atlas, change.contentUid, {
|
|
469
|
+
// This is critical to ensure a recursive loop of doesn't occur
|
|
470
|
+
skipNetwork: true
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
updateGuid = task.properties.mission.guid;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if (updateGuid) {
|
|
478
|
+
this.atlas.postMessage({
|
|
479
|
+
type: WorkerMessageType.Mission_Change_Feature,
|
|
480
|
+
body: {
|
|
481
|
+
guid: updateGuid
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
} else if (task.properties.type === 't-x-m-c-l' && task.properties.mission && task.properties.mission.guid) {
|
|
486
|
+
const sub = await Subscription.from(task.properties.mission.guid, this.atlas.token, {
|
|
487
|
+
subscribed: true
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
if (!sub) {
|
|
491
|
+
console.error(`Cannot refresh ${task.properties.mission.guid} logs as it is not subscribed`);
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
await sub.log.refresh();
|
|
496
|
+
} else if (task.properties.type === 't-x-m-c-m' && task.properties.mission && task.properties.mission.guid) {
|
|
497
|
+
const sub = await Subscription.from(task.properties.mission.guid, this.atlas.token, {
|
|
498
|
+
subscribed: true
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
if (!sub) {
|
|
502
|
+
console.error(`Cannot refresh ${task.properties.mission.guid} logs as it is not subscribed`);
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
await sub.fetch();
|
|
507
|
+
} else {
|
|
508
|
+
console.warn('Unknown Mission Task', JSON.stringify(task));
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Add or Update a CoT GeoJSON to the store and modify props to meet MapLibre style requirements
|
|
514
|
+
*
|
|
515
|
+
* @param feat - GeoJSON Feature to create/update in Store
|
|
516
|
+
*
|
|
517
|
+
* @param opts - Optional Options
|
|
518
|
+
* @param opts.skipSave - Don't save the COT to the Profile Feature Database
|
|
519
|
+
* @param opts.skipBroadcast - Don't broadcast the COT on the internal message bus to the UI
|
|
520
|
+
* @param opts.authored - If the COT is authored, append creator information if the CoT is new & potentially add it to a mission
|
|
521
|
+
*/
|
|
522
|
+
async add(
|
|
523
|
+
feature: InputFeature,
|
|
524
|
+
opts?: {
|
|
525
|
+
skipSave?: boolean;
|
|
526
|
+
skipBroadcast?: boolean;
|
|
527
|
+
authored?: boolean,
|
|
528
|
+
}
|
|
529
|
+
): Promise<COT> {
|
|
530
|
+
if (!opts) opts = {};
|
|
531
|
+
|
|
532
|
+
feature.properties.id = feature.id;
|
|
533
|
+
|
|
534
|
+
const feat = feature as Feature;
|
|
535
|
+
|
|
536
|
+
// Check if CoT exists
|
|
537
|
+
let exists = await this.get(feat.properties.id, {
|
|
538
|
+
mission: true
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
if (opts.authored && !exists) {
|
|
542
|
+
feat.properties.creator = await this.atlas.profile.creator();
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// New CoT destined for a Mission
|
|
546
|
+
if (
|
|
547
|
+
!exists && (
|
|
548
|
+
(this.mission && opts.authored) // Authored CoT and we have an active Mission
|
|
549
|
+
|| (
|
|
550
|
+
feat.origin && feat.origin.mode === "Mission"
|
|
551
|
+
&& feat.origin.mode_id
|
|
552
|
+
)
|
|
553
|
+
|| this.subscriptionPending.get(feat.id)
|
|
554
|
+
)
|
|
555
|
+
|| exists && (
|
|
556
|
+
exists.origin.mode === OriginMode.MISSION
|
|
557
|
+
&& exists.origin.mode_id
|
|
558
|
+
)
|
|
559
|
+
) {
|
|
560
|
+
const pendingGuid = this.subscriptionPending.get(feat.id);
|
|
561
|
+
this.subscriptionPending.delete(feat.id);
|
|
562
|
+
|
|
563
|
+
const mission_guid =
|
|
564
|
+
this.mission // An Active Mission
|
|
565
|
+
|| pendingGuid
|
|
566
|
+
|| feat.origin?.mode_id; // The feature has a Mission Origin
|
|
567
|
+
|
|
568
|
+
if (!mission_guid) {
|
|
569
|
+
throw new Error(`Cannot add ${feat.id} to a mission as no mission GUID was found - Please report this error`);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
const sub = await Subscription.from(mission_guid, this.atlas.token, {
|
|
573
|
+
subscribed: true
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
if (!sub) {
|
|
577
|
+
throw new Error(`Cannot add ${feat.id} to mission ${mission_guid} as it is not loaded`)
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (!exists) {
|
|
581
|
+
exists = await COT.load(this.atlas, feat, {
|
|
582
|
+
mode: OriginMode.MISSION,
|
|
583
|
+
mode_id: mission_guid
|
|
584
|
+
}, opts);
|
|
585
|
+
} else {
|
|
586
|
+
await exists.update({
|
|
587
|
+
path: feat.path,
|
|
588
|
+
properties: feat.properties,
|
|
589
|
+
geometry: feat.geometry
|
|
590
|
+
}, { skipSave: opts.skipSave })
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
await sub.feature.update(this.atlas, exists, {
|
|
594
|
+
skipNetwork: !opts.authored
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
this.atlas.postMessage({
|
|
598
|
+
type: WorkerMessageType.Mission_Change_Feature,
|
|
599
|
+
body: {
|
|
600
|
+
guid: mission_guid
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
return exists;
|
|
605
|
+
} else {
|
|
606
|
+
if (exists) {
|
|
607
|
+
await exists.update({
|
|
608
|
+
path: feat.path,
|
|
609
|
+
properties: feat.properties,
|
|
610
|
+
geometry: feat.geometry
|
|
611
|
+
}, { skipSave: opts.skipSave })
|
|
612
|
+
} else {
|
|
613
|
+
exists = await COT.load(this.atlas, feat, {
|
|
614
|
+
mode: OriginMode.CONNECTION
|
|
615
|
+
}, opts);
|
|
616
|
+
|
|
617
|
+
if (opts.skipBroadcast !== true && exists.properties.archived) {
|
|
618
|
+
this.atlas.postMessage({
|
|
619
|
+
type: WorkerMessageType.Feature_Archived_Added,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
if (exists.is_skittle) {
|
|
625
|
+
await this.atlas.team.set(exists);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
return exists;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Return a CoT by ID if it exists
|
|
634
|
+
*
|
|
635
|
+
* @param id - ID of the CoT to return
|
|
636
|
+
* @param opts - Options
|
|
637
|
+
* @param opts.mission - If true, search Mission Stores for the CoT
|
|
638
|
+
*/
|
|
639
|
+
async get(
|
|
640
|
+
id: string,
|
|
641
|
+
opts: {
|
|
642
|
+
mission?: boolean,
|
|
643
|
+
} = {
|
|
644
|
+
mission: false
|
|
645
|
+
}
|
|
646
|
+
): Promise<COT | undefined> {
|
|
647
|
+
if (!id) throw new Error('Cannot get marker without an ID');
|
|
648
|
+
|
|
649
|
+
if (!opts) opts = {};
|
|
650
|
+
|
|
651
|
+
let cot = this.cots.get(id);
|
|
652
|
+
|
|
653
|
+
if (cot) {
|
|
654
|
+
return cot;
|
|
655
|
+
} else if (opts.mission) {
|
|
656
|
+
for (const sub of await Subscription.localList({
|
|
657
|
+
subscribed: true
|
|
658
|
+
})) {
|
|
659
|
+
const store = await Subscription.from(sub.guid, this.atlas.token, {
|
|
660
|
+
subscribed: true
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
if (!store) continue;
|
|
664
|
+
|
|
665
|
+
const feat = await store.feature.from(id);
|
|
666
|
+
|
|
667
|
+
if (!feat) continue;
|
|
668
|
+
|
|
669
|
+
cot = await COT.load(this.atlas, feat, {
|
|
670
|
+
mode: OriginMode.MISSION,
|
|
671
|
+
mode_id: sub.guid
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
return cot;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Returns if the CoT is present in the store given the ID
|
|
683
|
+
*/
|
|
684
|
+
has(id: string): boolean {
|
|
685
|
+
return this.cots.has(id);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
groups(store?: Map<string, COT>): Array<string> {
|
|
689
|
+
if (!store) store = this.cots;
|
|
690
|
+
|
|
691
|
+
const groups: Set<string> = new Set();
|
|
692
|
+
for (const value of store.values()) {
|
|
693
|
+
if (value.properties.group) groups.add(value.properties.group.name);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
return Array.from(groups);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
pathFeatures(path?: string, store?: Map<string, COT>): Set<COT> {
|
|
700
|
+
if (!store) store = this.cots;
|
|
701
|
+
|
|
702
|
+
const feats: Set<COT> = new Set();
|
|
703
|
+
|
|
704
|
+
for (const value of store.values()) {
|
|
705
|
+
if (path && value.path === path && value.properties.archived) {
|
|
706
|
+
feats.add(value);
|
|
707
|
+
} else if (!path && value.properties.archived) {
|
|
708
|
+
feats.add(value);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
return feats;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
markers(store?: Map<string, COT>): Array<string> {
|
|
716
|
+
if (!store) store = this.cots;
|
|
717
|
+
|
|
718
|
+
const markers: Set<string> = new Set();
|
|
719
|
+
for (const value of store.values()) {
|
|
720
|
+
if (value.properties.group) continue;
|
|
721
|
+
if (value.properties.archived) continue;
|
|
722
|
+
markers.add(value.properties.type);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
return Array.from(markers);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
markerFeatures(marker: string, store?: Map<string, COT>): Set<COT> {
|
|
729
|
+
if (!store) store = this.cots;
|
|
730
|
+
|
|
731
|
+
const feats: Set<COT> = new Set();
|
|
732
|
+
|
|
733
|
+
for (const value of store.values()) {
|
|
734
|
+
if (value.properties.group) continue;
|
|
735
|
+
if (value.properties.archived) continue;
|
|
736
|
+
|
|
737
|
+
if (value.properties.type === marker) {
|
|
738
|
+
feats.add(value);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
return feats;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
contacts(group?: string, store?: Map<string, COT>): Set<COT> {
|
|
746
|
+
if (!store) store = this.cots;
|
|
747
|
+
|
|
748
|
+
const contacts: Set<COT> = new Set();
|
|
749
|
+
for (const value of store.values()) {
|
|
750
|
+
if (value.properties.group) contacts.add(value);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
let list = Array.from(contacts);
|
|
754
|
+
|
|
755
|
+
if (group) {
|
|
756
|
+
list = list.filter((contact) => {
|
|
757
|
+
if (!contact.properties.group) return false;
|
|
758
|
+
return contact.properties.group.name === group;
|
|
759
|
+
})
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
return new Set(list);
|
|
763
|
+
}
|
|
764
|
+
}
|