@adminide-stack/yantra-mobile 12.0.196-alpha.0 → 12.0.196
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/lib/components/CustomDrawer.js +17 -1
- package/lib/components/CustomDrawer.js.map +1 -1
- package/lib/compute.js +57 -1
- package/lib/compute.js.map +1 -1
- package/lib/config/env-config.js +11 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/features/agent-chat/NativeAgentChat.js +7 -0
- package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
- package/lib/features/canvas/extendVideo.js +5 -1
- package/lib/features/canvas/extendVideo.js.map +1 -1
- package/lib/features/canvas/workflow/StepSheet.js +18 -1
- package/lib/features/canvas/workflow/StepSheet.js.map +1 -1
- package/lib/features/canvas/workflow/workflowSteps.js +102 -31
- package/lib/features/canvas/workflow/workflowSteps.js.map +1 -1
- package/lib/features/chat/ComposerMicSend.js +35 -0
- package/lib/features/chat/ComposerMicSend.js.map +1 -0
- package/lib/features/chat/ComposerModeSwitch.js +64 -1
- package/lib/features/chat/ComposerModeSwitch.js.map +1 -1
- package/lib/features/chat/askUser.js +6 -1
- package/lib/features/chat/askUser.js.map +1 -1
- package/lib/features/connectors/ConnectorSheet.js +443 -0
- package/lib/features/connectors/ConnectorSheet.js.map +1 -0
- package/lib/features/connectors/ConnectorsPage.js +320 -0
- package/lib/features/connectors/ConnectorsPage.js.map +1 -0
- package/lib/features/connectors/connectConnector.js +278 -0
- package/lib/features/connectors/connectConnector.js.map +1 -0
- package/lib/features/connectors/connectorCatalog.js +222 -0
- package/lib/features/connectors/connectorCatalog.js.map +1 -0
- package/lib/features/connectors/useConnectorCatalog.js +153 -0
- package/lib/features/connectors/useConnectorCatalog.js.map +1 -0
- package/lib/features/home/needsYou/HomeNeedsYou.js +618 -0
- package/lib/features/home/needsYou/HomeNeedsYou.js.map +1 -0
- package/lib/features/home/needsYou/chatFollowUps.js +333 -0
- package/lib/features/home/needsYou/chatFollowUps.js.map +1 -0
- package/lib/features/home/needsYou/format.js +47 -0
- package/lib/features/home/needsYou/format.js.map +1 -0
- package/lib/features/home/needsYou/historyText.js +40 -0
- package/lib/features/home/needsYou/historyText.js.map +1 -0
- package/lib/features/home/needsYou/inboxHighlights.js +152 -0
- package/lib/features/home/needsYou/inboxHighlights.js.map +1 -0
- package/lib/features/home/needsYou/panelsSettings.js +71 -0
- package/lib/features/home/needsYou/panelsSettings.js.map +1 -0
- package/lib/features/home/needsYou/ported/commandConfirmProtocol.js +13 -0
- package/lib/features/home/needsYou/ported/commandConfirmProtocol.js.map +1 -0
- package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js +91 -0
- package/lib/features/home/needsYou/ported/paymentApprovalProtocol.js.map +1 -0
- package/lib/features/home/needsYou/ported/resultCardModels.js +659 -0
- package/lib/features/home/needsYou/ported/resultCardModels.js.map +1 -0
- package/lib/features/home/needsYou/types.js +1 -0
- package/lib/features/home/needsYou/types.js.map +1 -0
- package/lib/features/home/needsYou/useChatFollowUps.js +149 -0
- package/lib/features/home/needsYou/useChatFollowUps.js.map +1 -0
- package/lib/features/home/needsYou/useHomeBriefing.js +68 -0
- package/lib/features/home/needsYou/useHomeBriefing.js.map +1 -0
- package/lib/features/home/needsYou/useInboxHighlights.js +173 -0
- package/lib/features/home/needsYou/useInboxHighlights.js.map +1 -0
- package/lib/features/home/needsYou/usePanelsSettings.js +105 -0
- package/lib/features/home/needsYou/usePanelsSettings.js.map +1 -0
- package/lib/features/shopping/DealCard.js +8 -1
- package/lib/features/shopping/DealCard.js.map +1 -1
- package/lib/features/shopping/DealRails.js +24 -7
- package/lib/features/shopping/DealRails.js.map +1 -1
- package/lib/features/shopping/DealsPanel.js +1 -1
- package/lib/features/shopping/DealsPanel.js.map +1 -1
- package/lib/features/shopping/HolidayDealsPanel.js +529 -0
- package/lib/features/shopping/HolidayDealsPanel.js.map +1 -0
- package/lib/features/shopping/HolidayDealsParts.js +954 -0
- package/lib/features/shopping/HolidayDealsParts.js.map +1 -0
- package/lib/features/shopping/HolidayOffers.js +351 -0
- package/lib/features/shopping/HolidayOffers.js.map +1 -0
- package/lib/features/shopping/ProductCard.js +80 -14
- package/lib/features/shopping/ProductCard.js.map +1 -1
- package/lib/features/shopping/ProductDetailSheet.js +22 -3
- package/lib/features/shopping/ProductDetailSheet.js.map +1 -1
- package/lib/features/shopping/SavedPanel.js +341 -5
- package/lib/features/shopping/SavedPanel.js.map +1 -1
- package/lib/features/shopping/SearchResults.js +8 -2
- package/lib/features/shopping/SearchResults.js.map +1 -1
- package/lib/features/shopping/ShoppingAgentChatPane.js +12 -0
- package/lib/features/shopping/ShoppingAgentChatPane.js.map +1 -1
- package/lib/features/shopping/ShoppingExperience.js +56 -19
- package/lib/features/shopping/ShoppingExperience.js.map +1 -1
- package/lib/features/shopping/TrendingSections.js +13 -4
- package/lib/features/shopping/TrendingSections.js.map +1 -1
- package/lib/features/shopping/WatchlistPanel.js +61 -5
- package/lib/features/shopping/WatchlistPanel.js.map +1 -1
- package/lib/features/shopping/catalog.js +41 -2
- package/lib/features/shopping/catalog.js.map +1 -1
- package/lib/features/shopping/chat/brainRouter.js +14 -0
- package/lib/features/shopping/chat/brainRouter.js.map +1 -1
- package/lib/features/shopping/chat/shoppingTurn.js +88 -16
- package/lib/features/shopping/chat/shoppingTurn.js.map +1 -1
- package/lib/features/shopping/hooks/useHolidayDeals.js +388 -0
- package/lib/features/shopping/hooks/useHolidayDeals.js.map +1 -0
- package/lib/features/shopping/hooks/useProductMedia.js +33 -6
- package/lib/features/shopping/hooks/useProductMedia.js.map +1 -1
- package/lib/features/shopping/hooks/useShoppingHistorySync.js +8 -4
- package/lib/features/shopping/hooks/useShoppingHistorySync.js.map +1 -1
- package/lib/features/shopping/hooks/useTrendingProducts.js +11 -3
- package/lib/features/shopping/hooks/useTrendingProducts.js.map +1 -1
- package/lib/features/shopping/savedProducts.js +76 -6
- package/lib/features/shopping/savedProducts.js.map +1 -1
- package/lib/features/shopping/services/aiRelevance.js +212 -0
- package/lib/features/shopping/services/aiRelevance.js.map +1 -0
- package/lib/features/shopping/services/blackFriday.js +301 -0
- package/lib/features/shopping/services/blackFriday.js.map +1 -0
- package/lib/features/shopping/services/blackFridayBrowserSites.js +137 -0
- package/lib/features/shopping/services/blackFridayBrowserSites.js.map +1 -0
- package/lib/features/shopping/services/catalogProductSearch.js +21 -3
- package/lib/features/shopping/services/catalogProductSearch.js.map +1 -1
- package/lib/features/shopping/services/holidayDeals.js +143 -0
- package/lib/features/shopping/services/holidayDeals.js.map +1 -0
- package/lib/features/shopping/services/mediaShape.js +7 -0
- package/lib/features/shopping/services/mediaShape.js.map +1 -0
- package/lib/features/shopping/services/modelStep.js +95 -0
- package/lib/features/shopping/services/modelStep.js.map +1 -0
- package/lib/features/shopping/services/modelWords.js +14 -0
- package/lib/features/shopping/services/modelWords.js.map +1 -0
- package/lib/features/shopping/services/productAvailability.js +5 -1
- package/lib/features/shopping/services/productAvailability.js.map +1 -1
- package/lib/features/shopping/services/productFilters.js +2 -2
- package/lib/features/shopping/services/productFilters.js.map +1 -1
- package/lib/features/shopping/services/productMedia.js +103 -18
- package/lib/features/shopping/services/productMedia.js.map +1 -1
- package/lib/features/shopping/services/retailerUrl.js +11 -8
- package/lib/features/shopping/services/retailerUrl.js.map +1 -1
- package/lib/features/shopping/services/salesDealsStore.js +3 -2
- package/lib/features/shopping/services/salesDealsStore.js.map +1 -1
- package/lib/features/shopping/services/savedReads.js +82 -0
- package/lib/features/shopping/services/savedReads.js.map +1 -0
- package/lib/features/shopping/services/searchCardFields.js +2 -0
- package/lib/features/shopping/services/searchCardFields.js.map +1 -1
- package/lib/features/shopping/services/searchRelevance.js +154 -24
- package/lib/features/shopping/services/searchRelevance.js.map +1 -1
- package/lib/features/shopping/services/secondHand.js +12 -0
- package/lib/features/shopping/services/secondHand.js.map +1 -0
- package/lib/features/shopping/services/shoppingProductSearch.js +82 -10
- package/lib/features/shopping/services/shoppingProductSearch.js.map +1 -1
- package/lib/features/shopping/services/shoppingSearchConnectorClient.js +14 -1
- package/lib/features/shopping/services/shoppingSearchConnectorClient.js.map +1 -1
- package/lib/features/shopping/services/shoppingSubgraph.js +2 -1
- package/lib/features/shopping/services/shoppingSubgraph.js.map +1 -1
- package/lib/features/shopping/services/storedGalleries.js +130 -0
- package/lib/features/shopping/services/storedGalleries.js.map +1 -0
- package/lib/features/shopping/services/usedSites.js +263 -0
- package/lib/features/shopping/services/usedSites.js.map +1 -0
- package/lib/features/shopping/services/verifyProducts.js +3 -3
- package/lib/features/shopping/services/verifyProducts.js.map +1 -1
- package/lib/features/shopping/services/watchDeal.js +61 -0
- package/lib/features/shopping/services/watchDeal.js.map +1 -0
- package/lib/features/shopping/shoppingRuntime.js +7 -2
- package/lib/features/shopping/shoppingRuntime.js.map +1 -1
- package/lib/features/shopping/state/accountCaches.js +20 -0
- package/lib/features/shopping/state/accountCaches.js.map +1 -0
- package/lib/features/shopping/state/holidayDealsRequest.js +22 -0
- package/lib/features/shopping/state/holidayDealsRequest.js.map +1 -0
- package/lib/features/shopping/tutorials/ShoppingTutorialDock.js +1 -1
- package/lib/features/shopping/tutorials/ShoppingTutorialDock.js.map +1 -1
- package/lib/features/shopping/tutorials/shoppingTutorials.js +2 -0
- package/lib/features/shopping/tutorials/shoppingTutorials.js.map +1 -1
- package/lib/features/shopping/useShoppingSearch.js +74 -18
- package/lib/features/shopping/useShoppingSearch.js.map +1 -1
- package/lib/features/team-chat/TeamChatExperience.js +474 -0
- package/lib/features/team-chat/TeamChatExperience.js.map +1 -0
- package/lib/features/team-chat/api/client.js +198 -0
- package/lib/features/team-chat/api/client.js.map +1 -0
- package/lib/features/team-chat/api/live.js +160 -0
- package/lib/features/team-chat/api/live.js.map +1 -0
- package/lib/features/team-chat/api/ops.js +241 -0
- package/lib/features/team-chat/api/ops.js.map +1 -0
- package/lib/features/team-chat/app.js +12 -0
- package/lib/features/team-chat/app.js.map +1 -0
- package/lib/features/team-chat/components/Avatar.js +107 -0
- package/lib/features/team-chat/components/Avatar.js.map +1 -0
- package/lib/features/team-chat/components/Composer.js +641 -0
- package/lib/features/team-chat/components/Composer.js.map +1 -0
- package/lib/features/team-chat/components/Dialogs.js +598 -0
- package/lib/features/team-chat/components/Dialogs.js.map +1 -0
- package/lib/features/team-chat/components/EmojiPicker.js +165 -0
- package/lib/features/team-chat/components/EmojiPicker.js.map +1 -0
- package/lib/features/team-chat/components/MessageItem.js +658 -0
- package/lib/features/team-chat/components/MessageItem.js.map +1 -0
- package/lib/features/team-chat/components/MessageList.js +248 -0
- package/lib/features/team-chat/components/MessageList.js.map +1 -0
- package/lib/features/team-chat/components/Mrkdwn.js +228 -0
- package/lib/features/team-chat/components/Mrkdwn.js.map +1 -0
- package/lib/features/team-chat/components/QuickSwitcher.js +215 -0
- package/lib/features/team-chat/components/QuickSwitcher.js.map +1 -0
- package/lib/features/team-chat/components/ui.js +662 -0
- package/lib/features/team-chat/components/ui.js.map +1 -0
- package/lib/features/team-chat/nativeTeamChatRegistry.js +15 -0
- package/lib/features/team-chat/nativeTeamChatRegistry.js.map +1 -0
- package/lib/features/team-chat/state/fetched.js +39 -0
- package/lib/features/team-chat/state/fetched.js.map +1 -0
- package/lib/features/team-chat/state/lists.js +230 -0
- package/lib/features/team-chat/state/lists.js.map +1 -0
- package/lib/features/team-chat/state/store.js +1108 -0
- package/lib/features/team-chat/state/store.js.map +1 -0
- package/lib/features/team-chat/state/useChannelDirectory.js +21 -0
- package/lib/features/team-chat/state/useChannelDirectory.js.map +1 -0
- package/lib/features/team-chat/theme.js +77 -0
- package/lib/features/team-chat/theme.js.map +1 -0
- package/lib/features/team-chat/utils/composeText.js +72 -0
- package/lib/features/team-chat/utils/composeText.js.map +1 -0
- package/lib/features/team-chat/utils/emoji.js +369 -0
- package/lib/features/team-chat/utils/emoji.js.map +1 -0
- package/lib/features/team-chat/utils/format.js +109 -0
- package/lib/features/team-chat/utils/format.js.map +1 -0
- package/lib/features/team-chat/utils/messageRows.js +24 -0
- package/lib/features/team-chat/utils/messageRows.js.map +1 -0
- package/lib/features/team-chat/utils/mrkdwn.js +222 -0
- package/lib/features/team-chat/utils/mrkdwn.js.map +1 -0
- package/lib/features/team-chat/utils/notify.js +47 -0
- package/lib/features/team-chat/utils/notify.js.map +1 -0
- package/lib/features/team-chat/utils/pickFiles.js +81 -0
- package/lib/features/team-chat/utils/pickFiles.js.map +1 -0
- package/lib/features/team-chat/views/ActivityView.js +235 -0
- package/lib/features/team-chat/views/ActivityView.js.map +1 -0
- package/lib/features/team-chat/views/BrowseView.js +179 -0
- package/lib/features/team-chat/views/BrowseView.js.map +1 -0
- package/lib/features/team-chat/views/ChannelView.js +475 -0
- package/lib/features/team-chat/views/ChannelView.js.map +1 -0
- package/lib/features/team-chat/views/DetailsPane.js +816 -0
- package/lib/features/team-chat/views/DetailsPane.js.map +1 -0
- package/lib/features/team-chat/views/DraftsView.js +212 -0
- package/lib/features/team-chat/views/DraftsView.js.map +1 -0
- package/lib/features/team-chat/views/FilesView.js +152 -0
- package/lib/features/team-chat/views/FilesView.js.map +1 -0
- package/lib/features/team-chat/views/NewMessageView.js +286 -0
- package/lib/features/team-chat/views/NewMessageView.js.map +1 -0
- package/lib/features/team-chat/views/PeopleView.js +118 -0
- package/lib/features/team-chat/views/PeopleView.js.map +1 -0
- package/lib/features/team-chat/views/ProfilePane.js +220 -0
- package/lib/features/team-chat/views/ProfilePane.js.map +1 -0
- package/lib/features/team-chat/views/SavedView.js +113 -0
- package/lib/features/team-chat/views/SavedView.js.map +1 -0
- package/lib/features/team-chat/views/SearchView.js +307 -0
- package/lib/features/team-chat/views/SearchView.js.map +1 -0
- package/lib/features/team-chat/views/Sidebar.js +368 -0
- package/lib/features/team-chat/views/Sidebar.js.map +1 -0
- package/lib/features/team-chat/views/ThreadPane.js +139 -0
- package/lib/features/team-chat/views/ThreadPane.js.map +1 -0
- package/lib/features/team-chat/views/ThreadsView.js +157 -0
- package/lib/features/team-chat/views/ThreadsView.js.map +1 -0
- package/lib/features/webbuilder/WebBuilderExperience.js +276 -42
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/buildFragments.js +10 -4
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/components/AssetChips.js +61 -0
- package/lib/features/webbuilder/components/AssetChips.js.map +1 -0
- package/lib/features/webbuilder/components/AssetSiteChooser.js +100 -0
- package/lib/features/webbuilder/components/AssetSiteChooser.js.map +1 -0
- package/lib/features/webbuilder/components/CommentsLayer.js +485 -0
- package/lib/features/webbuilder/components/CommentsLayer.js.map +1 -0
- package/lib/features/webbuilder/components/Composer.js +16 -2
- package/lib/features/webbuilder/components/Composer.js.map +1 -1
- package/lib/features/webbuilder/components/ComposerModeSwitch.js +71 -0
- package/lib/features/webbuilder/components/ComposerModeSwitch.js.map +1 -0
- package/lib/features/webbuilder/components/MyAssetsPicker.js +500 -0
- package/lib/features/webbuilder/components/MyAssetsPicker.js.map +1 -0
- package/lib/features/webbuilder/components/PlanDocument.js +165 -0
- package/lib/features/webbuilder/components/PlanDocument.js.map +1 -0
- package/lib/features/webbuilder/components/PlanDraftCard.js +205 -0
- package/lib/features/webbuilder/components/PlanDraftCard.js.map +1 -0
- package/lib/features/webbuilder/components/PlanView.js +788 -0
- package/lib/features/webbuilder/components/PlanView.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewConsoleSheet.js +334 -0
- package/lib/features/webbuilder/components/PreviewConsoleSheet.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewFrame.js +45 -3
- package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewScreen.js +94 -10
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectChat.js +84 -14
- package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
- package/lib/features/webbuilder/components/StudioHome.js +69 -6
- package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
- package/lib/features/webbuilder/components/StyleDirectionsSheet.js +291 -0
- package/lib/features/webbuilder/components/StyleDirectionsSheet.js.map +1 -0
- package/lib/features/webbuilder/components/VersionChangesView.js +574 -0
- package/lib/features/webbuilder/components/VersionChangesView.js.map +1 -0
- package/lib/features/webbuilder/components/VersionPreviewView.js +186 -0
- package/lib/features/webbuilder/components/VersionPreviewView.js.map +1 -0
- package/lib/features/webbuilder/components/VersionsSheet.js +673 -16
- package/lib/features/webbuilder/components/VersionsSheet.js.map +1 -1
- package/lib/features/webbuilder/connectorTemplates.js +6 -1
- package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
- package/lib/features/webbuilder/myAssets.js +101 -0
- package/lib/features/webbuilder/myAssets.js.map +1 -0
- package/lib/features/webbuilder/planChat.js +146 -0
- package/lib/features/webbuilder/planChat.js.map +1 -0
- package/lib/features/webbuilder/planDocument.js +89 -0
- package/lib/features/webbuilder/planDocument.js.map +1 -0
- package/lib/features/webbuilder/planStore.js +55 -0
- package/lib/features/webbuilder/planStore.js.map +1 -0
- package/lib/features/webbuilder/previewCommentsScript.js +218 -0
- package/lib/features/webbuilder/previewCommentsScript.js.map +1 -0
- package/lib/features/webbuilder/previewConsoleScript.js +39 -0
- package/lib/features/webbuilder/previewConsoleScript.js.map +1 -0
- package/lib/features/webbuilder/styleDirections.js +85 -0
- package/lib/features/webbuilder/styleDirections.js.map +1 -0
- package/lib/features/webbuilder/useCanvasComments.js +335 -0
- package/lib/features/webbuilder/useCanvasComments.js.map +1 -0
- package/lib/features/webbuilder/useCatalogTemplates.js +37 -0
- package/lib/features/webbuilder/useCatalogTemplates.js.map +1 -0
- package/lib/features/webbuilder/usePlanMode.js +145 -0
- package/lib/features/webbuilder/usePlanMode.js.map +1 -0
- package/lib/features/webbuilder/useStyleDirections.js +112 -0
- package/lib/features/webbuilder/useStyleDirections.js.map +1 -0
- package/lib/features/webbuilder/web/assets/assetsApi.js +174 -0
- package/lib/features/webbuilder/web/assets/assetsApi.js.map +1 -0
- package/lib/features/webbuilder/web/assets/assetsApi.ts +173 -0
- package/lib/features/webbuilder/web/assets/myAssets.js +341 -0
- package/lib/features/webbuilder/web/assets/myAssets.js.map +1 -0
- package/lib/features/webbuilder/web/assets/myAssets.ts +396 -0
- package/lib/features/webbuilder/web/canvas/elementName.js +46 -0
- package/lib/features/webbuilder/web/canvas/elementName.js.map +1 -0
- package/lib/features/webbuilder/web/canvas/visualEditorBridge.js +95 -0
- package/lib/features/webbuilder/web/canvas/visualEditorBridge.js.map +1 -0
- package/lib/features/webbuilder/web/chat/agentTurn.js +24 -0
- package/lib/features/webbuilder/web/chat/agentTurn.js.map +1 -0
- package/lib/features/webbuilder/web/chat/planMode.js +164 -0
- package/lib/features/webbuilder/web/chat/planMode.js.map +1 -0
- package/lib/features/webbuilder/web/chat/realPlans.js +66 -0
- package/lib/features/webbuilder/web/chat/realPlans.js.map +1 -0
- package/lib/features/webbuilder/web/comments/comments.js +336 -0
- package/lib/features/webbuilder/web/comments/comments.js.map +1 -0
- package/lib/features/webbuilder/web/comments/commentsApi.js +59 -0
- package/lib/features/webbuilder/web/comments/commentsApi.js.map +1 -0
- package/lib/features/webbuilder/web/components/planView.js +21 -0
- package/lib/features/webbuilder/web/components/planView.js.map +1 -0
- package/lib/features/webbuilder/web/console/consolePanel.js +43 -0
- package/lib/features/webbuilder/web/console/consolePanel.js.map +1 -0
- package/lib/features/webbuilder/web/console/previewConsole.js +256 -0
- package/lib/features/webbuilder/web/console/previewConsole.js.map +1 -0
- package/lib/features/webbuilder/web/console/usePreviewConsole.js +147 -0
- package/lib/features/webbuilder/web/console/usePreviewConsole.js.map +1 -0
- package/lib/features/webbuilder/web/design/directions.js +419 -1
- package/lib/features/webbuilder/web/design/directions.js.map +1 -1
- package/lib/features/webbuilder/web/history/diffActions.js +222 -0
- package/lib/features/webbuilder/web/history/diffActions.js.map +1 -0
- package/lib/features/webbuilder/web/history/diffHighlight.js +18 -0
- package/lib/features/webbuilder/web/history/diffHighlight.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionActions.js +272 -0
- package/lib/features/webbuilder/web/history/versionActions.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionDiff.js +338 -0
- package/lib/features/webbuilder/web/history/versionDiff.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionPreview.js +83 -0
- package/lib/features/webbuilder/web/history/versionPreview.js.map +1 -0
- package/lib/features/webbuilder/web/history/versionPreviewMachine.js +150 -0
- package/lib/features/webbuilder/web/history/versionPreviewMachine.js.map +1 -0
- package/lib/features/webbuilder/web/history/versions.js +326 -1
- package/lib/features/webbuilder/web/history/versions.js.map +1 -1
- package/lib/features/webbuilder/web/hosted/hostedTurn.js +36 -0
- package/lib/features/webbuilder/web/hosted/hostedTurn.js.map +1 -0
- package/lib/features/webbuilder/web/studio/brandKit.js +25 -0
- package/lib/features/webbuilder/web/studio/brandKit.js.map +1 -0
- package/lib/features/webbuilder/web/utils/promptSafe.js +15 -0
- package/lib/features/webbuilder/web/utils/promptSafe.js.map +1 -0
- package/lib/features/webbuilder/web/webServices.js +3 -1
- package/lib/features/webbuilder/web/webServices.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes.json +55 -0
- package/lib/screens/Account/index.js +13 -5
- package/lib/screens/Account/index.js.map +1 -1
- package/lib/screens/Chat/index.js +16 -0
- package/lib/screens/Chat/index.js.map +1 -1
- package/lib/screens/Home/HomeScreen.js +202 -39
- package/lib/screens/Home/HomeScreen.js.map +1 -1
- package/lib/screens/Home/components/HomeHero.js +52 -38
- package/lib/screens/Home/components/HomeHero.js.map +1 -1
- package/lib/screens/Home/components/homeCatalog.js +8 -1
- package/lib/screens/Home/components/homeCatalog.js.map +1 -1
- package/lib/screens/TeamChat/index.js +41 -0
- package/lib/screens/TeamChat/index.js.map +1 -0
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +9 -2
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
- package/lib/screens/WebBuilderNative/index.js +13 -3
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/useConnectorTemplates.js +2 -2
- package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const text = (value) => typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
21
|
+
const num = (value) => typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
22
|
+
const BARE_CODE_LABEL = /^(?:[A-Z]{3}\s?[\d,.]+|[\d,.]+\s?[A-Z]{3})$/;
|
|
23
|
+
function formatAmount(value, currency, label) {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
25
|
+
const given = text(label);
|
|
26
|
+
if (given && !BARE_CODE_LABEL.test(given)) return given;
|
|
27
|
+
const source = value != null ? value : given == null ? void 0 : given.replace(/[A-Z]{3}/, "").trim();
|
|
28
|
+
const amount = (_a = num(source)) != null ? _a : typeof source === "string" ? Number(source.replace(/[^0-9.-]/g, "")) : void 0;
|
|
29
|
+
if (amount === void 0 || !Number.isFinite(amount)) return given;
|
|
30
|
+
const code = (_d = (_c = text(currency)) != null ? _c : (_b = given == null ? void 0 : given.match(/[A-Z]{3}/)) == null ? void 0 : _b[0]) == null ? void 0 : _d.toUpperCase();
|
|
31
|
+
if (code && /^[A-Z]{3}$/.test(code)) {
|
|
32
|
+
try {
|
|
33
|
+
return new Intl.NumberFormat(void 0, {
|
|
34
|
+
style: "currency",
|
|
35
|
+
currency: code,
|
|
36
|
+
maximumFractionDigits: Number.isInteger(amount) ? 0 : 2
|
|
37
|
+
}).format(amount);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return amount.toLocaleString(void 0, {
|
|
42
|
+
maximumFractionDigits: 2
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function wallClock(iso) {
|
|
46
|
+
const m = iso == null ? void 0 : iso.match(/T(\d{2}):(\d{2})/);
|
|
47
|
+
if (!m) return void 0;
|
|
48
|
+
return new Date(Date.UTC(2e3, 0, 1, Number(m[1]), Number(m[2]))).toLocaleTimeString(void 0, {
|
|
49
|
+
hour: "numeric",
|
|
50
|
+
minute: "2-digit",
|
|
51
|
+
timeZone: "UTC"
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function datePart(iso) {
|
|
55
|
+
const m = iso == null ? void 0 : iso.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
56
|
+
return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : void 0;
|
|
57
|
+
}
|
|
58
|
+
function dateLabel(iso) {
|
|
59
|
+
const parts = datePart(iso);
|
|
60
|
+
if (!parts) return void 0;
|
|
61
|
+
return new Date(Date.UTC(parts[0], parts[1] - 1, parts[2])).toLocaleDateString(void 0, {
|
|
62
|
+
weekday: "short",
|
|
63
|
+
month: "short",
|
|
64
|
+
day: "numeric",
|
|
65
|
+
timeZone: "UTC"
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function dayOffset(departAt, arriveAt) {
|
|
69
|
+
const from = datePart(departAt);
|
|
70
|
+
const to = datePart(arriveAt);
|
|
71
|
+
if (!from || !to) return void 0;
|
|
72
|
+
const days = Math.round((Date.UTC(to[0], to[1] - 1, to[2]) - Date.UTC(from[0], from[1] - 1, from[2])) / 864e5);
|
|
73
|
+
return days > 0 ? `+${days}` : void 0;
|
|
74
|
+
}
|
|
75
|
+
function durationLabel(minutes) {
|
|
76
|
+
if (minutes === void 0 || !Number.isFinite(minutes) || minutes <= 0) return void 0;
|
|
77
|
+
const h = Math.floor(minutes / 60);
|
|
78
|
+
const m = Math.round(minutes % 60);
|
|
79
|
+
if (!h) return `${m}m`;
|
|
80
|
+
return m ? `${h}h ${m}m` : `${h}h`;
|
|
81
|
+
}
|
|
82
|
+
function stopsLabel(stops) {
|
|
83
|
+
if (stops === void 0 || !Number.isFinite(stops) || stops < 0) return void 0;
|
|
84
|
+
if (stops === 0) return "Nonstop";
|
|
85
|
+
return stops === 1 ? "1 stop" : `${stops} stops`;
|
|
86
|
+
}
|
|
87
|
+
function compactCount(count) {
|
|
88
|
+
if (count === void 0 || !Number.isFinite(count) || count <= 0) return void 0;
|
|
89
|
+
return new Intl.NumberFormat(void 0, {
|
|
90
|
+
notation: "compact",
|
|
91
|
+
maximumFractionDigits: 1
|
|
92
|
+
}).format(count);
|
|
93
|
+
}
|
|
94
|
+
const HOSTNAME_RE = /^(?=.{3,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,24}$/;
|
|
95
|
+
function cleanDomain(raw) {
|
|
96
|
+
var _a;
|
|
97
|
+
const host = (_a = text(raw)) == null ? void 0 : _a.toLowerCase().replace(/^[a-z]+:\/\//, "").replace(/^www\./, "").split(/[/?#:]/)[0];
|
|
98
|
+
return host && HOSTNAME_RE.test(host) ? host : void 0;
|
|
99
|
+
}
|
|
100
|
+
const FAVICON_SERVICE = "https://www.google.com/s2/favicons";
|
|
101
|
+
function faviconUrl(domain) {
|
|
102
|
+
return `${FAVICON_SERVICE}?domain=${encodeURIComponent(domain)}&sz=64`;
|
|
103
|
+
}
|
|
104
|
+
function brandLogo(logo, domain, knownLogo) {
|
|
105
|
+
const url = text(logo);
|
|
106
|
+
if (url && /^https:\/\//i.test(url)) return url;
|
|
107
|
+
if (knownLogo) return knownLogo;
|
|
108
|
+
const host = cleanDomain(domain);
|
|
109
|
+
return host ? faviconUrl(host) : void 0;
|
|
110
|
+
}
|
|
111
|
+
function carrierCode(flightNumber) {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
return (_b = (_a = flightNumber == null ? void 0 : flightNumber.match(/^\s*([A-Z0-9]{2})\s*\d/i)) == null ? void 0 : _a[1]) == null ? void 0 : _b.toUpperCase();
|
|
114
|
+
}
|
|
115
|
+
function monogram(name, flightNumber) {
|
|
116
|
+
var _a;
|
|
117
|
+
const code = carrierCode(flightNumber);
|
|
118
|
+
if (code) return code;
|
|
119
|
+
const words = name.replace(/[^\p{L}\p{N}\s]/gu, " ").split(/\s+/).filter(Boolean);
|
|
120
|
+
return (words.length > 1 ? words[0][0] + words[1][0] : ((_a = words[0]) != null ? _a : "?").slice(0, 2)).toUpperCase();
|
|
121
|
+
}
|
|
122
|
+
const AIRLINES = {
|
|
123
|
+
akasaair: {
|
|
124
|
+
domain: "akasaair.com",
|
|
125
|
+
code: "QP"
|
|
126
|
+
},
|
|
127
|
+
akasa: {
|
|
128
|
+
domain: "akasaair.com",
|
|
129
|
+
code: "QP"
|
|
130
|
+
},
|
|
131
|
+
indigo: {
|
|
132
|
+
domain: "goindigo.in",
|
|
133
|
+
code: "6E"
|
|
134
|
+
},
|
|
135
|
+
airindia: {
|
|
136
|
+
domain: "airindia.com",
|
|
137
|
+
code: "AI"
|
|
138
|
+
},
|
|
139
|
+
airindiaexpress: {
|
|
140
|
+
domain: "airindiaexpress.com",
|
|
141
|
+
code: "IX"
|
|
142
|
+
},
|
|
143
|
+
spicejet: {
|
|
144
|
+
domain: "spicejet.com",
|
|
145
|
+
code: "SG"
|
|
146
|
+
},
|
|
147
|
+
vistara: {
|
|
148
|
+
domain: "airvistara.com"
|
|
149
|
+
},
|
|
150
|
+
allianceair: {
|
|
151
|
+
domain: "allianceair.in"
|
|
152
|
+
},
|
|
153
|
+
starair: {
|
|
154
|
+
domain: "starair.in"
|
|
155
|
+
},
|
|
156
|
+
emirates: {
|
|
157
|
+
domain: "emirates.com",
|
|
158
|
+
code: "EK"
|
|
159
|
+
},
|
|
160
|
+
qatarairways: {
|
|
161
|
+
domain: "qatarairways.com",
|
|
162
|
+
code: "QR"
|
|
163
|
+
},
|
|
164
|
+
etihad: {
|
|
165
|
+
domain: "etihad.com",
|
|
166
|
+
code: "EY"
|
|
167
|
+
},
|
|
168
|
+
etihadairways: {
|
|
169
|
+
domain: "etihad.com",
|
|
170
|
+
code: "EY"
|
|
171
|
+
},
|
|
172
|
+
singaporeairlines: {
|
|
173
|
+
domain: "singaporeair.com",
|
|
174
|
+
code: "SQ"
|
|
175
|
+
},
|
|
176
|
+
lufthansa: {
|
|
177
|
+
domain: "lufthansa.com",
|
|
178
|
+
code: "LH"
|
|
179
|
+
},
|
|
180
|
+
britishairways: {
|
|
181
|
+
domain: "britishairways.com",
|
|
182
|
+
code: "BA"
|
|
183
|
+
},
|
|
184
|
+
united: {
|
|
185
|
+
domain: "united.com",
|
|
186
|
+
code: "UA"
|
|
187
|
+
},
|
|
188
|
+
unitedairlines: {
|
|
189
|
+
domain: "united.com",
|
|
190
|
+
code: "UA"
|
|
191
|
+
},
|
|
192
|
+
delta: {
|
|
193
|
+
domain: "delta.com",
|
|
194
|
+
code: "DL"
|
|
195
|
+
},
|
|
196
|
+
deltaairlines: {
|
|
197
|
+
domain: "delta.com",
|
|
198
|
+
code: "DL"
|
|
199
|
+
},
|
|
200
|
+
american: {
|
|
201
|
+
domain: "aa.com",
|
|
202
|
+
code: "AA"
|
|
203
|
+
},
|
|
204
|
+
americanairlines: {
|
|
205
|
+
domain: "aa.com",
|
|
206
|
+
code: "AA"
|
|
207
|
+
},
|
|
208
|
+
jetblue: {
|
|
209
|
+
domain: "jetblue.com",
|
|
210
|
+
code: "B6"
|
|
211
|
+
},
|
|
212
|
+
southwest: {
|
|
213
|
+
domain: "southwest.com",
|
|
214
|
+
code: "WN"
|
|
215
|
+
},
|
|
216
|
+
southwestairlines: {
|
|
217
|
+
domain: "southwest.com",
|
|
218
|
+
code: "WN"
|
|
219
|
+
},
|
|
220
|
+
alaska: {
|
|
221
|
+
domain: "alaskaair.com",
|
|
222
|
+
code: "AS"
|
|
223
|
+
},
|
|
224
|
+
alaskaairlines: {
|
|
225
|
+
domain: "alaskaair.com",
|
|
226
|
+
code: "AS"
|
|
227
|
+
},
|
|
228
|
+
hawaiian: {
|
|
229
|
+
domain: "hawaiianairlines.com",
|
|
230
|
+
code: "HA"
|
|
231
|
+
},
|
|
232
|
+
hawaiianairlines: {
|
|
233
|
+
domain: "hawaiianairlines.com",
|
|
234
|
+
code: "HA"
|
|
235
|
+
},
|
|
236
|
+
allegiant: {
|
|
237
|
+
domain: "allegiantair.com",
|
|
238
|
+
code: "G4"
|
|
239
|
+
},
|
|
240
|
+
allegiantair: {
|
|
241
|
+
domain: "allegiantair.com",
|
|
242
|
+
code: "G4"
|
|
243
|
+
},
|
|
244
|
+
suncountry: {
|
|
245
|
+
domain: "suncountry.com",
|
|
246
|
+
code: "SY"
|
|
247
|
+
},
|
|
248
|
+
suncountryairlines: {
|
|
249
|
+
domain: "suncountry.com",
|
|
250
|
+
code: "SY"
|
|
251
|
+
},
|
|
252
|
+
aircanada: {
|
|
253
|
+
domain: "aircanada.com",
|
|
254
|
+
code: "AC"
|
|
255
|
+
},
|
|
256
|
+
westjet: {
|
|
257
|
+
domain: "westjet.com",
|
|
258
|
+
code: "WS"
|
|
259
|
+
},
|
|
260
|
+
ana: {
|
|
261
|
+
domain: "ana.co.jp",
|
|
262
|
+
code: "NH"
|
|
263
|
+
},
|
|
264
|
+
allnipponairways: {
|
|
265
|
+
domain: "ana.co.jp",
|
|
266
|
+
code: "NH"
|
|
267
|
+
},
|
|
268
|
+
jal: {
|
|
269
|
+
domain: "jal.co.jp",
|
|
270
|
+
code: "JL"
|
|
271
|
+
},
|
|
272
|
+
japanairlines: {
|
|
273
|
+
domain: "jal.co.jp",
|
|
274
|
+
code: "JL"
|
|
275
|
+
},
|
|
276
|
+
cathaypacific: {
|
|
277
|
+
domain: "cathaypacific.com",
|
|
278
|
+
code: "CX"
|
|
279
|
+
},
|
|
280
|
+
thaiairways: {
|
|
281
|
+
domain: "thaiairways.com",
|
|
282
|
+
code: "TG"
|
|
283
|
+
},
|
|
284
|
+
turkishairlines: {
|
|
285
|
+
domain: "turkishairlines.com",
|
|
286
|
+
code: "TK"
|
|
287
|
+
},
|
|
288
|
+
klm: {
|
|
289
|
+
domain: "klm.com",
|
|
290
|
+
code: "KL"
|
|
291
|
+
},
|
|
292
|
+
airfrance: {
|
|
293
|
+
domain: "airfrance.com",
|
|
294
|
+
code: "AF"
|
|
295
|
+
},
|
|
296
|
+
ryanair: {
|
|
297
|
+
domain: "ryanair.com",
|
|
298
|
+
code: "FR"
|
|
299
|
+
},
|
|
300
|
+
easyjet: {
|
|
301
|
+
domain: "easyjet.com",
|
|
302
|
+
code: "U2"
|
|
303
|
+
},
|
|
304
|
+
qantas: {
|
|
305
|
+
domain: "qantas.com",
|
|
306
|
+
code: "QF"
|
|
307
|
+
},
|
|
308
|
+
virginatlantic: {
|
|
309
|
+
domain: "virginatlantic.com",
|
|
310
|
+
code: "VS"
|
|
311
|
+
},
|
|
312
|
+
frontier: {
|
|
313
|
+
domain: "flyfrontier.com",
|
|
314
|
+
code: "F9"
|
|
315
|
+
},
|
|
316
|
+
frontierairlines: {
|
|
317
|
+
domain: "flyfrontier.com",
|
|
318
|
+
code: "F9"
|
|
319
|
+
},
|
|
320
|
+
spirit: {
|
|
321
|
+
domain: "spirit.com",
|
|
322
|
+
code: "NK"
|
|
323
|
+
},
|
|
324
|
+
spiritairlines: {
|
|
325
|
+
domain: "spirit.com",
|
|
326
|
+
code: "NK"
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
const AIRLINE_LOGO_SERVICE = "https://www.gstatic.com/flights/airline_logos/70px";
|
|
330
|
+
const AIRLINE_LOGO_CODES = new Set(Object.values(AIRLINES).flatMap(({
|
|
331
|
+
code
|
|
332
|
+
}) => code ? [code] : []));
|
|
333
|
+
function airlineEntry(airline) {
|
|
334
|
+
return airline ? AIRLINES[airline.toLowerCase().replace(/[^a-z]/g, "")] : void 0;
|
|
335
|
+
}
|
|
336
|
+
function airlineDomain(airline) {
|
|
337
|
+
var _a;
|
|
338
|
+
return (_a = airlineEntry(airline)) == null ? void 0 : _a.domain;
|
|
339
|
+
}
|
|
340
|
+
function airlineLogoUrl(airline, flightNumber) {
|
|
341
|
+
var _a;
|
|
342
|
+
const fromNumber = carrierCode(flightNumber);
|
|
343
|
+
const code = fromNumber && AIRLINE_LOGO_CODES.has(fromNumber) ? fromNumber : (_a = airlineEntry(airline)) == null ? void 0 : _a.code;
|
|
344
|
+
return code ? `${AIRLINE_LOGO_SERVICE}/${code}.png` : void 0;
|
|
345
|
+
}
|
|
346
|
+
const GOOGLE_FLIGHTS = "https://www.google.com/travel/flights";
|
|
347
|
+
function flightSearchUrl(from, to, departDate, returnDate) {
|
|
348
|
+
const trip = returnDate ? `through ${returnDate}` : "one way";
|
|
349
|
+
return `${GOOGLE_FLIGHTS}?q=${encodeURIComponent(`Flights from ${from} to ${to} on ${departDate} ${trip}`)}`;
|
|
350
|
+
}
|
|
351
|
+
const isoDay = (iso) => {
|
|
352
|
+
var _a;
|
|
353
|
+
return (_a = iso == null ? void 0 : iso.match(/^\d{4}-\d{2}-\d{2}/)) == null ? void 0 : _a[0];
|
|
354
|
+
};
|
|
355
|
+
function flightLink(url, flight, departAt, returnAt) {
|
|
356
|
+
if (url) {
|
|
357
|
+
const site = /^https?:\/\/(www\.)?google\.[a-z.]+\/travel\/flights/i.test(url) ? "Google Flights" : cleanDomain(url);
|
|
358
|
+
const name = [flight.airline, flight.flightNumber].filter(Boolean).join(" ");
|
|
359
|
+
return {
|
|
360
|
+
href: url,
|
|
361
|
+
label: `Book ${name} on ${site != null ? site : "its site"}`,
|
|
362
|
+
exact: true
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
const day = isoDay(departAt);
|
|
366
|
+
if (!flight.from || !flight.to || !day) return void 0;
|
|
367
|
+
return {
|
|
368
|
+
href: flightSearchUrl(flight.from, flight.to, day, isoDay(returnAt)),
|
|
369
|
+
label: `Find the ${flight.departs ? `${flight.departs} ` : ""}${flight.airline} flight on Google Flights`,
|
|
370
|
+
exact: false
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
function flightTitle(rows, firstDepart) {
|
|
374
|
+
const first = rows[0];
|
|
375
|
+
const route = (first == null ? void 0 : first.from) && (first == null ? void 0 : first.to) ? `${first.from} \u2192 ${first.to}` : "Flights";
|
|
376
|
+
const date = dateLabel(firstDepart);
|
|
377
|
+
return date ? `${route} \xB7 ${date}` : route;
|
|
378
|
+
}
|
|
379
|
+
function standoutLowest(values) {
|
|
380
|
+
const known = values.filter((value) => value !== void 0);
|
|
381
|
+
const lowest = Math.min(...known);
|
|
382
|
+
return known.some((value) => value !== lowest) ? lowest : void 0;
|
|
383
|
+
}
|
|
384
|
+
function toFlightResults(attachment, limit = 6) {
|
|
385
|
+
var _a, _b, _c, _d, _e;
|
|
386
|
+
const set = attachment != null ? attachment : {};
|
|
387
|
+
const offers = (Array.isArray(set.properties) ? set.properties : []).filter((offer) => {
|
|
388
|
+
var _a2, _b2, _c2;
|
|
389
|
+
return ((_c2 = (_b2 = (_a2 = offer == null ? void 0 : offer.flight) == null ? void 0 : _a2.slices) == null ? void 0 : _b2.length) != null ? _c2 : 0) > 0;
|
|
390
|
+
});
|
|
391
|
+
if (offers.length === 0) return null;
|
|
392
|
+
const prices = [];
|
|
393
|
+
const minutes = [];
|
|
394
|
+
const rows = offers.slice(0, limit).map((offer, index) => {
|
|
395
|
+
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j;
|
|
396
|
+
const flight = (_a2 = offer.flight) != null ? _a2 : {};
|
|
397
|
+
const out = (_c2 = (_b2 = flight.slices) == null ? void 0 : _b2[0]) != null ? _c2 : {};
|
|
398
|
+
const back = flight.slices && flight.slices.length > 1 ? flight.slices[flight.slices.length - 1] : void 0;
|
|
399
|
+
const airline = (_e2 = (_d2 = text(flight.airline)) != null ? _d2 : text(offer.title)) != null ? _e2 : "Flight";
|
|
400
|
+
const flightNumber = text((_f = flight.flightNumbers) == null ? void 0 : _f[0]);
|
|
401
|
+
const price = formatAmount(offer.price, set.currency, offer.priceLabel);
|
|
402
|
+
const departs = wallClock(out.departAt);
|
|
403
|
+
const from = (_g = text(out.origin)) == null ? void 0 : _g.toUpperCase();
|
|
404
|
+
const to = (_h = text(out.destination)) == null ? void 0 : _h.toUpperCase();
|
|
405
|
+
prices.push(num(offer.price));
|
|
406
|
+
minutes.push(num(out.durationMinutes));
|
|
407
|
+
const backDeparts = wallClock(back == null ? void 0 : back.departAt);
|
|
408
|
+
const backArrives = wallClock(back == null ? void 0 : back.arriveAt);
|
|
409
|
+
const when = dateLabel(out.departAt);
|
|
410
|
+
const url = text(offer.url);
|
|
411
|
+
const link = flightLink(url && /^https?:\/\//i.test(url) ? url : void 0, {
|
|
412
|
+
airline,
|
|
413
|
+
flightNumber,
|
|
414
|
+
departs,
|
|
415
|
+
from,
|
|
416
|
+
to
|
|
417
|
+
}, out.departAt, back == null ? void 0 : back.departAt);
|
|
418
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
419
|
+
key: (_i = text(offer.id)) != null ? _i : `${airline}-${flightNumber != null ? flightNumber : index}-${index}`,
|
|
420
|
+
airline,
|
|
421
|
+
logo: brandLogo(flight.airlineLogo, (_j = flight.airlineDomain) != null ? _j : airlineDomain(airline), airlineLogoUrl(airline, flightNumber)),
|
|
422
|
+
monogram: monogram(airline, flightNumber)
|
|
423
|
+
}, flightNumber ? {
|
|
424
|
+
flightNumber
|
|
425
|
+
} : {}), from ? {
|
|
426
|
+
from
|
|
427
|
+
} : {}), to ? {
|
|
428
|
+
to
|
|
429
|
+
} : {}), departs ? {
|
|
430
|
+
departs
|
|
431
|
+
} : {}), wallClock(out.arriveAt) ? {
|
|
432
|
+
arrives: wallClock(out.arriveAt)
|
|
433
|
+
} : {}), dayOffset(out.departAt, out.arriveAt) ? {
|
|
434
|
+
arrivesDayOffset: dayOffset(out.departAt, out.arriveAt)
|
|
435
|
+
} : {}), durationLabel(out.durationMinutes) ? {
|
|
436
|
+
duration: durationLabel(out.durationMinutes)
|
|
437
|
+
} : {}), stopsLabel(out.stops) ? {
|
|
438
|
+
stops: stopsLabel(out.stops)
|
|
439
|
+
} : {}), price ? {
|
|
440
|
+
price
|
|
441
|
+
} : {}), link ? {
|
|
442
|
+
link
|
|
443
|
+
} : {}), backDeparts ? {
|
|
444
|
+
returnLeg: `Return ${backDeparts}${backArrives ? ` \u2192 ${backArrives}` : ""}`
|
|
445
|
+
} : {}), {
|
|
446
|
+
badges: [],
|
|
447
|
+
reply: [`Book the ${departs ? `${departs} ` : ""}${airline} flight`, flightNumber ? ` ${flightNumber}` : "", from && to ? ` from ${from} to ${to}` : "", when ? ` on ${when}` : "", price ? ` (${price})` : "", "."].join("")
|
|
448
|
+
});
|
|
449
|
+
});
|
|
450
|
+
if (rows.length > 1) rows[0].badges.push("best");
|
|
451
|
+
const lowest = standoutLowest(prices.slice(0, rows.length));
|
|
452
|
+
const quickest = standoutLowest(minutes.slice(0, rows.length));
|
|
453
|
+
rows.forEach((row, index) => {
|
|
454
|
+
if (lowest !== void 0 && prices[index] === lowest) row.badges.push("cheapest");
|
|
455
|
+
if (quickest !== void 0 && minutes[index] === quickest) row.badges.push("fastest");
|
|
456
|
+
});
|
|
457
|
+
const firstDepart = (_c = (_b = (_a = offers[0].flight) == null ? void 0 : _a.slices) == null ? void 0 : _b[0]) == null ? void 0 : _c.departAt;
|
|
458
|
+
const allNonstop = offers.every((offer) => {
|
|
459
|
+
var _a2, _b2;
|
|
460
|
+
return (_b2 = (_a2 = offer.flight) == null ? void 0 : _a2.slices) == null ? void 0 : _b2.every((slice) => slice.stops === 0);
|
|
461
|
+
});
|
|
462
|
+
const total = Math.max((_d = num(set.totalCount)) != null ? _d : 0, offers.length);
|
|
463
|
+
const title = (_e = text(set.title)) != null ? _e : flightTitle(rows, firstDepart);
|
|
464
|
+
const origins = new Set(rows.map((row) => row.from));
|
|
465
|
+
const [origin] = origins;
|
|
466
|
+
const originInTitle = origins.size === 1 && !!origin && /^[A-Z]{3}$/.test(origin) && new RegExp(`\\b${origin}\\b`).test(title.toUpperCase());
|
|
467
|
+
return {
|
|
468
|
+
title,
|
|
469
|
+
subtitle: [`${total} ${total === 1 ? "flight" : "flights"}`, allNonstop ? "nonstop" : void 0].filter(Boolean).join(" \xB7 "),
|
|
470
|
+
rows,
|
|
471
|
+
totalCount: total,
|
|
472
|
+
columns: {
|
|
473
|
+
from: rows.some((row) => row.from) && !originInTitle,
|
|
474
|
+
departs: rows.some((row) => row.departs),
|
|
475
|
+
arrives: rows.some((row) => row.arrives),
|
|
476
|
+
duration: rows.some((row) => row.duration),
|
|
477
|
+
stops: !allNonstop && rows.some((row) => row.stops),
|
|
478
|
+
price: rows.some((row) => row.price)
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
const GENERIC_SOURCES = /^(shopping[-_ ]?search|search|web|chat|yantra.*)$/i;
|
|
483
|
+
function storeName(item) {
|
|
484
|
+
var _a, _b;
|
|
485
|
+
const name = (_b = (_a = text(item.sourceLabel)) != null ? _a : text(item.provider)) != null ? _b : text(item.source);
|
|
486
|
+
if (!name || GENERIC_SOURCES.test(name)) return void 0;
|
|
487
|
+
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
488
|
+
}
|
|
489
|
+
function capitalize(value) {
|
|
490
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
491
|
+
}
|
|
492
|
+
function toProductResults(attachment, limit = 5) {
|
|
493
|
+
var _a, _b;
|
|
494
|
+
const set = attachment != null ? attachment : {};
|
|
495
|
+
const items = (Array.isArray(set.properties) ? set.properties : []).filter((item) => text(item == null ? void 0 : item.title));
|
|
496
|
+
if (items.length === 0) return null;
|
|
497
|
+
const prices = [];
|
|
498
|
+
const rows = items.slice(0, limit).map((item, index) => {
|
|
499
|
+
var _a2, _b2, _c, _d, _e;
|
|
500
|
+
const title = text(item.title);
|
|
501
|
+
const currency = (_a2 = text(item.currency)) != null ? _a2 : set.currency;
|
|
502
|
+
const price = formatAmount(item.price, currency, item.priceLabel);
|
|
503
|
+
const wasPrice = formatAmount(item.wasPrice, currency, item.wasPriceLabel);
|
|
504
|
+
const rating = num(item.rating);
|
|
505
|
+
const reviews = compactCount((_b2 = num(item.reviewCount)) != null ? _b2 : num(item.reviews));
|
|
506
|
+
prices.push(num(item.price));
|
|
507
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
508
|
+
key: (_c = text(item.id)) != null ? _c : `${title}-${index}`,
|
|
509
|
+
title
|
|
510
|
+
}, text(item.imageUrl) && /^https?:\/\//i.test(item.imageUrl) ? {
|
|
511
|
+
imageUrl: item.imageUrl
|
|
512
|
+
} : {}), rating !== void 0 && rating > 0 ? {
|
|
513
|
+
rating: rating.toFixed(1)
|
|
514
|
+
} : {}), reviews ? {
|
|
515
|
+
reviews
|
|
516
|
+
} : {}), ((_d = text(item.note)) != null ? _d : text(item.detail)) ? {
|
|
517
|
+
detail: (_e = text(item.note)) != null ? _e : text(item.detail)
|
|
518
|
+
} : {}), price ? {
|
|
519
|
+
price
|
|
520
|
+
} : {}), wasPrice && wasPrice !== price ? {
|
|
521
|
+
wasPrice
|
|
522
|
+
} : {}), text(item.url) && /^https?:\/\//i.test(item.url) ? {
|
|
523
|
+
url: item.url
|
|
524
|
+
} : {}), {
|
|
525
|
+
badges: [],
|
|
526
|
+
reply: `I'll take the ${title}${price ? ` (${price})` : ""}.`
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
if (rows.length > 1) {
|
|
530
|
+
rows[0].badges.push("best");
|
|
531
|
+
const lowest = standoutLowest(prices);
|
|
532
|
+
rows.forEach((row, index) => {
|
|
533
|
+
if (lowest !== void 0 && prices[index] === lowest) row.badges.push("cheapest");
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
const store = storeName(items[0]);
|
|
537
|
+
const total = Math.max((_a = num(set.totalCount)) != null ? _a : 0, items.length);
|
|
538
|
+
return {
|
|
539
|
+
title: (_b = text(set.title)) != null ? _b : text(set.query) ? capitalize(text(set.query)) : "Products",
|
|
540
|
+
subtitle: [`${total} ${total === 1 ? "result" : "results"}`, store ? `on ${store}` : void 0].filter(Boolean).join(" \xB7 "),
|
|
541
|
+
rows,
|
|
542
|
+
totalCount: total
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
const BOOKING_STATUSES = ["review", "processing", "payment_due", "declined", "confirmed", "cancelled"];
|
|
546
|
+
const BOOKING_KINDS = ["flight", "stay", "order", "other"];
|
|
547
|
+
function bookingKind(a) {
|
|
548
|
+
if (BOOKING_KINDS.includes(a.kind)) return a.kind;
|
|
549
|
+
return a.trip ? "flight" : "order";
|
|
550
|
+
}
|
|
551
|
+
const GO_AHEAD = {
|
|
552
|
+
flight: "book it",
|
|
553
|
+
stay: "book it",
|
|
554
|
+
order: "place the order",
|
|
555
|
+
other: "go ahead"
|
|
556
|
+
};
|
|
557
|
+
function bookingStatusLabel(status, kind, note, reference) {
|
|
558
|
+
if (status === "processing") return kind === "order" ? "Placing your order\u2026" : "Booking\u2026";
|
|
559
|
+
if (status === "payment_due") return note != null ? note : `${kind === "order" ? "Order placed" : "Reserved"}${reference ? ` \xB7 ${reference}` : ""} \xB7 waiting for payment`;
|
|
560
|
+
if (status === "declined") return note != null ? note : "Payment declined";
|
|
561
|
+
if (status === "confirmed") return `${kind === "order" ? "Order placed" : "Booked"}${reference ? ` \xB7 ${reference}` : ""}`;
|
|
562
|
+
if (status === "cancelled") return note != null ? note : "Cancelled";
|
|
563
|
+
return note;
|
|
564
|
+
}
|
|
565
|
+
function toBookingView(attachment) {
|
|
566
|
+
var _a, _b, _c, _d;
|
|
567
|
+
const a = attachment != null ? attachment : {};
|
|
568
|
+
const vendor = text(a.vendor);
|
|
569
|
+
const total = formatAmount(a.total, a.currency, a.totalLabel);
|
|
570
|
+
if (!vendor && !total) return null;
|
|
571
|
+
const kind = bookingKind(a);
|
|
572
|
+
const status = BOOKING_STATUSES.includes(a.status) ? a.status : "review";
|
|
573
|
+
const name = vendor != null ? vendor : "Your booking";
|
|
574
|
+
const {
|
|
575
|
+
trip
|
|
576
|
+
} = a;
|
|
577
|
+
const tripView = trip ? __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, text(trip.origin) ? {
|
|
578
|
+
from: text(trip.origin).toUpperCase()
|
|
579
|
+
} : {}), text(trip.destination) ? {
|
|
580
|
+
to: text(trip.destination).toUpperCase()
|
|
581
|
+
} : {}), wallClock(trip.departAt) ? {
|
|
582
|
+
departs: wallClock(trip.departAt)
|
|
583
|
+
} : {}), wallClock(trip.arriveAt) ? {
|
|
584
|
+
arrives: wallClock(trip.arriveAt)
|
|
585
|
+
} : {}), dayOffset(trip.departAt, trip.arriveAt) ? {
|
|
586
|
+
arrivesDayOffset: dayOffset(trip.departAt, trip.arriveAt)
|
|
587
|
+
} : {}), durationLabel(trip.durationMinutes) ? {
|
|
588
|
+
duration: durationLabel(trip.durationMinutes)
|
|
589
|
+
} : {}), stopsLabel(trip.stops) ? {
|
|
590
|
+
stops: stopsLabel(trip.stops)
|
|
591
|
+
} : {}), text(trip.flightNumber) ? {
|
|
592
|
+
flightNumber: text(trip.flightNumber)
|
|
593
|
+
} : {}) : void 0;
|
|
594
|
+
const date = (_b = (_a = dateLabel(a.date)) != null ? _a : dateLabel(trip == null ? void 0 : trip.departAt)) != null ? _b : text(a.date);
|
|
595
|
+
const reference = text(a.reference);
|
|
596
|
+
const what = [name, text(a.title), date ? `on ${date}` : void 0].filter(Boolean).join(", ");
|
|
597
|
+
let action = null;
|
|
598
|
+
if (status === "review") {
|
|
599
|
+
action = {
|
|
600
|
+
// The go-ahead, not the payment: the card's money moves later, on the payment page or the
|
|
601
|
+
// payment card, so the button never says "pay".
|
|
602
|
+
label: (_c = text(a.confirmLabel)) != null ? _c : `${capitalize(GO_AHEAD[kind])}${total ? ` \xB7 ${total}` : ""}`,
|
|
603
|
+
reply: `Yes, ${GO_AHEAD[kind]}: ${what}${total ? `, ${total} total` : ""}.`
|
|
604
|
+
};
|
|
605
|
+
} else if (status === "declined") {
|
|
606
|
+
action = {
|
|
607
|
+
label: total ? `Retry ${total}` : "Retry payment",
|
|
608
|
+
reply: `Retry the payment: ${what}${total ? `, ${total} total` : ""}.`
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
const statusLabel = bookingStatusLabel(status, kind, text(a.statusNote), reference);
|
|
612
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
613
|
+
kind,
|
|
614
|
+
vendor: name,
|
|
615
|
+
logo: brandLogo(a.vendorLogo, (_d = a.vendorDomain) != null ? _d : kind === "flight" ? airlineDomain(vendor) : void 0, kind === "flight" ? airlineLogoUrl(vendor, tripView == null ? void 0 : tripView.flightNumber) : void 0),
|
|
616
|
+
monogram: monogram(name, tripView == null ? void 0 : tripView.flightNumber)
|
|
617
|
+
}, text(a.title) ? {
|
|
618
|
+
title: text(a.title)
|
|
619
|
+
} : {}), date ? {
|
|
620
|
+
date
|
|
621
|
+
} : {}), tripView && Object.keys(tripView).length > 0 ? {
|
|
622
|
+
trip: tripView
|
|
623
|
+
} : {}), {
|
|
624
|
+
items: (Array.isArray(a.items) ? a.items : []).filter((item) => text(item == null ? void 0 : item.title)).map((item, index) => __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
625
|
+
key: `${text(item.title)}-${index}`,
|
|
626
|
+
title: text(item.title)
|
|
627
|
+
}, text(item.detail) ? {
|
|
628
|
+
detail: text(item.detail)
|
|
629
|
+
} : {}), num(item.quantity) && item.quantity > 1 ? {
|
|
630
|
+
quantity: item.quantity
|
|
631
|
+
} : {}), formatAmount(item.price, a.currency, item.priceLabel) ? {
|
|
632
|
+
price: formatAmount(item.price, a.currency, item.priceLabel)
|
|
633
|
+
} : {}), text(item.imageUrl) && /^https?:\/\//i.test(item.imageUrl) ? {
|
|
634
|
+
imageUrl: item.imageUrl
|
|
635
|
+
} : {})),
|
|
636
|
+
lines: (Array.isArray(a.lines) ? a.lines : []).filter((line) => text(line == null ? void 0 : line.label) && text(line == null ? void 0 : line.value)).map((line) => ({
|
|
637
|
+
label: text(line.label),
|
|
638
|
+
value: text(line.value)
|
|
639
|
+
})),
|
|
640
|
+
charges: (Array.isArray(a.charges) ? a.charges : []).flatMap((charge) => {
|
|
641
|
+
const label = text(charge == null ? void 0 : charge.label);
|
|
642
|
+
const amount = formatAmount(charge == null ? void 0 : charge.amount, a.currency, charge == null ? void 0 : charge.amountLabel);
|
|
643
|
+
return label && amount ? [{
|
|
644
|
+
label,
|
|
645
|
+
amount
|
|
646
|
+
}] : [];
|
|
647
|
+
})
|
|
648
|
+
}), total ? {
|
|
649
|
+
total
|
|
650
|
+
} : {}), {
|
|
651
|
+
status
|
|
652
|
+
}), statusLabel ? {
|
|
653
|
+
statusLabel
|
|
654
|
+
} : {}), reference ? {
|
|
655
|
+
reference
|
|
656
|
+
} : {}), {
|
|
657
|
+
action
|
|
658
|
+
});
|
|
659
|
+
}export{airlineDomain,airlineLogoUrl,brandLogo,cleanDomain,compactCount,dateLabel,dayOffset,durationLabel,faviconUrl,flightSearchUrl,formatAmount,monogram,stopsLabel,toBookingView,toFlightResults,toProductResults,wallClock};//# sourceMappingURL=resultCardModels.js.map
|